diff options
106 files changed, 1475 insertions, 2060 deletions
diff --git a/apex/media/framework/Android.bp b/apex/media/framework/Android.bp index 1bf732ba33f2..d963e68d80ec 100644 --- a/apex/media/framework/Android.bp +++ b/apex/media/framework/Android.bp @@ -120,7 +120,7 @@ filegroup { srcs: [ "java/android/media/ApplicationMediaCapabilities.java", "java/android/media/MediaFeature.java", - "java/android/media/MediaTranscodeManager.java", + "java/android/media/MediaTranscodingManager.java", ], path: "java", } diff --git a/apex/media/framework/api/system-current.txt b/apex/media/framework/api/system-current.txt index ce68447df051..6eea769d9f57 100644 --- a/apex/media/framework/api/system-current.txt +++ b/apex/media/framework/api/system-current.txt @@ -1,15 +1,15 @@ // Signature format: 2.0 package android.media { - public final class MediaTranscodeManager { - method @Nullable public android.media.MediaTranscodeManager.TranscodingSession enqueueRequest(@NonNull android.media.MediaTranscodeManager.TranscodingRequest, @NonNull java.util.concurrent.Executor, @NonNull android.media.MediaTranscodeManager.OnTranscodingFinishedListener); + public final class MediaTranscodingManager { + method @Nullable public android.media.MediaTranscodingManager.TranscodingSession enqueueRequest(@NonNull android.media.MediaTranscodingManager.TranscodingRequest, @NonNull java.util.concurrent.Executor, @NonNull android.media.MediaTranscodingManager.OnTranscodingFinishedListener); } - @java.lang.FunctionalInterface public static interface MediaTranscodeManager.OnTranscodingFinishedListener { - method public void onTranscodingFinished(@NonNull android.media.MediaTranscodeManager.TranscodingSession); + @java.lang.FunctionalInterface public static interface MediaTranscodingManager.OnTranscodingFinishedListener { + method public void onTranscodingFinished(@NonNull android.media.MediaTranscodingManager.TranscodingSession); } - public abstract static class MediaTranscodeManager.TranscodingRequest { + public abstract static class MediaTranscodingManager.TranscodingRequest { method public int getClientPid(); method public int getClientUid(); method @Nullable public android.os.ParcelFileDescriptor getDestinationFileDescriptor(); @@ -18,13 +18,13 @@ package android.media { method @NonNull public android.net.Uri getSourceUri(); } - public static class MediaTranscodeManager.TranscodingRequest.VideoFormatResolver { - ctor public MediaTranscodeManager.TranscodingRequest.VideoFormatResolver(@NonNull android.media.ApplicationMediaCapabilities, @NonNull android.media.MediaFormat); + public static class MediaTranscodingManager.TranscodingRequest.VideoFormatResolver { + ctor public MediaTranscodingManager.TranscodingRequest.VideoFormatResolver(@NonNull android.media.ApplicationMediaCapabilities, @NonNull android.media.MediaFormat); method @Nullable public android.media.MediaFormat resolveVideoFormat(); method public boolean shouldTranscode(); } - public static final class MediaTranscodeManager.TranscodingSession { + public static final class MediaTranscodingManager.TranscodingSession { method public boolean addClientUid(int); method public void cancel(); method @NonNull public java.util.List<java.lang.Integer> getClientUids(); @@ -33,7 +33,7 @@ package android.media { method public int getResult(); method public int getSessionId(); method public int getStatus(); - method public void setOnProgressUpdateListener(@NonNull java.util.concurrent.Executor, @Nullable android.media.MediaTranscodeManager.TranscodingSession.OnProgressUpdateListener); + method public void setOnProgressUpdateListener(@NonNull java.util.concurrent.Executor, @Nullable android.media.MediaTranscodingManager.TranscodingSession.OnProgressUpdateListener); field public static final int ERROR_DROPPED_BY_SERVICE = 1; // 0x1 field public static final int ERROR_NONE = 0; // 0x0 field public static final int ERROR_SERVICE_DIED = 2; // 0x2 @@ -47,21 +47,21 @@ package android.media { field public static final int STATUS_RUNNING = 2; // 0x2 } - @java.lang.FunctionalInterface public static interface MediaTranscodeManager.TranscodingSession.OnProgressUpdateListener { - method public void onProgressUpdate(@NonNull android.media.MediaTranscodeManager.TranscodingSession, @IntRange(from=0, to=100) int); + @java.lang.FunctionalInterface public static interface MediaTranscodingManager.TranscodingSession.OnProgressUpdateListener { + method public void onProgressUpdate(@NonNull android.media.MediaTranscodingManager.TranscodingSession, @IntRange(from=0, to=100) int); } - public static final class MediaTranscodeManager.VideoTranscodingRequest extends android.media.MediaTranscodeManager.TranscodingRequest { + public static final class MediaTranscodingManager.VideoTranscodingRequest extends android.media.MediaTranscodingManager.TranscodingRequest { method @NonNull public android.media.MediaFormat getVideoTrackFormat(); } - public static final class MediaTranscodeManager.VideoTranscodingRequest.Builder { - ctor public MediaTranscodeManager.VideoTranscodingRequest.Builder(@NonNull android.net.Uri, @NonNull android.net.Uri, @NonNull android.media.MediaFormat); - method @NonNull public android.media.MediaTranscodeManager.VideoTranscodingRequest build(); - method @NonNull public android.media.MediaTranscodeManager.VideoTranscodingRequest.Builder setClientPid(int); - method @NonNull public android.media.MediaTranscodeManager.VideoTranscodingRequest.Builder setClientUid(int); - method @NonNull public android.media.MediaTranscodeManager.VideoTranscodingRequest.Builder setDestinationFileDescriptor(@NonNull android.os.ParcelFileDescriptor); - method @NonNull public android.media.MediaTranscodeManager.VideoTranscodingRequest.Builder setSourceFileDescriptor(@NonNull android.os.ParcelFileDescriptor); + public static final class MediaTranscodingManager.VideoTranscodingRequest.Builder { + ctor public MediaTranscodingManager.VideoTranscodingRequest.Builder(@NonNull android.net.Uri, @NonNull android.net.Uri, @NonNull android.media.MediaFormat); + method @NonNull public android.media.MediaTranscodingManager.VideoTranscodingRequest build(); + method @NonNull public android.media.MediaTranscodingManager.VideoTranscodingRequest.Builder setClientPid(int); + method @NonNull public android.media.MediaTranscodingManager.VideoTranscodingRequest.Builder setClientUid(int); + method @NonNull public android.media.MediaTranscodingManager.VideoTranscodingRequest.Builder setDestinationFileDescriptor(@NonNull android.os.ParcelFileDescriptor); + method @NonNull public android.media.MediaTranscodingManager.VideoTranscodingRequest.Builder setSourceFileDescriptor(@NonNull android.os.ParcelFileDescriptor); } } diff --git a/apex/media/framework/java/android/media/MediaFrameworkInitializer.java b/apex/media/framework/java/android/media/MediaFrameworkInitializer.java index de2924e160b6..75a56b7231d9 100644 --- a/apex/media/framework/java/android/media/MediaFrameworkInitializer.java +++ b/apex/media/framework/java/android/media/MediaFrameworkInitializer.java @@ -75,8 +75,8 @@ public class MediaFrameworkInitializer { public static void registerServiceWrappers() { SystemServiceRegistry.registerContextAwareService( Context.MEDIA_TRANSCODING_SERVICE, - MediaTranscodeManager.class, - context -> new MediaTranscodeManager(context) + MediaTranscodingManager.class, + context -> new MediaTranscodingManager(context) ); if (SdkLevel.isAtLeastS()) { SystemServiceRegistry.registerContextAwareService( diff --git a/apex/media/framework/java/android/media/MediaTranscodeManager.java b/apex/media/framework/java/android/media/MediaTranscodingManager.java index 5742d43f83b7..93d58d07f81a 100644 --- a/apex/media/framework/java/android/media/MediaTranscodeManager.java +++ b/apex/media/framework/java/android/media/MediaTranscodingManager.java @@ -54,7 +54,7 @@ import java.util.concurrent.Executors; /** Android 12 introduces Compatible media transcoding feature. See <a href="https://developer.android.com/about/versions/12/features#compatible_media_transcoding"> - Compatible media transcoding</a>. MediaTranscodeManager provides an interface to the system's media + Compatible media transcoding</a>. MediaTranscodingManager provides an interface to the system's media transcoding service and can be used to transcode media files, e.g. transcoding a video from HEVC to AVC. @@ -69,7 +69,7 @@ import java.util.concurrent.Executors; <p> To transcode a media file, first create a {@link TranscodingRequest} through its builder class {@link VideoTranscodingRequest.Builder}. Transcode requests are then enqueue to the manager through - {@link MediaTranscodeManager#enqueueRequest( + {@link MediaTranscodingManager#enqueueRequest( TranscodingRequest, Executor, OnTranscodingFinishedListener)} TranscodeRequest are processed based on client process's priority and request priority. When a transcode operation is completed the caller is notified via its @@ -87,8 +87,8 @@ import java.util.concurrent.Executors; */ @MinSdk(Build.VERSION_CODES.S) @SystemApi -public final class MediaTranscodeManager { - private static final String TAG = "MediaTranscodeManager"; +public final class MediaTranscodingManager { + private static final String TAG = "MediaTranscodingManager"; /** Maximum number of retry to connect to the service. */ private static final int CONNECT_SERVICE_RETRY_COUNT = 100; @@ -127,7 +127,7 @@ public final class MediaTranscodeManager { private final Object mLock = new Object(); @GuardedBy("mLock") @NonNull private ITranscodingClient mTranscodingClient = null; - private static MediaTranscodeManager sMediaTranscodeManager; + private static MediaTranscodingManager sMediaTranscodingManager; private void handleTranscodingFinished(int sessionId, TranscodingResultParcel result) { synchronized (mPendingTranscodingSessions) { @@ -306,7 +306,7 @@ public final class MediaTranscodeManager { } try { - // Do not set hasRetried for retry initiated by MediaTranscodeManager. + // Do not set hasRetried for retry initiated by MediaTranscodingManager. session.retryInternal(false /*setHasRetried*/); } catch (Exception re) { // TODO(hkuang): Return correct error code to the client. @@ -423,7 +423,7 @@ public final class MediaTranscodeManager { /** * @hide */ - public MediaTranscodeManager(@NonNull Context context) { + public MediaTranscodingManager(@NonNull Context context) { mContext = context; mContentResolver = mContext.getContentResolver(); mPackageName = mContext.getPackageName(); @@ -1348,7 +1348,7 @@ public final class MediaTranscodeManager { @IntRange(from = 0, to = 100) int progress); } - private final MediaTranscodeManager mManager; + private final MediaTranscodingManager mManager; private Executor mListenerExecutor; private OnTranscodingFinishedListener mListener; private int mSessionId = -1; @@ -1374,7 +1374,7 @@ public final class MediaTranscodeManager { private final TranscodingRequest mRequest; private TranscodingSession( - @NonNull MediaTranscodeManager manager, + @NonNull MediaTranscodingManager manager, @NonNull TranscodingRequest request, @NonNull TranscodingSessionParcel parcel, @NonNull @CallbackExecutor Executor executor, @@ -1675,10 +1675,10 @@ public final class MediaTranscodeManager { /** * Enqueues a TranscodingRequest for execution. - * <p> Upon successfully accepting the request, MediaTranscodeManager will return a + * <p> Upon successfully accepting the request, MediaTranscodingManager will return a * {@link TranscodingSession} to the client. Client should use {@link TranscodingSession} to * track the progress and get the result. - * <p> MediaTranscodeManager will return null if fails to accept the request due to service + * <p> MediaTranscodingManager will return null if fails to accept the request due to service * rebooting. Client could retry again after receiving null. * * @param transcodingRequest The TranscodingRequest to enqueue. diff --git a/core/java/android/app/Service.java b/core/java/android/app/Service.java index 7cb1d89aa954..336387204410 100644 --- a/core/java/android/app/Service.java +++ b/core/java/android/app/Service.java @@ -387,6 +387,13 @@ public abstract class Service extends ContextWrapper implements ComponentCallbac * <p>This mode makes sense for things that will be explicitly started * and stopped to run for arbitrary periods of time, such as a service * performing background music playback. + * + * <p>Since Android version {@link Build.VERSION_CODES#S}, apps + * targeting {@link Build.VERSION_CODES#S} or above are disallowed + * to start a foreground service from the background, but the restriction + * doesn't impact <em>restarts</em> of a sticky foreground service. However, + * when apps start a sticky foreground service from the background, + * the same restriction still applies. */ public static final int START_STICKY = 1; diff --git a/core/java/android/appwidget/AppWidgetManagerInternal.java b/core/java/android/appwidget/AppWidgetManagerInternal.java index 5694ca860453..266e33af0e22 100644 --- a/core/java/android/appwidget/AppWidgetManagerInternal.java +++ b/core/java/android/appwidget/AppWidgetManagerInternal.java @@ -19,6 +19,8 @@ package android.appwidget; import android.annotation.Nullable; import android.util.ArraySet; +import java.util.Set; + /** * App widget manager local system service interface. * @@ -42,4 +44,16 @@ public abstract class AppWidgetManagerInternal { * @param userId The user that is being unlocked. */ public abstract void unlockUser(int userId); + + /** + * Updates all widgets, applying changes to Runtime Resource Overlay affecting the specified + * target packages. + * + * @param packageNames The names of all target packages for which an overlay was modified + * @param userId The user for which overlay modifications occurred. + * @param updateFrameworkRes Whether or not an overlay affected the values of framework + * resources. + */ + public abstract void applyResourceOverlaysToWidgets(Set<String> packageNames, int userId, + boolean updateFrameworkRes); } diff --git a/core/java/android/bluetooth/BluetoothAdapter.java b/core/java/android/bluetooth/BluetoothAdapter.java index 8398be1af49a..5094498dbee5 100644 --- a/core/java/android/bluetooth/BluetoothAdapter.java +++ b/core/java/android/bluetooth/BluetoothAdapter.java @@ -64,6 +64,8 @@ import android.os.SystemProperties; import android.util.Log; import android.util.Pair; +import com.android.internal.annotations.GuardedBy; + import java.io.IOException; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; @@ -78,6 +80,7 @@ import java.util.Map; import java.util.Objects; import java.util.Set; import java.util.UUID; +import java.util.WeakHashMap; import java.util.concurrent.Executor; import java.util.concurrent.TimeoutException; import java.util.concurrent.locks.ReentrantReadWriteLock; @@ -715,10 +718,21 @@ public final class BluetoothAdapter { private final IBluetoothManager mManagerService; private final AttributionSource mAttributionSource; + // Yeah, keeping both mService and sService isn't pretty, but it's too late + // in the current release for a major refactoring, so we leave them both + // intact until this can be cleaned up in a future release + @UnsupportedAppUsage + @GuardedBy("mServiceLock") private IBluetooth mService; private final ReentrantReadWriteLock mServiceLock = new ReentrantReadWriteLock(); + @GuardedBy("sServiceLock") + private static boolean sServiceRegistered; + @GuardedBy("sServiceLock") + private static IBluetooth sService; + private static final Object sServiceLock = new Object(); + private final Object mLock = new Object(); private final Map<LeScanCallback, ScanCallback> mLeScanClients; private final Map<BluetoothDevice, List<Pair<OnMetadataChangedListener, Executor>>> @@ -792,19 +806,11 @@ public final class BluetoothAdapter { * Use {@link #getDefaultAdapter} to get the BluetoothAdapter instance. */ BluetoothAdapter(IBluetoothManager managerService, AttributionSource attributionSource) { - if (managerService == null) { - throw new IllegalArgumentException("bluetooth manager service is null"); - } - try { - mServiceLock.writeLock().lock(); - mService = managerService.registerAdapter(mManagerCallback); - } catch (RemoteException e) { - Log.e(TAG, "", e); - } finally { - mServiceLock.writeLock().unlock(); - } mManagerService = Objects.requireNonNull(managerService); mAttributionSource = Objects.requireNonNull(attributionSource); + synchronized (mServiceLock.writeLock()) { + mService = getBluetoothService(mManagerCallback); + } mLeScanClients = new HashMap<LeScanCallback, ScanCallback>(); mToken = new Binder(DESCRIPTOR); } @@ -3154,21 +3160,16 @@ public final class BluetoothAdapter { } } - @SuppressLint("AndroidFrameworkBluetoothPermission") - private final IBluetoothManagerCallback mManagerCallback = + private static final IBluetoothManagerCallback sManagerCallback = new IBluetoothManagerCallback.Stub() { - @SuppressLint("AndroidFrameworkRequiresPermission") public void onBluetoothServiceUp(IBluetooth bluetoothService) { if (DBG) { Log.d(TAG, "onBluetoothServiceUp: " + bluetoothService); } - mServiceLock.writeLock().lock(); - mService = bluetoothService; - mServiceLock.writeLock().unlock(); - - synchronized (mProxyServiceStateCallbacks) { - for (IBluetoothManagerCallback cb : mProxyServiceStateCallbacks) { + synchronized (sServiceLock) { + sService = bluetoothService; + for (IBluetoothManagerCallback cb : sProxyServiceStateCallbacks.keySet()) { try { if (cb != null) { cb.onBluetoothServiceUp(bluetoothService); @@ -3180,6 +3181,56 @@ public final class BluetoothAdapter { } } } + } + + public void onBluetoothServiceDown() { + if (DBG) { + Log.d(TAG, "onBluetoothServiceDown"); + } + + synchronized (sServiceLock) { + sService = null; + for (IBluetoothManagerCallback cb : sProxyServiceStateCallbacks.keySet()) { + try { + if (cb != null) { + cb.onBluetoothServiceDown(); + } else { + Log.d(TAG, "onBluetoothServiceDown: cb is null!"); + } + } catch (Exception e) { + Log.e(TAG, "", e); + } + } + } + } + + public void onBrEdrDown() { + if (VDBG) { + Log.i(TAG, "onBrEdrDown"); + } + + synchronized (sServiceLock) { + for (IBluetoothManagerCallback cb : sProxyServiceStateCallbacks.keySet()) { + try { + if (cb != null) { + cb.onBrEdrDown(); + } else { + Log.d(TAG, "onBrEdrDown: cb is null!"); + } + } catch (Exception e) { + Log.e(TAG, "", e); + } + } + } + } + }; + + private final IBluetoothManagerCallback mManagerCallback = + new IBluetoothManagerCallback.Stub() { + public void onBluetoothServiceUp(IBluetooth bluetoothService) { + synchronized (mServiceLock.writeLock()) { + mService = bluetoothService; + } synchronized (mMetadataListeners) { mMetadataListeners.forEach((device, pair) -> { try { @@ -3204,12 +3255,7 @@ public final class BluetoothAdapter { } public void onBluetoothServiceDown() { - if (DBG) { - Log.d(TAG, "onBluetoothServiceDown: " + mService); - } - - try { - mServiceLock.writeLock().lock(); + synchronized (mServiceLock.writeLock()) { mService = null; if (mLeScanClients != null) { mLeScanClients.clear(); @@ -3220,29 +3266,10 @@ public final class BluetoothAdapter { if (mBluetoothLeScanner != null) { mBluetoothLeScanner.cleanup(); } - } finally { - mServiceLock.writeLock().unlock(); - } - - synchronized (mProxyServiceStateCallbacks) { - for (IBluetoothManagerCallback cb : mProxyServiceStateCallbacks) { - try { - if (cb != null) { - cb.onBluetoothServiceDown(); - } else { - Log.d(TAG, "onBluetoothServiceDown: cb is null!"); - } - } catch (Exception e) { - Log.e(TAG, "", e); - } - } } } public void onBrEdrDown() { - if (VDBG) { - Log.i(TAG, "onBrEdrDown: " + mService); - } } }; @@ -3477,15 +3504,12 @@ public final class BluetoothAdapter { protected void finalize() throws Throwable { try { - mManagerService.unregisterAdapter(mManagerCallback); - } catch (RemoteException e) { - Log.e(TAG, "", e); + removeServiceStateCallback(mManagerCallback); } finally { super.finalize(); } } - /** * Validate a String Bluetooth address, such as "00:43:A8:23:10:F0" * <p>Alphabetic characters must be uppercase to be valid. @@ -3549,24 +3573,64 @@ public final class BluetoothAdapter { return mAttributionSource; } - private final ArrayList<IBluetoothManagerCallback> mProxyServiceStateCallbacks = - new ArrayList<IBluetoothManagerCallback>(); + @GuardedBy("sServiceLock") + private static final WeakHashMap<IBluetoothManagerCallback, Void> sProxyServiceStateCallbacks = + new WeakHashMap<>(); + + /*package*/ IBluetooth getBluetoothService() { + synchronized (sServiceLock) { + if (sProxyServiceStateCallbacks.isEmpty()) { + throw new IllegalStateException( + "Anonymous service access requires at least one lifecycle in process"); + } + return sService; + } + } @UnsupportedAppUsage /*package*/ IBluetooth getBluetoothService(IBluetoothManagerCallback cb) { - synchronized (mProxyServiceStateCallbacks) { - if (cb == null) { - Log.w(TAG, "getBluetoothService() called with no BluetoothManagerCallback"); - } else if (!mProxyServiceStateCallbacks.contains(cb)) { - mProxyServiceStateCallbacks.add(cb); - } + Objects.requireNonNull(cb); + synchronized (sServiceLock) { + sProxyServiceStateCallbacks.put(cb, null); + registerOrUnregisterAdapterLocked(); + return sService; } - return mService; } /*package*/ void removeServiceStateCallback(IBluetoothManagerCallback cb) { - synchronized (mProxyServiceStateCallbacks) { - mProxyServiceStateCallbacks.remove(cb); + Objects.requireNonNull(cb); + synchronized (sServiceLock) { + sProxyServiceStateCallbacks.remove(cb); + registerOrUnregisterAdapterLocked(); + } + } + + /** + * Handle registering (or unregistering) a single process-wide + * {@link IBluetoothManagerCallback} based on the presence of local + * {@link #sProxyServiceStateCallbacks} clients. + */ + @GuardedBy("sServiceLock") + private void registerOrUnregisterAdapterLocked() { + final boolean isRegistered = sServiceRegistered; + final boolean wantRegistered = !sProxyServiceStateCallbacks.isEmpty(); + + if (isRegistered != wantRegistered) { + if (wantRegistered) { + try { + sService = mManagerService.registerAdapter(sManagerCallback); + } catch (RemoteException e) { + throw e.rethrowFromSystemServer(); + } + } else { + try { + mManagerService.unregisterAdapter(sManagerCallback); + sService = null; + } catch (RemoteException e) { + throw e.rethrowFromSystemServer(); + } + } + sServiceRegistered = wantRegistered; } } diff --git a/core/java/android/bluetooth/BluetoothSocket.java b/core/java/android/bluetooth/BluetoothSocket.java index bb409d5360f9..1655b62bbfec 100644 --- a/core/java/android/bluetooth/BluetoothSocket.java +++ b/core/java/android/bluetooth/BluetoothSocket.java @@ -399,7 +399,7 @@ public final class BluetoothSocket implements Closeable { try { if (mSocketState == SocketState.CLOSED) throw new IOException("socket closed"); IBluetooth bluetoothProxy = - BluetoothAdapter.getDefaultAdapter().getBluetoothService(null); + BluetoothAdapter.getDefaultAdapter().getBluetoothService(); if (bluetoothProxy == null) throw new IOException("Bluetooth is off"); mPfd = bluetoothProxy.getSocketManager().connectSocket(mDevice, mType, mUuid, mPort, getSecurityFlags()); @@ -438,7 +438,7 @@ public final class BluetoothSocket implements Closeable { /*package*/ int bindListen() { int ret; if (mSocketState == SocketState.CLOSED) return EBADFD; - IBluetooth bluetoothProxy = BluetoothAdapter.getDefaultAdapter().getBluetoothService(null); + IBluetooth bluetoothProxy = BluetoothAdapter.getDefaultAdapter().getBluetoothService(); if (bluetoothProxy == null) { Log.e(TAG, "bindListen fail, reason: bluetooth is off"); return -1; @@ -706,7 +706,7 @@ public final class BluetoothSocket implements Closeable { throw new IOException("socket closed"); } IBluetooth bluetoothProxy = - BluetoothAdapter.getDefaultAdapter().getBluetoothService(null); + BluetoothAdapter.getDefaultAdapter().getBluetoothService(); if (bluetoothProxy == null) { throw new IOException("Bluetooth is off"); } diff --git a/core/java/android/content/Context.java b/core/java/android/content/Context.java index c02dcfd3d681..27027721109d 100644 --- a/core/java/android/content/Context.java +++ b/core/java/android/content/Context.java @@ -4464,11 +4464,11 @@ public abstract class Context { /** * Use with {@link #getSystemService(String)} to retrieve a {@link - * android.media.MediaTranscodeManager} for transcoding media. + * android.media.MediaTranscodingManager} for transcoding media. * * @hide * @see #getSystemService(String) - * @see android.media.MediaTranscodeManager + * @see android.media.MediaTranscodingManager */ @SystemApi public static final String MEDIA_TRANSCODING_SERVICE = "media_transcoding"; diff --git a/core/java/android/widget/RemoteViews.java b/core/java/android/widget/RemoteViews.java index e827f0a31bfd..91fc5a56d979 100644 --- a/core/java/android/widget/RemoteViews.java +++ b/core/java/android/widget/RemoteViews.java @@ -5824,6 +5824,25 @@ public class RemoteViews implements Parcelable, Filter { return false; } + /** @hide */ + public void updateAppInfo(@NonNull ApplicationInfo info) { + if (mApplication != null && mApplication.sourceDir.equals(info.sourceDir)) { + // Overlay paths are generated against a particular version of an application. + // The overlays paths of a newly upgraded application are incompatible with the + // old version of the application. + mApplication = info; + } + if (hasSizedRemoteViews()) { + for (RemoteViews layout : mSizedRemoteViews) { + layout.updateAppInfo(info); + } + } + if (hasLandscapeAndPortraitLayouts()) { + mLandscape.updateAppInfo(info); + mPortrait.updateAppInfo(info); + } + } + private Context getContextForResources(Context context) { if (mApplication != null) { if (context.getUserId() == UserHandle.getUserId(mApplication.uid) diff --git a/core/res/res/values-ka/strings.xml b/core/res/res/values-ka/strings.xml index 8765659347f9..789e2794e083 100644 --- a/core/res/res/values-ka/strings.xml +++ b/core/res/res/values-ka/strings.xml @@ -57,7 +57,7 @@ <string name="imei" msgid="2157082351232630390">"IMEI"</string> <string name="meid" msgid="3291227361605924674">"MEID"</string> <string name="ClipMmi" msgid="4110549342447630629">"შემომავალი ზარის აბონენტის ID"</string> - <string name="ClirMmi" msgid="6752346475055446417">"გამავალი აბონენტის ID-ის დამალვა"</string> + <string name="ClirMmi" msgid="6752346475055446417">"გამავალი აბონენტის ID-ს დამალვა"</string> <string name="ColpMmi" msgid="4736462893284419302">"დაუკავშირდა Line ID-ს"</string> <string name="ColrMmi" msgid="5889782479745764278">"დაუკავშირდა Line ID Restriction-ს"</string> <string name="CfMmi" msgid="8390012691099787178">"ზარის გადამისამართება"</string> diff --git a/core/res/res/values-te/strings.xml b/core/res/res/values-te/strings.xml index 81be9a7988b0..1d2fd8a0885b 100644 --- a/core/res/res/values-te/strings.xml +++ b/core/res/res/values-te/strings.xml @@ -247,21 +247,21 @@ <string name="global_action_power_options" msgid="1185286119330160073">"పవర్"</string> <string name="global_action_restart" msgid="4678451019561687074">"రీస్టార్ట్ చేయి"</string> <string name="global_action_emergency" msgid="1387617624177105088">"ఎమర్జెన్సీ"</string> - <string name="global_action_bug_report" msgid="5127867163044170003">"బగ్ నివేదిక"</string> + <string name="global_action_bug_report" msgid="5127867163044170003">"బగ్ రిపోర్ట్"</string> <string name="global_action_logout" msgid="6093581310002476511">"సెషన్ను ముగించు"</string> <string name="global_action_screenshot" msgid="2610053466156478564">"స్క్రీన్షాట్"</string> <string name="bugreport_title" msgid="8549990811777373050">"బగ్ రిపోర్ట్"</string> - <string name="bugreport_message" msgid="5212529146119624326">"ఇది ఇ-మెయిల్ సందేశం రూపంలో పంపడానికి మీ ప్రస్తుత పరికర స్థితి గురించి సమాచారాన్ని సేకరిస్తుంది. బగ్ నివేదికను ప్రారంభించడం మొదలుకొని పంపడానికి సిద్ధం చేసే వరకు ఇందుకు కొంత సమయం పడుతుంది; దయచేసి ఓపిక పట్టండి."</string> - <string name="bugreport_option_interactive_title" msgid="7968287837902871289">"ప్రభావశీల నివేదిక"</string> - <string name="bugreport_option_interactive_summary" msgid="8493795476325339542">"చాలా సందర్భాల్లో దీన్ని ఉపయోగించండి. ఇది నివేదిక ప్రోగ్రెస్ను ట్రాక్ చేయడానికి, సమస్య గురించి మరిన్ని వివరాలను నమోదు చేయడానికి మరియు స్క్రీన్షాట్లు తీయడానికి మిమ్మల్ని అనుమతిస్తుంది. ఇది నివేదించడానికి ఎక్కువ సమయం పట్టే తక్కువ వినియోగ విభాగాలను విడిచిపెట్టవచ్చు."</string> - <string name="bugreport_option_full_title" msgid="7681035745950045690">"పూర్తి నివేదిక"</string> - <string name="bugreport_option_full_summary" msgid="1975130009258435885">"మీ పరికరం ప్రతిస్పందనరహితంగా ఉన్నప్పుడు లేదా చాలా నెమ్మదిగా ఉన్నప్పుడు లేదా మీకు అన్ని నివేదిక విభాగాలు అవసరమైనప్పుడు సిస్టమ్కి అంతరాయ స్థాయి కనిష్టంగా ఉండేలా చేయడానికి ఈ ఎంపిక ఉపయోగించండి. ఇది మరిన్ని వివరాలను నమోదు చేయడానికి లేదా అదనపు స్క్రీన్షాట్లు తీయడానికి మిమ్మల్ని అనుమతించదు."</string> + <string name="bugreport_message" msgid="5212529146119624326">"ఇది ఇ-మెయిల్ సందేశం రూపంలో పంపడానికి మీ ప్రస్తుత పరికర స్థితి గురించి సమాచారాన్ని సేకరిస్తుంది. బగ్ రిపోర్ట్ను ప్రారంభించడం మొదలుకొని పంపడానికి సిద్ధం చేసే వరకు ఇందుకు కొంత సమయం పడుతుంది; దయచేసి ఓపిక పట్టండి."</string> + <string name="bugreport_option_interactive_title" msgid="7968287837902871289">"ప్రభావశీల రిపోర్ట్"</string> + <string name="bugreport_option_interactive_summary" msgid="8493795476325339542">"చాలా సందర్భాల్లో దీన్ని ఉపయోగించండి. ఇది రిపోర్ట్ ప్రోగ్రెస్ను ట్రాక్ చేయడానికి, సమస్య గురించి మరిన్ని వివరాలను నమోదు చేయడానికి మరియు స్క్రీన్షాట్లు తీయడానికి మిమ్మల్ని అనుమతిస్తుంది. ఇది నివేదించడానికి ఎక్కువ సమయం పట్టే తక్కువ వినియోగ విభాగాలను విడిచిపెట్టవచ్చు."</string> + <string name="bugreport_option_full_title" msgid="7681035745950045690">"పూర్తి రిపోర్ట్"</string> + <string name="bugreport_option_full_summary" msgid="1975130009258435885">"మీ పరికరం ప్రతిస్పందనరహితంగా ఉన్నప్పుడు లేదా చాలా నెమ్మదిగా ఉన్నప్పుడు లేదా మీకు అన్ని రిపోర్ట్ విభాగాలు అవసరమైనప్పుడు సిస్టమ్కి అంతరాయ స్థాయి కనిష్టంగా ఉండేలా చేయడానికి ఈ ఎంపిక ఉపయోగించండి. ఇది మరిన్ని వివరాలను నమోదు చేయడానికి లేదా అదనపు స్క్రీన్షాట్లు తీయడానికి మిమ్మల్ని అనుమతించదు."</string> <plurals name="bugreport_countdown" formatted="false" msgid="3906120379260059206"> - <item quantity="other">బగ్ నివేదిక కోసం <xliff:g id="NUMBER_1">%d</xliff:g> సెకన్లలో స్క్రీన్షాట్ తీయబోతోంది.</item> - <item quantity="one">బగ్ నివేదిక కోసం <xliff:g id="NUMBER_0">%d</xliff:g> సెకనులో స్క్రీన్షాట్ తీయబోతోంది.</item> + <item quantity="other">బగ్ రిపోర్ట్ కోసం <xliff:g id="NUMBER_1">%d</xliff:g> సెకన్లలో స్క్రీన్షాట్ తీయబోతోంది.</item> + <item quantity="one">బగ్ రిపోర్ట్ కోసం <xliff:g id="NUMBER_0">%d</xliff:g> సెకనులో స్క్రీన్షాట్ తీయబోతోంది.</item> </plurals> - <string name="bugreport_screenshot_success_toast" msgid="7986095104151473745">"బగ్ నివేదికతో ఉన్న స్క్రీన్షాట్ తీయబడింది"</string> - <string name="bugreport_screenshot_failure_toast" msgid="6736320861311294294">"బగ్ నివేదికతో ఉన్న స్క్రీన్షాట్ను తీయడం విఫలమైంది"</string> + <string name="bugreport_screenshot_success_toast" msgid="7986095104151473745">"బగ్ రిపోర్ట్తో ఉన్న స్క్రీన్షాట్ తీయబడింది"</string> + <string name="bugreport_screenshot_failure_toast" msgid="6736320861311294294">"బగ్ రిపోర్ట్తో ఉన్న స్క్రీన్షాట్ను తీయడం విఫలమైంది"</string> <string name="global_action_toggle_silent_mode" msgid="8464352592860372188">"నిశ్శబ్ద మోడ్"</string> <string name="global_action_silent_mode_on_status" msgid="2371892537738632013">"ధ్వని ఆఫ్లో ఉంది"</string> <string name="global_action_silent_mode_off_status" msgid="6608006545950920042">"ధ్వని ఆన్లో ఉంది"</string> @@ -1384,10 +1384,10 @@ <string name="usb_contaminant_detected_message" msgid="7346100585390795743">"USB పోర్ట్ ఆటోమేటిక్గా నిలిపివేయబడింది. మరింత తెలుసుకోవడానికి నొక్కండి."</string> <string name="usb_contaminant_not_detected_title" msgid="2651167729563264053">"USB పోర్ట్ను ఉపయోగించడం సురక్షితం"</string> <string name="usb_contaminant_not_detected_message" msgid="892863190942660462">"ఫోన్ ఇకపై ద్రవ లేదా వ్యర్థ పదార్థాలను గుర్తించదు."</string> - <string name="taking_remote_bugreport_notification_title" msgid="1582531382166919850">"బగ్ నివేదికను తీస్తోంది…"</string> - <string name="share_remote_bugreport_notification_title" msgid="6708897723753334999">"బగ్ నివేదికను భాగస్వామ్యం చేయాలా?"</string> - <string name="sharing_remote_bugreport_notification_title" msgid="3077385149217638550">"బగ్ నివేదికను భాగస్వామ్యం చేస్తోంది..."</string> - <string name="share_remote_bugreport_notification_message_finished" msgid="7325635795739260135">"మీ నిర్వాహకులు ఈ పరికరం సమస్యకు పరిష్కారాన్ని కనుగొనడంలో సహాయం కోసం బగ్ నివేదికను అభ్యర్థించారు. యాప్లు మరియు డేటా భాగస్వామ్యం చేయబడవచ్చు."</string> + <string name="taking_remote_bugreport_notification_title" msgid="1582531382166919850">"బగ్ రిపోర్ట్ను తీస్తోంది…"</string> + <string name="share_remote_bugreport_notification_title" msgid="6708897723753334999">"బగ్ రిపోర్ట్ను భాగస్వామ్యం చేయాలా?"</string> + <string name="sharing_remote_bugreport_notification_title" msgid="3077385149217638550">"బగ్ రిపోర్ట్ను భాగస్వామ్యం చేస్తోంది..."</string> + <string name="share_remote_bugreport_notification_message_finished" msgid="7325635795739260135">"మీ నిర్వాహకులు ఈ పరికరం సమస్యకు పరిష్కారాన్ని కనుగొనడంలో సహాయం కోసం బగ్ రిపోర్ట్ను అభ్యర్థించారు. యాప్లు మరియు డేటా భాగస్వామ్యం చేయబడవచ్చు."</string> <string name="share_remote_bugreport_action" msgid="7630880678785123682">"షేర్ చేయి"</string> <string name="decline_remote_bugreport_action" msgid="4040894777519784346">"తిరస్కరిస్తున్నాను"</string> <string name="select_input_method" msgid="3971267998568587025">"ఇన్పుట్ పద్ధతిని ఎంచుకోండి"</string> diff --git a/graphics/java/android/graphics/Paint.java b/graphics/java/android/graphics/Paint.java index 51bf6d539ce8..42e470b7f660 100644 --- a/graphics/java/android/graphics/Paint.java +++ b/graphics/java/android/graphics/Paint.java @@ -255,12 +255,6 @@ public class Paint { | FILTER_BITMAP_FLAG; /** - * These flags are always set on a reset paint or a new paint instantiated using - * {@link #Paint()}. - */ - private static final int DEFAULT_PAINT_FLAGS = ANTI_ALIAS_FLAG | DITHER_FLAG; - - /** * Font hinter option that disables font hinting. * * @see #setHinting(int) @@ -577,12 +571,12 @@ public class Paint { * On devices running {@link Build.VERSION_CODES#Q} and above, * {@code FILTER_BITMAP_FLAG} is set by this constructor, and it can be * cleared with {@link #setFlags} or {@link #setFilterBitmap}. - * On devices running {@link Build.VERSION_CODES#S} and above, {@code ANTI_ALIAS_FLAG} and - * {@code DITHER_FLAG} are set by this constructor, and they can be cleared with - * {@link #setFlags} or {@link #setAntiAlias} and {@link #setDither}, respectively.</p> + * On devices running {@link Build.VERSION_CODES#S} and above, {@code ANTI_ALIAS_FLAG} + * is set by this constructor, and it can be cleared with {@link #setFlags} or + * {@link #setAntiAlias}.</p> */ public Paint() { - this(DEFAULT_PAINT_FLAGS); + this(ANTI_ALIAS_FLAG); } /** @@ -627,7 +621,7 @@ public class Paint { /** Restores the paint to its default settings. */ public void reset() { nReset(mNativePaint); - setFlags(HIDDEN_DEFAULT_PAINT_FLAGS | DEFAULT_PAINT_FLAGS); + setFlags(HIDDEN_DEFAULT_PAINT_FLAGS | ANTI_ALIAS_FLAG); // TODO: Turning off hinting has undesirable side effects, we need to // revisit hinting once we add support for subpixel positioning diff --git a/location/java/android/location/CorrelationVector.java b/location/java/android/location/CorrelationVector.java index 718977ff4296..5493e2579225 100644 --- a/location/java/android/location/CorrelationVector.java +++ b/location/java/android/location/CorrelationVector.java @@ -94,8 +94,6 @@ public final class CorrelationVector implements Parcelable { "FrequencyOffsetMetersPerSecond must be non-negative (greater than or equal to 0)"); Preconditions.checkArgument(builder.mSamplingWidthMeters > 0.0, "SamplingWidthMeters must be positive (greater than 0)"); - Preconditions.checkArgument(builder.mSamplingStartMeters >= 0.0, - "SamplingStartMeters must be non-negative (greater than or equal to 0)"); mMagnitude = builder.mMagnitude; mFrequencyOffsetMetersPerSecond = builder.mFrequencyOffsetMetersPerSecond; mSamplingWidthMeters = builder.mSamplingWidthMeters; diff --git a/location/java/android/location/Location.java b/location/java/android/location/Location.java index 1e8b9521e41e..209903c57d90 100644 --- a/location/java/android/location/Location.java +++ b/location/java/android/location/Location.java @@ -1084,6 +1084,12 @@ public class Location implements Parcelable { mExtras = (extras == null) ? null : new Bundle(extras); } + /** + * Location equality is provided primarily for test purposes. Comparing locations for equality + * in production may indicate incorrect assumptions, and should be avoided whenever possible. + * + * <p>{@inheritDoc} + */ @Override public boolean equals(Object o) { if (this == o) { @@ -1121,7 +1127,17 @@ public class Location implements Parcelable { && (!hasBearingAccuracy() || Float.compare(location.mBearingAccuracyDegrees, mBearingAccuracyDegrees) == 0) && Objects.equals(mProvider, location.mProvider) - && Objects.equals(mExtras, location.mExtras); + && areExtrasEqual(mExtras, location.mExtras); + } + + private static boolean areExtrasEqual(@Nullable Bundle extras1, @Nullable Bundle extras2) { + if ((extras1 == null || extras1.isEmpty()) && (extras2 == null || extras2.isEmpty())) { + return true; + } else if (extras1 == null || extras2 == null) { + return false; + } else { + return extras1.kindofEquals(extras2); + } } @Override diff --git a/location/java/android/location/LocationListener.java b/location/java/android/location/LocationListener.java index 35a40910e373..031642b752e5 100644 --- a/location/java/android/location/LocationListener.java +++ b/location/java/android/location/LocationListener.java @@ -38,9 +38,9 @@ import java.util.concurrent.Executor; public interface LocationListener { /** - * Called when the location has changed. A wakelock is held on behalf on the listener for some - * brief amount of time as this callback executes. If this callback performs long running - * operations, it is the client's responsibility to obtain their own wakelock. + * Called when the location has changed. A wakelock may be held on behalf on the listener for + * some brief amount of time as this callback executes. If this callback performs long running + * operations, it is the client's responsibility to obtain their own wakelock if necessary. * * @param location the updated location */ @@ -48,7 +48,7 @@ public interface LocationListener { /** * Called when the location has changed and locations are being delivered in batches. The - * default implementation calls through to ({@link #onLocationChanged(Location)} with all + * default implementation calls through to {@link #onLocationChanged(Location)} with all * locations in the batch. The list of locations is always guaranteed to be non-empty, and is * always guaranteed to be ordered from earliest location to latest location (so that the * earliest location in the batch is at index 0 in the list, and the latest location in the @@ -76,6 +76,11 @@ public interface LocationListener { * This callback will never be invoked on Android Q and above, and providers can be considered * as always in the {@link LocationProvider#AVAILABLE} state. * + * <p class="note">Note that this method only has a default implementation on Android R and + * above, and this method must still be overridden in order to run successfully on Android + * versions below R. LocationListenerCompat from the compat libraries may be used to avoid the + * need to override for older platforms. + * * @deprecated This callback will never be invoked on Android Q and above. */ @Deprecated @@ -84,6 +89,11 @@ public interface LocationListener { /** * Called when a provider this listener is registered with becomes enabled. * + * <p class="note">Note that this method only has a default implementation on Android R and + * above, and this method must still be overridden in order to run successfully on Android + * versions below R. LocationListenerCompat from the compat libraries may be used to avoid the + * need to override for older platforms. + * * @param provider the name of the location provider */ default void onProviderEnabled(@NonNull String provider) {} @@ -92,6 +102,11 @@ public interface LocationListener { * Called when the provider this listener is registered with becomes disabled. If a provider is * disabled when this listener is registered, this callback will be invoked immediately. * + * <p class="note">Note that this method only has a default implementation on Android R and + * above, and this method must still be overridden in order to run successfully on Android + * versions below R. LocationListenerCompat from the compat libraries may be used to avoid the + * need to override for older platforms. + * * @param provider the name of the location provider */ default void onProviderDisabled(@NonNull String provider) {} diff --git a/packages/PackageInstaller/res/values-te/strings.xml b/packages/PackageInstaller/res/values-te/strings.xml index dba1ab4de61f..11e01c7ce51d 100644 --- a/packages/PackageInstaller/res/values-te/strings.xml +++ b/packages/PackageInstaller/res/values-te/strings.xml @@ -86,7 +86,7 @@ <string name="anonymous_source_warning" product="default" msgid="2784902545920822500">"తెలియని యాప్లు మీ ఫోన్ పైన, వ్యక్తిగత డేటా పైన దాడి చేయడానికి ఎక్కువగా అవకాశం ఉంటుంది. ఈ యాప్ను ఇన్స్టాల్ చేయడం ద్వారా, దాని వినియోగంతో మీ ఫోన్కు ఏదైనా నష్టం జరిగితే లేదా మీ డేటాను కోల్పోతే అందుకు మీరే బాధ్యత వహిస్తారని అంగీకరిస్తున్నారు."</string> <string name="anonymous_source_warning" product="tablet" msgid="3939101621438855516">"మీ టాబ్లెట్ మరియు వ్యక్తిగత డేటాపై తెలియని యాప్లు దాడి చేయడానికి ఎక్కువ అవకాశం ఉంది. మీరు ఈ యాప్ను ఇన్స్టాల్ చేయడం ద్వారా, దీనిని ఉపయోగించడం వలన మీ టాబ్లెట్కు ఏదైనా హాని జరిగినా లేదా డేటా కోల్పోయినా బాధ్యత మీదేనని అంగీకరిస్తున్నారు."</string> <string name="anonymous_source_warning" product="tv" msgid="5599483539528168566">"మీ టీవీ మరియు వ్యక్తిగత డేటాపై తెలియని యాప్లు దాడి చేయడానికి ఎక్కువ అవకాశం ఉంది. మీరు ఈ యాప్ను ఇన్స్టాల్ చేయడం ద్వారా, దీనిని ఉపయోగించడం వలన మీ టీవీకి ఏదైనా హాని జరిగినా లేదా డేటా కోల్పోయినా బాధ్యత మీదేనని అంగీకరిస్తున్నారు."</string> - <string name="anonymous_source_continue" msgid="4375745439457209366">"కొనసాగించు"</string> + <string name="anonymous_source_continue" msgid="4375745439457209366">"కొనసాగండి"</string> <string name="external_sources_settings" msgid="4046964413071713807">"సెట్టింగ్లు"</string> <string name="wear_app_channel" msgid="1960809674709107850">"Wear యాప్లను ఇన్స్టాల్/అన్ఇన్స్టాల్ చేస్తోంది"</string> <string name="app_installed_notification_channel_description" msgid="2695385797601574123">"యాప్ ఇన్స్టాల్ చేయబడిందనే నోటిఫికేషన్"</string> diff --git a/packages/SettingsLib/BannerMessagePreference/res/values-v31/styles.xml b/packages/SettingsLib/BannerMessagePreference/res/values-v31/styles.xml index e74ac44ec8a4..fede44feb090 100644 --- a/packages/SettingsLib/BannerMessagePreference/res/values-v31/styles.xml +++ b/packages/SettingsLib/BannerMessagePreference/res/values-v31/styles.xml @@ -33,18 +33,18 @@ <style name="Banner.Title.SettingsLib" parent="@android:style/TextAppearance.Material.Subhead"> <item name="android:textSize">20sp</item> - <item name="android:fontFamily">@*android:string/config_headlineFontFamily</item> + <item name="android:fontFamily">@string/settingslib_config_headlineFontFamily</item> <item name="android:textColor">?android:attr/textColorPrimary</item> </style> <style name="Banner.Subtitle.SettingsLib" - parent="@*android:style/TextAppearance.DeviceDefault.Body1"> + parent="@android:style/TextAppearance.DeviceDefault"> <item name="android:textColor">?android:attr/textColorSecondary</item> <item name="android:textSize">14sp</item> </style> <style name="Banner.Summary.SettingsLib" - parent="@*android:style/TextAppearance.DeviceDefault.Body1"> + parent="@android:style/TextAppearance.DeviceDefault"> <item name="android:textColor">?android:attr/textColorSecondary</item> <item name="android:textSize">14sp</item> </style> @@ -58,4 +58,4 @@ parent="android:Widget.DeviceDefault.Button.Borderless.Colored"> <item name="android:textColor">?android:attr/colorAccent</item> </style> -</resources>
\ No newline at end of file +</resources> diff --git a/packages/SettingsLib/BannerMessagePreference/res/values/styles.xml b/packages/SettingsLib/BannerMessagePreference/res/values/styles.xml index df47c642e402..4c6ed58f4a58 100644 --- a/packages/SettingsLib/BannerMessagePreference/res/values/styles.xml +++ b/packages/SettingsLib/BannerMessagePreference/res/values/styles.xml @@ -17,14 +17,13 @@ <resources> <style name="Banner.Text.Title" - parent="@android:style/TextAppearance.Material.Subhead"> + parent="@android:style/TextAppearance.DeviceDefault.WindowTitle"> <item name="android:textSize">16sp</item> - <item name="android:fontFamily">@*android:string/config_headlineFontFamilyMedium</item> <item name="android:textColor">?android:attr/textColorPrimary</item> </style> <style name="Banner.Text.Summary" - parent="@*android:style/TextAppearance.DeviceDefault.Body1"> + parent="@android:style/TextAppearance.DeviceDefault"> <item name="android:textColor">?android:attr/textColorSecondary</item> <item name="android:textSize">14sp</item> </style> diff --git a/packages/SettingsLib/BarChartPreference/res/values/styles.xml b/packages/SettingsLib/BarChartPreference/res/values/styles.xml index 7a3fb7d9386e..d1f562b38760 100644 --- a/packages/SettingsLib/BarChartPreference/res/values/styles.xml +++ b/packages/SettingsLib/BarChartPreference/res/values/styles.xml @@ -85,9 +85,9 @@ </style> <style name="BarChart.Text" - parent="@android:style/TextAppearance.Material.Subhead"> - <item name="android:fontFamily">@*android:string/config_headlineFontFamilyMedium</item> + parent="@android:style/TextAppearance.DeviceDefault.WindowTitle"> <item name="android:textColor">?android:attr/textColorPrimary</item> + <item name="android:textSize">16sp</item> </style> <style name="BarChart.Text.HeaderTitle"> @@ -99,7 +99,7 @@ </style> <style name="BarChart.Text.Summary" - parent="@*android:style/TextAppearance.DeviceDefault.Body1"> + parent="@android:style/TextAppearance.DeviceDefault"> <item name="android:textColor">?android:attr/textColorSecondary</item> <item name="android:textSize">12sp</item> </style> diff --git a/packages/SettingsLib/CollapsingToolbarBaseActivity/Android.bp b/packages/SettingsLib/CollapsingToolbarBaseActivity/Android.bp index 2f911c4e6546..238e65ec9a3c 100644 --- a/packages/SettingsLib/CollapsingToolbarBaseActivity/Android.bp +++ b/packages/SettingsLib/CollapsingToolbarBaseActivity/Android.bp @@ -19,6 +19,7 @@ android_library { "com.google.android.material_material", "SettingsLibSettingsTransition", "SettingsLibUtils", + "SettingsLibSettingsTheme", ], sdk_version: "system_current", min_sdk_version: "29", diff --git a/packages/SettingsLib/CollapsingToolbarBaseActivity/res/layout-v31/collapsing_toolbar_base_layout.xml b/packages/SettingsLib/CollapsingToolbarBaseActivity/res/layout-v31/collapsing_toolbar_base_layout.xml index 59506564400b..907863e19972 100644 --- a/packages/SettingsLib/CollapsingToolbarBaseActivity/res/layout-v31/collapsing_toolbar_base_layout.xml +++ b/packages/SettingsLib/CollapsingToolbarBaseActivity/res/layout-v31/collapsing_toolbar_base_layout.xml @@ -16,7 +16,6 @@ --> <androidx.coordinatorlayout.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android" - xmlns:androidprv="http://schemas.android.com/apk/prv/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" android:id="@+id/content_parent" android:layout_width="match_parent" @@ -40,7 +39,7 @@ android:clipToPadding="false" app:forceApplySystemWindowInsetTop="true" app:extraMultilineHeightEnabled="true" - app:contentScrim="?androidprv:attr/colorSurfaceHeader" + app:contentScrim="@color/settingslib_colorSurfaceHeader" app:maxLines="3" app:layout_scrollFlags="scroll|exitUntilCollapsed|snap" app:scrimAnimationDuration="50" diff --git a/packages/SettingsLib/CollapsingToolbarBaseActivity/res/values-night/themes.xml b/packages/SettingsLib/CollapsingToolbarBaseActivity/res/values-night-v31/themes.xml index 878275a08752..c20beaf9bf93 100644 --- a/packages/SettingsLib/CollapsingToolbarBaseActivity/res/values-night/themes.xml +++ b/packages/SettingsLib/CollapsingToolbarBaseActivity/res/values-night-v31/themes.xml @@ -18,7 +18,7 @@ <style name="Theme.CollapsingToolbar.Settings" parent="@style/Theme.MaterialComponents.DayNight"> <item name="elevationOverlayEnabled">true</item> <item name="elevationOverlayColor">?attr/colorPrimary</item> - <item name="colorPrimary">@*android:color/primary_dark_device_default_settings</item> - <item name="colorAccent">@*android:color/accent_device_default_dark</item> + <item name="colorPrimary">@color/settingslib_primary_dark_device_default_settings</item> + <item name="colorAccent">@color/settingslib_accent_device_default_dark</item> </style> </resources>
\ No newline at end of file diff --git a/packages/SettingsLib/CollapsingToolbarBaseActivity/res/values/dimens.xml b/packages/SettingsLib/CollapsingToolbarBaseActivity/res/values-v31/dimens.xml index 15c1abbf97ba..15c1abbf97ba 100644 --- a/packages/SettingsLib/CollapsingToolbarBaseActivity/res/values/dimens.xml +++ b/packages/SettingsLib/CollapsingToolbarBaseActivity/res/values-v31/dimens.xml diff --git a/packages/SettingsLib/CollapsingToolbarBaseActivity/res/values/styles.xml b/packages/SettingsLib/CollapsingToolbarBaseActivity/res/values-v31/styles.xml index 63d397c69353..bda51b5160c8 100644 --- a/packages/SettingsLib/CollapsingToolbarBaseActivity/res/values/styles.xml +++ b/packages/SettingsLib/CollapsingToolbarBaseActivity/res/values-v31/styles.xml @@ -16,7 +16,7 @@ --> <resources> <style name="CollapsingToolbarTitle.Collapsed" parent="@android:style/TextAppearance.DeviceDefault.Widget.ActionBar.Title"> - <item name="android:fontFamily">@*android:string/config_headlineFontFamily</item> + <item name="android:fontFamily">@string/settingslib_config_headlineFontFamily</item> <item name="android:textSize">20dp</item> </style> diff --git a/packages/SettingsLib/CollapsingToolbarBaseActivity/res/values/themes.xml b/packages/SettingsLib/CollapsingToolbarBaseActivity/res/values-v31/themes.xml index 2e7a6a9181fe..9ecc297c6d36 100644 --- a/packages/SettingsLib/CollapsingToolbarBaseActivity/res/values/themes.xml +++ b/packages/SettingsLib/CollapsingToolbarBaseActivity/res/values-v31/themes.xml @@ -18,7 +18,7 @@ <style name="Theme.CollapsingToolbar.Settings" parent="@style/Theme.MaterialComponents.DayNight"> <item name="elevationOverlayEnabled">true</item> <item name="elevationOverlayColor">?attr/colorPrimary</item> - <item name="colorPrimary">@*android:color/primary_device_default_settings_light</item> - <item name="colorAccent">@*android:color/accent_device_default_light</item> + <item name="colorPrimary">@color/settingslib_primary_device_default_settings_light</item> + <item name="colorAccent">@color/settingslib_accent_device_default_light</item> </style> </resources>
\ No newline at end of file diff --git a/packages/SettingsLib/FooterPreference/res/values/styles.xml b/packages/SettingsLib/FooterPreference/res/values/styles.xml index 08dd35991f69..5a3bada3e594 100644 --- a/packages/SettingsLib/FooterPreference/res/values/styles.xml +++ b/packages/SettingsLib/FooterPreference/res/values/styles.xml @@ -17,9 +17,8 @@ <resources> <style name="TextAppearance.Footer.Title.SettingsLib" - parent="@android:style/TextAppearance.DeviceDefault.Medium"> + parent="@android:style/TextAppearance.DeviceDefault.WindowTitle"> <item name="android:textSize">14sp</item> - <item name="android:fontFamily">@*android:string/config_headlineFontFamilyMedium</item> <item name="android:textColor">?android:attr/colorAccent</item> </style> </resources>
\ No newline at end of file diff --git a/packages/SettingsLib/LayoutPreference/res/values/styles.xml b/packages/SettingsLib/LayoutPreference/res/values/styles.xml index 4a99e845a5fc..2ffe6d91651b 100644 --- a/packages/SettingsLib/LayoutPreference/res/values/styles.xml +++ b/packages/SettingsLib/LayoutPreference/res/values/styles.xml @@ -24,14 +24,13 @@ </style> <style name="TextAppearance.EntityHeaderTitle" - parent="@android:style/TextAppearance.Material.Subhead"> - <item name="android:fontFamily">@*android:string/config_headlineFontFamilyMedium</item> + parent="@android:style/TextAppearance.DeviceDefault.WindowTitle"> <item name="android:textColor">?android:attr/textColorPrimary</item> <item name="android:textSize">20sp</item> </style> <style name="TextAppearance.EntityHeaderSummary" - parent="@*android:style/TextAppearance.DeviceDefault.Body1"> + parent="@android:style/TextAppearance.DeviceDefault"> <item name="android:textAlignment">viewStart</item> <item name="android:textColor">?android:attr/textColorSecondary</item> <item name="android:singleLine">true</item> diff --git a/packages/SettingsLib/MainSwitchPreference/res/drawable/settingslib_switch_bar_bg_disabled.xml b/packages/SettingsLib/MainSwitchPreference/res/drawable-v31/settingslib_switch_bar_bg_disabled.xml index 088e82bb4260..088e82bb4260 100644 --- a/packages/SettingsLib/MainSwitchPreference/res/drawable/settingslib_switch_bar_bg_disabled.xml +++ b/packages/SettingsLib/MainSwitchPreference/res/drawable-v31/settingslib_switch_bar_bg_disabled.xml diff --git a/packages/SettingsLib/MainSwitchPreference/res/drawable/settingslib_switch_bar_bg_off.xml b/packages/SettingsLib/MainSwitchPreference/res/drawable-v31/settingslib_switch_bar_bg_off.xml index 088e82bb4260..088e82bb4260 100644 --- a/packages/SettingsLib/MainSwitchPreference/res/drawable/settingslib_switch_bar_bg_off.xml +++ b/packages/SettingsLib/MainSwitchPreference/res/drawable-v31/settingslib_switch_bar_bg_off.xml diff --git a/packages/SettingsLib/MainSwitchPreference/res/drawable/settingslib_switch_bar_bg_on.xml b/packages/SettingsLib/MainSwitchPreference/res/drawable-v31/settingslib_switch_bar_bg_on.xml index 250188b892f4..250188b892f4 100644 --- a/packages/SettingsLib/MainSwitchPreference/res/drawable/settingslib_switch_bar_bg_on.xml +++ b/packages/SettingsLib/MainSwitchPreference/res/drawable-v31/settingslib_switch_bar_bg_on.xml diff --git a/packages/SettingsLib/MainSwitchPreference/res/layout-v31/settingslib_main_switch_bar.xml b/packages/SettingsLib/MainSwitchPreference/res/layout-v31/settingslib_main_switch_bar.xml index 6e5911cbf0a0..30748e6244cb 100644 --- a/packages/SettingsLib/MainSwitchPreference/res/layout-v31/settingslib_main_switch_bar.xml +++ b/packages/SettingsLib/MainSwitchPreference/res/layout-v31/settingslib_main_switch_bar.xml @@ -50,7 +50,7 @@ android:tint="?android:attr/colorAccent" android:layout_gravity="center_vertical" android:layout_marginEnd="@dimen/settingslib_restricted_icon_margin_end" - android:src="@*android:drawable/ic_info" + android:src="@android:drawable/ic_info" android:visibility="gone" /> <Switch diff --git a/packages/SettingsLib/MainSwitchPreference/res/layout/settingslib_main_switch_bar.xml b/packages/SettingsLib/MainSwitchPreference/res/layout/settingslib_main_switch_bar.xml index 306145a3e689..d0c2d0b5937d 100644 --- a/packages/SettingsLib/MainSwitchPreference/res/layout/settingslib_main_switch_bar.xml +++ b/packages/SettingsLib/MainSwitchPreference/res/layout/settingslib_main_switch_bar.xml @@ -28,7 +28,7 @@ android:layout_gravity="center_vertical" android:maxLines="2" android:ellipsize="end" - android:textAppearance="@*android:style/TextAppearance.DeviceDefault.Widget.ActionBar.Title" + android:textAppearance="@android:style/TextAppearance.DeviceDefault.Widget.ActionBar.Title" android:textSize="16sp" android:textColor="?android:attr/textColorPrimaryInverse" android:layout_marginStart="@dimen/settingslib_switchbar_subsettings_margin_start" @@ -42,7 +42,7 @@ android:theme="@android:style/Theme.Material" android:layout_gravity="center_vertical" android:layout_marginEnd="@dimen/settingslib_restricted_icon_margin_end" - android:src="@*android:drawable/ic_info" + android:src="@android:drawable/ic_info" android:visibility="gone"/> <Switch diff --git a/packages/SettingsLib/MainSwitchPreference/res/values-v31/dimens.xml b/packages/SettingsLib/MainSwitchPreference/res/values-v31/dimens.xml new file mode 100644 index 000000000000..2272a375fb83 --- /dev/null +++ b/packages/SettingsLib/MainSwitchPreference/res/values-v31/dimens.xml @@ -0,0 +1,37 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- + Copyright (C) 2021 The Android Open Source Project + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + --> + +<resources> + + <!-- Size of layout margin --> + <dimen name="settingslib_switchbar_margin">16dp</dimen> + + <!-- Size of layout margin left --> + <dimen name="settingslib_switchbar_padding_left">24dp</dimen> + + <!-- Size of layout margin right --> + <dimen name="settingslib_switchbar_padding_right">16dp</dimen> + + <!-- Minimum width of switch --> + <dimen name="settingslib_min_switch_width">52dp</dimen> + + <!-- Minimum width of switch bar --> + <dimen name="settingslib_min_switch_bar_height">72dp</dimen> + + <!-- Radius of switch bar --> + <dimen name="settingslib_switch_bar_radius">28dp</dimen> +</resources> diff --git a/packages/SettingsLib/MainSwitchPreference/res/values-v31/styles.xml b/packages/SettingsLib/MainSwitchPreference/res/values-v31/styles.xml new file mode 100644 index 000000000000..a50fc7cc0028 --- /dev/null +++ b/packages/SettingsLib/MainSwitchPreference/res/values-v31/styles.xml @@ -0,0 +1,25 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- + Copyright (C) 2021 The Android Open Source Project + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + --> + +<resources> + + <style name="MainSwitchText.Settingslib" parent="@android:style/TextAppearance.DeviceDefault.Widget.ActionBar.Title"> + <item name="android:textSize">20sp</item> + <item name="android:fontFamily">@string/settingslib_config_headlineFontFamily</item> + <item name="android:textColor">@android:color/black</item> + </style> +</resources> diff --git a/packages/SettingsLib/MainSwitchPreference/res/values/dimens.xml b/packages/SettingsLib/MainSwitchPreference/res/values/dimens.xml index 16b8af6a2dab..6362882e2332 100644 --- a/packages/SettingsLib/MainSwitchPreference/res/values/dimens.xml +++ b/packages/SettingsLib/MainSwitchPreference/res/values/dimens.xml @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="utf-8"?> <!-- - Copyright (C) 2020 The Android Open Source Project + Copyright (C) 2021 The Android Open Source Project Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -17,30 +17,12 @@ <resources> - <!-- Size of layout margin --> - <dimen name="settingslib_switchbar_margin">16dp</dimen> - - <!-- Size of layout margin left --> - <dimen name="settingslib_switchbar_padding_left">24dp</dimen> - - <!-- Size of layout margin right --> - <dimen name="settingslib_switchbar_padding_right">16dp</dimen> - - <!-- Minimum width of switch --> - <dimen name="settingslib_min_switch_width">52dp</dimen> - - <!-- Minimum width of switch bar --> - <dimen name="settingslib_min_switch_bar_height">72dp</dimen> - <!-- Restricted icon size in switch bar --> - <dimen name="settingslib_restricted_icon_size">@*android:dimen/config_restrictedIconSize</dimen> + <dimen name="settingslib_restricted_icon_size">@android:dimen/config_restrictedIconSize</dimen> <!-- Restricted icon in switch bar --> <dimen name="settingslib_restricted_icon_margin_end">16dp</dimen> - <!-- Radius of switch bar --> - <dimen name="settingslib_switch_bar_radius">28dp</dimen> - <!-- Size of title margin --> <dimen name="settingslib_switch_title_margin">16dp</dimen> diff --git a/packages/SettingsLib/MainSwitchPreference/res/values/styles.xml b/packages/SettingsLib/MainSwitchPreference/res/values/styles.xml index 3924e301a2d3..870812ae6caf 100644 --- a/packages/SettingsLib/MainSwitchPreference/res/values/styles.xml +++ b/packages/SettingsLib/MainSwitchPreference/res/values/styles.xml @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="utf-8"?> <!-- - Copyright (C) 2020 The Android Open Source Project + Copyright (C) 2021 The Android Open Source Project Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -17,13 +17,6 @@ <resources> - <style name="MainSwitchText.Settingslib" parent="@android:style/TextAppearance.DeviceDefault.Widget.ActionBar.Title"> - <item name="android:textSize">20sp</item> - <item name="android:fontFamily">@*android:string/config_headlineFontFamily</item> - <item name="android:textColor">@android:color/black</item> - </style> - - <style name="SwitchBar.Switch.Settingslib" parent="@android:style/Widget.Material.CompoundButton.Switch"> <item name="android:trackTint">@color/settingslib_switchbar_switch_track_tint</item> <item name="android:thumbTint">@color/settingslib_switchbar_switch_thumb_tint</item> diff --git a/packages/SettingsLib/SettingsTheme/res/color-v31/settingslib_surface_light.xml b/packages/SettingsLib/SettingsTheme/res/color-v31/settingslib_surface_light.xml new file mode 100644 index 000000000000..037b80abc6f9 --- /dev/null +++ b/packages/SettingsLib/SettingsTheme/res/color-v31/settingslib_surface_light.xml @@ -0,0 +1,18 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Copyright (C) 2021 The Android Open Source Project + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +--> +<selector xmlns:android="http://schemas.android.com/apk/res/android"> + <item android:color="@android:color/system_neutral1_500" android:lStar="98" /> +</selector>
\ No newline at end of file diff --git a/packages/SettingsLib/SettingsTheme/res/values-night-v31/colors.xml b/packages/SettingsLib/SettingsTheme/res/values-night-v31/colors.xml index 8c7c7ed5b120..e8fd4b24b629 100644 --- a/packages/SettingsLib/SettingsTheme/res/values-night-v31/colors.xml +++ b/packages/SettingsLib/SettingsTheme/res/values-night-v31/colors.xml @@ -36,4 +36,9 @@ <color name="settingslib_dialog_colorError">#f28b82</color> <!-- Red 300 --> <color name="settingslib_colorSurfaceVariant">@android:color/system_neutral1_700</color> + + <color name="settingslib_colorSurfaceHeader">@android:color/system_neutral1_700</color> + + <!-- copy from accent_primary_variant_dark_device_default--> + <color name="settingslib_accent_primary_variant">@android:color/system_accent1_300</color> </resources>
\ No newline at end of file diff --git a/packages/SettingsLib/SettingsTheme/res/values-v31/colors.xml b/packages/SettingsLib/SettingsTheme/res/values-v31/colors.xml index 77f1bcd17371..0f20ec326e74 100644 --- a/packages/SettingsLib/SettingsTheme/res/values-v31/colors.xml +++ b/packages/SettingsLib/SettingsTheme/res/values-v31/colors.xml @@ -37,9 +37,30 @@ <!-- Dialog accent color --> <color name="settingslib_dialog_accent">@android:color/system_accent1_600</color> <!-- Dialog background color --> - <color name="settingslib_dialog_background">@*android:color/surface_light</color> + <color name="settingslib_dialog_background">@color/settingslib_surface_light</color> <!-- Dialog error color. --> <color name="settingslib_dialog_colorError">#d93025</color> <!-- Red 600 --> <color name="settingslib_colorSurfaceVariant">@android:color/system_neutral2_100</color> + + <color name="settingslib_colorSurfaceHeader">@android:color/system_neutral1_100</color> + + <color name="settingslib_accent_device_default_dark">@android:color/system_accent1_100</color> + + <color name="settingslib_accent_device_default_light">@android:color/system_accent1_600</color> + + <color name="settingslib_primary_dark_device_default_settings">@android:color/system_neutral1_900</color> + + <color name="settingslib_primary_device_default_settings_light">@android:color/system_neutral1_50</color> + + <color name="settingslib_accent_primary_device_default">@android:color/system_accent1_100</color> + + <!-- copy from accent_primary_variant_light_device_default--> + <color name="settingslib_accent_primary_variant">@android:color/system_accent1_600</color> + + <color name="settingslib_accent_secondary_device_default">@android:color/system_accent2_100</color> + + <color name="settingslib_background_device_default_dark">@android:color/system_neutral1_900</color> + + <color name="settingslib_background_device_default_light">@android:color/system_neutral1_50</color> </resources> diff --git a/packages/SettingsLib/SettingsTheme/res/values-v31/dimens.xml b/packages/SettingsLib/SettingsTheme/res/values-v31/dimens.xml index ddcc83eee4bf..1c33f1a57ea5 100644 --- a/packages/SettingsLib/SettingsTheme/res/values-v31/dimens.xml +++ b/packages/SettingsLib/SettingsTheme/res/values-v31/dimens.xml @@ -19,4 +19,5 @@ <dimen name="app_preference_padding_start">20dp</dimen> <dimen name="app_icon_min_width">52dp</dimen> <dimen name="settingslib_preferred_minimum_touch_target">48dp</dimen> + <dimen name="settingslib_dialogCornerRadius">28dp</dimen> </resources> diff --git a/packages/SettingsLib/SettingsTheme/res/values-v31/strings.xml b/packages/SettingsLib/SettingsTheme/res/values-v31/strings.xml new file mode 100644 index 000000000000..6d072a936b15 --- /dev/null +++ b/packages/SettingsLib/SettingsTheme/res/values-v31/strings.xml @@ -0,0 +1,37 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- Copyright (C) 2021 The Android Open Source Project + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +--> + +<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> + <!-- Name of a font family to use for headlines in SettingsLib. --> + <string name="settingslib_config_headlineFontFamily" translatable="false"> + @*android:string/config_headlineFontFamily + </string> + + <!-- Name of a font family to use for headlines-medium in SettingsLib. --> + <string name="settingslib_config_headlineFontFamilyMedium" translatable="false"> + @*android:string/config_headlineFontFamilyMedium + </string> + + <!-- Name of a font family to use for body in SettingsLib. --> + <string name="settingslib_config_bodyFontFamily" translatable="false"> + @*android:string/config_bodyFontFamily + </string> + + <!-- Name of a font family to use for body-medium in SettingsLib. --> + <string name="settingslib_config_bodyFontFamilyMedium" translatable="false"> + @*android:string/config_bodyFontFamilyMedium + </string> +</resources> diff --git a/packages/SettingsLib/SettingsTheme/res/values-v31/styles.xml b/packages/SettingsLib/SettingsTheme/res/values-v31/styles.xml index 46f1e030af23..58006369988e 100644 --- a/packages/SettingsLib/SettingsTheme/res/values-v31/styles.xml +++ b/packages/SettingsLib/SettingsTheme/res/values-v31/styles.xml @@ -16,12 +16,16 @@ --> <resources> <style name="TextAppearance.PreferenceTitle.SettingsLib" - parent="@*android:style/TextAppearance.DeviceDefault.ListItem"> + parent="@android:style/TextAppearance.Material.Subhead"> + <item name="android:fontFamily">@string/settingslib_config_headlineFontFamily</item> <item name="android:textSize">20sp</item> </style> <style name="TextAppearance.CategoryTitle.SettingsLib" - parent="@*android:style/TextAppearance.DeviceDefault.Body2" /> + parent="@android:style/TextAppearance.DeviceDefault.Medium"> + <item name="android:textColor">?android:attr/textColorPrimary</item> + <item name="android:textSize">14sp</item> + </style> <style name="Switch.SettingsLib" parent="@android:style/Widget.Material.CompoundButton.Switch"> <item name="android:switchMinWidth">52dp</item> diff --git a/packages/SettingsLib/SettingsTheme/res/values-v31/themes.xml b/packages/SettingsLib/SettingsTheme/res/values-v31/themes.xml index 8034710b4341..6bf288b74d5a 100644 --- a/packages/SettingsLib/SettingsTheme/res/values-v31/themes.xml +++ b/packages/SettingsLib/SettingsTheme/res/values-v31/themes.xml @@ -50,6 +50,6 @@ <item name="android:clipToPadding">true</item> <item name="android:clipChildren">true</item> - <item name="dialogCornerRadius">@*android:dimen/config_dialogCornerRadius</item> + <item name="dialogCornerRadius">@dimen/settingslib_dialogCornerRadius</item> </style> </resources>
\ No newline at end of file diff --git a/packages/SettingsLib/SettingsTheme/res/values/dimens.xml b/packages/SettingsLib/SettingsTheme/res/values/dimens.xml index 25f9514c29b7..18af1f9c15d0 100644 --- a/packages/SettingsLib/SettingsTheme/res/values/dimens.xml +++ b/packages/SettingsLib/SettingsTheme/res/values/dimens.xml @@ -20,4 +20,5 @@ <dimen name="app_preference_padding_start">?android:attr/listPreferredItemPaddingStart</dimen> <dimen name="app_icon_min_width">56dp</dimen> <dimen name="two_target_min_width">72dp</dimen> + <dimen name="settingslib_dialogCornerRadius">8dp</dimen> </resources> diff --git a/packages/SettingsLib/SettingsTheme/res/values/themes.xml b/packages/SettingsLib/SettingsTheme/res/values/themes.xml index 6f2517746ddc..2d881d1a8a7b 100644 --- a/packages/SettingsLib/SettingsTheme/res/values/themes.xml +++ b/packages/SettingsLib/SettingsTheme/res/values/themes.xml @@ -35,7 +35,7 @@ <!-- TODO(b/189308264): fix the crash in Android R if set the attributes: <item name="colorAccent">@*android:color/accent_device_default_light</item> <item name="android:colorBackground">@color/settingslib_dialog_background</item> - <item name="dialogCornerRadius">@*android:dimen/config_dialogCornerRadius</item> + <item name="dialogCornerRadius">@dimen/settingslib_dialogCornerRadius</item> --> <item name="android:windowSoftInputMode">adjustResize</item> <item name="android:clipToPadding">true</item> diff --git a/packages/SettingsLib/TopIntroPreference/res/values/styles.xml b/packages/SettingsLib/TopIntroPreference/res/values/styles.xml index 65869b5580b5..b6ca41fb6b6d 100644 --- a/packages/SettingsLib/TopIntroPreference/res/values/styles.xml +++ b/packages/SettingsLib/TopIntroPreference/res/values/styles.xml @@ -16,8 +16,7 @@ --> <resources> <style name="TextAppearance.TopIntroText" - parent="@*android:style/TextAppearance.DeviceDefault"> - <item name="android:fontFamily">@*android:string/config_bodyFontFamily</item> + parent="@android:style/TextAppearance.DeviceDefault"> <item name="android:textSize">14sp</item> <item name="android:textColor">?android:attr/textColorSecondary</item> </style> diff --git a/packages/SettingsLib/res/values-ar/strings.xml b/packages/SettingsLib/res/values-ar/strings.xml index 881b76bcf62d..e397035ea0ac 100644 --- a/packages/SettingsLib/res/values-ar/strings.xml +++ b/packages/SettingsLib/res/values-ar/strings.xml @@ -511,7 +511,7 @@ <string name="alarms_and_reminders_label" msgid="6918395649731424294">"المنبّهات والتذكيرات"</string> <string name="alarms_and_reminders_switch_title" msgid="4939393911531826222">"السماح بضبط المنبّهات والتذكيرات"</string> <string name="alarms_and_reminders_title" msgid="8819933264635406032">"المنبّهات والتذكيرات"</string> - <string name="alarms_and_reminders_footer_title" msgid="6302587438389079695">"عليك السماح لهذا التطبيق بضبط المنبّهات وتحديد مواعيد للإجراءات الحساسة زمنيًا. يسمح هذا الأذن بتشغيل التطبيق في الخلفية، ما قد يستهلك المزيد من شحن البطارية.\n\nإذا كان هذا الإذن غير مسموح به، لن تعمل الأحداث المستندة إلى وقت والمنبّهات الحالية التي يحدِّد هذا التطبيق موعدها."</string> + <string name="alarms_and_reminders_footer_title" msgid="6302587438389079695">"يمكنك السماح لهذا التطبيق بضبط المنبّهات وجدولة الإجراءات لتنفيذها في الوقت المناسب. ويسمح هذا الإذن بتشغيل التطبيق في الخلفية، ما قد يستهلك المزيد من البطارية.\n\nفي حال عدم تفعيل هذا الإذن، لن تعمل المنبهات الحالية والأحداث المستندة إلى الوقت المضبوطة في هذا التطبيق."</string> <string name="keywords_alarms_and_reminders" msgid="6633360095891110611">"جدول زمني، جدولة، منبّه، تذكير، ساعة"</string> <string name="zen_mode_enable_dialog_turn_on" msgid="6418297231575050426">"تفعيل"</string> <string name="zen_mode_settings_turn_on_dialog_title" msgid="2760567063190790696">"تفعيل ميزة \"عدم الإزعاج\""</string> diff --git a/packages/SettingsLib/res/values-es-rUS/strings.xml b/packages/SettingsLib/res/values-es-rUS/strings.xml index 7755cb74b04f..048039f6af81 100644 --- a/packages/SettingsLib/res/values-es-rUS/strings.xml +++ b/packages/SettingsLib/res/values-es-rUS/strings.xml @@ -426,7 +426,7 @@ <string name="daltonizer_mode_protanomaly" msgid="7805583306666608440">"Protanomalía (rojo-verde)"</string> <string name="daltonizer_mode_tritanomaly" msgid="7135266249220732267">"Tritanomalía (azul-amarillo)"</string> <string name="accessibility_display_daltonizer_preference_title" msgid="1810693571332381974">"Corrección de color"</string> - <string name="accessibility_display_daltonizer_preference_subtitle" msgid="2333641630205214702">"Ajusta cómo se muestran los colores en tu dispositivo. Esto puede ser útil cuando quieres:<br/><br/> <ol> <li> Ver colores con más exactitud</li> <li> Quitar colores para tener un enfoque más claro</li> </ol>"</string> + <string name="accessibility_display_daltonizer_preference_subtitle" msgid="2333641630205214702">"Ajusta cómo se muestran los colores en tu dispositivo. Esto puede ser útil cuando quieres:<br/><br/> <ol> <li>&nbsp;Ver colores con más exactitud</li> <li>&nbsp;Quitar colores para tener un enfoque más claro</li> </ol>"</string> <string name="daltonizer_type_overridden" msgid="4509604753672535721">"Reemplazado por <xliff:g id="TITLE">%1$s</xliff:g>"</string> <string name="power_remaining_settings_home_page" msgid="4885165789445462557">"<xliff:g id="PERCENTAGE">%1$s</xliff:g> - <xliff:g id="TIME_STRING">%2$s</xliff:g>"</string> <string name="power_remaining_duration_only" msgid="8264199158671531431">"Tiempo restante: aproximadamente <xliff:g id="TIME_REMAINING">%1$s</xliff:g>"</string> diff --git a/packages/SettingsLib/res/values-et/strings.xml b/packages/SettingsLib/res/values-et/strings.xml index d835cb95ed98..60469a1d2b17 100644 --- a/packages/SettingsLib/res/values-et/strings.xml +++ b/packages/SettingsLib/res/values-et/strings.xml @@ -507,7 +507,7 @@ <string name="alarms_and_reminders_label" msgid="6918395649731424294">"Alarmid ja meeldetuletused"</string> <string name="alarms_and_reminders_switch_title" msgid="4939393911531826222">"Luba alarmide ja meeldetuletuste määramine"</string> <string name="alarms_and_reminders_title" msgid="8819933264635406032">"Alarmid ja meeldetuletused"</string> - <string name="alarms_and_reminders_footer_title" msgid="6302587438389079695">"Lubage sellel rakendusel määrata alarme ja ajastada kiire tähtajaga toiminguid. See võimaldab rakendusel töötada taustal, mistõttu võib akukasutus olla suurem.\n\nKui see luba on välja lülitatud, siis olemasolevad alarmid ja selle rakenduse ajastatud ajapõhised sündmused ei tööta."</string> + <string name="alarms_and_reminders_footer_title" msgid="6302587438389079695">"Lubage sellel rakendusel määrata alarme ja ajastada ajakriitilisi toiminguid. See võimaldab rakendusel töötada taustal, mistõttu võib akukasutus olla suurem.\n\nKui see luba on välja lülitatud, siis olemasolevad alarmid ja selle rakenduse ajastatud ajapõhised sündmused ei tööta."</string> <string name="keywords_alarms_and_reminders" msgid="6633360095891110611">"ajakava, äratus, meeldetuletus, kell"</string> <string name="zen_mode_enable_dialog_turn_on" msgid="6418297231575050426">"Lülita sisse"</string> <string name="zen_mode_settings_turn_on_dialog_title" msgid="2760567063190790696">"Valiku Mitte segada sisselülitamine"</string> diff --git a/packages/SettingsLib/res/values-hi/strings.xml b/packages/SettingsLib/res/values-hi/strings.xml index bf9b72e45a88..630000fe6921 100644 --- a/packages/SettingsLib/res/values-hi/strings.xml +++ b/packages/SettingsLib/res/values-hi/strings.xml @@ -527,7 +527,7 @@ <string name="profile_connect_timeout_subtext" msgid="4043408193005851761">"कनेक्ट करने में समस्या हो रही है. डिवाइस को बंद करके चालू करें"</string> <string name="media_transfer_wired_device_name" msgid="4447880899964056007">"वायर वाला ऑडियो डिवाइस"</string> <string name="help_label" msgid="3528360748637781274">"सहायता और सुझाव"</string> - <string name="storage_category" msgid="2287342585424631813">"डिवाइस की मेमोरी"</string> + <string name="storage_category" msgid="2287342585424631813">"डिवाइस का स्टोरेज"</string> <string name="shared_data_title" msgid="1017034836800864953">"शेयर किया गया डेटा"</string> <string name="shared_data_summary" msgid="5516326713822885652">"शेयर किए गए डेटा को देखें और उसमें बदलाव करें"</string> <string name="shared_data_no_blobs_text" msgid="3108114670341737434">"इस उपयोगकर्ता के साथ किसी तरह का डेटा शेयर नहीं किया गया है."</string> diff --git a/packages/SettingsLib/res/values-in/strings.xml b/packages/SettingsLib/res/values-in/strings.xml index 4b37650563ac..c1403082e37b 100644 --- a/packages/SettingsLib/res/values-in/strings.xml +++ b/packages/SettingsLib/res/values-in/strings.xml @@ -507,7 +507,7 @@ <string name="alarms_and_reminders_label" msgid="6918395649731424294">"Alarm dan pengingat"</string> <string name="alarms_and_reminders_switch_title" msgid="4939393911531826222">"Izinkan menyetel alarm dan pengingat"</string> <string name="alarms_and_reminders_title" msgid="8819933264635406032">"Alarm & pengingat"</string> - <string name="alarms_and_reminders_footer_title" msgid="6302587438389079695">"Izinkan aplikasi ini menyetel alarm dan menjadwalkan tindakan berjangka waktu. Hal ini memungkinkan aplikasi berjalan di latar belakang, sehingga mungkin menggunakan lebih banyak daya baterai.\n\nJika izin ini dinonaktifkan, alarm dan acara berjangka waktu yang dijadwalkan oleh aplikasi ini tidak akan berfungsi."</string> + <string name="alarms_and_reminders_footer_title" msgid="6302587438389079695">"Izinkan aplikasi ini menyetel alarm dan menjadwalkan tindakan yang sensitif waktu. Hal ini memungkinkan aplikasi berjalan di latar belakang, sehingga mungkin menggunakan lebih banyak daya baterai.\n\nJika izin ini dinonaktifkan, alarm dan acara berbasis waktu yang dijadwalkan oleh aplikasi ini tidak akan berfungsi."</string> <string name="keywords_alarms_and_reminders" msgid="6633360095891110611">"jadwal, alarm, pengingat, jam"</string> <string name="zen_mode_enable_dialog_turn_on" msgid="6418297231575050426">"Aktifkan"</string> <string name="zen_mode_settings_turn_on_dialog_title" msgid="2760567063190790696">"Aktifkan mode Jangan Ganggu"</string> diff --git a/packages/SettingsLib/res/values-iw/strings.xml b/packages/SettingsLib/res/values-iw/strings.xml index 71cc9a031364..9f2d8a2d346e 100644 --- a/packages/SettingsLib/res/values-iw/strings.xml +++ b/packages/SettingsLib/res/values-iw/strings.xml @@ -426,7 +426,7 @@ <string name="daltonizer_mode_protanomaly" msgid="7805583306666608440">"פרוטנומליה (אדום-ירוק)"</string> <string name="daltonizer_mode_tritanomaly" msgid="7135266249220732267">"טריטנומליה (כחול-צהוב)"</string> <string name="accessibility_display_daltonizer_preference_title" msgid="1810693571332381974">"תיקון צבע"</string> - <string name="accessibility_display_daltonizer_preference_subtitle" msgid="2333641630205214702">"ניתן לשנות את האופן שבו צבעים מוצגים במכשיר. שינוי כזה עשוי לעזור:<br/><br/> <ol> <li> להבחין בצבעים בצורה יותר מדויקת</li> <li> להסיר צבעים מסוימים כדי להתמקד</li> </ol>"</string> + <string name="accessibility_display_daltonizer_preference_subtitle" msgid="2333641630205214702">"ניתן לשנות את האופן שבו צבעים מוצגים במכשיר. שינוי כזה עשוי לעזור:<br/><br/> <ol> <li>&nbsp;להבחין בצבעים בצורה יותר מדויקת</li> <li>&nbsp;להסיר צבעים מסוימים כדי להתמקד</li> </ol>"</string> <string name="daltonizer_type_overridden" msgid="4509604753672535721">"נעקף על ידי <xliff:g id="TITLE">%1$s</xliff:g>"</string> <string name="power_remaining_settings_home_page" msgid="4885165789445462557">"<xliff:g id="PERCENTAGE">%1$s</xliff:g> – <xliff:g id="TIME_STRING">%2$s</xliff:g>"</string> <string name="power_remaining_duration_only" msgid="8264199158671531431">"הזמן הנותר: בערך <xliff:g id="TIME_REMAINING">%1$s</xliff:g>"</string> diff --git a/packages/SettingsLib/res/values-mn/strings.xml b/packages/SettingsLib/res/values-mn/strings.xml index 25769936ebfc..474ded9972c7 100644 --- a/packages/SettingsLib/res/values-mn/strings.xml +++ b/packages/SettingsLib/res/values-mn/strings.xml @@ -426,7 +426,7 @@ <string name="daltonizer_mode_protanomaly" msgid="7805583306666608440">"Протаномаль (улаан-ногоон)"</string> <string name="daltonizer_mode_tritanomaly" msgid="7135266249220732267">"Тританомаль (цэнхэр-шар)"</string> <string name="accessibility_display_daltonizer_preference_title" msgid="1810693571332381974">"Өнгө тохируулах"</string> - <string name="accessibility_display_daltonizer_preference_subtitle" msgid="2333641630205214702">"Таны төхөөрөмж дээр өнгийг хэрхэн үзүүлэхийг тохируулна уу. Энэ нь танд дараахыг хийхийг хүссэн үед хэрэг болж магадгүй:<br/><br/> <ol> <li>Өнгийг илүү оновчтой харах</li> <li>Танд төвлөрөхөд туслахын тулд өнгийг хасах</li> </ol>"</string> + <string name="accessibility_display_daltonizer_preference_subtitle" msgid="2333641630205214702">"Таны төхөөрөмж дээр өнгийг хэрхэн үзүүлэхийг тохируулна уу. Энэ нь танд дараахыг хийхийг хүссэн үед хэрэг болж магадгүй:<br/><br/> <ol> <li>&nbsp;Өнгийг илүү оновчтой харах</li> <li>&nbsp;Танд төвлөрөхөд туслахын тулд өнгийг хасах</li> </ol>"</string> <string name="daltonizer_type_overridden" msgid="4509604753672535721">"Давхарласан <xliff:g id="TITLE">%1$s</xliff:g>"</string> <string name="power_remaining_settings_home_page" msgid="4885165789445462557">"<xliff:g id="PERCENTAGE">%1$s</xliff:g> - <xliff:g id="TIME_STRING">%2$s</xliff:g>"</string> <string name="power_remaining_duration_only" msgid="8264199158671531431">"Ойролцоогоор <xliff:g id="TIME_REMAINING">%1$s</xliff:g> үлдсэн"</string> diff --git a/packages/SettingsLib/res/values-sq/strings.xml b/packages/SettingsLib/res/values-sq/strings.xml index 78b35aad1b20..e39b4200b83b 100644 --- a/packages/SettingsLib/res/values-sq/strings.xml +++ b/packages/SettingsLib/res/values-sq/strings.xml @@ -507,7 +507,7 @@ <string name="alarms_and_reminders_label" msgid="6918395649731424294">"Alarmet dhe alarmet rikujtuese"</string> <string name="alarms_and_reminders_switch_title" msgid="4939393911531826222">"Lejo caktimin e alarmeve dhe alarmeve rikujtuese"</string> <string name="alarms_and_reminders_title" msgid="8819933264635406032">"Alarmet dhe alarmet rikujtuese"</string> - <string name="alarms_and_reminders_footer_title" msgid="6302587438389079695">"Lejo që ky aplikacion të caktojë alarmet dhe të planifikojë veprime që kanë një afat të caktuar. Kjo lejon që aplikacioni të ekzekutohet në sfond, gjë që mund të përdorë më shumë bateri.\n\nNëse kjo leje është caktuar si joaktive, alarmet ekzistuese dhe ngjarjet me bazë kohore të planifikuara nga ky apliikacion nuk do të funksionojnë."</string> + <string name="alarms_and_reminders_footer_title" msgid="6302587438389079695">"Lejo që ky aplikacion të caktojë alarmet dhe të planifikojë veprime që kanë një afat të caktuar. Kjo mundëson që aplikacioni të ekzekutohet në sfond, gjë që mund të përdorë më shumë bateri.\n\nNëse kjo leje është caktuar si joaktive, alarmet ekzistuese dhe ngjarjet në bazë kohore të planifikuara nga ky aplikacion nuk do të funksionojnë."</string> <string name="keywords_alarms_and_reminders" msgid="6633360095891110611">"planifiko, alarm, alarm rikujtues, ora"</string> <string name="zen_mode_enable_dialog_turn_on" msgid="6418297231575050426">"Aktivizo"</string> <string name="zen_mode_settings_turn_on_dialog_title" msgid="2760567063190790696">"Aktivizo \"Mos shqetëso\""</string> diff --git a/packages/SettingsLib/res/values-ta/strings.xml b/packages/SettingsLib/res/values-ta/strings.xml index 6255d4132953..4a3b32a3a90f 100644 --- a/packages/SettingsLib/res/values-ta/strings.xml +++ b/packages/SettingsLib/res/values-ta/strings.xml @@ -98,7 +98,7 @@ <string name="bluetooth_hearing_aid_profile_summary_connected" msgid="8191273236809964030">"செவித்துணை கருவிகளுடன் இணைக்கப்பட்டது"</string> <string name="bluetooth_a2dp_profile_summary_connected" msgid="7422607970115444153">"மீடியா ஆடியோவுடன் இணைக்கப்பட்டது"</string> <string name="bluetooth_headset_profile_summary_connected" msgid="2420981566026949688">"மொபைல் ஆடியோவுடன் இணைக்கப்பட்டது"</string> - <string name="bluetooth_opp_profile_summary_connected" msgid="2393521801478157362">"கோப்பைப் பரிமாற்றும் சேவையகத்துடன் இணைக்கப்பட்டது"</string> + <string name="bluetooth_opp_profile_summary_connected" msgid="2393521801478157362">"ஃபைலைப் பரிமாற்றும் சேவையகத்துடன் இணைக்கப்பட்டது"</string> <string name="bluetooth_map_profile_summary_connected" msgid="4141725591784669181">"வரைபடத்துடன் இணைக்கப்பட்டது"</string> <string name="bluetooth_sap_profile_summary_connected" msgid="1280297388033001037">"SAP உடன் இணைக்கப்பட்டது"</string> <string name="bluetooth_opp_profile_summary_not_connected" msgid="3959741824627764954">"கோப்பு இடமாற்றும் சேவையகத்துடன் இணைக்கப்படவில்லை"</string> @@ -426,7 +426,7 @@ <string name="daltonizer_mode_protanomaly" msgid="7805583306666608440">"நிறம் அடையாளங்காண முடியாமை (சிவப்பு-பச்சை)"</string> <string name="daltonizer_mode_tritanomaly" msgid="7135266249220732267">"நிறம் அடையாளங்காண முடியாமை (நீலம்-மஞ்சள்)"</string> <string name="accessibility_display_daltonizer_preference_title" msgid="1810693571332381974">"வண்ணத்திருத்தம்"</string> - <string name="accessibility_display_daltonizer_preference_subtitle" msgid="2333641630205214702">"சாதனத்தில் வண்ணங்கள் காண்பிக்கப்படும் விதத்தைச் சரிசெய்யலாம். இதன் மூலம் நீங்கள் விரும்பும்போதெல்லாம்:<br/><br/> <ol> <li>&nbsp;வண்ணங்களை மிகத் தெளிவாகப் பார்க்கலாம்</li> <li>கவனம் சிதறாமல் இருக்க வண்ணங்களை நீக்கலாம்</li> </ol>"</string> + <string name="accessibility_display_daltonizer_preference_subtitle" msgid="2333641630205214702">"சாதனத்தில் வண்ணங்கள் காண்பிக்கப்படும் விதத்தைச் சரிசெய்யலாம். இதன் மூலம் நீங்கள் விரும்பும்போதெல்லாம்:<br/><br/> <ol> <li>&nbsp;வண்ணங்களை மிகத் தெளிவாகப் பார்க்கலாம்</li> <li>&nbsp;கவனம் சிதறாமல் இருக்க வண்ணங்களை நீக்கலாம்</li> </ol>"</string> <string name="daltonizer_type_overridden" msgid="4509604753672535721">"<xliff:g id="TITLE">%1$s</xliff:g> மூலம் மேலெழுதப்பட்டது"</string> <string name="power_remaining_settings_home_page" msgid="4885165789445462557">"<xliff:g id="PERCENTAGE">%1$s</xliff:g> - <xliff:g id="TIME_STRING">%2$s</xliff:g>"</string> <string name="power_remaining_duration_only" msgid="8264199158671531431">"கிட்டத்தட்ட <xliff:g id="TIME_REMAINING">%1$s</xliff:g> மீதமுள்ளது"</string> diff --git a/packages/SettingsLib/res/values-te/strings.xml b/packages/SettingsLib/res/values-te/strings.xml index 4f74d2492d43..9a1e4f4297c4 100644 --- a/packages/SettingsLib/res/values-te/strings.xml +++ b/packages/SettingsLib/res/values-te/strings.xml @@ -33,12 +33,12 @@ <string name="wifi_cant_connect_to_ap" msgid="3099667989279700135">"\'<xliff:g id="AP_NAME">%1$s</xliff:g>\'కు కనెక్ట్ చేయడం సాధ్యపడదు"</string> <string name="wifi_check_password_try_again" msgid="8817789642851605628">"పాస్వర్డ్ను చెక్ చేసి, మళ్లీ ప్రయత్నించండి"</string> <string name="wifi_not_in_range" msgid="1541760821805777772">"పరిధిలో లేదు"</string> - <string name="wifi_no_internet_no_reconnect" msgid="821591791066497347">"స్వయంచాలకంగా కనెక్ట్ కాదు"</string> + <string name="wifi_no_internet_no_reconnect" msgid="821591791066497347">"ఆటోమేటిక్గా కనెక్ట్ కాదు"</string> <string name="wifi_no_internet" msgid="1774198889176926299">"ఇంటర్నెట్ యాక్సెస్ లేదు"</string> <string name="saved_network" msgid="7143698034077223645">"<xliff:g id="NAME">%1$s</xliff:g> ద్వారా సేవ్ చేయబడింది"</string> <string name="connected_to_metered_access_point" msgid="9179693207918156341">"డేటా నియంత్రణ నెట్వర్క్కు కనెక్ట్ చేయబడింది"</string> - <string name="connected_via_network_scorer" msgid="7665725527352893558">"%1$s ద్వారా స్వయంచాలకంగా కనెక్ట్ చేయబడింది"</string> - <string name="connected_via_network_scorer_default" msgid="7973529709744526285">"నెట్వర్క్ రేటింగ్ ప్రదాత ద్వారా స్వయంచాలకంగా కనెక్ట్ చేయబడింది"</string> + <string name="connected_via_network_scorer" msgid="7665725527352893558">"%1$s ద్వారా ఆటోమేటిక్గా కనెక్ట్ చేయబడింది"</string> + <string name="connected_via_network_scorer_default" msgid="7973529709744526285">"నెట్వర్క్ రేటింగ్ ప్రదాత ద్వారా ఆటోమేటిక్గా కనెక్ట్ చేయబడింది"</string> <string name="connected_via_passpoint" msgid="7735442932429075684">"%1$s ద్వారా కనెక్ట్ చేయబడింది"</string> <string name="connected_via_app" msgid="3532267661404276584">"<xliff:g id="NAME">%1$s</xliff:g> ద్వారా కనెక్ట్ చేయబడింది"</string> <string name="available_via_passpoint" msgid="1716000261192603682">"%1$s ద్వారా అందుబాటులో ఉంది"</string> @@ -83,7 +83,7 @@ <string name="bluetooth_battery_level_untethered" msgid="4002282355111504349">"L: <xliff:g id="BATTERY_LEVEL_AS_PERCENTAGE_0">%1$s</xliff:g> బ్యాటరీ, R: <xliff:g id="BATTERY_LEVEL_AS_PERCENTAGE_1">%2$s</xliff:g> బ్యాటరీ"</string> <string name="bluetooth_active_no_battery_level" msgid="4155462233006205630">"యాక్టివ్గా ఉంది"</string> <string name="bluetooth_profile_a2dp" msgid="4632426382762851724">"మీడియా ఆడియో"</string> - <string name="bluetooth_profile_headset" msgid="5395952236133499331">"ఫోన్ కాల్లు"</string> + <string name="bluetooth_profile_headset" msgid="5395952236133499331">"ఫోన్ కాల్స్"</string> <string name="bluetooth_profile_opp" msgid="6692618568149493430">"ఫైల్ బదిలీ"</string> <string name="bluetooth_profile_hid" msgid="2969922922664315866">"ఇన్పుట్ పరికరం"</string> <string name="bluetooth_profile_pan" msgid="1006235139308318188">"ఇంటర్నెట్ యాక్సెస్"</string> @@ -301,7 +301,7 @@ <string name="mobile_data_always_on_summary" msgid="1112156365594371019">"ఎల్లప్పుడూ మొబైల్ డేటాను యాక్టివ్గా ఉంచు, Wi‑Fi యాక్టివ్గా ఉన్నా కూడా (వేగవంతమైన నెట్వర్క్ మార్పు కోసం)."</string> <string name="tethering_hardware_offload_summary" msgid="7801345335142803029">"అందుబాటులో ఉంటే టెథెరింగ్ హార్డ్వేర్ వేగవృద్ధిని ఉపయోగించండి"</string> <string name="adb_warning_title" msgid="7708653449506485728">"USB డీబగ్గింగ్ను అనుమతించాలా?"</string> - <string name="adb_warning_message" msgid="8145270656419669221">"USB డీబగ్గింగ్ అనేది అభివృద్ధి ప్రయోజనాల కోసం మాత్రమే ఉద్దేశించబడింది. మీ కంప్యూటర్ మరియు మీ పరికరం మధ్య డేటాను కాపీ చేయడానికి, నోటిఫికేషన్ లేకుండా మీ పరికరంలో అనువర్తనాలను ఇన్స్టాల్ చేయడానికి మరియు లాగ్ డేటాను చదవడానికి దీన్ని ఉపయోగించండి."</string> + <string name="adb_warning_message" msgid="8145270656419669221">"USB డీబగ్గింగ్ అనేది అభివృద్ధి ప్రయోజనాల కోసం మాత్రమే ఉద్దేశించబడింది. మీ కంప్యూటర్ మరియు మీ పరికరం మధ్య డేటాను కాపీ చేయడానికి, నోటిఫికేషన్ లేకుండా మీ పరికరంలో యాప్లను ఇన్స్టాల్ చేయడానికి మరియు లాగ్ డేటాను చదవడానికి దీన్ని ఉపయోగించండి."</string> <string name="adbwifi_warning_title" msgid="727104571653031865">"వైర్లెస్ డీబగ్గింగ్ను అనుమతించాలా?"</string> <string name="adbwifi_warning_message" msgid="8005936574322702388">"వైర్లెస్ డీబగ్గింగ్ అనేది అభివృద్ధి ప్రయోజనాల కోసం మాత్రమే ఉద్దేశించబడింది. మీ కంప్యూటర్, పరికరాల మధ్య డేటాను కాపీ చేయడానికి, నోటిఫికేషన్ లేకుండా మీ పరికరంలో యాప్లను ఇన్స్టాల్ చేయడానికి, లాగ్ డేటాను చదవడానికి దీన్ని ఉపయోగించండి."</string> <string name="adb_keys_warning_message" msgid="2968555274488101220">"మీరు గతంలో ప్రామాణీకరించిన అన్ని కంప్యూటర్ల నుండి USB డీబగ్గింగ్కు ప్రాప్యతను ఉపసంహరించాలా?"</string> @@ -541,8 +541,8 @@ <string name="accessor_expires_text" msgid="4625619273236786252">"లీజు గడువు <xliff:g id="DATE">%s</xliff:g>తో ముగుస్తుంది"</string> <string name="delete_blob_text" msgid="2819192607255625697">"షేర్ చేసిన డేటాను తొలగించు"</string> <string name="delete_blob_confirmation_text" msgid="7807446938920827280">"మీరు ఖచ్చితంగా ఈ షేర్ చేసిన డేటాను తొలగించాలనుకుంటున్నారా?"</string> - <string name="user_add_user_item_summary" msgid="5748424612724703400">"వినియోగదారులు వారి స్వంత అనువర్తనాలను మరియు కంటెంట్ను కలిగి ఉన్నారు"</string> - <string name="user_add_profile_item_summary" msgid="5418602404308968028">"మీరు మీ ఖాతా నుండి అనువర్తనాలకు మరియు కంటెంట్కు ప్రాప్యతను పరిమితం చేయవచ్చు"</string> + <string name="user_add_user_item_summary" msgid="5748424612724703400">"వినియోగదారులు వారి స్వంత యాప్లను మరియు కంటెంట్ను కలిగి ఉన్నారు"</string> + <string name="user_add_profile_item_summary" msgid="5418602404308968028">"మీరు మీ ఖాతా నుండి యాప్లకు మరియు కంటెంట్కు ప్రాప్యతను పరిమితం చేయవచ్చు"</string> <string name="user_add_user_item_title" msgid="2394272381086965029">"యూజర్"</string> <string name="user_add_profile_item_title" msgid="3111051717414643029">"పరిమితం చేయబడిన ప్రొఫైల్"</string> <string name="user_add_user_title" msgid="5457079143694924885">"కొత్త వినియోగదారుని జోడించాలా?"</string> diff --git a/packages/SettingsLib/src/com/android/settingslib/enterprise/BiometricActionDisabledByAdminController.java b/packages/SettingsLib/src/com/android/settingslib/enterprise/BiometricActionDisabledByAdminController.java index e0339dacf5ac..d205eaab6656 100644 --- a/packages/SettingsLib/src/com/android/settingslib/enterprise/BiometricActionDisabledByAdminController.java +++ b/packages/SettingsLib/src/com/android/settingslib/enterprise/BiometricActionDisabledByAdminController.java @@ -65,7 +65,6 @@ public class BiometricActionDisabledByAdminController extends BaseActionDisabled Log.d(TAG, "Positive button clicked, component: " + enforcedAdmin.component); final Intent intent = new Intent(ACTION_LEARN_MORE) .putExtra(EXTRA_SETTING_KEY, EXTRA_SETTING_VALUE) - .addFlags(Intent.FLAG_ACTIVITY_NEW_TASK) .setPackage(enforcedAdmin.component.getPackageName()); context.startActivity(intent); }; diff --git a/packages/SettingsLib/src/com/android/settingslib/media/InfoMediaManager.java b/packages/SettingsLib/src/com/android/settingslib/media/InfoMediaManager.java index ed8d524b0132..3c43f4a637ba 100644 --- a/packages/SettingsLib/src/com/android/settingslib/media/InfoMediaManager.java +++ b/packages/SettingsLib/src/com/android/settingslib/media/InfoMediaManager.java @@ -15,7 +15,6 @@ */ package com.android.settingslib.media; -import static android.media.MediaRoute2Info.FEATURE_REMOTE_GROUP_PLAYBACK; import static android.media.MediaRoute2Info.TYPE_BLUETOOTH_A2DP; import static android.media.MediaRoute2Info.TYPE_BUILTIN_SPEAKER; import static android.media.MediaRoute2Info.TYPE_DOCK; @@ -388,34 +387,7 @@ public class InfoMediaManager extends MediaManager { @TargetApi(Build.VERSION_CODES.R) boolean shouldEnableVolumeSeekBar(RoutingSessionInfo sessionInfo) { - if (sessionInfo == null) { - Log.w(TAG, "shouldEnableVolumeSeekBar() package name is null or empty!"); - return false; - } - final List<MediaRoute2Info> mediaRoute2Infos = - mRouterManager.getSelectedRoutes(sessionInfo); - // More than one selected route - if (mediaRoute2Infos.size() > 1) { - if (DEBUG) { - Log.d(TAG, "shouldEnableVolumeSeekBar() package name : " - + sessionInfo.getClientPackageName() - + ", mediaRoute2Infos.size() " + mediaRoute2Infos.size()); - } - return false; - } - // Route contains group feature - for (MediaRoute2Info mediaRoute2Info : mediaRoute2Infos) { - final List<String> features = mediaRoute2Info.getFeatures(); - if (features.contains(FEATURE_REMOTE_GROUP_PLAYBACK)) { - if (DEBUG) { - Log.d(TAG, "shouldEnableVolumeSeekBar() package name : " - + mediaRoute2Info.getClientPackageName() - + "contain group playback "); - } - return false; - } - } - return true; + return false; } private void refreshDevices() { diff --git a/packages/Shell/res/values-te/strings.xml b/packages/Shell/res/values-te/strings.xml index fc49f079f82d..50b5c8550ef2 100644 --- a/packages/Shell/res/values-te/strings.xml +++ b/packages/Shell/res/values-te/strings.xml @@ -18,30 +18,30 @@ xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> <string name="app_label" msgid="3701846017049540910">"షెల్"</string> <string name="bugreport_notification_channel" msgid="2574150205913861141">"బగ్ రిపోర్ట్స్"</string> - <string name="bugreport_in_progress_title" msgid="4311705936714972757">"బగ్ నివేదిక <xliff:g id="ID">#%d</xliff:g> ఉత్పాదించబడుతోంది"</string> - <string name="bugreport_finished_title" msgid="4429132808670114081">"బగ్ నివేదిక <xliff:g id="ID">#%d</xliff:g> సంగ్రహించబడింది"</string> - <string name="bugreport_updating_title" msgid="4423539949559634214">"బగ్ నివేదికకు వివరాలను జోడిస్తోంది"</string> + <string name="bugreport_in_progress_title" msgid="4311705936714972757">"బగ్ రిపోర్ట్ <xliff:g id="ID">#%d</xliff:g> ఉత్పాదించబడుతోంది"</string> + <string name="bugreport_finished_title" msgid="4429132808670114081">"బగ్ రిపోర్ట్ <xliff:g id="ID">#%d</xliff:g> సంగ్రహించబడింది"</string> + <string name="bugreport_updating_title" msgid="4423539949559634214">"బగ్ రిపోర్ట్కు వివరాలను జోడిస్తోంది"</string> <string name="bugreport_updating_wait" msgid="3322151947853929470">"దయచేసి వేచి ఉండండి..."</string> - <string name="bugreport_finished_text" product="watch" msgid="1223616207145252689">"బగ్ నివేదిక త్వరలో ఫోన్లో కనిపిస్తుంది"</string> - <string name="bugreport_finished_text" product="tv" msgid="5758325479058638893">"మీ బగ్ నివేదికను భాగస్వామ్యం చేయడానికి ఎంచుకోండి"</string> - <string name="bugreport_finished_text" product="default" msgid="8353769438382138847">"మీ బగ్ నివేదికను షేర్ చేయడానికి నొక్కండి"</string> - <string name="bugreport_finished_pending_screenshot_text" product="tv" msgid="2343263822812016950">"స్క్రీన్షాట్ లేకుండా మీ బగ్ నివేదికను భాగస్వామ్యం చేయడానికి ఎంచుకోండి లేదా స్క్రీన్షాట్ ముగిసేదాకా వేచి ఉండండి"</string> + <string name="bugreport_finished_text" product="watch" msgid="1223616207145252689">"బగ్ రిపోర్ట్ త్వరలో ఫోన్లో కనిపిస్తుంది"</string> + <string name="bugreport_finished_text" product="tv" msgid="5758325479058638893">"మీ బగ్ రిపోర్ట్ను భాగస్వామ్యం చేయడానికి ఎంచుకోండి"</string> + <string name="bugreport_finished_text" product="default" msgid="8353769438382138847">"మీ బగ్ రిపోర్ట్ను షేర్ చేయడానికి నొక్కండి"</string> + <string name="bugreport_finished_pending_screenshot_text" product="tv" msgid="2343263822812016950">"స్క్రీన్షాట్ లేకుండా మీ బగ్ రిపోర్ట్ను భాగస్వామ్యం చేయడానికి ఎంచుకోండి లేదా స్క్రీన్షాట్ ముగిసేదాకా వేచి ఉండండి"</string> <string name="bugreport_finished_pending_screenshot_text" product="watch" msgid="1474435374470177193">"స్క్రీన్షాట్ లేకుండా మీ బగ్ నివే. భాగ. చేయడానికి నొక్కండి లేదా స్క్రీన్షాట్ ముగిసేదాకా వేచి ఉండండి"</string> <string name="bugreport_finished_pending_screenshot_text" product="default" msgid="1474435374470177193">"స్క్రీన్షాట్ లేకుండా మీ బగ్ నివే. భాగ. చేయడానికి నొక్కండి లేదా స్క్రీన్షాట్ ముగిసేదాకా వేచి ఉండండి"</string> - <string name="bugreport_confirm" msgid="5917407234515812495">"బగ్ రిపోర్ట్స్లో మీరు గోప్యమైనదిగా పరిగణించే (యాప్ వినియోగం, లొకేషన్ డేటా వంటి) డేటాతో పాటు సిస్టమ్కు సంబంధించిన విభిన్న లాగ్ ఫైళ్ల డేటా ఉంటుంది. బగ్ నివేదికలను మీరు విశ్వసించే యాప్లు, వ్యక్తులతో మాత్రమే షేర్ చేయండి."</string> + <string name="bugreport_confirm" msgid="5917407234515812495">"బగ్ రిపోర్ట్స్లో మీరు గోప్యమైనదిగా పరిగణించే (యాప్ వినియోగం, లొకేషన్ డేటా వంటి) డేటాతో పాటు సిస్టమ్కు సంబంధించిన విభిన్న లాగ్ ఫైళ్ల డేటా ఉంటుంది. బగ్ రిపోర్ట్లను మీరు విశ్వసించే యాప్లు, వ్యక్తులతో మాత్రమే షేర్ చేయండి."</string> <string name="bugreport_confirm_dont_repeat" msgid="6179945398364357318">"మళ్లీ చూపవద్దు"</string> <string name="bugreport_storage_title" msgid="5332488144740527109">"బగ్ రిపోర్ట్స్"</string> - <string name="bugreport_unreadable_text" msgid="586517851044535486">"బగ్ నివేదిక ఫైల్ను చదవడం సాధ్యపడలేదు"</string> - <string name="bugreport_add_details_to_zip_failed" msgid="1302931926486712371">"బగ్ నివేదిక వివరాలను జిప్ ఫైల్కు జోడించడం సాధ్యపడలేదు"</string> + <string name="bugreport_unreadable_text" msgid="586517851044535486">"బగ్ రిపోర్ట్ ఫైల్ను చదవడం సాధ్యపడలేదు"</string> + <string name="bugreport_add_details_to_zip_failed" msgid="1302931926486712371">"బగ్ రిపోర్ట్ వివరాలను జిప్ ఫైల్కు జోడించడం సాధ్యపడలేదు"</string> <string name="bugreport_unnamed" msgid="2800582406842092709">"పేరు లేనివి"</string> <string name="bugreport_info_action" msgid="2158204228510576227">"వివరాలు"</string> <string name="bugreport_screenshot_action" msgid="8677781721940614995">"స్క్రీన్షాట్"</string> <string name="bugreport_screenshot_taken" msgid="5684211273096253120">"స్క్రీన్షాట్ విజయవంతంగా తీయబడింది."</string> <string name="bugreport_screenshot_failed" msgid="5853049140806834601">"స్క్రీన్షాట్ను తీయడం సాధ్యపడలేదు."</string> - <string name="bugreport_info_dialog_title" msgid="1355948594292983332">"బగ్ నివేదిక <xliff:g id="ID">#%d</xliff:g> వివరాలు"</string> + <string name="bugreport_info_dialog_title" msgid="1355948594292983332">"బగ్ రిపోర్ట్ <xliff:g id="ID">#%d</xliff:g> వివరాలు"</string> <string name="bugreport_info_name" msgid="4414036021935139527">"ఫైల్ పేరు"</string> <string name="bugreport_info_title" msgid="2306030793918239804">"బగ్ శీర్షిక"</string> <string name="bugreport_info_description" msgid="5072835127481627722">"బగ్ సారాంశం"</string> <string name="save" msgid="4781509040564835759">"సేవ్ చేయి"</string> - <string name="bugreport_intent_chooser_title" msgid="7605709494790894076">"బగ్ నివేదిక షేర్ చేయండి"</string> + <string name="bugreport_intent_chooser_title" msgid="7605709494790894076">"బగ్ రిపోర్ట్ షేర్ చేయండి"</string> </resources> diff --git a/packages/SystemUI/res/layout/media_view.xml b/packages/SystemUI/res/layout/media_view.xml index c0d353bf8f56..075473aef9ac 100644 --- a/packages/SystemUI/res/layout/media_view.xml +++ b/packages/SystemUI/res/layout/media_view.xml @@ -185,7 +185,7 @@ android:maxHeight="@dimen/qs_media_enabled_seekbar_height" android:paddingTop="@dimen/qs_media_enabled_seekbar_vertical_padding" android:layout_marginTop="-22dp" - android:paddingBottom="0dp" + android:paddingBottom="2dp" android:splitTrack="false" /> <!-- Song name --> diff --git a/packages/SystemUI/res/raw/udfps_aod_fp.json b/packages/SystemUI/res/raw/udfps_aod_fp.json index 3b273ff92814..51d9058f4dd2 100644 --- a/packages/SystemUI/res/raw/udfps_aod_fp.json +++ b/packages/SystemUI/res/raw/udfps_aod_fp.json @@ -5,7 +5,7 @@ "op":361, "w":46, "h":65, - "nm":"fingerprint_burn_in_Loop_02", + "nm":"fingerprint_burn_in_loop", "ddd":0, "assets":[ @@ -15,7 +15,7 @@ "ddd":0, "ind":2, "ty":4, - "nm":"Fingerprint_20210701 Outlines 9", + "nm":"Fingerprint_20210701 Outlines 8", "sr":1, "ks":{ "o":{ @@ -171,6 +171,55 @@ "lj":1, "ml":10, "bm":0, + "d":[ + { + "n":"d", + "nm":"dash", + "v":{ + "a":0, + "k":3, + "ix":1 + } + }, + { + "n":"o", + "nm":"offset", + "v":{ + "a":1, + "k":[ + { + "i":{ + "x":[ + 0.833 + ], + "y":[ + 0.833 + ] + }, + "o":{ + "x":[ + 0.167 + ], + "y":[ + 0.167 + ] + }, + "t":0, + "s":[ + 0 + ] + }, + { + "t":360, + "s":[ + -6 + ] + } + ], + "ix":7 + } + } + ], "nm":"Stroke 1", "mn":"ADBE Vector Graphic - Stroke", "hd":false @@ -241,403 +290,12 @@ }, "e":{ "a":0, - "k":17, + "k":100, "ix":2 }, "o":{ - "a":1, - "k":[ - { - "i":{ - "x":[ - 0.833 - ], - "y":[ - 0.833 - ] - }, - "o":{ - "x":[ - 0.167 - ], - "y":[ - 0.167 - ] - }, - "t":0, - "s":[ - 246 - ] - }, - { - "t":360, - "s":[ - 1326 - ] - } - ], - "ix":3 - }, - "m":1, - "ix":2, - "nm":"Trim Paths 1", - "mn":"ADBE Vector Filter - Trim", - "hd":false - }, - { - "ty":"gr", - "it":[ - { - "ty":"tm", - "s":{ - "a":0, - "k":0, - "ix":1 - }, - "e":{ - "a":0, - "k":17, - "ix":2 - }, - "o":{ - "a":0, - "k":0, - "ix":3 - }, - "m":1, - "ix":1, - "nm":"Trim Paths 1", - "mn":"ADBE Vector Filter - Trim", - "hd":false - }, - { - "ty":"tr", - "p":{ - "a":0, - "k":[ - 0, - 0 - ], - "ix":2 - }, - "a":{ - "a":0, - "k":[ - 0, - 0 - ], - "ix":1 - }, - "s":{ - "a":0, - "k":[ - 100, - 100 - ], - "ix":3 - }, - "r":{ - "a":0, - "k":0, - "ix":6 - }, - "o":{ - "a":0, - "k":100, - "ix":7 - }, - "sk":{ - "a":0, - "k":0, - "ix":4 - }, - "sa":{ - "a":0, - "k":0, - "ix":5 - }, - "nm":"Transform" - } - ], - "nm":"Group 1", - "np":1, - "cix":2, - "bm":0, - "ix":3, - "mn":"ADBE Vector Group", - "hd":false - } - ], - "ip":0, - "op":600, - "st":0, - "bm":0 - }, - { - "ddd":0, - "ind":3, - "ty":4, - "nm":"Fingerprint_20210701 Outlines 8", - "sr":1, - "ks":{ - "o":{ - "a":0, - "k":100, - "ix":11 - }, - "r":{ - "a":0, - "k":0, - "ix":10 - }, - "p":{ - "a":0, - "k":[ - 23.091, - 32.5, - 0 - ], - "ix":2, - "l":2 - }, - "a":{ - "a":0, - "k":[ - 19.341, - 24.25, - 0 - ], - "ix":1, - "l":2 - }, - "s":{ - "a":0, - "k":[ - 100, - 100, - 100 - ], - "ix":6, - "l":2 - } - }, - "ao":0, - "shapes":[ - { - "ty":"gr", - "it":[ - { - "ind":0, - "ty":"sh", - "ix":1, - "ks":{ - "a":0, - "k":{ - "i":[ - [ - 0, - 0 - ], - [ - -1.701, - 0.42 - ], - [ - -1.757, - 0 - ], - [ - -1.577, - -0.381 - ], - [ - -1.485, - -0.816 - ] - ], - "o":[ - [ - 1.455, - -0.799 - ], - [ - 1.608, - -0.397 - ], - [ - 1.719, - 0 - ], - [ - 1.739, - 0.42 - ], - [ - 0, - 0 - ] - ], - "v":[ - [ - -9.818, - 1.227 - ], - [ - -5.064, - -0.618 - ], - [ - 0, - -1.227 - ], - [ - 4.96, - -0.643 - ], - [ - 9.818, - 1.227 - ] - ], - "c":false - }, - "ix":2 - }, - "nm":"Path 1", - "mn":"ADBE Vector Shape - Group", - "hd":false - }, - { - "ty":"st", - "c":{ - "a":0, - "k":[ - 1, - 1, - 1, - 1 - ], - "ix":3 - }, - "o":{ - "a":0, - "k":100, - "ix":4 - }, - "w":{ - "a":0, - "k":1.3, - "ix":5 - }, - "lc":2, - "lj":1, - "ml":10, - "bm":0, - "nm":"Stroke 1", - "mn":"ADBE Vector Graphic - Stroke", - "hd":false - }, - { - "ty":"tr", - "p":{ - "a":0, - "k":[ - 19.341, - 7.477 - ], - "ix":2 - }, - "a":{ - "a":0, - "k":[ - 0, - 0 - ], - "ix":1 - }, - "s":{ - "a":0, - "k":[ - 100, - 100 - ], - "ix":3 - }, - "r":{ - "a":0, - "k":0, - "ix":6 - }, - "o":{ - "a":0, - "k":100, - "ix":7 - }, - "sk":{ - "a":0, - "k":0, - "ix":4 - }, - "sa":{ - "a":0, - "k":0, - "ix":5 - }, - "nm":"Transform" - } - ], - "nm":"Top", - "np":2, - "cix":2, - "bm":0, - "ix":1, - "mn":"ADBE Vector Group", - "hd":false - }, - { - "ty":"tm", - "s":{ "a":0, "k":0, - "ix":1 - }, - "e":{ - "a":0, - "k":54, - "ix":2 - }, - "o":{ - "a":1, - "k":[ - { - "i":{ - "x":[ - 0.833 - ], - "y":[ - 0.833 - ] - }, - "o":{ - "x":[ - 0.167 - ], - "y":[ - 0.167 - ] - }, - "t":0, - "s":[ - 0 - ] - }, - { - "t":360, - "s":[ - 1080 - ] - } - ], "ix":3 }, "m":1, @@ -645,257 +303,6 @@ "nm":"Trim Paths 1", "mn":"ADBE Vector Filter - Trim", "hd":false - } - ], - "ip":0, - "op":600, - "st":0, - "bm":0 - }, - { - "ddd":0, - "ind":4, - "ty":4, - "nm":"Fingerprint_20210701 Outlines 7", - "sr":1, - "ks":{ - "o":{ - "a":0, - "k":100, - "ix":11 - }, - "r":{ - "a":0, - "k":0, - "ix":10 - }, - "p":{ - "a":0, - "k":[ - 23.091, - 32.5, - 0 - ], - "ix":2, - "l":2 - }, - "a":{ - "a":0, - "k":[ - 19.341, - 24.25, - 0 - ], - "ix":1, - "l":2 - }, - "s":{ - "a":0, - "k":[ - 100, - 100, - 100 - ], - "ix":6, - "l":2 - } - }, - "ao":0, - "shapes":[ - { - "ty":"gr", - "it":[ - { - "ind":0, - "ty":"sh", - "ix":1, - "ks":{ - "a":0, - "k":{ - "i":[ - [ - 0, - 0 - ], - [ - -2.446, - 1.161 - ], - [ - -1.168, - 0.275 - ], - [ - -1.439, - 0 - ], - [ - -1.301, - -0.304 - ], - [ - -1.225, - -0.66 - ], - [ - -1.11, - -1.844 - ] - ], - "o":[ - [ - 1.23, - -2.044 - ], - [ - 1.024, - -0.486 - ], - [ - 1.312, - -0.31 - ], - [ - 1.425, - 0 - ], - [ - 1.454, - 0.34 - ], - [ - 2.122, - 1.143 - ], - [ - 0, - 0 - ] - ], - "v":[ - [ - -13.091, - 3.273 - ], - [ - -7.438, - -1.646 - ], - [ - -4.14, - -2.797 - ], - [ - 0, - -3.273 - ], - [ - 4.104, - -2.805 - ], - [ - 8.141, - -1.29 - ], - [ - 13.091, - 3.273 - ] - ], - "c":false - }, - "ix":2 - }, - "nm":"Path 1", - "mn":"ADBE Vector Shape - Group", - "hd":false - }, - { - "ty":"st", - "c":{ - "a":0, - "k":[ - 1, - 1, - 1, - 1 - ], - "ix":3 - }, - "o":{ - "a":0, - "k":100, - "ix":4 - }, - "w":{ - "a":0, - "k":1.3, - "ix":5 - }, - "lc":2, - "lj":1, - "ml":10, - "bm":0, - "nm":"Stroke 1", - "mn":"ADBE Vector Graphic - Stroke", - "hd":false - }, - { - "ty":"tr", - "p":{ - "a":0, - "k":[ - 19.341, - 16.069 - ], - "ix":2 - }, - "a":{ - "a":0, - "k":[ - 0, - 0 - ], - "ix":1 - }, - "s":{ - "a":0, - "k":[ - 100, - 100 - ], - "ix":3 - }, - "r":{ - "a":0, - "k":0, - "ix":6 - }, - "o":{ - "a":0, - "k":100, - "ix":7 - }, - "sk":{ - "a":0, - "k":0, - "ix":4 - }, - "sa":{ - "a":0, - "k":0, - "ix":5 - }, - "nm":"Transform" - } - ], - "nm":"Mid Top", - "np":2, - "cix":2, - "bm":0, - "ix":1, - "mn":"ADBE Vector Group", - "hd":false }, { "ty":"tm", @@ -906,46 +313,17 @@ }, "e":{ "a":0, - "k":38.2, + "k":100, "ix":2 }, "o":{ - "a":1, - "k":[ - { - "i":{ - "x":[ - 0.833 - ], - "y":[ - 0.833 - ] - }, - "o":{ - "x":[ - 0.167 - ], - "y":[ - 0.167 - ] - }, - "t":0, - "s":[ - 170 - ] - }, - { - "t":360, - "s":[ - 890 - ] - } - ], + "a":0, + "k":0, "ix":3 }, "m":1, - "ix":2, - "nm":"Trim Paths 1", + "ix":3, + "nm":"Trim Paths 2", "mn":"ADBE Vector Filter - Trim", "hd":false } @@ -957,7 +335,7 @@ }, { "ddd":0, - "ind":5, + "ind":3, "ty":4, "nm":"Fingerprint_20210701 Outlines 6", "sr":1, @@ -1139,6 +517,55 @@ "lj":1, "ml":10, "bm":0, + "d":[ + { + "n":"d", + "nm":"dash", + "v":{ + "a":0, + "k":3, + "ix":1 + } + }, + { + "n":"o", + "nm":"offset", + "v":{ + "a":1, + "k":[ + { + "i":{ + "x":[ + 0.833 + ], + "y":[ + 0.833 + ] + }, + "o":{ + "x":[ + 0.167 + ], + "y":[ + 0.167 + ] + }, + "t":0, + "s":[ + 0 + ] + }, + { + "t":360, + "s":[ + -6 + ] + } + ], + "ix":7 + } + } + ], "nm":"Stroke 1", "mn":"ADBE Vector Graphic - Stroke", "hd":false @@ -1209,416 +636,12 @@ }, "e":{ "a":0, - "k":34.2, + "k":100, "ix":2 }, "o":{ - "a":1, - "k":[ - { - "i":{ - "x":[ - 0.833 - ], - "y":[ - 0.833 - ] - }, - "o":{ - "x":[ - 0.167 - ], - "y":[ - 0.167 - ] - }, - "t":0, - "s":[ - 0 - ] - }, - { - "t":360, - "s":[ - 720 - ] - } - ], - "ix":3 - }, - "m":1, - "ix":2, - "nm":"Trim Paths 1", - "mn":"ADBE Vector Filter - Trim", - "hd":false - } - ], - "ip":0, - "op":600, - "st":0, - "bm":0 - }, - { - "ddd":0, - "ind":6, - "ty":4, - "nm":"Fingerprint_20210701 Outlines 5", - "sr":1, - "ks":{ - "o":{ - "a":0, - "k":100, - "ix":11 - }, - "r":{ - "a":0, - "k":0, - "ix":10 - }, - "p":{ - "a":0, - "k":[ - 23.091, - 32.5, - 0 - ], - "ix":2, - "l":2 - }, - "a":{ - "a":0, - "k":[ - 19.341, - 24.25, - 0 - ], - "ix":1, - "l":2 - }, - "s":{ - "a":0, - "k":[ - 100, - 100, - 100 - ], - "ix":6, - "l":2 - } - }, - "ao":0, - "shapes":[ - { - "ty":"gr", - "it":[ - { - "ind":0, - "ty":"sh", - "ix":1, - "ks":{ - "a":0, - "k":{ - "i":[ - [ - 0, - 0 - ], - [ - 0, - 0 - ], - [ - -6.53, - 0 - ], - [ - 0, - -5.793 - ], - [ - 0, - 0 - ], - [ - 2.159, - 0 - ], - [ - 0.59, - 1.489 - ], - [ - 0, - 0 - ], - [ - 1.587, - 0 - ], - [ - 0, - -2.16 - ], - [ - -0.81, - -1.363 - ], - [ - -0.844, - -0.674 - ], - [ - 0, - 0 - ] - ], - "o":[ - [ - -0.753, - -2.095 - ], - [ - 0, - -5.793 - ], - [ - 6.529, - 0 - ], - [ - 0, - 0 - ], - [ - 0, - 2.16 - ], - [ - -1.604, - 0 - ], - [ - 0, - 0 - ], - [ - -0.589, - -1.489 - ], - [ - -2.161, - 0 - ], - [ - 0, - 1.62 - ], - [ - 0.54, - 0.909 - ], - [ - 0, - 0 - ], - [ - 0, - 0 - ] - ], - "v":[ - [ - -10.702, - 5.728 - ], - [ - -11.454, - 1.506 - ], - [ - 0.001, - -9 - ], - [ - 11.454, - 1.506 - ], - [ - 11.454, - 1.817 - ], - [ - 7.544, - 5.728 - ], - [ - 3.926, - 3.273 - ], - [ - 2.618, - 0 - ], - [ - -0.997, - -2.454 - ], - [ - -4.91, - 1.457 - ], - [ - -3.657, - 6.014 - ], - [ - -1.57, - 8.412 - ], - [ - -0.818, - 9 - ] - ], - "c":false - }, - "ix":2 - }, - "nm":"Path 1", - "mn":"ADBE Vector Shape - Group", - "hd":false - }, - { - "ty":"st", - "c":{ - "a":0, - "k":[ - 1, - 1, - 1, - 1 - ], - "ix":3 - }, - "o":{ - "a":0, - "k":100, - "ix":4 - }, - "w":{ - "a":0, - "k":1.3, - "ix":5 - }, - "lc":2, - "lj":1, - "ml":10, - "bm":0, - "nm":"Stroke 1", - "mn":"ADBE Vector Graphic - Stroke", - "hd":false - }, - { - "ty":"tr", - "p":{ - "a":0, - "k":[ - 19.341, - 28.341 - ], - "ix":2 - }, - "a":{ - "a":0, - "k":[ - 0, - 0 - ], - "ix":1 - }, - "s":{ - "a":0, - "k":[ - 100, - 100 - ], - "ix":3 - }, - "r":{ - "a":0, - "k":0, - "ix":6 - }, - "o":{ - "a":0, - "k":100, - "ix":7 - }, - "sk":{ - "a":0, - "k":0, - "ix":4 - }, - "sa":{ - "a":0, - "k":0, - "ix":5 - }, - "nm":"Transform" - } - ], - "nm":"Inside to dot ", - "np":2, - "cix":2, - "bm":0, - "ix":1, - "mn":"ADBE Vector Group", - "hd":false - }, - { - "ty":"tm", - "s":{ "a":0, "k":0, - "ix":1 - }, - "e":{ - "a":0, - "k":35, - "ix":2 - }, - "o":{ - "a":1, - "k":[ - { - "i":{ - "x":[ - 0.833 - ], - "y":[ - 0.833 - ] - }, - "o":{ - "x":[ - 0.167 - ], - "y":[ - 0.167 - ] - }, - "t":0, - "s":[ - -159 - ] - }, - { - "t":360, - "s":[ - 201 - ] - } - ], "ix":3 }, "m":1, @@ -1635,9 +658,9 @@ }, { "ddd":0, - "ind":7, + "ind":4, "ty":4, - "nm":"Fingerprint_20210701 Outlines 4", + "nm":"Fingerprint_20210701 Outlines 5", "sr":1, "ks":{ "o":{ @@ -1889,6 +912,55 @@ "lj":1, "ml":10, "bm":0, + "d":[ + { + "n":"d", + "nm":"dash", + "v":{ + "a":0, + "k":3, + "ix":1 + } + }, + { + "n":"o", + "nm":"offset", + "v":{ + "a":1, + "k":[ + { + "i":{ + "x":[ + 0.833 + ], + "y":[ + 0.833 + ] + }, + "o":{ + "x":[ + 0.167 + ], + "y":[ + 0.167 + ] + }, + "t":0, + "s":[ + 0 + ] + }, + { + "t":360, + "s":[ + -6 + ] + } + ], + "ix":7 + } + } + ], "nm":"Stroke 1", "mn":"ADBE Vector Graphic - Stroke", "hd":false @@ -1959,416 +1031,12 @@ }, "e":{ "a":0, - "k":9, + "k":100, "ix":2 }, "o":{ - "a":1, - "k":[ - { - "i":{ - "x":[ - 0.833 - ], - "y":[ - 0.833 - ] - }, - "o":{ - "x":[ - 0.167 - ], - "y":[ - 0.167 - ] - }, - "t":0, - "s":[ - 135 - ] - }, - { - "t":360, - "s":[ - 495 - ] - } - ], - "ix":3 - }, - "m":1, - "ix":2, - "nm":"Trim Paths 1", - "mn":"ADBE Vector Filter - Trim", - "hd":false - } - ], - "ip":0, - "op":600, - "st":0, - "bm":0 - }, - { - "ddd":0, - "ind":8, - "ty":4, - "nm":"Fingerprint_20210701 Outlines 3", - "sr":1, - "ks":{ - "o":{ - "a":0, - "k":100, - "ix":11 - }, - "r":{ - "a":0, - "k":0, - "ix":10 - }, - "p":{ - "a":0, - "k":[ - 23.091, - 32.5, - 0 - ], - "ix":2, - "l":2 - }, - "a":{ - "a":0, - "k":[ - 19.341, - 24.25, - 0 - ], - "ix":1, - "l":2 - }, - "s":{ - "a":0, - "k":[ - 100, - 100, - 100 - ], - "ix":6, - "l":2 - } - }, - "ao":0, - "shapes":[ - { - "ty":"gr", - "it":[ - { - "ind":0, - "ty":"sh", - "ix":1, - "ks":{ - "a":0, - "k":{ - "i":[ - [ - 0, - 0 - ], - [ - 0, - 0 - ], - [ - -6.53, - 0 - ], - [ - 0, - -5.793 - ], - [ - 0, - 0 - ], - [ - 2.159, - 0 - ], - [ - 0.59, - 1.489 - ], - [ - 0, - 0 - ], - [ - 1.587, - 0 - ], - [ - 0, - -2.16 - ], - [ - -0.81, - -1.363 - ], - [ - -0.844, - -0.674 - ], - [ - 0, - 0 - ] - ], - "o":[ - [ - -0.753, - -2.095 - ], - [ - 0, - -5.793 - ], - [ - 6.529, - 0 - ], - [ - 0, - 0 - ], - [ - 0, - 2.16 - ], - [ - -1.604, - 0 - ], - [ - 0, - 0 - ], - [ - -0.589, - -1.489 - ], - [ - -2.161, - 0 - ], - [ - 0, - 1.62 - ], - [ - 0.54, - 0.909 - ], - [ - 0, - 0 - ], - [ - 0, - 0 - ] - ], - "v":[ - [ - -10.702, - 5.728 - ], - [ - -11.454, - 1.506 - ], - [ - 0.001, - -9 - ], - [ - 11.454, - 1.506 - ], - [ - 11.454, - 1.817 - ], - [ - 7.544, - 5.728 - ], - [ - 3.926, - 3.273 - ], - [ - 2.618, - 0 - ], - [ - -0.997, - -2.454 - ], - [ - -4.91, - 1.457 - ], - [ - -3.657, - 6.014 - ], - [ - -1.57, - 8.412 - ], - [ - -0.818, - 9 - ] - ], - "c":false - }, - "ix":2 - }, - "nm":"Path 1", - "mn":"ADBE Vector Shape - Group", - "hd":false - }, - { - "ty":"st", - "c":{ - "a":0, - "k":[ - 1, - 1, - 1, - 1 - ], - "ix":3 - }, - "o":{ - "a":0, - "k":100, - "ix":4 - }, - "w":{ - "a":0, - "k":1.3, - "ix":5 - }, - "lc":2, - "lj":1, - "ml":10, - "bm":0, - "nm":"Stroke 1", - "mn":"ADBE Vector Graphic - Stroke", - "hd":false - }, - { - "ty":"tr", - "p":{ - "a":0, - "k":[ - 19.341, - 28.341 - ], - "ix":2 - }, - "a":{ - "a":0, - "k":[ - 0, - 0 - ], - "ix":1 - }, - "s":{ - "a":0, - "k":[ - 100, - 100 - ], - "ix":3 - }, - "r":{ - "a":0, - "k":0, - "ix":6 - }, - "o":{ - "a":0, - "k":100, - "ix":7 - }, - "sk":{ - "a":0, - "k":0, - "ix":4 - }, - "sa":{ - "a":0, - "k":0, - "ix":5 - }, - "nm":"Transform" - } - ], - "nm":"Inside to dot ", - "np":2, - "cix":2, - "bm":0, - "ix":1, - "mn":"ADBE Vector Group", - "hd":false - }, - { - "ty":"tm", - "s":{ "a":0, "k":0, - "ix":1 - }, - "e":{ - "a":0, - "k":30, - "ix":2 - }, - "o":{ - "a":1, - "k":[ - { - "i":{ - "x":[ - 0.833 - ], - "y":[ - 0.833 - ] - }, - "o":{ - "x":[ - 0.167 - ], - "y":[ - 0.167 - ] - }, - "t":0, - "s":[ - 0 - ] - }, - { - "t":360, - "s":[ - 360 - ] - } - ], "ix":3 }, "m":1, @@ -2385,7 +1053,7 @@ }, { "ddd":0, - "ind":9, + "ind":5, "ty":4, "nm":"Fingerprint_20210701 Outlines", "sr":1, @@ -2567,6 +1235,55 @@ "lj":1, "ml":10, "bm":0, + "d":[ + { + "n":"d", + "nm":"dash", + "v":{ + "a":0, + "k":2.5, + "ix":1 + } + }, + { + "n":"o", + "nm":"offset", + "v":{ + "a":1, + "k":[ + { + "i":{ + "x":[ + 0.833 + ], + "y":[ + 0.833 + ] + }, + "o":{ + "x":[ + 0.167 + ], + "y":[ + 0.167 + ] + }, + "t":0, + "s":[ + 0 + ] + }, + { + "t":360, + "s":[ + -5 + ] + } + ], + "ix":7 + } + } + ], "nm":"Stroke 1", "mn":"ADBE Vector Graphic - Stroke", "hd":false @@ -2637,41 +1354,12 @@ }, "e":{ "a":0, - "k":69, + "k":100, "ix":2 }, "o":{ - "a":1, - "k":[ - { - "i":{ - "x":[ - 0.833 - ], - "y":[ - 0.833 - ] - }, - "o":{ - "x":[ - 0.167 - ], - "y":[ - 0.167 - ] - }, - "t":0, - "s":[ - 0 - ] - }, - { - "t":360, - "s":[ - 720 - ] - } - ], + "a":0, + "k":0, "ix":3 }, "m":1, @@ -2699,4 +1387,4 @@ "dr":0 } ] -}
\ No newline at end of file +} diff --git a/packages/SystemUI/res/values-eu/strings.xml b/packages/SystemUI/res/values-eu/strings.xml index 4f4892cf8f00..b6162a830186 100644 --- a/packages/SystemUI/res/values-eu/strings.xml +++ b/packages/SystemUI/res/values-eu/strings.xml @@ -58,7 +58,7 @@ <string name="always_use_device" msgid="210535878779644679">"Ireki <xliff:g id="APPLICATION">%1$s</xliff:g> <xliff:g id="USB_DEVICE">%2$s</xliff:g> konektatzen den guztietan"</string> <string name="always_use_accessory" msgid="1977225429341838444">"Ireki <xliff:g id="APPLICATION">%1$s</xliff:g> <xliff:g id="USB_ACCESSORY">%2$s</xliff:g> konektatzen den guztietan"</string> <string name="usb_debugging_title" msgid="8274884945238642726">"USB bidezko arazketa onartu?"</string> - <string name="usb_debugging_message" msgid="5794616114463921773">"Ordenagailuaren RSA gakoaren erreferentzia-gako digitala hau da:\n<xliff:g id="FINGERPRINT">%1$s</xliff:g>"</string> + <string name="usb_debugging_message" msgid="5794616114463921773">"Ordenagailuaren RSA gakoaren aztarna digitala hau da:\n<xliff:g id="FINGERPRINT">%1$s</xliff:g>"</string> <string name="usb_debugging_always" msgid="4003121804294739548">"Eman beti ordenagailu honetatik arazteko baimena"</string> <string name="usb_debugging_allow" msgid="1722643858015321328">"Eman baimena"</string> <string name="usb_debugging_secondary_user_title" msgid="7843050591380107998">"Ez da onartzen USB bidezko arazketa"</string> @@ -577,7 +577,7 @@ <string name="monitoring_description_ca_cert_settings_separator" msgid="7107390013344435439">" "</string> <string name="monitoring_description_ca_cert_settings" msgid="8329781950135541003">"Ireki kredentzial fidagarriak"</string> <string name="monitoring_description_network_logging" msgid="577305979174002252">"Administratzaileak sarearen erregistroak aktibatu ditu; horrela, zure gailuko trafikoa gainbegira dezake.\n\nInformazio gehiago lortzeko, jarri administratzailearekin harremanetan."</string> - <string name="monitoring_description_vpn" msgid="1685428000684586870">"Aplikazio bati VPN konexio bat konfiguratzeko baimena eman diozu.\n\nAplikazio horrek gailuko eta sareko jarduerak kontrola ditzake, mezu elektronikoak, aplikazioak eta webguneak barne."</string> + <string name="monitoring_description_vpn" msgid="1685428000684586870">"Aplikazio bati VPN bidezko konexio bat konfiguratzeko baimena eman diozu.\n\nAplikazio horrek gailuko eta sareko jarduerak kontrola ditzake, mezu elektronikoak, aplikazioak eta webguneak barne."</string> <string name="monitoring_description_vpn_profile_owned" msgid="4964237035412372751">"<xliff:g id="ORGANIZATION">%1$s</xliff:g> erakundeak kudeatzen du zure laneko profila.\n\nAdministratzaileak sareko jarduerak kontrola diezazkizuke, besteak beste, posta elektronikoa, aplikazioak eta webguneak.\n\nInformazio gehiago lortzeko, jarri administratzailearekin harremanetan.\n\nHorrez gain, VPN batera zaude konektatuta, eta hark ere kontrola ditzake zure sareko jarduerak."</string> <string name="monitoring_description_parental_controls" msgid="8184693528917051626">"Zure gurasoak kudeatzen du gailua. Zure gurasoak gailuko informazioa ikusi eta kudea dezake; besteak beste, zer aplikazio erabiltzen dituzun, zure kokapena zein den eta pantaila aurrean zenbat eta noiz egoten zaren."</string> <string name="legacy_vpn_name" msgid="4174223520162559145">"VPN konexioa"</string> diff --git a/packages/SystemUI/res/values-mr/strings.xml b/packages/SystemUI/res/values-mr/strings.xml index cee701953f69..1202a7467a2c 100644 --- a/packages/SystemUI/res/values-mr/strings.xml +++ b/packages/SystemUI/res/values-mr/strings.xml @@ -148,7 +148,7 @@ <string name="voice_assist_label" msgid="3725967093735929020">"व्हॉइस सहाय्य उघडा"</string> <string name="camera_label" msgid="8253821920931143699">"कॅमेरा उघडा"</string> <string name="cancel" msgid="1089011503403416730">"रद्द करा"</string> - <string name="biometric_dialog_confirm" msgid="2005978443007344895">"खात्री करा"</string> + <string name="biometric_dialog_confirm" msgid="2005978443007344895">"कंफर्म करा"</string> <string name="biometric_dialog_try_again" msgid="8575345628117768844">"पुन्हा प्रयत्न करा"</string> <string name="biometric_dialog_empty_space_description" msgid="3330555462071453396">"ऑथेंटिकेशन रद्द करण्यासाठी टॅप करा"</string> <string name="biometric_dialog_face_icon_description_idle" msgid="4351777022315116816">"कृपया पुन्हा प्रयत्न करा"</string> diff --git a/packages/SystemUI/res/values-te-ldrtl/strings.xml b/packages/SystemUI/res/values-te-ldrtl/strings.xml index 1c1b56274c8e..94bdbcf19038 100644 --- a/packages/SystemUI/res/values-te-ldrtl/strings.xml +++ b/packages/SystemUI/res/values-te-ldrtl/strings.xml @@ -19,5 +19,5 @@ <resources xmlns:android="http://schemas.android.com/apk/res/android" xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> - <string name="recents_quick_scrub_onboarding" msgid="2452671841151577157">"యాప్లను శీఘ్రంగా స్విచ్ చేయడానికి ఎడమ వైపుకు లాగండి"</string> + <string name="recents_quick_scrub_onboarding" msgid="2452671841151577157">"యాప్లను శీఘ్రంగా స్విచ్ చేయడానికి ఎడమ వైపునకు లాగండి"</string> </resources> diff --git a/packages/SystemUI/res/values-te/strings.xml b/packages/SystemUI/res/values-te/strings.xml index 7ad382ec6bbc..45236a795573 100644 --- a/packages/SystemUI/res/values-te/strings.xml +++ b/packages/SystemUI/res/values-te/strings.xml @@ -319,10 +319,10 @@ <string name="notification_summary_message_format" msgid="5158219088501909966">"<xliff:g id="CONTACT_NAME">%1$s</xliff:g>: <xliff:g id="MESSAGE_CONTENT">%2$s</xliff:g>"</string> <string name="status_bar_notification_inspect_item_title" msgid="6818779631806163080">"నోటిఫికేషన్ సెట్టింగ్లు"</string> <string name="status_bar_notification_app_settings_title" msgid="5050006438806013903">"<xliff:g id="APP_NAME">%s</xliff:g> సెట్టింగ్లు"</string> - <string name="accessibility_rotation_lock_off" msgid="3880436123632448930">"స్క్రీన్ స్వయంచాలకంగా తిప్పబడుతుంది."</string> + <string name="accessibility_rotation_lock_off" msgid="3880436123632448930">"స్క్రీన్ ఆటోమేటిక్గా తిప్పబడుతుంది."</string> <string name="accessibility_rotation_lock_on_landscape" msgid="936972553861524360">"స్క్రీన్ ల్యాండ్స్కేప్ దృగ్విన్యాసంలో లాక్ చేయబడుతుంది."</string> <string name="accessibility_rotation_lock_on_portrait" msgid="2356633398683813837">"స్క్రీన్ పోర్ట్రెయిట్ దృగ్విన్యాసంలో లాక్ చేయబడుతుంది."</string> - <string name="accessibility_rotation_lock_off_changed" msgid="5772498370935088261">"స్క్రీన్ ఇప్పుడు స్వయంచాలకంగా తిరుగుతుంది."</string> + <string name="accessibility_rotation_lock_off_changed" msgid="5772498370935088261">"స్క్రీన్ ఇప్పుడు ఆటోమేటిక్గా తిరుగుతుంది."</string> <string name="accessibility_rotation_lock_on_landscape_changed" msgid="5785739044300729592">"స్క్రీన్ ఇప్పుడు ల్యాండ్స్కేప్ దృగ్విన్యాసంలో లాక్ చేయబడింది."</string> <string name="accessibility_rotation_lock_on_portrait_changed" msgid="5580170829728987989">"స్క్రీన్ ఇప్పుడు పోర్ట్రెయిట్ దృగ్విన్యాసంలో లాక్ చేయబడింది."</string> <string name="dessert_case" msgid="9104973640704357717">"డెజర్ట్ కేస్"</string> @@ -941,7 +941,7 @@ <string name="thermal_shutdown_dialog_help_text" msgid="6413474593462902901">"తీసుకోవాల్సిన జాగ్రత్తలు ఏమిటో చూడండి"</string> <string name="high_temp_title" msgid="2218333576838496100">"ఫోన్ వేడెక్కుతోంది"</string> <string name="high_temp_notif_message" msgid="1277346543068257549">"ఫోన్ను చల్లబరిచే క్రమంలో కొన్ని ఫీచర్లు పరిమితం చేయబడ్డాయి.\nమరింత సమాచారం కోసం ట్యాప్ చేయండి"</string> - <string name="high_temp_dialog_message" msgid="3793606072661253968">"మీ ఫోన్ స్వయంచాలకంగా చల్లబడటానికి ప్రయత్నిస్తుంది. మీరు ఇప్పటికీ మీ ఫోన్ను ఉపయోగించవచ్చు, కానీ దాని పనితీరు నెమ్మదిగా ఉండవచ్చు.\n\nమీ ఫోన్ చల్లబడిన తర్వాత, అది సాధారణ రీతిలో పని చేస్తుంది."</string> + <string name="high_temp_dialog_message" msgid="3793606072661253968">"మీ ఫోన్ ఆటోమేటిక్గా చల్లబడటానికి ప్రయత్నిస్తుంది. మీరు ఇప్పటికీ మీ ఫోన్ను ఉపయోగించవచ్చు, కానీ దాని పనితీరు నెమ్మదిగా ఉండవచ్చు.\n\nమీ ఫోన్ చల్లబడిన తర్వాత, అది సాధారణ రీతిలో పని చేస్తుంది."</string> <string name="high_temp_dialog_help_text" msgid="7380171287943345858">"తీసుకోవాల్సిన జాగ్రత్తలు ఏమిటో చూడండి"</string> <string name="high_temp_alarm_title" msgid="2359958549570161495">"ప్లగ్ నుండి ఛార్జర్ తీసివేయండి"</string> <string name="high_temp_alarm_notify_message" msgid="7186272817783835089">"ఈ పరికరాన్ని ఛార్జ్ చేయడంలో సమస్య ఉంది. పవర్ అడాప్టర్ను ప్లగ్ నుండి తీసివేసి, కేబుల్ ఏమైనా వేడిగా అయితే తగిన జాగ్రత్తలు తీసుకోండి."</string> diff --git a/packages/SystemUI/res/values/dimens.xml b/packages/SystemUI/res/values/dimens.xml index 0e02ad09d2c9..6ad9ab9a26ec 100644 --- a/packages/SystemUI/res/values/dimens.xml +++ b/packages/SystemUI/res/values/dimens.xml @@ -1287,7 +1287,7 @@ <!-- Size of media cards in the QSPanel carousel --> <dimen name="qs_media_padding">16dp</dimen> <dimen name="qs_media_album_size_small">72dp</dimen> - <dimen name="qs_media_album_size">92dp</dimen> + <dimen name="qs_media_album_size">84dp</dimen> <dimen name="qs_media_album_radius">14dp</dimen> <dimen name="qs_media_album_device_padding">26dp</dimen> <dimen name="qs_media_info_margin">12dp</dimen> @@ -1304,13 +1304,14 @@ <dimen name="qs_footer_horizontal_margin">22dp</dimen> <dimen name="qs_media_disabled_seekbar_height">1dp</dimen> <dimen name="qs_media_enabled_seekbar_height">2dp</dimen> - <dimen name="qs_media_enabled_seekbar_vertical_padding">31dp</dimen> - <dimen name="qs_media_disabled_seekbar_vertical_padding">32dp</dimen> + <dimen name="qs_media_enabled_seekbar_vertical_padding">28dp</dimen> + <dimen name="qs_media_disabled_seekbar_vertical_padding">29dp</dimen> <!-- Size of Smartspace media recommendations cards in the QSPanel carousel --> <dimen name="qs_aa_media_rec_album_size_collapsed">72dp</dimen> - <dimen name="qs_aa_media_rec_album_size_expanded">80dp</dimen> + <dimen name="qs_aa_media_rec_album_size_expanded">76dp</dimen> <dimen name="qs_aa_media_rec_album_margin">8dp</dimen> + <dimen name="qs_aa_media_rec_album_margin_vert">4dp</dimen> <dimen name="qq_aa_media_rec_header_text_size">16sp</dimen> <!-- Window magnification --> diff --git a/packages/SystemUI/res/xml/media_expanded.xml b/packages/SystemUI/res/xml/media_expanded.xml index 9d706c5bad20..0e284e6ad631 100644 --- a/packages/SystemUI/res/xml/media_expanded.xml +++ b/packages/SystemUI/res/xml/media_expanded.xml @@ -93,7 +93,7 @@ android:layout_marginEnd="@dimen/qs_media_padding" android:layout_marginBottom="@dimen/qs_media_info_margin" app:layout_constrainedWidth="true" - android:layout_marginTop="@dimen/qs_media_info_spacing" + android:layout_marginTop="1dp" app:layout_constraintTop_toBottomOf="@id/header_title" app:layout_constraintStart_toStartOf="@id/header_title" app:layout_constraintEnd_toEndOf="parent" @@ -104,7 +104,8 @@ android:id="@+id/media_progress_bar" android:layout_width="0dp" android:layout_height="wrap_content" - app:layout_constraintTop_toBottomOf="@id/header_artist" + android:layout_marginTop="34dp" + app:layout_constraintTop_toBottomOf="@id/center_horizontal_guideline" app:layout_constraintStart_toStartOf="parent" app:layout_constraintEnd_toEndOf="parent" /> @@ -124,7 +125,6 @@ android:id="@+id/action0" android:layout_width="48dp" android:layout_height="48dp" - android:layout_marginTop="@dimen/qs_media_action_margin" android:layout_marginStart="@dimen/qs_media_padding" android:layout_marginEnd="@dimen/qs_media_action_spacing" android:layout_marginBottom="@dimen/qs_media_action_margin" @@ -139,7 +139,6 @@ android:id="@+id/action1" android:layout_width="48dp" android:layout_height="48dp" - android:layout_marginTop="@dimen/qs_media_action_margin" android:layout_marginStart="@dimen/qs_media_action_spacing" android:layout_marginEnd="@dimen/qs_media_action_spacing" android:layout_marginBottom="@dimen/qs_media_action_margin" @@ -153,7 +152,6 @@ android:id="@+id/action2" android:layout_width="48dp" android:layout_height="48dp" - android:layout_marginTop="@dimen/qs_media_action_margin" android:layout_marginStart="@dimen/qs_media_action_spacing" android:layout_marginEnd="@dimen/qs_media_action_spacing" android:layout_marginBottom="@dimen/qs_media_action_margin" @@ -167,7 +165,6 @@ android:id="@+id/action3" android:layout_width="48dp" android:layout_height="48dp" - android:layout_marginTop="@dimen/qs_media_action_margin" android:layout_marginStart="@dimen/qs_media_action_spacing" android:layout_marginEnd="@dimen/qs_media_action_spacing" android:layout_marginBottom="@dimen/qs_media_action_margin" @@ -181,7 +178,6 @@ android:id="@+id/action4" android:layout_width="48dp" android:layout_height="48dp" - android:layout_marginTop="@dimen/qs_media_action_margin" android:layout_marginStart="@dimen/qs_media_action_spacing" android:layout_marginEnd="@dimen/qs_media_padding" android:layout_marginBottom="@dimen/qs_media_action_margin" diff --git a/packages/SystemUI/res/xml/media_recommendation_expanded.xml b/packages/SystemUI/res/xml/media_recommendation_expanded.xml index d8e132cc1208..8a3d5ca75a77 100644 --- a/packages/SystemUI/res/xml/media_recommendation_expanded.xml +++ b/packages/SystemUI/res/xml/media_recommendation_expanded.xml @@ -43,7 +43,7 @@ android:layout_height="@dimen/qs_aa_media_rec_album_size_expanded" app:layout_constraintWidth_max="@dimen/qs_aa_media_rec_album_size_expanded" android:layout_marginTop="@dimen/qs_media_padding" - android:layout_marginBottom="@dimen/qs_aa_media_rec_album_margin" + android:layout_marginBottom="@dimen/qs_aa_media_rec_album_margin_vert" android:layout_marginEnd="@dimen/qs_aa_media_rec_album_margin" app:layout_constraintTop_toTopOf="parent" app:layout_constraintBottom_toTopOf="@+id/media_horizontal_center_guideline" @@ -61,7 +61,7 @@ android:layout_height="@dimen/qs_aa_media_rec_album_size_expanded" app:layout_constraintWidth_max="@dimen/qs_aa_media_rec_album_size_expanded" android:layout_marginTop="@dimen/qs_media_padding" - android:layout_marginBottom="@dimen/qs_aa_media_rec_album_margin" + android:layout_marginBottom="@dimen/qs_aa_media_rec_album_margin_vert" android:layout_marginEnd="@dimen/qs_aa_media_rec_album_margin" app:layout_constraintTop_toTopOf="parent" app:layout_constraintBottom_toTopOf="@+id/media_horizontal_center_guideline" @@ -79,7 +79,7 @@ android:layout_height="@dimen/qs_aa_media_rec_album_size_expanded" app:layout_constraintWidth_max="@dimen/qs_aa_media_rec_album_size_expanded" android:layout_marginTop="@dimen/qs_media_padding" - android:layout_marginBottom="@dimen/qs_aa_media_rec_album_margin" + android:layout_marginBottom="@dimen/qs_aa_media_rec_album_margin_vert" app:layout_constraintTop_toTopOf="parent" app:layout_constraintBottom_toTopOf="@+id/media_horizontal_center_guideline" app:layout_constraintStart_toEndOf="@id/media_cover2_container" @@ -95,7 +95,7 @@ android:layout_width="0dp" android:layout_height="@dimen/qs_aa_media_rec_album_size_expanded" app:layout_constraintWidth_max="@dimen/qs_aa_media_rec_album_size_expanded" - android:layout_marginTop="@dimen/qs_aa_media_rec_album_margin" + android:layout_marginTop="@dimen/qs_aa_media_rec_album_margin_vert" android:layout_marginBottom="@dimen/qs_media_padding" android:layout_marginEnd="@dimen/qs_aa_media_rec_album_margin" app:layout_constraintTop_toBottomOf="@+id/media_horizontal_center_guideline" @@ -113,7 +113,7 @@ android:layout_width="0dp" android:layout_height="@dimen/qs_aa_media_rec_album_size_expanded" app:layout_constraintWidth_max="@dimen/qs_aa_media_rec_album_size_expanded" - android:layout_marginTop="@dimen/qs_aa_media_rec_album_margin" + android:layout_marginTop="@dimen/qs_aa_media_rec_album_margin_vert" android:layout_marginBottom="@dimen/qs_media_padding" android:layout_marginEnd="@dimen/qs_aa_media_rec_album_margin" app:layout_constraintTop_toBottomOf="@+id/media_horizontal_center_guideline" @@ -131,7 +131,7 @@ android:layout_width="0dp" android:layout_height="@dimen/qs_aa_media_rec_album_size_expanded" app:layout_constraintWidth_max="@dimen/qs_aa_media_rec_album_size_expanded" - android:layout_marginTop="@dimen/qs_aa_media_rec_album_margin" + android:layout_marginTop="@dimen/qs_aa_media_rec_album_margin_vert" android:layout_marginBottom="@dimen/qs_media_padding" app:layout_constraintTop_toBottomOf="@id/media_horizontal_center_guideline" app:layout_constraintBottom_toBottomOf="parent" diff --git a/packages/SystemUI/src/com/android/keyguard/KeyguardFaceListenModel.kt b/packages/SystemUI/src/com/android/keyguard/KeyguardFaceListenModel.kt deleted file mode 100644 index 0785cc3c04d2..000000000000 --- a/packages/SystemUI/src/com/android/keyguard/KeyguardFaceListenModel.kt +++ /dev/null @@ -1,28 +0,0 @@ -package com.android.keyguard - -import android.annotation.CurrentTimeMillisLong - -/** - * Data class for tracking information associated with [KeyguardUpdateMonitor.shouldListenForFace] - * method calls. - */ -data class KeyguardFaceListenModel( - @CurrentTimeMillisLong val timeMillis: Long, - val userId: Int, - val isListeningForFace: Boolean, - val isBouncer: Boolean, - val isAuthInterruptActive: Boolean, - val isOccludingAppRequestingFaceAuth: Boolean, - val isKeyguardAwake: Boolean, - val isListeningForFaceAssistant: Boolean, - val isSwitchingUser: Boolean, - val isFaceDisabled: Boolean, - val isBecauseCannotSkipBouncer: Boolean, - val isKeyguardGoingAway: Boolean, - val isBiometricSettingEnabledForUser: Boolean, - val isLockIconPressed: Boolean, - val isScanningAllowedByStrongAuth: Boolean, - val isPrimaryUser: Boolean, - val isSecureCameraLaunched: Boolean, - val isFaceAuthenticated: Boolean -) diff --git a/packages/SystemUI/src/com/android/keyguard/KeyguardListenModel.kt b/packages/SystemUI/src/com/android/keyguard/KeyguardListenModel.kt new file mode 100644 index 000000000000..9286175cc2ea --- /dev/null +++ b/packages/SystemUI/src/com/android/keyguard/KeyguardListenModel.kt @@ -0,0 +1,77 @@ +package com.android.keyguard + +import android.annotation.CurrentTimeMillisLong +import android.hardware.biometrics.BiometricAuthenticator.Modality +import android.hardware.biometrics.BiometricAuthenticator.TYPE_FACE +import android.hardware.biometrics.BiometricAuthenticator.TYPE_FINGERPRINT + +/** Verbose logging for various keyguard listening states. */ +sealed class KeyguardListenModel { + /** Timestamp of the state change. */ + abstract val timeMillis: Long + /** Current user */ + abstract val userId: Int + /** If keyguard is listening for the given [modality]. */ + abstract val listening: Boolean + /** Sensor type */ + @Modality abstract val modality: Int +} + +/** + * Verbose debug information associated with [KeyguardUpdateMonitor.shouldListenForFingerprint]. + */ +data class KeyguardFingerprintListenModel( + @CurrentTimeMillisLong override val timeMillis: Long, + override val userId: Int, + override val listening: Boolean, + // keep sorted + val biometricEnabledForUser: Boolean, + val bouncer: Boolean, + val canSkipBouncer: Boolean, + val credentialAttempted: Boolean, + val deviceInteractive: Boolean, + val dreaming: Boolean, + val encryptedOrLockdown: Boolean, + val fingerprintDisabled: Boolean, + val fingerprintLockedOut: Boolean, + val goingToSleep: Boolean, + val keyguardGoingAway: Boolean, + val keyguardIsVisible: Boolean, + val keyguardOccluded: Boolean, + val occludingAppRequestingFp: Boolean, + val primaryUser: Boolean, + val shouldListenForFingerprintAssistant: Boolean, + val switchingUser: Boolean, + val udfps: Boolean, + val userDoesNotHaveTrust: Boolean, + val userNeedsStrongAuth: Boolean +) : KeyguardListenModel() { + override val modality: Int = TYPE_FACE +} + +/** + * Verbose debug information associated with [KeyguardUpdateMonitor.shouldListenForFace]. + */ +data class KeyguardFaceListenModel( + @CurrentTimeMillisLong override val timeMillis: Long, + override val userId: Int, + override val listening: Boolean, + // keep sorted + val authInterruptActive: Boolean, + val becauseCannotSkipBouncer: Boolean, + val biometricSettingEnabledForUser: Boolean, + val bouncer: Boolean, + val faceAuthenticated: Boolean, + val faceDisabled: Boolean, + val keyguardAwake: Boolean, + val keyguardGoingAway: Boolean, + val listeningForFaceAssistant: Boolean, + val lockIconPressed: Boolean, + val occludingAppRequestingFaceAuth: Boolean, + val primaryUser: Boolean, + val scanningAllowedByStrongAuth: Boolean, + val secureCameraLaunched: Boolean, + val switchingUser: Boolean +) : KeyguardListenModel() { + override val modality: Int = TYPE_FINGERPRINT +} diff --git a/packages/SystemUI/src/com/android/keyguard/KeyguardListenQueue.kt b/packages/SystemUI/src/com/android/keyguard/KeyguardListenQueue.kt new file mode 100644 index 000000000000..f13a59a84811 --- /dev/null +++ b/packages/SystemUI/src/com/android/keyguard/KeyguardListenQueue.kt @@ -0,0 +1,67 @@ +/* + * Copyright (C) 2021 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.android.keyguard + +import androidx.annotation.VisibleForTesting +import java.io.PrintWriter +import java.text.DateFormat +import java.text.SimpleDateFormat +import java.util.Date +import java.util.Locale +import kotlin.collections.ArrayDeque + +private val DEFAULT_FORMATTING = SimpleDateFormat("yyyy-MM-dd HH:mm:ss.SSS", Locale.US) + +/** Queue for verbose logging checks for the listening state. */ +class KeyguardListenQueue( + val sizePerModality: Int = 20 +) { + private val faceQueue = ArrayDeque<KeyguardFaceListenModel>() + private val fingerprintQueue = ArrayDeque<KeyguardFingerprintListenModel>() + + @get:VisibleForTesting val models: List<KeyguardListenModel> + get() = faceQueue + fingerprintQueue + + /** Push a [model] to the queue (will be logged until the queue exceeds [sizePerModality]). */ + fun add(model: KeyguardListenModel) { + val queue = when (model) { + is KeyguardFaceListenModel -> faceQueue.apply { add(model) } + is KeyguardFingerprintListenModel -> fingerprintQueue.apply { add(model) } + } + + if (queue.size > sizePerModality) { + queue.removeFirstOrNull() + } + } + + /** Print verbose logs via the [writer]. */ + @JvmOverloads + fun print(writer: PrintWriter, dateFormat: DateFormat = DEFAULT_FORMATTING) { + val stringify: (KeyguardListenModel) -> String = { model -> + " ${dateFormat.format(Date(model.timeMillis))} $model" + } + + writer.println(" Face listen results (last ${faceQueue.size} calls):") + for (model in faceQueue) { + writer.println(stringify(model)) + } + writer.println(" Fingerprint listen results (last ${fingerprintQueue.size} calls):") + for (model in fingerprintQueue) { + writer.println(stringify(model)) + } + } +} diff --git a/packages/SystemUI/src/com/android/keyguard/KeyguardSecurityContainerController.java b/packages/SystemUI/src/com/android/keyguard/KeyguardSecurityContainerController.java index fde8213de0c6..dd7c7ea6b5a5 100644 --- a/packages/SystemUI/src/com/android/keyguard/KeyguardSecurityContainerController.java +++ b/packages/SystemUI/src/com/android/keyguard/KeyguardSecurityContainerController.java @@ -146,7 +146,9 @@ public class KeyguardSecurityContainerController extends ViewController<Keyguard try { Thread.sleep(5000); } catch (InterruptedException ignored) { } - Runtime.getRuntime().gc(); + System.gc(); + System.runFinalization(); + System.gc(); }); } else { SysUiStatsLog.write(SysUiStatsLog.KEYGUARD_BOUNCER_PASSWORD_ENTERED, diff --git a/packages/SystemUI/src/com/android/keyguard/KeyguardUpdateMonitor.java b/packages/SystemUI/src/com/android/keyguard/KeyguardUpdateMonitor.java index 0bb5b1ce5179..877e76480b1e 100644 --- a/packages/SystemUI/src/com/android/keyguard/KeyguardUpdateMonitor.java +++ b/packages/SystemUI/src/com/android/keyguard/KeyguardUpdateMonitor.java @@ -118,15 +118,11 @@ import com.google.android.collect.Lists; import java.io.FileDescriptor; import java.io.PrintWriter; import java.lang.ref.WeakReference; -import java.text.SimpleDateFormat; -import java.util.ArrayDeque; import java.util.ArrayList; -import java.util.Date; import java.util.HashMap; import java.util.HashSet; import java.util.Iterator; import java.util.List; -import java.util.Locale; import java.util.Map; import java.util.Map.Entry; import java.util.Set; @@ -148,6 +144,7 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener, Dumpab private static final boolean DEBUG = KeyguardConstants.DEBUG; private static final boolean DEBUG_SIM_STATES = KeyguardConstants.DEBUG_SIM_STATES; private static final boolean DEBUG_FACE = Build.IS_DEBUGGABLE; + private static final boolean DEBUG_FINGERPRINT = Build.IS_DEBUGGABLE; private static final boolean DEBUG_SPEW = false; private static final int FINGERPRINT_LOCKOUT_RESET_DELAY_MS = 600; @@ -422,9 +419,8 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener, Dumpab @VisibleForTesting SparseArray<BiometricAuthenticated> mUserFaceAuthenticated = new SparseArray<>(); - // Keep track of recent calls to shouldListenForFace() for debugging. - private static final int FACE_LISTEN_CALLS_QUEUE_SIZE = 20; - private ArrayDeque<KeyguardFaceListenModel> mFaceListenModels; + // Keep track of recent calls to shouldListenFor*() for debugging. + private final KeyguardListenQueue mListenModels = new KeyguardListenQueue(); private static int sCurrentUser; private Runnable mUpdateBiometricListeningState = this::updateBiometricListeningState; @@ -2229,37 +2225,75 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener, Dumpab @VisibleForTesting protected boolean shouldListenForFingerprint(boolean isUdfps) { - final boolean userDoesNotHaveTrust = !getUserHasTrust(getCurrentUser()); + final int user = getCurrentUser(); + final boolean userDoesNotHaveTrust = !getUserHasTrust(user); + final boolean shouldListenForFingerprintAssistant = shouldListenForFingerprintAssistant(); final boolean shouldListenKeyguardState = mKeyguardIsVisible || !mDeviceInteractive || (mBouncer && !mKeyguardGoingAway) || mGoingToSleep - || shouldListenForFingerprintAssistant() + || shouldListenForFingerprintAssistant || (mKeyguardOccluded && mIsDreaming) || (mKeyguardOccluded && userDoesNotHaveTrust && (mOccludingAppRequestingFp || isUdfps)); // Only listen if this KeyguardUpdateMonitor belongs to the primary user. There is an // instance of KeyguardUpdateMonitor for each user but KeyguardUpdateMonitor is user-aware. + final boolean biometricEnabledForUser = mBiometricEnabledForUser.get(user); + final boolean userCanSkipBouncer = getUserCanSkipBouncer(user); + final boolean fingerprintDisabledForUser = isFingerprintDisabled(user); final boolean shouldListenUserState = !mSwitchingUser - && !isFingerprintDisabled(getCurrentUser()) + && !fingerprintDisabledForUser && (!mKeyguardGoingAway || !mDeviceInteractive) && mIsPrimaryUser - && mBiometricEnabledForUser.get(getCurrentUser()); + && biometricEnabledForUser; final boolean shouldListenBouncerState = !(mFingerprintLockedOut && mBouncer && mCredentialAttempted); + final boolean isEncryptedOrLockdownForUser = isEncryptedOrLockdown(user); + final boolean userNeedsStrongAuth = userNeedsStrongAuth(); final boolean shouldListenUdfpsState = !isUdfps - || (!getUserCanSkipBouncer(getCurrentUser()) - && !isEncryptedOrLockdown(getCurrentUser()) - && !userNeedsStrongAuth() + || (!userCanSkipBouncer + && !isEncryptedOrLockdownForUser + && !userNeedsStrongAuth && userDoesNotHaveTrust && !mFingerprintLockedOut); - return shouldListenKeyguardState && shouldListenUserState && shouldListenBouncerState - && shouldListenUdfpsState; + + final boolean shouldListen = shouldListenKeyguardState && shouldListenUserState + && shouldListenBouncerState && shouldListenUdfpsState; + + if (DEBUG_FINGERPRINT || DEBUG_SPEW) { + maybeLogListenerModelData( + new KeyguardFingerprintListenModel( + System.currentTimeMillis(), + user, + shouldListen, + biometricEnabledForUser, + mBouncer, + userCanSkipBouncer, + mCredentialAttempted, + mDeviceInteractive, + mIsDreaming, + isEncryptedOrLockdownForUser, + fingerprintDisabledForUser, + mFingerprintLockedOut, + mGoingToSleep, + mKeyguardGoingAway, + mKeyguardIsVisible, + mKeyguardOccluded, + mOccludingAppRequestingFp, + mIsPrimaryUser, + shouldListenForFingerprintAssistant, + mSwitchingUser, + isUdfps, + userDoesNotHaveTrust, + userNeedsStrongAuth)); + } + + return shouldListen; } /** @@ -2283,12 +2317,12 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener, Dumpab containsFlag(strongAuth, STRONG_AUTH_REQUIRED_AFTER_BOOT) || containsFlag(strongAuth, STRONG_AUTH_REQUIRED_AFTER_TIMEOUT); - boolean canBypass = mKeyguardBypassController != null + final boolean canBypass = mKeyguardBypassController != null && mKeyguardBypassController.canBypass(); // There's no reason to ask the HAL for authentication when the user can dismiss the // bouncer, unless we're bypassing and need to auto-dismiss the lock screen even when // TrustAgents or biometrics are keeping the device unlocked. - boolean becauseCannotSkipBouncer = !getUserCanSkipBouncer(user) || canBypass; + final boolean becauseCannotSkipBouncer = !getUserCanSkipBouncer(user) || canBypass; // Scan even when encrypted or timeout to show a preemptive bouncer when bypassing. // Lock-down mode shouldn't scan, since it is more explicit. @@ -2296,69 +2330,72 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener, Dumpab // If the device supports face detection (without authentication), allow it to happen // if the device is in lockdown mode. Otherwise, prevent scanning. - boolean supportsDetectOnly = !mFaceSensorProperties.isEmpty() + final boolean supportsDetectOnly = !mFaceSensorProperties.isEmpty() && mFaceSensorProperties.get(0).supportsFaceDetection; if (isLockDown && !supportsDetectOnly) { strongAuthAllowsScanning = false; } // If the face has recently been authenticated do not attempt to authenticate again. - boolean faceAuthenticated = getIsFaceAuthenticated(); + final boolean faceAuthenticated = getIsFaceAuthenticated(); + final boolean faceDisabledForUser = isFaceDisabled(user); + final boolean biometricEnabledForUser = mBiometricEnabledForUser.get(user); + final boolean shouldListenForFaceAssistant = shouldListenForFaceAssistant(); // Only listen if this KeyguardUpdateMonitor belongs to the primary user. There is an // instance of KeyguardUpdateMonitor for each user but KeyguardUpdateMonitor is user-aware. final boolean shouldListen = (mBouncer || mAuthInterruptActive || mOccludingAppRequestingFace || awakeKeyguard - || shouldListenForFaceAssistant()) - && !mSwitchingUser && !isFaceDisabled(user) && becauseCannotSkipBouncer - && !mKeyguardGoingAway && mBiometricEnabledForUser.get(user) && !mLockIconPressed + || shouldListenForFaceAssistant) + && !mSwitchingUser && !faceDisabledForUser && becauseCannotSkipBouncer + && !mKeyguardGoingAway && biometricEnabledForUser && !mLockIconPressed && strongAuthAllowsScanning && mIsPrimaryUser && (!mSecureCameraLaunched || mOccludingAppRequestingFace) && !faceAuthenticated; // Aggregate relevant fields for debug logging. if (DEBUG_FACE || DEBUG_SPEW) { - final KeyguardFaceListenModel model = new KeyguardFaceListenModel( - System.currentTimeMillis(), - user, - shouldListen, - mBouncer, - mAuthInterruptActive, - mOccludingAppRequestingFace, - awakeKeyguard, - shouldListenForFaceAssistant(), - mSwitchingUser, - isFaceDisabled(user), - becauseCannotSkipBouncer, - mKeyguardGoingAway, - mBiometricEnabledForUser.get(user), - mLockIconPressed, - strongAuthAllowsScanning, - mIsPrimaryUser, - mSecureCameraLaunched, - faceAuthenticated); - maybeLogFaceListenerModelData(model); + maybeLogListenerModelData( + new KeyguardFaceListenModel( + System.currentTimeMillis(), + user, + shouldListen, + mAuthInterruptActive, + becauseCannotSkipBouncer, + biometricEnabledForUser, + mBouncer, + faceAuthenticated, + faceDisabledForUser, + awakeKeyguard, + mKeyguardGoingAway, + shouldListenForFaceAssistant, + mLockIconPressed, + mOccludingAppRequestingFace, + mIsPrimaryUser, + strongAuthAllowsScanning, + mSecureCameraLaunched, + mSwitchingUser)); } return shouldListen; } - private void maybeLogFaceListenerModelData(KeyguardFaceListenModel model) { + private void maybeLogListenerModelData(KeyguardListenModel model) { // Too chatty, but very useful when debugging issues. if (DEBUG_SPEW) { Log.v(TAG, model.toString()); } // Add model data to the historical buffer. - if (DEBUG_FACE && mFaceRunningState != BIOMETRIC_STATE_RUNNING - && model.isListeningForFace()) { - if (mFaceListenModels == null) { - mFaceListenModels = new ArrayDeque<>(FACE_LISTEN_CALLS_QUEUE_SIZE); - } - if (mFaceListenModels.size() >= FACE_LISTEN_CALLS_QUEUE_SIZE) { - mFaceListenModels.remove(); - } - mFaceListenModels.add(model); + final boolean notYetRunning = + (DEBUG_FACE + && model instanceof KeyguardFaceListenModel + && mFaceRunningState != BIOMETRIC_STATE_RUNNING) + || (DEBUG_FINGERPRINT + && model instanceof KeyguardFingerprintListenModel + && mFingerprintRunningState != BIOMETRIC_STATE_RUNNING); + if (notYetRunning && model.getListening()) { + mListenModels.add(model); } } @@ -3437,15 +3474,8 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener, Dumpab pw.println(" enabledByUser=" + mBiometricEnabledForUser.get(userId)); pw.println(" mSecureCameraLaunched=" + mSecureCameraLaunched); } - if (mFaceListenModels != null && !mFaceListenModels.isEmpty()) { - final SimpleDateFormat dateFormat = - new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.SSS", Locale.US); - pw.println(" Face listen results (last " + FACE_LISTEN_CALLS_QUEUE_SIZE + " calls):"); - for (final KeyguardFaceListenModel model : mFaceListenModels) { - final String time = dateFormat.format(new Date(model.getTimeMillis())); - pw.println(" " + time + " " + model.toString()); - } - } + mListenModels.print(pw); + if (mIsAutomotive) { pw.println(" Running on Automotive build"); } diff --git a/packages/SystemUI/src/com/android/keyguard/LockIconViewController.java b/packages/SystemUI/src/com/android/keyguard/LockIconViewController.java index 4317e258d8f7..509ac8a6d9fe 100644 --- a/packages/SystemUI/src/com/android/keyguard/LockIconViewController.java +++ b/packages/SystemUI/src/com/android/keyguard/LockIconViewController.java @@ -514,7 +514,15 @@ public class LockIconViewController extends ViewController<LockIconView> impleme if (!wasClickableOnDownEvent()) { return false; } + onAffordanceClick(); + return true; + } + public boolean onFling(MotionEvent e1, MotionEvent e2, + float velocityX, float velocityY) { + if (!wasClickableOnDownEvent()) { + return false; + } onAffordanceClick(); return true; } diff --git a/packages/SystemUI/src/com/android/systemui/biometrics/AuthBiometricFaceToFingerprintView.java b/packages/SystemUI/src/com/android/systemui/biometrics/AuthBiometricFaceToFingerprintView.java index 98ad87506819..ae3e94b9a1cb 100644 --- a/packages/SystemUI/src/com/android/systemui/biometrics/AuthBiometricFaceToFingerprintView.java +++ b/packages/SystemUI/src/com/android/systemui/biometrics/AuthBiometricFaceToFingerprintView.java @@ -44,11 +44,17 @@ public class AuthBiometricFaceToFingerprintView extends AuthBiometricFaceView { private static final String TAG = "BiometricPrompt/AuthBiometricFaceToFingerprintView"; protected static class UdfpsIconController extends IconController { + @BiometricState private int mIconState = STATE_IDLE; + protected UdfpsIconController( @NonNull Context context, @NonNull ImageView iconView, @NonNull TextView textView) { super(context, iconView, textView); } + void updateState(@BiometricState int newState) { + updateState(mIconState, newState); + } + @Override protected void updateState(int lastState, int newState) { final boolean lastStateIsErrorIcon = @@ -86,6 +92,7 @@ public class AuthBiometricFaceToFingerprintView extends AuthBiometricFaceView { } mState = newState; + mIconState = newState; } } @@ -191,11 +198,11 @@ public class AuthBiometricFaceToFingerprintView extends AuthBiometricFaceView { // Deactivate the face icon controller so it stops drawing to the view mFaceIconController.deactivate(); - // Then, activate this icon controller. We need to start in the "error" state - mUdfpsIconController.updateState(mState, newState); + // Then, activate this icon controller. We need to start in the "idle" state + mUdfpsIconController.updateState(STATE_IDLE); } } else { // Fingerprint - mUdfpsIconController.updateState(mState, newState); + mUdfpsIconController.updateState(newState); } super.updateState(newState); diff --git a/packages/SystemUI/src/com/android/systemui/doze/util/BurnInHelper.kt b/packages/SystemUI/src/com/android/systemui/doze/util/BurnInHelper.kt index 15e3f3a6b1e9..5c6478ed0895 100644 --- a/packages/SystemUI/src/com/android/systemui/doze/util/BurnInHelper.kt +++ b/packages/SystemUI/src/com/android/systemui/doze/util/BurnInHelper.kt @@ -21,8 +21,8 @@ import android.util.MathUtils private const val MILLIS_PER_MINUTES = 1000 * 60f private const val BURN_IN_PREVENTION_PERIOD_Y = 521f private const val BURN_IN_PREVENTION_PERIOD_X = 83f -private const val BURN_IN_PREVENTION_PERIOD_SCALE = 180f -private const val BURN_IN_PREVENTION_PERIOD_PROGRESS = 120f +private const val BURN_IN_PREVENTION_PERIOD_SCALE = 181f +private const val BURN_IN_PREVENTION_PERIOD_PROGRESS = 89f /** * Returns the translation offset that should be used to avoid burn in at diff --git a/packages/SystemUI/src/com/android/systemui/media/dialog/MediaOutputController.java b/packages/SystemUI/src/com/android/systemui/media/dialog/MediaOutputController.java index 5293c8850267..b2def7a8596a 100644 --- a/packages/SystemUI/src/com/android/systemui/media/dialog/MediaOutputController.java +++ b/packages/SystemUI/src/com/android/systemui/media/dialog/MediaOutputController.java @@ -466,7 +466,7 @@ public class MediaOutputController implements LocalMediaManager.DeviceCallback { } boolean isVolumeControlEnabled(@NonNull MediaDevice device) { - return !device.getFeatures().contains(MediaRoute2Info.FEATURE_REMOTE_GROUP_PLAYBACK); + return !isActiveRemoteDevice(device); } private final MediaController.Callback mCb = new MediaController.Callback() { diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/NotificationShadeDepthController.kt b/packages/SystemUI/src/com/android/systemui/statusbar/NotificationShadeDepthController.kt index db553e4b093b..002c9c7d2544 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/NotificationShadeDepthController.kt +++ b/packages/SystemUI/src/com/android/systemui/statusbar/NotificationShadeDepthController.kt @@ -178,7 +178,8 @@ class NotificationShadeDepthController @Inject constructor( blurUtils.minBlurRadius, blurUtils.maxBlurRadius) var combinedBlur = (shadeSpring.radius * INTERACTION_BLUR_FRACTION + normalizedBlurRadius * ANIMATION_BLUR_FRACTION).toInt() - combinedBlur = max(combinedBlur, blurUtils.blurRadiusOfRatio(qsPanelExpansion)) + val qsExpandedRatio = qsPanelExpansion * shadeExpansion + combinedBlur = max(combinedBlur, blurUtils.blurRadiusOfRatio(qsExpandedRatio)) combinedBlur = max(combinedBlur, blurUtils.blurRadiusOfRatio(transitionToFullShadeProgress)) var shadeRadius = max(combinedBlur, wakeAndUnlockBlurRadius).toFloat() diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/UnlockedScreenOffAnimationController.kt b/packages/SystemUI/src/com/android/systemui/statusbar/phone/UnlockedScreenOffAnimationController.kt index a5b868b6f8a3..6b52dca42eda 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/UnlockedScreenOffAnimationController.kt +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/UnlockedScreenOffAnimationController.kt @@ -149,14 +149,18 @@ class UnlockedScreenOffAnimationController @Inject constructor( lightRevealAnimationPlaying = false aodUiAnimationPlaying = false - // Make sure the status bar is in the correct keyguard state, forcing it if necessary. This - // is required if the screen off animation is cancelled, since it might be incorrectly left - // in the KEYGUARD or SHADE states depending on when it was cancelled and whether 'lock - // instantly' is enabled. We need to force it so that the state is set even if we're going - // from SHADE to SHADE or KEYGUARD to KEYGUARD, since we might have changed parts of the UI - // (such as showing AOD in the shade) without actually changing the StatusBarState. This - // ensures that the UI definitely reflects the desired state. - statusBar.updateIsKeyguard(true /* force */) + // If we can't control the screen off animation, we shouldn't mess with the StatusBar's + // keyguard state unnecessarily. + if (dozeParameters.get().canControlUnlockedScreenOff()) { + // Make sure the status bar is in the correct keyguard state, forcing it if necessary. + // This is required if the screen off animation is cancelled, since it might be + // incorrectly left in the KEYGUARD or SHADE states depending on when it was cancelled + // and whether 'lock instantly' is enabled. We need to force it so that the state is set + // even if we're going from SHADE to SHADE or KEYGUARD to KEYGUARD, since we might have + // changed parts of the UI (such as showing AOD in the shade) without actually changing + // the StatusBarState. This ensures that the UI definitely reflects the desired state. + statusBar.updateIsKeyguard(true /* force */) + } } override fun onStartedGoingToSleep() { diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/ongoingcall/OngoingCallController.kt b/packages/SystemUI/src/com/android/systemui/statusbar/phone/ongoingcall/OngoingCallController.kt index 16fa5da9e979..6982631766f7 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/ongoingcall/OngoingCallController.kt +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/ongoingcall/OngoingCallController.kt @@ -218,6 +218,10 @@ class OngoingCallController @Inject constructor( isCallAppVisible = isProcessVisibleToUser( iActivityManager.getUidProcessState(currentCallNotificationInfo.uid, null)) + if (uidObserver != null) { + iActivityManager.unregisterUidObserver(uidObserver) + } + uidObserver = object : IUidObserver.Stub() { override fun onUidStateChanged( uid: Int, procState: Int, procStateSeq: Long, capability: Int) { diff --git a/packages/SystemUI/tests/src/com/android/keyguard/KeyguardListenQueueTest.kt b/packages/SystemUI/tests/src/com/android/keyguard/KeyguardListenQueueTest.kt new file mode 100644 index 000000000000..db87c5df16e1 --- /dev/null +++ b/packages/SystemUI/tests/src/com/android/keyguard/KeyguardListenQueueTest.kt @@ -0,0 +1,101 @@ +/* + * Copyright (C) 2021 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.android.keyguard + +import android.testing.AndroidTestingRunner +import androidx.test.filters.SmallTest +import com.android.systemui.SysuiTestCase +import com.google.common.truth.Truth.assertThat +import org.junit.Test +import org.junit.runner.RunWith + +@RunWith(AndroidTestingRunner::class) +@SmallTest +class KeyguardListenQueueTest : SysuiTestCase() { + + @Test + fun testQueueIsBounded() { + val size = 5 + val queue = KeyguardListenQueue(sizePerModality = size) + + val fingerprints = List(100) { fingerprintModel(it) } + fingerprints.forEach { queue.add(it) } + + assertThat(queue.models).containsExactlyElementsIn(fingerprints.takeLast(size)) + + val faces = List(100) { faceModel(it) } + faces.forEach { queue.add(it) } + + assertThat(queue.models).containsExactlyElementsIn( + faces.takeLast(size) + fingerprints.takeLast(5) + ) + + repeat(100) { + queue.add(faceModel(-1)) + queue.add(fingerprintModel(-1)) + } + assertThat(queue.models).hasSize(2 * size) + assertThat(queue.models.count { it.userId == -1 }).isEqualTo(2 * size) + } +} + +private fun fingerprintModel(user: Int) = KeyguardFingerprintListenModel( + timeMillis = System.currentTimeMillis(), + userId = user, + listening = false, + biometricEnabledForUser = false, + bouncer = false, + canSkipBouncer = false, + credentialAttempted = false, + deviceInteractive = false, + dreaming = false, + encryptedOrLockdown = false, + fingerprintDisabled = false, + fingerprintLockedOut = false, + goingToSleep = false, + keyguardGoingAway = false, + keyguardIsVisible = false, + keyguardOccluded = false, + occludingAppRequestingFp = false, + primaryUser = false, + shouldListenForFingerprintAssistant = false, + switchingUser = false, + udfps = false, + userDoesNotHaveTrust = false, + userNeedsStrongAuth = false +) + +private fun faceModel(user: Int) = KeyguardFaceListenModel( + timeMillis = System.currentTimeMillis(), + userId = user, + listening = false, + authInterruptActive = false, + becauseCannotSkipBouncer = false, + biometricSettingEnabledForUser = false, + bouncer = false, + faceAuthenticated = false, + faceDisabled = false, + keyguardAwake = false, + keyguardGoingAway = false, + listeningForFaceAssistant = false, + lockIconPressed = false, + occludingAppRequestingFaceAuth = false, + primaryUser = false, + scanningAllowedByStrongAuth = false, + secureCameraLaunched = false, + switchingUser = false +) diff --git a/packages/SystemUI/tests/src/com/android/systemui/biometrics/AuthBiometricFaceToFingerprintViewTest.java b/packages/SystemUI/tests/src/com/android/systemui/biometrics/AuthBiometricFaceToFingerprintViewTest.java index 090cf9f63eaf..f91c02938845 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/biometrics/AuthBiometricFaceToFingerprintViewTest.java +++ b/packages/SystemUI/tests/src/com/android/systemui/biometrics/AuthBiometricFaceToFingerprintViewTest.java @@ -101,7 +101,7 @@ public class AuthBiometricFaceToFingerprintViewTest extends SysuiTestCase { mFaceToFpView.onDialogAnimatedIn(); verify(mFaceToFpView.mFaceIconController) .updateState(anyInt(), eq(AuthBiometricFaceToFingerprintView.STATE_AUTHENTICATING)); - verify(mFaceToFpView.mUdfpsIconController, never()).updateState(anyInt(), anyInt()); + verify(mFaceToFpView.mUdfpsIconController, never()).updateState(anyInt()); } @Test @@ -109,13 +109,13 @@ public class AuthBiometricFaceToFingerprintViewTest extends SysuiTestCase { mFaceToFpView.onDialogAnimatedIn(); verify(mFaceToFpView.mFaceIconController) .updateState(anyInt(), eq(AuthBiometricFaceToFingerprintView.STATE_AUTHENTICATING)); - verify(mFaceToFpView.mUdfpsIconController, never()).updateState(anyInt(), anyInt()); + verify(mFaceToFpView.mUdfpsIconController, never()).updateState(anyInt()); mFaceToFpView.updateState(AuthBiometricFaceView.STATE_AUTHENTICATED); verify(mFaceToFpView.mFaceIconController).updateState( eq(AuthBiometricFaceToFingerprintView.STATE_AUTHENTICATING), eq(AuthBiometricFaceToFingerprintView.STATE_AUTHENTICATED)); - verify(mFaceToFpView.mUdfpsIconController, never()).updateState(anyInt(), anyInt()); + verify(mFaceToFpView.mUdfpsIconController, never()).updateState(anyInt()); assertEquals(AuthBiometricFaceToFingerprintView.STATE_AUTHENTICATED, mFaceToFpView.mState); } @@ -130,14 +130,12 @@ public class AuthBiometricFaceToFingerprintViewTest extends SysuiTestCase { verify(mFaceToFpView.mFaceIconController).deactivate(); verify(mFaceToFpView.mUdfpsIconController).updateState( - eq(AuthBiometricFaceToFingerprintView.STATE_AUTHENTICATING), - eq(AuthBiometricFaceToFingerprintView.STATE_ERROR)); + eq(AuthBiometricFaceToFingerprintView.STATE_IDLE)); verify(mConfirmButton).setVisibility(eq(View.GONE)); mFaceToFpView.updateState(AuthBiometricFaceToFingerprintView.STATE_AUTHENTICATING); verify(mFaceToFpView.mUdfpsIconController).updateState( - eq(AuthBiometricFaceToFingerprintView.STATE_ERROR), eq(AuthBiometricFaceToFingerprintView.STATE_AUTHENTICATING)); } diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/NotificationShadeDepthControllerTest.kt b/packages/SystemUI/tests/src/com/android/systemui/statusbar/NotificationShadeDepthControllerTest.kt index d23a9ce26def..7c045c1f2894 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/NotificationShadeDepthControllerTest.kt +++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/NotificationShadeDepthControllerTest.kt @@ -184,8 +184,9 @@ class NotificationShadeDepthControllerTest : SysuiTestCase() { @Test fun setQsPanelExpansion_appliesBlur() { notificationShadeDepthController.qsPanelExpansion = 1f + notificationShadeDepthController.onPanelExpansionChanged(0.5f, tracking = false) notificationShadeDepthController.updateBlurCallback.doFrame(0) - verify(blurUtils).applyBlur(any(), eq(maxBlur), eq(false)) + verify(blurUtils).applyBlur(any(), eq(maxBlur / 2), eq(false)) } @Test diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/ongoingcall/OngoingCallControllerTest.kt b/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/ongoingcall/OngoingCallControllerTest.kt index d36cb0b3a717..d26db4c69ece 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/ongoingcall/OngoingCallControllerTest.kt +++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/ongoingcall/OngoingCallControllerTest.kt @@ -184,6 +184,21 @@ class OngoingCallControllerTest : SysuiTestCase() { .isGreaterThan(0) } + /** Regression test for b/194731244. */ + @Test + fun onEntryUpdated_calledManyTimes_uidObserverUnregisteredManyTimes() { + val numCalls = 4 + + for (i in 0 until numCalls) { + // Re-create the notification each time so that it's considered a different object and + // observers will get re-registered (and hopefully unregistered). + notifCollectionListener.onEntryUpdated(createOngoingCallNotifEntry()) + } + + // There should be 1 observer still registered, so we should unregister n-1 times. + verify(mockIActivityManager, times(numCalls - 1)).unregisterUidObserver(any()) + } + /** * If a call notification is never added before #onEntryRemoved is called, then the listener * should never be notified. diff --git a/packages/VpnDialogs/res/values-eu/strings.xml b/packages/VpnDialogs/res/values-eu/strings.xml index 9fc16e27ca7f..a27a66a86c9d 100644 --- a/packages/VpnDialogs/res/values-eu/strings.xml +++ b/packages/VpnDialogs/res/values-eu/strings.xml @@ -17,7 +17,7 @@ <resources xmlns:android="http://schemas.android.com/apk/res/android" xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> <string name="prompt" msgid="3183836924226407828">"Konektatzeko eskaera"</string> - <string name="warning" msgid="809658604548412033">"<xliff:g id="APP">%s</xliff:g> aplikazioak VPN bidezko konexioa ezarri nahi du sareko trafikoa kontrolatzeko. Iturburua fidagarria bada bakarrik baimendu. <br /> <br /> VPN konexioa aktibo dagoenean, <img src=vpn_icon /> agertuko da pantailaren goialdean."</string> + <string name="warning" msgid="809658604548412033">"<xliff:g id="APP">%s</xliff:g> aplikazioak VPN bidezko konexioa ezarri nahi du sareko trafikoa kontrolatzeko. Iturburua fidagarria bada bakarrik baimendu. <br /> <br /> VPN bidezko konexioa aktibo dagoenean, <img src=vpn_icon /> agertuko da pantailaren goialdean."</string> <string name="warning" product="tv" msgid="5188957997628124947">"<xliff:g id="APP">%s</xliff:g> aplikazioak VPN bidezko konexio bat konfiguratu nahi du sareko trafikoa gainbegiratzeko. Onartu soilik iturburuaz fidatzen bazara. <br /> <br /> <img src=vpn_icon /> agertzen da pantailan, VPNa aktibo dagoenean."</string> <string name="legacy_title" msgid="192936250066580964">"VPN sarera konektatuta dago"</string> <string name="session" msgid="6470628549473641030">"Saioa:"</string> diff --git a/services/appwidget/java/com/android/server/appwidget/AppWidgetServiceImpl.java b/services/appwidget/java/com/android/server/appwidget/AppWidgetServiceImpl.java index 5aec6aa99c12..a56b1db1494c 100644 --- a/services/appwidget/java/com/android/server/appwidget/AppWidgetServiceImpl.java +++ b/services/appwidget/java/com/android/server/appwidget/AppWidgetServiceImpl.java @@ -3285,6 +3285,57 @@ class AppWidgetServiceImpl extends IAppWidgetService.Stub implements WidgetBacku } } + private void applyResourceOverlaysToWidgetsLocked(Set<String> packageNames, int userId, + boolean updateFrameworkRes) { + for (int i = 0, N = mProviders.size(); i < N; i++) { + Provider provider = mProviders.get(i); + if (provider.getUserId() != userId) { + continue; + } + + final String packageName = provider.id.componentName.getPackageName(); + if (!updateFrameworkRes && !packageNames.contains(packageName)) { + continue; + } + + ApplicationInfo newAppInfo = null; + try { + newAppInfo = mPackageManager.getApplicationInfo(packageName, + PackageManager.GET_SHARED_LIBRARY_FILES, userId); + } catch (RemoteException e) { + Slog.w(TAG, "Failed to retrieve app info for " + packageName + + " userId=" + userId, e); + } + if (newAppInfo == null) { + continue; + } + ApplicationInfo oldAppInfo = provider.info.providerInfo.applicationInfo; + if (!newAppInfo.sourceDir.equals(oldAppInfo.sourceDir)) { + // Overlay paths are generated against a particular version of an application. + // The overlays paths of a newly upgraded application are incompatible with the + // old version of the application. + continue; + } + + // Isolate the changes relating to RROs. The app info must be copied to prevent + // affecting other parts of system server that may have cached this app info. + oldAppInfo = new ApplicationInfo(oldAppInfo); + oldAppInfo.overlayPaths = newAppInfo.overlayPaths.clone(); + oldAppInfo.resourceDirs = newAppInfo.resourceDirs.clone(); + provider.info.providerInfo.applicationInfo = oldAppInfo; + + for (int j = 0, M = provider.widgets.size(); j < M; j++) { + Widget widget = provider.widgets.get(j); + if (widget.views != null) { + widget.views.updateAppInfo(oldAppInfo); + } + if (widget.maskedViews != null) { + widget.maskedViews.updateAppInfo(oldAppInfo); + } + } + } + } + /** * Updates all providers with the specified package names, and records any providers that were * pruned. @@ -4875,5 +4926,14 @@ class AppWidgetServiceImpl extends IAppWidgetService.Stub implements WidgetBacku public void unlockUser(int userId) { handleUserUnlocked(userId); } + + @Override + public void applyResourceOverlaysToWidgets(Set<String> packageNames, int userId, + boolean updateFrameworkRes) { + synchronized (mLock) { + applyResourceOverlaysToWidgetsLocked(new HashSet<>(packageNames), userId, + updateFrameworkRes); + } + } } } diff --git a/services/core/java/com/android/server/SensorPrivacyService.java b/services/core/java/com/android/server/SensorPrivacyService.java index 422e8ae14862..91b2440f71fe 100644 --- a/services/core/java/com/android/server/SensorPrivacyService.java +++ b/services/core/java/com/android/server/SensorPrivacyService.java @@ -1021,7 +1021,15 @@ public final class SensorPrivacyService extends SystemService { } } - return upgradeAndInit(version, map); + try { + return upgradeAndInit(version, map); + } catch (Exception e) { + Log.wtf(TAG, "Failed to upgrade and set sensor privacy state," + + " resetting to default.", e); + mEnabled = new SparseBooleanArray(); + mIndividualEnabled = new SparseArray<>(); + return true; + } } private boolean upgradeAndInit(int version, SparseArray map) { @@ -1037,22 +1045,22 @@ public final class SensorPrivacyService extends SystemService { final int[] users = getLocalService(UserManagerInternal.class).getUserIds(); if (version == 0) { final boolean enabled = (boolean) map.get(VER0_ENABLED); - final SparseBooleanArray individualEnabled = - (SparseBooleanArray) map.get(VER0_INDIVIDUAL_ENABLED); + final SparseArray<SensorState> individualEnabled = + (SparseArray<SensorState>) map.get(VER0_INDIVIDUAL_ENABLED); final SparseBooleanArray perUserEnabled = new SparseBooleanArray(); - final SparseArray<SparseBooleanArray> perUserIndividualEnabled = + final SparseArray<SparseArray<SensorState>> perUserIndividualEnabled = new SparseArray<>(); // Copy global state to each user for (int i = 0; i < users.length; i++) { int user = users[i]; perUserEnabled.put(user, enabled); - SparseBooleanArray userIndividualSensorEnabled = new SparseBooleanArray(); + SparseArray<SensorState> userIndividualSensorEnabled = new SparseArray<>(); perUserIndividualEnabled.put(user, userIndividualSensorEnabled); for (int j = 0; j < individualEnabled.size(); j++) { final int sensor = individualEnabled.keyAt(j); - final boolean isSensorEnabled = individualEnabled.valueAt(j); + final SensorState isSensorEnabled = individualEnabled.valueAt(j); userIndividualSensorEnabled.put(sensor, isSensorEnabled); } } diff --git a/services/core/java/com/android/server/VpnManagerService.java b/services/core/java/com/android/server/VpnManagerService.java index d483f1863258..a03425c0bb75 100644 --- a/services/core/java/com/android/server/VpnManagerService.java +++ b/services/core/java/com/android/server/VpnManagerService.java @@ -26,6 +26,8 @@ import android.content.BroadcastReceiver; import android.content.Context; import android.content.Intent; import android.content.IntentFilter; +import android.content.pm.PackageManager; +import android.content.pm.PackageManager.NameNotFoundException; import android.net.ConnectivityManager; import android.net.INetd; import android.net.IVpnManager; @@ -312,6 +314,26 @@ public class VpnManagerService extends IVpnManager.Stub { } } + // TODO : Move to a static lib to factorize with Vpn.java + private int getAppUid(final String app, final int userId) { + final PackageManager pm = mContext.getPackageManager(); + final long token = Binder.clearCallingIdentity(); + try { + return pm.getPackageUidAsUser(app, userId); + } catch (NameNotFoundException e) { + return -1; + } finally { + Binder.restoreCallingIdentity(token); + } + } + + private void verifyCallingUidAndPackage(String packageName, int callingUid) { + final int userId = UserHandle.getUserId(callingUid); + if (getAppUid(packageName, userId) != callingUid) { + throw new SecurityException(packageName + " does not belong to uid " + callingUid); + } + } + /** * Starts the VPN based on the stored profile for the given package * @@ -323,7 +345,9 @@ public class VpnManagerService extends IVpnManager.Stub { */ @Override public void startVpnProfile(@NonNull String packageName) { - final int user = UserHandle.getUserId(mDeps.getCallingUid()); + final int callingUid = Binder.getCallingUid(); + verifyCallingUidAndPackage(packageName, callingUid); + final int user = UserHandle.getUserId(callingUid); synchronized (mVpns) { throwIfLockdownEnabled(); mVpns.get(user).startVpnProfile(packageName); @@ -340,7 +364,9 @@ public class VpnManagerService extends IVpnManager.Stub { */ @Override public void stopVpnProfile(@NonNull String packageName) { - final int user = UserHandle.getUserId(mDeps.getCallingUid()); + final int callingUid = Binder.getCallingUid(); + verifyCallingUidAndPackage(packageName, callingUid); + final int user = UserHandle.getUserId(callingUid); synchronized (mVpns) { mVpns.get(user).stopVpnProfile(packageName); } diff --git a/services/core/java/com/android/server/am/ActiveServices.java b/services/core/java/com/android/server/am/ActiveServices.java index 45e6f1ec4bf8..a2fec2753340 100644 --- a/services/core/java/com/android/server/am/ActiveServices.java +++ b/services/core/java/com/android/server/am/ActiveServices.java @@ -807,10 +807,12 @@ public final class ActiveServices { if (fgRequired) { // We are now effectively running a foreground service. - ServiceState stracker = r.getTracker(); - if (stracker != null) { - stracker.setForeground(true, mAm.mProcessStats.getMemFactorLocked(), - r.lastActivity); + synchronized (mAm.mProcessStats.mLock) { + final ServiceState stracker = r.getTracker(); + if (stracker != null) { + stracker.setForeground(true, mAm.mProcessStats.getMemFactorLocked(), + r.lastActivity); + } } mAm.mAppOpsService.startOperation(AppOpsManager.getToken(mAm.mAppOpsService), AppOpsManager.OP_START_FOREGROUND, r.appInfo.uid, r.packageName, null, @@ -1082,9 +1084,11 @@ public final class ActiveServices { ComponentName startServiceInnerLocked(ServiceMap smap, Intent service, ServiceRecord r, boolean callerFg, boolean addToStarting) throws TransactionTooLargeException { - ServiceState stracker = r.getTracker(); - if (stracker != null) { - stracker.setStarted(true, mAm.mProcessStats.getMemFactorLocked(), r.lastActivity); + synchronized (mAm.mProcessStats.mLock) { + final ServiceState stracker = r.getTracker(); + if (stracker != null) { + stracker.setStarted(true, mAm.mProcessStats.getMemFactorLocked(), r.lastActivity); + } } r.callStart = false; @@ -1144,8 +1148,10 @@ public final class ActiveServices { mAm.mBatteryStatsService.noteServiceStopRunning(uid, packageName, serviceName); service.startRequested = false; if (service.tracker != null) { - service.tracker.setStarted(false, mAm.mProcessStats.getMemFactorLocked(), - SystemClock.uptimeMillis()); + synchronized (mAm.mProcessStats.mLock) { + service.tracker.setStarted(false, mAm.mProcessStats.getMemFactorLocked(), + SystemClock.uptimeMillis()); + } } service.callStart = false; @@ -1320,8 +1326,10 @@ public final class ActiveServices { mAm.mBatteryStatsService.noteServiceStopRunning(uid, packageName, serviceName); r.startRequested = false; if (r.tracker != null) { - r.tracker.setStarted(false, mAm.mProcessStats.getMemFactorLocked(), - SystemClock.uptimeMillis()); + synchronized (mAm.mProcessStats.mLock) { + r.tracker.setStarted(false, mAm.mProcessStats.getMemFactorLocked(), + SystemClock.uptimeMillis()); + } } r.callStart = false; final long origId = Binder.clearCallingIdentity(); @@ -1877,10 +1885,12 @@ public final class ActiveServices { r.mStartForegroundCount++; r.mFgsEnterTime = SystemClock.uptimeMillis(); if (!stopProcStatsOp) { - ServiceState stracker = r.getTracker(); - if (stracker != null) { - stracker.setForeground(true, - mAm.mProcessStats.getMemFactorLocked(), r.lastActivity); + synchronized (mAm.mProcessStats.mLock) { + final ServiceState stracker = r.getTracker(); + if (stracker != null) { + stracker.setForeground(true, + mAm.mProcessStats.getMemFactorLocked(), r.lastActivity); + } } } else { stopProcStatsOp = false; @@ -1915,10 +1925,12 @@ public final class ActiveServices { if (stopProcStatsOp) { // We got through to this point with it actively being started foreground, // and never decided we wanted to keep it like that, so drop it. - ServiceState stracker = r.getTracker(); - if (stracker != null) { - stracker.setForeground(false, mAm.mProcessStats.getMemFactorLocked(), - SystemClock.uptimeMillis()); + synchronized (mAm.mProcessStats.mLock) { + final ServiceState stracker = r.getTracker(); + if (stracker != null) { + stracker.setForeground(false, mAm.mProcessStats.getMemFactorLocked(), + SystemClock.uptimeMillis()); + } } } if (alreadyStartedOp) { @@ -1960,10 +1972,12 @@ public final class ActiveServices { r.isForeground = false; r.mFgsExitTime = SystemClock.uptimeMillis(); - ServiceState stracker = r.getTracker(); - if (stracker != null) { - stracker.setForeground(false, mAm.mProcessStats.getMemFactorLocked(), - SystemClock.uptimeMillis()); + synchronized (mAm.mProcessStats.mLock) { + final ServiceState stracker = r.getTracker(); + if (stracker != null) { + stracker.setForeground(false, mAm.mProcessStats.getMemFactorLocked(), + SystemClock.uptimeMillis()); + } } mAm.mAppOpsService.finishOperation( AppOpsManager.getToken(mAm.mAppOpsService), @@ -2738,10 +2752,12 @@ public final class ActiveServices { s.lastActivity = SystemClock.uptimeMillis(); if (!s.hasAutoCreateConnections()) { // This is the first binding, let the tracker know. - ServiceState stracker = s.getTracker(); - if (stracker != null) { - stracker.setBound(true, mAm.mProcessStats.getMemFactorLocked(), - s.lastActivity); + synchronized (mAm.mProcessStats.mLock) { + final ServiceState stracker = s.getTracker(); + if (stracker != null) { + stracker.setBound(true, mAm.mProcessStats.getMemFactorLocked(), + s.lastActivity); + } } } } @@ -3378,9 +3394,11 @@ public final class ActiveServices { ProcessServiceRecord psr; if (r.executeNesting == 0) { r.executeFg = fg; - ServiceState stracker = r.getTracker(); - if (stracker != null) { - stracker.setExecuting(true, mAm.mProcessStats.getMemFactorLocked(), now); + synchronized (mAm.mProcessStats.mLock) { + final ServiceState stracker = r.getTracker(); + if (stracker != null) { + stracker.setExecuting(true, mAm.mProcessStats.getMemFactorLocked(), now); + } } if (r.app != null) { psr = r.app.mServices; @@ -3575,7 +3593,9 @@ public final class ActiveServices { if (!mRestartingServices.contains(r)) { r.createdFromFg = false; mRestartingServices.add(r); - r.makeRestarting(mAm.mProcessStats.getMemFactorLocked(), now); + synchronized (mAm.mProcessStats.mLock) { + r.makeRestarting(mAm.mProcessStats.getMemFactorLocked(), now); + } } cancelForegroundNotificationLocked(r); @@ -3653,8 +3673,10 @@ public final class ActiveServices { } } if (!stillTracking) { - r.restartTracker.setRestarting(false, mAm.mProcessStats.getMemFactorLocked(), - SystemClock.uptimeMillis()); + synchronized (mAm.mProcessStats.mLock) { + r.restartTracker.setRestarting(false, mAm.mProcessStats.getMemFactorLocked(), + SystemClock.uptimeMillis()); + } r.restartTracker = null; } } @@ -4174,9 +4196,11 @@ public final class ActiveServices { + r); r.fgRequired = false; r.fgWaiting = false; - ServiceState stracker = r.getTracker(); - if (stracker != null) { - stracker.setForeground(false, mAm.mProcessStats.getMemFactorLocked(), now); + synchronized (mAm.mProcessStats.mLock) { + ServiceState stracker = r.getTracker(); + if (stracker != null) { + stracker.setForeground(false, mAm.mProcessStats.getMemFactorLocked(), now); + } } mAm.mAppOpsService.finishOperation(AppOpsManager.getToken(mAm.mAppOpsService), AppOpsManager.OP_START_FOREGROUND, r.appInfo.uid, r.packageName, null); @@ -4233,9 +4257,11 @@ public final class ActiveServices { cancelForegroundNotificationLocked(r); if (r.isForeground) { decActiveForegroundAppLocked(smap, r); - ServiceState stracker = r.getTracker(); - if (stracker != null) { - stracker.setForeground(false, mAm.mProcessStats.getMemFactorLocked(), now); + synchronized (mAm.mProcessStats.mLock) { + ServiceState stracker = r.getTracker(); + if (stracker != null) { + stracker.setForeground(false, mAm.mProcessStats.getMemFactorLocked(), now); + } } mAm.mAppOpsService.finishOperation( AppOpsManager.getToken(mAm.mAppOpsService), @@ -4303,13 +4329,15 @@ public final class ActiveServices { ((ServiceRestarter)r.restarter).setService(null); } - int memFactor = mAm.mProcessStats.getMemFactorLocked(); - if (r.tracker != null) { - r.tracker.setStarted(false, memFactor, now); - r.tracker.setBound(false, memFactor, now); - if (r.executeNesting == 0) { - r.tracker.clearCurrentOwner(r, false); - r.tracker = null; + synchronized (mAm.mProcessStats.mLock) { + final int memFactor = mAm.mProcessStats.getMemFactorLocked(); + if (r.tracker != null) { + r.tracker.setStarted(false, memFactor, now); + r.tracker.setBound(false, memFactor, now); + if (r.executeNesting == 0) { + r.tracker.clearCurrentOwner(r, false); + r.tracker = null; + } } } @@ -4440,8 +4468,10 @@ public final class ActiveServices { boolean hasAutoCreate = s.hasAutoCreateConnections(); if (!hasAutoCreate) { if (s.tracker != null) { - s.tracker.setBound(false, mAm.mProcessStats.getMemFactorLocked(), - SystemClock.uptimeMillis()); + synchronized (mAm.mProcessStats.mLock) { + s.tracker.setBound(false, mAm.mProcessStats.getMemFactorLocked(), + SystemClock.uptimeMillis()); + } } } bringDownServiceIfNeededLocked(s, true, hasAutoCreate, enqueueOomAdj); @@ -4533,12 +4563,14 @@ public final class ActiveServices { private void serviceProcessGoneLocked(ServiceRecord r, boolean enqueueOomAdj) { if (r.tracker != null) { - int memFactor = mAm.mProcessStats.getMemFactorLocked(); - long now = SystemClock.uptimeMillis(); - r.tracker.setExecuting(false, memFactor, now); - r.tracker.setForeground(false, memFactor, now); - r.tracker.setBound(false, memFactor, now); - r.tracker.setStarted(false, memFactor, now); + synchronized (mAm.mProcessStats.mLock) { + final int memFactor = mAm.mProcessStats.getMemFactorLocked(); + final long now = SystemClock.uptimeMillis(); + r.tracker.setExecuting(false, memFactor, now); + r.tracker.setForeground(false, memFactor, now); + r.tracker.setBound(false, memFactor, now); + r.tracker.setStarted(false, memFactor, now); + } } serviceDoneExecutingLocked(r, true, true, enqueueOomAdj); } @@ -4585,13 +4617,15 @@ public final class ActiveServices { } r.executeFg = false; if (r.tracker != null) { - final int memFactor = mAm.mProcessStats.getMemFactorLocked(); - final long now = SystemClock.uptimeMillis(); - r.tracker.setExecuting(false, memFactor, now); - r.tracker.setForeground(false, memFactor, now); - if (finishing) { - r.tracker.clearCurrentOwner(r, false); - r.tracker = null; + synchronized (mAm.mProcessStats.mLock) { + final int memFactor = mAm.mProcessStats.getMemFactorLocked(); + final long now = SystemClock.uptimeMillis(); + r.tracker.setExecuting(false, memFactor, now); + r.tracker.setForeground(false, memFactor, now); + if (finishing) { + r.tracker.clearCurrentOwner(r, false); + r.tracker = null; + } } } if (finishing) { @@ -4976,8 +5010,10 @@ public final class ActiveServices { // down it. sr.startRequested = false; if (sr.tracker != null) { - sr.tracker.setStarted(false, mAm.mProcessStats.getMemFactorLocked(), - SystemClock.uptimeMillis()); + synchronized (mAm.mProcessStats.mLock) { + sr.tracker.setStarted(false, mAm.mProcessStats.getMemFactorLocked(), + SystemClock.uptimeMillis()); + } } } } @@ -6278,10 +6314,17 @@ public final class ActiveServices { final String msg = "Background started FGS: " + ((r.mAllowStartForeground != REASON_DENIED) ? "Allowed " : "Disallowed ") + r.mInfoAllowStartForeground; - Slog.wtfQuiet(TAG, msg); if (r.mAllowStartForeground != REASON_DENIED) { + if (ActivityManagerUtils.shouldSamplePackageForAtom(r.packageName, + mAm.mConstants.mFgsStartAllowedLogSampleRate)) { + Slog.wtfQuiet(TAG, msg); + } Slog.i(TAG, msg); } else { + if (ActivityManagerUtils.shouldSamplePackageForAtom(r.packageName, + mAm.mConstants.mFgsStartDeniedLogSampleRate)) { + Slog.wtfQuiet(TAG, msg); + } Slog.w(TAG, msg); } r.mLoggedInfoAllowStartForeground = true; diff --git a/services/core/java/com/android/server/am/ActivityManagerConstants.java b/services/core/java/com/android/server/am/ActivityManagerConstants.java index ac0a1985ac89..eeb41a3df969 100644 --- a/services/core/java/com/android/server/am/ActivityManagerConstants.java +++ b/services/core/java/com/android/server/am/ActivityManagerConstants.java @@ -108,6 +108,8 @@ final class ActivityManagerConstants extends ContentObserver { static final String KEY_FG_TO_BG_FGS_GRACE_DURATION = "fg_to_bg_fgs_grace_duration"; static final String KEY_FGS_START_FOREGROUND_TIMEOUT = "fgs_start_foreground_timeout"; static final String KEY_FGS_ATOM_SAMPLE_RATE = "fgs_atom_sample_rate"; + static final String KEY_FGS_START_ALLOWED_LOG_SAMPLE_RATE = "fgs_start_allowed_log_sample_rate"; + static final String KEY_FGS_START_DENIED_LOG_SAMPLE_RATE = "fgs_start_denied_log_sample_rate"; static final String KEY_FGS_ALLOW_OPT_OUT = "fgs_allow_opt_out"; private static final int DEFAULT_MAX_CACHED_PROCESSES = 32; @@ -152,6 +154,8 @@ final class ActivityManagerConstants extends ContentObserver { private static final long DEFAULT_FG_TO_BG_FGS_GRACE_DURATION = 5 * 1000; private static final int DEFAULT_FGS_START_FOREGROUND_TIMEOUT_MS = 10 * 1000; private static final float DEFAULT_FGS_ATOM_SAMPLE_RATE = 1; // 100 % + private static final float DEFAULT_FGS_START_ALLOWED_LOG_SAMPLE_RATE = 0.25f; // 25% + private static final float DEFAULT_FGS_START_DENIED_LOG_SAMPLE_RATE = 1; // 100% /** * Same as {@link TEMPORARY_ALLOW_LIST_TYPE_FOREGROUND_SERVICE_NOT_ALLOWED} */ @@ -496,6 +500,20 @@ final class ActivityManagerConstants extends ContentObserver { volatile float mFgsAtomSampleRate = DEFAULT_FGS_ATOM_SAMPLE_RATE; /** + * Sample rate for the allowed FGS start WTF logs. + * + * If the value is 0.1, 10% of the logs would be sampled. + */ + volatile float mFgsStartAllowedLogSampleRate = DEFAULT_FGS_START_ALLOWED_LOG_SAMPLE_RATE; + + /** + * Sample rate for the denied FGS start WTF logs. + * + * If the value is 0.1, 10% of the logs would be sampled. + */ + volatile float mFgsStartDeniedLogSampleRate = DEFAULT_FGS_START_DENIED_LOG_SAMPLE_RATE; + + /** * Whether to allow "opt-out" from the foreground service restrictions. * (https://developer.android.com/about/versions/12/foreground-services) */ @@ -711,6 +729,12 @@ final class ActivityManagerConstants extends ContentObserver { case KEY_FGS_ATOM_SAMPLE_RATE: updateFgsAtomSamplePercent(); break; + case KEY_FGS_START_ALLOWED_LOG_SAMPLE_RATE: + updateFgsStartAllowedLogSamplePercent(); + break; + case KEY_FGS_START_DENIED_LOG_SAMPLE_RATE: + updateFgsStartDeniedLogSamplePercent(); + break; case KEY_FGS_ALLOW_OPT_OUT: updateFgsAllowOptOut(); break; @@ -1057,6 +1081,20 @@ final class ActivityManagerConstants extends ContentObserver { DEFAULT_FGS_ATOM_SAMPLE_RATE); } + private void updateFgsStartAllowedLogSamplePercent() { + mFgsStartAllowedLogSampleRate = DeviceConfig.getFloat( + DeviceConfig.NAMESPACE_ACTIVITY_MANAGER, + KEY_FGS_START_ALLOWED_LOG_SAMPLE_RATE, + DEFAULT_FGS_START_ALLOWED_LOG_SAMPLE_RATE); + } + + private void updateFgsStartDeniedLogSamplePercent() { + mFgsStartDeniedLogSampleRate = DeviceConfig.getFloat( + DeviceConfig.NAMESPACE_ACTIVITY_MANAGER, + KEY_FGS_START_DENIED_LOG_SAMPLE_RATE, + DEFAULT_FGS_START_DENIED_LOG_SAMPLE_RATE); + } + private void updateFgsAllowOptOut() { mFgsAllowOptOut = DeviceConfig.getBoolean( DeviceConfig.NAMESPACE_ACTIVITY_MANAGER, @@ -1285,6 +1323,10 @@ final class ActivityManagerConstants extends ContentObserver { pw.print("="); pw.println(mFgsStartRestrictionCheckCallerTargetSdk); pw.print(" "); pw.print(KEY_FGS_ATOM_SAMPLE_RATE); pw.print("="); pw.println(mFgsAtomSampleRate); + pw.print(" "); pw.print(KEY_FGS_START_ALLOWED_LOG_SAMPLE_RATE); + pw.print("="); pw.println(mFgsStartAllowedLogSampleRate); + pw.print(" "); pw.print(KEY_FGS_START_DENIED_LOG_SAMPLE_RATE); + pw.print("="); pw.println(mFgsStartDeniedLogSampleRate); pw.print(" "); pw.print(KEY_PUSH_MESSAGING_OVER_QUOTA_BEHAVIOR); pw.print("="); pw.println(mPushMessagingOverQuotaBehavior); pw.print(" "); pw.print(KEY_FGS_ALLOW_OPT_OUT); diff --git a/services/core/java/com/android/server/am/ActivityManagerService.java b/services/core/java/com/android/server/am/ActivityManagerService.java index 99ae52c00995..953e6e24236f 100644 --- a/services/core/java/com/android/server/am/ActivityManagerService.java +++ b/services/core/java/com/android/server/am/ActivityManagerService.java @@ -193,6 +193,7 @@ import android.app.usage.UsageEvents.Event; import android.app.usage.UsageStatsManager; import android.app.usage.UsageStatsManagerInternal; import android.appwidget.AppWidgetManager; +import android.appwidget.AppWidgetManagerInternal; import android.content.AttributionSource; import android.content.AutofillOptions; import android.content.BroadcastReceiver; @@ -16569,13 +16570,21 @@ public class ActivityManagerService extends IActivityManager.Stub enforceCallingPermission(android.Manifest.permission.CHANGE_CONFIGURATION, "scheduleApplicationInfoChanged()"); - synchronized (mProcLock) { - final long origId = Binder.clearCallingIdentity(); - try { - updateApplicationInfoLOSP(packageNames, userId); - } finally { - Binder.restoreCallingIdentity(origId); + final long origId = Binder.clearCallingIdentity(); + try { + final boolean updateFrameworkRes = packageNames.contains("android"); + synchronized (mProcLock) { + updateApplicationInfoLOSP(packageNames, updateFrameworkRes, userId); + } + + AppWidgetManagerInternal widgets = LocalServices.getService( + AppWidgetManagerInternal.class); + if (widgets != null) { + widgets.applyResourceOverlaysToWidgets(new HashSet<>(packageNames), userId, + updateFrameworkRes); } + } finally { + Binder.restoreCallingIdentity(origId); } } @@ -16592,11 +16601,12 @@ public class ActivityManagerService extends IActivityManager.Stub } @GuardedBy(anyOf = {"this", "mProcLock"}) - private void updateApplicationInfoLOSP(@NonNull List<String> packagesToUpdate, int userId) { - final boolean updateFrameworkRes = packagesToUpdate.contains("android"); + private void updateApplicationInfoLOSP(@NonNull List<String> packagesToUpdate, + boolean updateFrameworkRes, int userId) { if (updateFrameworkRes) { ParsingPackageUtils.readConfigUseRoundIcon(null); } + mProcessList.updateApplicationInfoLOSP(packagesToUpdate, userId, updateFrameworkRes); if (updateFrameworkRes) { diff --git a/services/core/java/com/android/server/am/ConnectionRecord.java b/services/core/java/com/android/server/am/ConnectionRecord.java index e6cd509f50dc..916127126117 100644 --- a/services/core/java/com/android/server/am/ConnectionRecord.java +++ b/services/core/java/com/android/server/am/ConnectionRecord.java @@ -47,6 +47,7 @@ final class ConnectionRecord { public AssociationState.SourceState association; // Association tracking String stringName; // Caching of toString. boolean serviceDead; // Well is it? + private Object mProcStatsLock; // Internal lock for accessing AssociationState // Please keep the following two enum list synced. private static final int[] BIND_ORIG_ENUMS = new int[] { @@ -137,23 +138,29 @@ final class ConnectionRecord { Slog.wtf(TAG_AM, "Inactive holder in referenced service " + binding.service.shortInstanceName + ": proc=" + binding.service.app); } else { - association = holder.pkg.getAssociationStateLocked(holder.state, - binding.service.instanceName.getClassName()).startSource(clientUid, - clientProcessName, clientPackageName); - + mProcStatsLock = binding.service.app.mService.mProcessStats.mLock; + synchronized (mProcStatsLock) { + association = holder.pkg.getAssociationStateLocked(holder.state, + binding.service.instanceName.getClassName()).startSource(clientUid, + clientProcessName, clientPackageName); + } } } } public void trackProcState(int procState, int seq, long now) { if (association != null) { - association.trackProcState(procState, seq, now); + synchronized (mProcStatsLock) { + association.trackProcState(procState, seq, now); + } } } public void stopAssociation() { if (association != null) { - association.stop(); + synchronized (mProcStatsLock) { + association.stop(); + } association = null; } } diff --git a/services/core/java/com/android/server/am/ContentProviderConnection.java b/services/core/java/com/android/server/am/ContentProviderConnection.java index 3bc4fcf08921..3b9d47d509ad 100644 --- a/services/core/java/com/android/server/am/ContentProviderConnection.java +++ b/services/core/java/com/android/server/am/ContentProviderConnection.java @@ -38,6 +38,7 @@ public final class ContentProviderConnection extends Binder { public final String clientPackage; public AssociationState.SourceState association; public final long createTime; + private Object mProcStatsLock; // Internal lock for accessing AssociationState /** * Internal lock that guards access to the two counters. @@ -87,23 +88,29 @@ public final class ContentProviderConnection extends Binder { Slog.wtf(TAG_AM, "Inactive holder in referenced provider " + provider.name.toShortString() + ": proc=" + provider.proc); } else { - association = holder.pkg.getAssociationStateLocked(holder.state, - provider.name.getClassName()).startSource(client.uid, client.processName, - clientPackage); - + mProcStatsLock = provider.proc.mService.mProcessStats.mLock; + synchronized (mProcStatsLock) { + association = holder.pkg.getAssociationStateLocked(holder.state, + provider.name.getClassName()).startSource(client.uid, + client.processName, clientPackage); + } } } } public void trackProcState(int procState, int seq, long now) { if (association != null) { - association.trackProcState(procState, seq, now); + synchronized (mProcStatsLock) { + association.trackProcState(procState, seq, now); + } } } public void stopAssociation() { if (association != null) { - association.stop(); + synchronized (mProcStatsLock) { + association.stop(); + } association = null; } } diff --git a/services/core/java/com/android/server/am/ContentProviderRecord.java b/services/core/java/com/android/server/am/ContentProviderRecord.java index 5fd15db79d66..75f31c0ac29f 100644 --- a/services/core/java/com/android/server/am/ContentProviderRecord.java +++ b/services/core/java/com/android/server/am/ContentProviderRecord.java @@ -321,6 +321,7 @@ final class ContentProviderRecord implements ComponentName.WithComponentName { final String mOwningProcessName; int mAcquisitionCount; AssociationState.SourceState mAssociation; + private Object mProcStatsLock; // Internal lock for accessing AssociationState public ExternalProcessHandle(IBinder token, int owningUid, String owningProcessName) { mToken = token; @@ -353,17 +354,21 @@ final class ContentProviderRecord implements ComponentName.WithComponentName { Slog.wtf(TAG_AM, "Inactive holder in referenced provider " + provider.name.toShortString() + ": proc=" + provider.proc); } else { - mAssociation = holder.pkg.getAssociationStateLocked(holder.state, - provider.name.getClassName()).startSource(mOwningUid, - mOwningProcessName, null); - + mProcStatsLock = provider.proc.mService.mProcessStats.mLock; + synchronized (mProcStatsLock) { + mAssociation = holder.pkg.getAssociationStateLocked(holder.state, + provider.name.getClassName()).startSource(mOwningUid, + mOwningProcessName, null); + } } } } public void stopAssociation() { if (mAssociation != null) { - mAssociation.stop(); + synchronized (mProcStatsLock) { + mAssociation.stop(); + } mAssociation = null; } } diff --git a/services/core/java/com/android/server/am/OomAdjuster.java b/services/core/java/com/android/server/am/OomAdjuster.java index d6bf8dbe0a6a..5c19ceb7067a 100644 --- a/services/core/java/com/android/server/am/OomAdjuster.java +++ b/services/core/java/com/android/server/am/OomAdjuster.java @@ -2792,8 +2792,10 @@ public class OomAdjuster { state.setNotCachedSinceIdle(false); } if (!doingAll) { - mService.setProcessTrackerStateLOSP(app, - mService.mProcessStats.getMemFactorLocked(), now); + synchronized (mService.mProcessStats.mLock) { + mService.setProcessTrackerStateLOSP(app, + mService.mProcessStats.getMemFactorLocked(), now); + } } else { state.setProcStateChanged(true); } diff --git a/services/core/java/com/android/server/location/eventlog/LocationEventLog.java b/services/core/java/com/android/server/location/eventlog/LocationEventLog.java index db2a43f7a00d..2178672cbea9 100644 --- a/services/core/java/com/android/server/location/eventlog/LocationEventLog.java +++ b/services/core/java/com/android/server/location/eventlog/LocationEventLog.java @@ -192,9 +192,7 @@ public class LocationEventLog extends LocalEventLog { /** Logs a new incoming location for a location provider. */ public void logProviderReceivedLocations(String provider, int numLocations) { - if (D) { - addLogEvent(EVENT_PROVIDER_RECEIVE_LOCATION, provider, numLocations); - } + addLogEvent(EVENT_PROVIDER_RECEIVE_LOCATION, provider, numLocations); } /** Logs a location deliver for a client of a location provider. */ diff --git a/services/core/java/com/android/server/pm/PackageSignatures.java b/services/core/java/com/android/server/pm/PackageSignatures.java index 394cdee8f917..83f54f156750 100644 --- a/services/core/java/com/android/server/pm/PackageSignatures.java +++ b/services/core/java/com/android/server/pm/PackageSignatures.java @@ -174,7 +174,16 @@ class PackageSignatures { if (index >= 0 && index < readSignatures.size()) { Signature sig = readSignatures.get(index); if (sig != null) { - signatures.add(sig); + // An app using a shared signature in its signing lineage + // can have unique capabilities assigned to this previous + // signer; create a new instance of this Signature to ensure + // its flags do not overwrite those of the instance from + // readSignatures. + if (isPastSigs) { + signatures.add(new Signature(sig)); + } else { + signatures.add(sig); + } signatureParsed = true; } else { PackageManagerService.reportSettingsProblem(Log.WARN, diff --git a/services/core/java/com/android/server/power/hint/HintManagerService.java b/services/core/java/com/android/server/power/hint/HintManagerService.java index 6014d0cee171..2491565dd376 100644 --- a/services/core/java/com/android/server/power/hint/HintManagerService.java +++ b/services/core/java/com/android/server/power/hint/HintManagerService.java @@ -255,7 +255,11 @@ public final class HintManagerService extends SystemService { private boolean checkTidValid(int uid, int tgid, int [] tids) { // Make sure all tids belongs to the same UID (including isolated UID), // tids can belong to different application processes. - List<Integer> eligiblePids = mAmInternal.getIsolatedProcesses(uid); + List<Integer> eligiblePids = null; + // To avoid deadlock, do not call into AMS if the call is from system. + if (uid != Process.SYSTEM_UID) { + eligiblePids = mAmInternal.getIsolatedProcesses(uid); + } if (eligiblePids == null) { eligiblePids = new ArrayList<>(); } diff --git a/services/core/java/com/android/server/powerstats/PowerStatsDataStorage.java b/services/core/java/com/android/server/powerstats/PowerStatsDataStorage.java index 2a95416747a6..06253a08d937 100644 --- a/services/core/java/com/android/server/powerstats/PowerStatsDataStorage.java +++ b/services/core/java/com/android/server/powerstats/PowerStatsDataStorage.java @@ -124,12 +124,8 @@ public class PowerStatsDataStorage { @Override public void read(InputStream in) throws IOException { while (in.available() > 0) { - try { - DataElement dataElement = new DataElement(in); - mCallback.onReadDataElement(dataElement.getData()); - } catch (IOException e) { - Slog.e(TAG, "Failed to read from storage. " + e.getMessage()); - } + DataElement dataElement = new DataElement(in); + mCallback.onReadDataElement(dataElement.getData()); } } } diff --git a/services/core/java/com/android/server/wm/DisplayContent.java b/services/core/java/com/android/server/wm/DisplayContent.java index 1b799dfbdaab..dbc1116ad389 100644 --- a/services/core/java/com/android/server/wm/DisplayContent.java +++ b/services/core/java/com/android/server/wm/DisplayContent.java @@ -1593,8 +1593,10 @@ class DisplayContent extends RootDisplayArea implements WindowManagerPolicy.Disp // If the transition has not started yet, the activity must be the top. return false; } - if (mLastWallpaperVisible && r.windowsCanBeWallpaperTarget()) { - // Use normal rotation animation for orientation change of visible wallpaper. + if (mLastWallpaperVisible && r.windowsCanBeWallpaperTarget() + && mFixedRotationTransitionListener.mAnimatingRecents == null) { + // Use normal rotation animation for orientation change of visible wallpaper if recents + // animation is not running (it may be swiping to home). return false; } final int rotation = rotationForActivityInDifferentOrientation(r); diff --git a/services/core/java/com/android/server/wm/WallpaperController.java b/services/core/java/com/android/server/wm/WallpaperController.java index 95e5fc2e6b27..4ff6d3c9a5f2 100644 --- a/services/core/java/com/android/server/wm/WallpaperController.java +++ b/services/core/java/com/android/server/wm/WallpaperController.java @@ -549,6 +549,9 @@ class WallpaperController { final WindowState prevWallpaperTarget = mWallpaperTarget; mWallpaperTarget = wallpaperTarget; + if (prevWallpaperTarget == null && wallpaperTarget != null) { + updateWallpaperOffsetLocked(mWallpaperTarget, false); + } if (wallpaperTarget == null || prevWallpaperTarget == null) { return; } diff --git a/services/core/java/com/android/server/wm/WindowOrientationListener.java b/services/core/java/com/android/server/wm/WindowOrientationListener.java index 0ded8fb313cd..a967ea8fbf8c 100644 --- a/services/core/java/com/android/server/wm/WindowOrientationListener.java +++ b/services/core/java/com/android/server/wm/WindowOrientationListener.java @@ -68,7 +68,7 @@ public abstract class WindowOrientationListener { private static final String KEY_ROTATION_MEMORIZATION_TIMEOUT = "rotation_memorization_timeout_millis"; private static final long DEFAULT_ROTATION_RESOLVER_TIMEOUT_MILLIS = 700L; - private static final long DEFAULT_ROTATION_MEMORIZATION_TIMEOUT_MILLIS = 10_000L; // 10 seconds + private static final long DEFAULT_ROTATION_MEMORIZATION_TIMEOUT_MILLIS = 3_000L; // 3 seconds private Handler mHandler; private SensorManager mSensorManager; diff --git a/services/tests/mockingservicestests/assets/SensorPrivacyServiceMockingTest/persisted_file6.xml b/services/tests/mockingservicestests/assets/SensorPrivacyServiceMockingTest/persisted_file6.xml new file mode 100644 index 000000000000..b3c142285c8a --- /dev/null +++ b/services/tests/mockingservicestests/assets/SensorPrivacyServiceMockingTest/persisted_file6.xml @@ -0,0 +1,3 @@ +<?xml version='1.0' encoding='UTF-8' standalone='yes' ?> +<sensor-privacy enabled="false"> +</sensor-privacy> diff --git a/services/tests/mockingservicestests/src/com/android/server/sensorprivacy/SensorPrivacyServiceMockingTest.java b/services/tests/mockingservicestests/src/com/android/server/sensorprivacy/SensorPrivacyServiceMockingTest.java index 844687f34555..ba79a764b672 100644 --- a/services/tests/mockingservicestests/src/com/android/server/sensorprivacy/SensorPrivacyServiceMockingTest.java +++ b/services/tests/mockingservicestests/src/com/android/server/sensorprivacy/SensorPrivacyServiceMockingTest.java @@ -60,6 +60,8 @@ public class SensorPrivacyServiceMockingTest { String.format(PERSISTENCE_FILE_PATHS_TEMPLATE, 4); public static final String PERSISTENCE_FILE5 = String.format(PERSISTENCE_FILE_PATHS_TEMPLATE, 5); + public static final String PERSISTENCE_FILE6 = + String.format(PERSISTENCE_FILE_PATHS_TEMPLATE, 6); private Context mContext; @Mock @@ -111,6 +113,7 @@ public class SensorPrivacyServiceMockingTest { initServiceWithPersistenceFile(onDeviceFile, PERSISTENCE_FILE3); initServiceWithPersistenceFile(onDeviceFile, PERSISTENCE_FILE4); initServiceWithPersistenceFile(onDeviceFile, PERSISTENCE_FILE5); + initServiceWithPersistenceFile(onDeviceFile, PERSISTENCE_FILE6); // Try all files with two known users doReturn(new int[]{0, 10}).when(mMockedUserManagerInternal).getUserIds(); @@ -124,6 +127,7 @@ public class SensorPrivacyServiceMockingTest { initServiceWithPersistenceFile(onDeviceFile, PERSISTENCE_FILE3); initServiceWithPersistenceFile(onDeviceFile, PERSISTENCE_FILE4); initServiceWithPersistenceFile(onDeviceFile, PERSISTENCE_FILE5); + initServiceWithPersistenceFile(onDeviceFile, PERSISTENCE_FILE6); } finally { mockitoSession.finishMocking(); diff --git a/services/usb/java/com/android/server/usb/UsbUserPermissionManager.java b/services/usb/java/com/android/server/usb/UsbUserPermissionManager.java index 5874b4b9fd3e..7b6ccd31adcc 100644 --- a/services/usb/java/com/android/server/usb/UsbUserPermissionManager.java +++ b/services/usb/java/com/android/server/usb/UsbUserPermissionManager.java @@ -25,12 +25,12 @@ import android.content.Context; import android.content.Intent; import android.content.pm.ApplicationInfo; import android.content.pm.PackageManager; +import android.hardware.SensorPrivacyManager.Sensors; +import android.hardware.SensorPrivacyManagerInternal; import android.hardware.usb.AccessoryFilter; import android.hardware.usb.DeviceFilter; import android.hardware.usb.UsbAccessory; -import android.hardware.usb.UsbConstants; import android.hardware.usb.UsbDevice; -import android.hardware.usb.UsbInterface; import android.hardware.usb.UsbManager; import android.os.AsyncTask; import android.os.Binder; @@ -52,9 +52,9 @@ import android.util.TypedXmlSerializer; import android.util.Xml; import com.android.internal.annotations.GuardedBy; -import com.android.internal.util.FastXmlSerializer; import com.android.internal.util.XmlUtils; import com.android.internal.util.dump.DualDumpOutputStream; +import com.android.server.LocalServices; import org.xmlpull.v1.XmlPullParser; import org.xmlpull.v1.XmlPullParserException; @@ -64,7 +64,6 @@ import java.io.FileInputStream; import java.io.FileNotFoundException; import java.io.FileOutputStream; import java.io.IOException; -import java.nio.charset.StandardCharsets; /** * UsbUserPermissionManager manages usb device or accessory access permissions. @@ -110,19 +109,20 @@ class UsbUserPermissionManager { */ @GuardedBy("mLock") private boolean mIsCopyPermissionsScheduled; + private final SensorPrivacyManagerInternal mSensorPrivacyMgrInternal; UsbUserPermissionManager(@NonNull Context context, @NonNull UsbUserSettingsManager usbUserSettingsManager) { mContext = context; mUser = context.getUser(); mUsbUserSettingsManager = usbUserSettingsManager; + mSensorPrivacyMgrInternal = LocalServices.getService(SensorPrivacyManagerInternal.class); mDisablePermissionDialogs = context.getResources().getBoolean( com.android.internal.R.bool.config_disableUsbPermissionDialogs); mPermissionsFile = new AtomicFile(new File( Environment.getUserSystemDirectory(mUser.getIdentifier()), "usb_permissions.xml"), "usb-permissions"); - synchronized (mLock) { readPermissionsLocked(); } @@ -195,11 +195,27 @@ class UsbUserPermissionManager { */ boolean hasPermission(@NonNull UsbDevice device, @NonNull String packageName, int pid, int uid) { - if (isCameraDevicePresent(device)) { - if (!isCameraPermissionGranted(packageName, pid, uid)) { + if (device.getHasVideoCapture()) { + boolean isCameraPrivacyEnabled = mSensorPrivacyMgrInternal.isSensorPrivacyEnabled( + UserHandle.getUserId(uid), Sensors.CAMERA); + if (DEBUG) { + Slog.d(TAG, "isCameraPrivacyEnabled: " + isCameraPrivacyEnabled); + } + if (isCameraPrivacyEnabled || !isCameraPermissionGranted(packageName, pid, uid)) { return false; } } + // Only check for microphone privacy and not RECORD_AUDIO permission, because access to usb + // camera device with audio recording capabilities may still be granted with a warning + if (device.getHasAudioCapture() && mSensorPrivacyMgrInternal.isSensorPrivacyEnabled( + UserHandle.getUserId(uid), Sensors.MICROPHONE)) { + if (DEBUG) { + Slog.d(TAG, + "Access to device with audio recording capabilities denied because " + + "microphone privacy is enabled."); + } + return false; + } synchronized (mLock) { if (uid == Process.SYSTEM_UID || mDisablePermissionDialogs) { return true; @@ -698,7 +714,10 @@ class UsbUserPermissionManager { } return; } - if (isCameraDevicePresent(device)) { + // If the app doesn't have camera permission do not request permission to the USB device. + // Note that if the USB camera also has a microphone, a warning will be shown to the user if + // the app doesn't have RECORD_AUDIO permission. + if (device.getHasVideoCapture()) { if (!isCameraPermissionGranted(packageName, pid, uid)) { intent.putExtra(UsbManager.EXTRA_DEVICE, device); intent.putExtra(UsbManager.EXTRA_PERMISSION_GRANTED, false); @@ -733,27 +752,4 @@ class UsbUserPermissionManager { requestPermissionDialog(null, accessory, mUsbUserSettingsManager.canBeDefault(accessory, packageName), packageName, pi, uid); } - - /** - * Check whether a particular device or any of its interfaces - * is of class VIDEO. - * - * @param device The device that needs to get scanned - * @return True in case a VIDEO device or interface is present, - * False otherwise. - */ - private boolean isCameraDevicePresent(UsbDevice device) { - if (device.getDeviceClass() == UsbConstants.USB_CLASS_VIDEO) { - return true; - } - - for (int i = 0; i < device.getInterfaceCount(); i++) { - UsbInterface iface = device.getInterface(i); - if (iface.getInterfaceClass() == UsbConstants.USB_CLASS_VIDEO) { - return true; - } - } - - return false; - } } |