Merge "Add filter class"
diff --git a/Android.bp b/Android.bp
index e4b22d2..a944bb9 100644
--- a/Android.bp
+++ b/Android.bp
@@ -34,6 +34,27 @@
path: "core/java",
}
+// These are subset of framework-core-sources that are needed by the
+// android.test.mock library. Ideally, the library should use public APIs only,
+// but unfortunately its API signature has some references to these private APIs.
+filegroup {
+ name: "framework-core-sources-for-test-mock",
+ srcs: [
+ "core/java/android/app/IApplicationThread.aidl",
+ "core/java/android/app/IServiceConnection.aidl",
+ "core/java/android/content/IContentProvider.java",
+ "core/java/android/content/pm/IPackageDataObserver.aidl",
+ "core/java/android/content/pm/InstantAppInfo.java",
+ "core/java/android/content/pm/KeySet.java",
+ "core/java/android/content/pm/PackageManager.java",
+ "core/java/android/content/pm/VerifierDeviceIdentity.java",
+ "core/java/android/content/res/Resources.java",
+ "core/java/android/os/storage/VolumeInfo.java",
+ "core/java/android/view/DisplayAdjustments.java",
+ ],
+ path: "core/java",
+}
+
filegroup {
name: "framework-drm-sources",
srcs: [
@@ -1424,8 +1445,6 @@
name: "hiddenapi-mappings",
defaults: ["metalava-api-stubs-default"],
srcs: [
- ":non_openjdk_java_files",
- ":openjdk_java_files",
":opt-telephony-common-srcs",
],
@@ -1579,13 +1598,16 @@
"core/java/android/util/Slog.java",
"core/java/android/util/TimeUtils.java",
"core/java/com/android/internal/os/SomeArgs.java",
+ "core/java/com/android/internal/util/ArrayUtils.java",
+ "core/java/com/android/internal/util/DumpUtils.java",
+ "core/java/com/android/internal/util/FastXmlSerializer.java",
+ "core/java/com/android/internal/util/HexDump.java",
+ "core/java/com/android/internal/util/IndentingPrintWriter.java",
"core/java/com/android/internal/util/Preconditions.java",
"core/java/com/android/internal/util/State.java",
"core/java/com/android/internal/util/StateMachine.java",
+ "core/java/com/android/internal/util/UserIcons.java",
"core/java/com/android/internal/util/XmlUtils.java",
- "core/java/com/android/internal/util/HexDump.java",
- "core/java/com/android/internal/util/IndentingPrintWriter.java",
- "core/java/com/android/internal/util/DumpUtils.java"
],
}
@@ -1615,6 +1637,7 @@
name: "framework-wifistack-shared-srcs",
srcs: [
":framework-annotations",
+ "core/java/android/os/HandlerExecutor.java",
"core/java/android/util/KeyValueListParser.java",
"core/java/android/util/LocalLog.java",
"core/java/android/util/Rational.java",
diff --git a/apex/statsd/service/java/com/android/server/stats/StatsCompanionService.java b/apex/statsd/service/java/com/android/server/stats/StatsCompanionService.java
index 5e5a04b..518a29c 100644
--- a/apex/statsd/service/java/com/android/server/stats/StatsCompanionService.java
+++ b/apex/statsd/service/java/com/android/server/stats/StatsCompanionService.java
@@ -583,7 +583,11 @@
} catch (IllegalArgumentException e) {
installer = "";
}
- sStatsd.informOnePackage(app, uid, pi.getLongVersionCode(), pi.versionName,
+ sStatsd.informOnePackage(
+ app,
+ uid,
+ pi.getLongVersionCode(),
+ pi.versionName == null ? "" : pi.versionName,
installer == null ? "" : installer);
}
} catch (Exception e) {
diff --git a/api/current.txt b/api/current.txt
index ce9dba0..55983c8 100644
--- a/api/current.txt
+++ b/api/current.txt
@@ -29786,6 +29786,7 @@
public class ScanResult implements android.os.Parcelable {
method public int describeContents();
+ method public int getWifiStandard();
method public boolean is80211mcResponder();
method public boolean isPasspointNetwork();
method public void writeToParcel(android.os.Parcel, int);
@@ -29796,6 +29797,11 @@
field public static final int CHANNEL_WIDTH_80MHZ = 2; // 0x2
field public static final int CHANNEL_WIDTH_80MHZ_PLUS_MHZ = 4; // 0x4
field public String SSID;
+ field public static final int WIFI_STANDARD_11AC = 5; // 0x5
+ field public static final int WIFI_STANDARD_11AX = 6; // 0x6
+ field public static final int WIFI_STANDARD_11N = 4; // 0x4
+ field public static final int WIFI_STANDARD_LEGACY = 1; // 0x1
+ field public static final int WIFI_STANDARD_UNKNOWN = 0; // 0x0
field public String capabilities;
field public int centerFreq0;
field public int centerFreq1;
@@ -29992,16 +29998,11 @@
method public String getSSID();
method public android.net.wifi.SupplicantState getSupplicantState();
method @IntRange(from=0xffffffff) public int getTxLinkSpeedMbps();
- method public int getWifiTechnology();
+ method public int getWifiStandard();
method public void writeToParcel(android.os.Parcel, int);
field public static final String FREQUENCY_UNITS = "MHz";
field public static final String LINK_SPEED_UNITS = "Mbps";
field public static final int LINK_SPEED_UNKNOWN = -1; // 0xffffffff
- field public static final int WIFI_TECHNOLOGY_11AC = 5; // 0x5
- field public static final int WIFI_TECHNOLOGY_11AX = 6; // 0x6
- field public static final int WIFI_TECHNOLOGY_11N = 4; // 0x4
- field public static final int WIFI_TECHNOLOGY_LEGACY = 1; // 0x1
- field public static final int WIFI_TECHNOLOGY_UNKNOWN = 0; // 0x0
}
public class WifiManager {
@@ -61224,9 +61225,9 @@
method @NonNull public StringBuilder reverse();
method public void setCharAt(int, char);
method public void setLength(int);
- method public CharSequence subSequence(int, int);
- method public String substring(int);
- method public String substring(int, int);
+ method @NonNull public CharSequence subSequence(int, int);
+ method @NonNull public String substring(int);
+ method @NonNull public String substring(int, int);
method public void trimToSize();
}
@@ -71559,20 +71560,20 @@
method public boolean addAll(@NonNull java.util.Collection<? extends K>);
method public final void clear();
method public boolean contains(@NonNull Object);
- method public final boolean containsAll(java.util.Collection<?>);
+ method public final boolean containsAll(@NonNull java.util.Collection<?>);
method public void forEach(@NonNull java.util.function.Consumer<? super K>);
- method public java.util.concurrent.ConcurrentHashMap<K,V> getMap();
+ method @NonNull public java.util.concurrent.ConcurrentHashMap<K,V> getMap();
method @Nullable public V getMappedValue();
method public final boolean isEmpty();
method @NonNull public java.util.Iterator<K> iterator();
method public boolean remove(@NonNull Object);
- method public final boolean removeAll(java.util.Collection<?>);
- method public final boolean retainAll(java.util.Collection<?>);
+ method public final boolean removeAll(@NonNull java.util.Collection<?>);
+ method public final boolean retainAll(@NonNull java.util.Collection<?>);
method public final int size();
method @NonNull public java.util.Spliterator<K> spliterator();
- method public final Object[] toArray();
- method public final <T> T[] toArray(T[]);
- method public final String toString();
+ method @NonNull public final Object[] toArray();
+ method @NonNull public final <T> T[] toArray(@NonNull T[]);
+ method @NonNull public final String toString();
}
public class ConcurrentLinkedDeque<E> extends java.util.AbstractCollection<E> implements java.util.Deque<E> java.io.Serializable {
diff --git a/api/system-current.txt b/api/system-current.txt
index 6258b33..0b18393 100644
--- a/api/system-current.txt
+++ b/api/system-current.txt
@@ -9496,14 +9496,17 @@
}
public class ImsUtListener {
+ method public void onLineIdentificationSupplementaryServiceResponse(int, @NonNull android.telephony.ims.ImsSsInfo);
method public void onSupplementaryServiceIndication(android.telephony.ims.ImsSsData);
method public void onUtConfigurationCallBarringQueried(int, android.telephony.ims.ImsSsInfo[]);
method public void onUtConfigurationCallForwardQueried(int, android.telephony.ims.ImsCallForwardInfo[]);
method public void onUtConfigurationCallWaitingQueried(int, android.telephony.ims.ImsSsInfo[]);
- method public void onUtConfigurationQueried(int, android.os.Bundle);
+ method @Deprecated public void onUtConfigurationQueried(int, android.os.Bundle);
method public void onUtConfigurationQueryFailed(int, android.telephony.ims.ImsReasonInfo);
method public void onUtConfigurationUpdateFailed(int, android.telephony.ims.ImsReasonInfo);
method public void onUtConfigurationUpdated(int);
+ field @Deprecated public static final String BUNDLE_KEY_CLIR = "queryClir";
+ field @Deprecated public static final String BUNDLE_KEY_SSINFO = "imsSsInfo";
}
public abstract class ImsVideoCallProvider {
diff --git a/api/system-lint-baseline.txt b/api/system-lint-baseline.txt
index a907fa6..21526d0 100644
--- a/api/system-lint-baseline.txt
+++ b/api/system-lint-baseline.txt
@@ -135,6 +135,12 @@
+MutableBareField: android.net.wifi.WifiConfiguration#allowAutojoin:
+
+MutableBareField: android.net.wifi.WifiConfiguration#carrierId:
+
+
+
NoClone: android.service.contentcapture.ContentCaptureService#dump(java.io.FileDescriptor, java.io.PrintWriter, String[]) parameter #0:
diff --git a/api/test-lint-baseline.txt b/api/test-lint-baseline.txt
index a43b45d..9606413 100644
--- a/api/test-lint-baseline.txt
+++ b/api/test-lint-baseline.txt
@@ -1799,6 +1799,48 @@
+MutableBareField: android.content.AutofillOptions#appDisabledExpiration:
+
+MutableBareField: android.content.AutofillOptions#augmentedAutofillEnabled:
+
+MutableBareField: android.content.AutofillOptions#disabledActivities:
+
+MutableBareField: android.content.AutofillOptions#whitelistedActivitiesForAugmentedAutofill:
+
+MutableBareField: android.database.sqlite.SQLiteDebug.DbStats#cache:
+
+MutableBareField: android.database.sqlite.SQLiteDebug.DbStats#dbName:
+
+MutableBareField: android.database.sqlite.SQLiteDebug.DbStats#dbSize:
+
+MutableBareField: android.database.sqlite.SQLiteDebug.DbStats#lookaside:
+
+MutableBareField: android.database.sqlite.SQLiteDebug.DbStats#pageSize:
+
+MutableBareField: android.database.sqlite.SQLiteDebug.PagerStats#dbStats:
+
+MutableBareField: android.database.sqlite.SQLiteDebug.PagerStats#largestMemAlloc:
+
+MutableBareField: android.database.sqlite.SQLiteDebug.PagerStats#memoryUsed:
+
+MutableBareField: android.database.sqlite.SQLiteDebug.PagerStats#pageCacheOverflow:
+
+MutableBareField: android.os.StrictMode.ViolationInfo#broadcastIntentAction:
+
+MutableBareField: android.os.StrictMode.ViolationInfo#durationMillis:
+
+MutableBareField: android.os.StrictMode.ViolationInfo#numAnimationsRunning:
+
+MutableBareField: android.os.StrictMode.ViolationInfo#numInstances:
+
+MutableBareField: android.os.StrictMode.ViolationInfo#tags:
+
+MutableBareField: android.os.StrictMode.ViolationInfo#violationNumThisLoop:
+
+MutableBareField: android.os.StrictMode.ViolationInfo#violationUptimeMillis:
+
+
+
NoByteOrShort: android.media.audiofx.AudioEffect#byteArrayToShort(byte[]):
NoByteOrShort: android.media.audiofx.AudioEffect#setParameter(int, short) parameter #1:
@@ -2133,6 +2175,10 @@
+UseParcelFileDescriptor: android.util.proto.ProtoOutputStream#ProtoOutputStream(java.io.FileDescriptor) parameter #0:
+
+
+
UserHandle: android.app.admin.DevicePolicyManager#getOwnerInstalledCaCerts(android.os.UserHandle):
UserHandle: android.app.role.RoleManager#addOnRoleHoldersChangedListenerAsUser(java.util.concurrent.Executor, android.app.role.OnRoleHoldersChangedListener, android.os.UserHandle):
diff --git a/cmds/incidentd/src/Section.cpp b/cmds/incidentd/src/Section.cpp
index 0176f80..c9277a5 100644
--- a/cmds/incidentd/src/Section.cpp
+++ b/cmds/incidentd/src/Section.cpp
@@ -495,6 +495,7 @@
name += " ";
name += arg;
}
+ va_end(args);
switch (mLogID) {
case LOG_ID_EVENTS:
diff --git a/core/java/android/app/PendingIntent.java b/core/java/android/app/PendingIntent.java
index 4b4a071..3ad8882 100644
--- a/core/java/android/app/PendingIntent.java
+++ b/core/java/android/app/PendingIntent.java
@@ -94,6 +94,12 @@
* {@link #FLAG_CANCEL_CURRENT} or {@link #FLAG_UPDATE_CURRENT} to either
* cancel or modify whatever current PendingIntent is associated with the
* Intent you are supplying.
+ *
+ * <p>Also note that flags like {@link #FLAG_ONE_SHOT} or {@link #FLAG_IMMUTABLE} describe the
+ * PendingIntent instance and thus, are used to identify it. Any calls to retrieve or modify a
+ * PendingIntent created with these flags will also require these flags to be supplied in
+ * conjunction with others. E.g. To retrieve an existing PendingIntent created with
+ * FLAG_ONE_SHOT, <b>both</b> FLAG_ONE_SHOT and FLAG_NO_CREATE need to be supplied.
*/
public final class PendingIntent implements Parcelable {
private final IIntentSender mTarget;
diff --git a/core/java/android/os/BinderProxy.java b/core/java/android/os/BinderProxy.java
index b3b4f78..ee95fce 100644
--- a/core/java/android/os/BinderProxy.java
+++ b/core/java/android/os/BinderProxy.java
@@ -242,32 +242,37 @@
}
Map<String, Integer> counts = new HashMap<>();
- for (ArrayList<WeakReference<BinderProxy>> a : mMainIndexValues) {
- if (a != null) {
- for (WeakReference<BinderProxy> weakRef : a) {
- BinderProxy bp = weakRef.get();
- String key;
- if (bp == null) {
- key = "<cleared weak-ref>";
- } else {
- try {
- key = bp.getInterfaceDescriptor();
- if ((key == null || key.isEmpty()) && !bp.isBinderAlive()) {
- key = "<proxy to dead node>";
- }
- } catch (Throwable t) {
- key = "<exception during getDescriptor>";
- }
- }
- Integer i = counts.get(key);
- if (i == null) {
- counts.put(key, 1);
- } else {
- counts.put(key, i + 1);
- }
+ final ArrayList<WeakReference<BinderProxy>> proxiesToQuery =
+ new ArrayList<WeakReference<BinderProxy>>();
+ synchronized (sProxyMap) {
+ for (ArrayList<WeakReference<BinderProxy>> a : mMainIndexValues) {
+ if (a != null) {
+ proxiesToQuery.addAll(a);
}
}
}
+ for (WeakReference<BinderProxy> weakRef : proxiesToQuery) {
+ BinderProxy bp = weakRef.get();
+ String key;
+ if (bp == null) {
+ key = "<cleared weak-ref>";
+ } else {
+ try {
+ key = bp.getInterfaceDescriptor();
+ if ((key == null || key.isEmpty()) && !bp.isBinderAlive()) {
+ key = "<proxy to dead node>";
+ }
+ } catch (Throwable t) {
+ key = "<exception during getDescriptor>";
+ }
+ }
+ Integer i = counts.get(key);
+ if (i == null) {
+ counts.put(key, 1);
+ } else {
+ counts.put(key, i + 1);
+ }
+ }
Map.Entry<String, Integer>[] sorted = counts.entrySet().toArray(
new Map.Entry[counts.size()]);
@@ -355,9 +360,7 @@
* @hide
*/
public static InterfaceCount[] getSortedInterfaceCounts(int num) {
- synchronized (sProxyMap) {
- return sProxyMap.getSortedInterfaceCounts(num);
- }
+ return sProxyMap.getSortedInterfaceCounts(num);
}
/**
@@ -377,10 +380,8 @@
*/
public static void dumpProxyDebugInfo() {
if (Build.IS_DEBUGGABLE) {
- synchronized (sProxyMap) {
- sProxyMap.dumpProxyInterfaceCounts();
- sProxyMap.dumpPerUidProxyCounts();
- }
+ sProxyMap.dumpProxyInterfaceCounts();
+ sProxyMap.dumpPerUidProxyCounts();
}
}
diff --git a/core/java/android/view/GestureDetector.java b/core/java/android/view/GestureDetector.java
index 8fbbcf4..d59ee92 100644
--- a/core/java/android/view/GestureDetector.java
+++ b/core/java/android/view/GestureDetector.java
@@ -145,7 +145,7 @@
boolean onSingleTapConfirmed(MotionEvent e);
/**
- * Notified when a double-tap occurs.
+ * Notified when a double-tap occurs. Triggered on the down event of second tap.
*
* @param e The down motion event of the first tap of the double-tap.
* @return true if the event is consumed, else false
@@ -378,7 +378,9 @@
*
* @param context the application's context
* @param listener the listener invoked for all the callbacks, this must
- * not be null.
+ * not be null. If the listener implements the {@link OnDoubleTapListener} or
+ * {@link OnContextClickListener} then it will also be set as the listener for
+ * these callbacks (for example when using the {@link SimpleOnGestureListener}).
*
* @throws NullPointerException if {@code listener} is null.
*/
@@ -393,7 +395,9 @@
*
* @param context the application's context
* @param listener the listener invoked for all the callbacks, this must
- * not be null.
+ * not be null. If the listener implements the {@link OnDoubleTapListener} or
+ * {@link OnContextClickListener} then it will also be set as the listener for
+ * these callbacks (for example when using the {@link SimpleOnGestureListener}).
* @param handler the handler to use for running deferred listener events.
*
* @throws NullPointerException if {@code listener} is null.
diff --git a/core/java/com/android/internal/app/ChooserListAdapter.java b/core/java/com/android/internal/app/ChooserListAdapter.java
index 6eb470f..38f4c64 100644
--- a/core/java/com/android/internal/app/ChooserListAdapter.java
+++ b/core/java/com/android/internal/app/ChooserListAdapter.java
@@ -95,7 +95,7 @@
// we want to separate them into a different section.
super(context, payloadIntents, null, rList, filterLastUsed,
resolverListController, useLayoutForBrowsables,
- chooserListCommunicator);
+ chooserListCommunicator, false);
createPlaceHolders();
mMaxShortcutTargetsPerApp =
diff --git a/core/java/com/android/internal/app/ResolverActivity.java b/core/java/com/android/internal/app/ResolverActivity.java
index c1c6ac9..1beb1c5 100644
--- a/core/java/com/android/internal/app/ResolverActivity.java
+++ b/core/java/com/android/internal/app/ResolverActivity.java
@@ -140,6 +140,9 @@
private final PackageMonitor mPackageMonitor = createPackageMonitor();
+ // Intent extra for connected audio devices
+ public static final String EXTRA_IS_AUDIO_CAPTURE_DEVICE = "is_audio_capture_device";
+
/**
* Get the string resource to be used as a label for the link to the resolver activity for an
* action.
@@ -1038,8 +1041,14 @@
public ResolverListAdapter createAdapter(Context context, List<Intent> payloadIntents,
Intent[] initialIntents, List<ResolveInfo> rList,
boolean filterLastUsed, boolean useLayoutForBrowsables) {
+
+ Intent startIntent = getIntent();
+ boolean isAudioCaptureDevice =
+ startIntent.getBooleanExtra(EXTRA_IS_AUDIO_CAPTURE_DEVICE, false);
+
return new ResolverListAdapter(context, payloadIntents, initialIntents, rList,
- filterLastUsed, createListController(), useLayoutForBrowsables, this);
+ filterLastUsed, createListController(), useLayoutForBrowsables, this,
+ isAudioCaptureDevice);
}
@VisibleForTesting
diff --git a/core/java/com/android/internal/app/ResolverListAdapter.java b/core/java/com/android/internal/app/ResolverListAdapter.java
index 4076dda..a587936 100644
--- a/core/java/com/android/internal/app/ResolverListAdapter.java
+++ b/core/java/com/android/internal/app/ResolverListAdapter.java
@@ -24,6 +24,7 @@
import android.content.ComponentName;
import android.content.Context;
import android.content.Intent;
+import android.content.PermissionChecker;
import android.content.pm.ActivityInfo;
import android.content.pm.ApplicationInfo;
import android.content.pm.LabeledIntent;
@@ -86,13 +87,15 @@
private boolean mFilterLastUsed;
private final ResolverListCommunicator mResolverListCommunicator;
private Runnable mPostListReadyRunnable;
+ private final boolean mIsAudioCaptureDevice;
public ResolverListAdapter(Context context, List<Intent> payloadIntents,
Intent[] initialIntents, List<ResolveInfo> rList,
boolean filterLastUsed,
ResolverListController resolverListController,
boolean useLayoutForBrowsables,
- ResolverListCommunicator resolverListCommunicator) {
+ ResolverListCommunicator resolverListCommunicator,
+ boolean isAudioCaptureDevice) {
mContext = context;
mIntents = payloadIntents;
mInitialIntents = initialIntents;
@@ -105,6 +108,7 @@
mSuspendedMatrixColorFilter = createSuspendedColorMatrix();
mUseLayoutForBrowsables = useLayoutForBrowsables;
mResolverListCommunicator = resolverListCommunicator;
+ mIsAudioCaptureDevice = isAudioCaptureDevice;
final ActivityManager am = (ActivityManager) mContext.getSystemService(ACTIVITY_SERVICE);
mIconDpi = am.getLauncherLargeIconDensity();
}
@@ -651,6 +655,29 @@
protected CharSequence[] doInBackground(Void... voids) {
ResolveInfoPresentationGetter pg =
makePresentationGetter(mDisplayResolveInfo.getResolveInfo());
+
+ if (mIsAudioCaptureDevice) {
+ // This is an audio capture device, so check record permissions
+ ActivityInfo activityInfo = mDisplayResolveInfo.getResolveInfo().activityInfo;
+ String packageName = activityInfo.packageName;
+
+ int uid = activityInfo.applicationInfo.uid;
+ boolean hasRecordPermission =
+ PermissionChecker.checkPermissionForPreflight(
+ mContext,
+ android.Manifest.permission.RECORD_AUDIO, -1, uid,
+ packageName)
+ == android.content.pm.PackageManager.PERMISSION_GRANTED;
+
+ if (!hasRecordPermission) {
+ // Doesn't have record permission, so warn the user
+ return new CharSequence[] {
+ pg.getLabel(),
+ mContext.getString(R.string.usb_device_resolve_prompt_warn)
+ };
+ }
+ }
+
return new CharSequence[] {
pg.getLabel(),
pg.getSubLabel()
diff --git a/core/java/com/android/internal/config/sysui/SystemUiDeviceConfigFlags.java b/core/java/com/android/internal/config/sysui/SystemUiDeviceConfigFlags.java
index 033e9b2..36a7a9c 100644
--- a/core/java/com/android/internal/config/sysui/SystemUiDeviceConfigFlags.java
+++ b/core/java/com/android/internal/config/sysui/SystemUiDeviceConfigFlags.java
@@ -337,6 +337,14 @@
"brightline_falsing_zigzag_y_secondary_deviance";
+ // Flags related to screenshots
+
+ /**
+ * (boolean) Whether screenshot flow going to the corner (instead of shown in a notification)
+ * is enabled.
+ */
+ public static final String SCREENSHOT_CORNER_FLOW = "screenshot_corner_flow";
+
private SystemUiDeviceConfigFlags() {
}
}
diff --git a/core/java/com/android/internal/statusbar/IStatusBarService.aidl b/core/java/com/android/internal/statusbar/IStatusBarService.aidl
index 499a4d2..d703b86 100644
--- a/core/java/com/android/internal/statusbar/IStatusBarService.aidl
+++ b/core/java/com/android/internal/statusbar/IStatusBarService.aidl
@@ -21,6 +21,7 @@
import android.content.ComponentName;
import android.graphics.Rect;
import android.os.Bundle;
+import android.os.UserHandle;
import android.service.notification.StatusBarNotification;
import android.hardware.biometrics.IBiometricServiceReceiverInternal;
@@ -78,7 +79,8 @@
void onNotificationSettingsViewed(String key);
void setSystemUiVisibility(int displayId, int vis, int mask, String cause);
void onNotificationBubbleChanged(String key, boolean isBubble);
- void grantInlineReplyUriPermission(String key, in Uri uri);
+ void grantInlineReplyUriPermission(String key, in Uri uri, in UserHandle user, String packageName);
+ void clearInlineReplyUriPermissions(String key);
void onGlobalActionsShown();
void onGlobalActionsHidden();
diff --git a/core/java/com/android/server/SystemConfig.java b/core/java/com/android/server/SystemConfig.java
index b752396..db91dc5 100644
--- a/core/java/com/android/server/SystemConfig.java
+++ b/core/java/com/android/server/SystemConfig.java
@@ -863,11 +863,7 @@
XmlUtils.skipCurrentTag(parser);
} break;
case "component-override": {
- if (allowAppConfigs) {
- readComponentOverrides(parser, permFile);
- } else {
- logNotAllowedInPartition(name, permFile, parser);
- }
+ readComponentOverrides(parser, permFile);
XmlUtils.skipCurrentTag(parser);
} break;
case "backup-transport-whitelisted-service": {
diff --git a/core/res/res/layout/resolve_list_item.xml b/core/res/res/layout/resolve_list_item.xml
index 4857095..86f028c 100644
--- a/core/res/res/layout/resolve_list_item.xml
+++ b/core/res/res/layout/resolve_list_item.xml
@@ -54,7 +54,9 @@
android:minLines="1"
android:maxLines="1"
android:ellipsize="marquee" />
- <!-- Extended activity info to distinguish between duplicate activity names -->
+ <!-- Extended activity info to distinguish between duplicate activity names
+ or provide record w/o permission warnings.
+ -->
<TextView android:id="@android:id/text2"
android:textColor="?android:attr/textColorSecondary"
android:fontFamily="@android:string/config_bodyFontFamily"
@@ -64,7 +66,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:minLines="1"
- android:maxLines="1"
+ android:maxLines="2"
android:ellipsize="marquee" />
</LinearLayout>
</LinearLayout>
diff --git a/core/res/res/values-el/strings.xml b/core/res/res/values-el/strings.xml
index 4fb03d6..e74cbb1 100644
--- a/core/res/res/values-el/strings.xml
+++ b/core/res/res/values-el/strings.xml
@@ -299,13 +299,13 @@
<string name="permgrouplab_microphone" msgid="171539900250043464">"Μικρόφωνο"</string>
<string name="permgroupdesc_microphone" msgid="4988812113943554584">"ηχογραφεί"</string>
<string name="permgrouprequest_microphone" msgid="9167492350681916038">"Να επιτρέπεται στην εφαρμογή <b><xliff:g id="APP_NAME">%1$s</xliff:g></b> η εγγραφή ήχου;"</string>
- <string name="permgrouplab_activityRecognition" msgid="1565108047054378642">"Σωματική δραστηριότητα"</string>
+ <string name="permgrouplab_activityRecognition" msgid="1565108047054378642">"Σωματική δραστ/τητα"</string>
<string name="permgroupdesc_activityRecognition" msgid="6949472038320473478">"πρόσβαση στη σωματική σας δραστηριότητα"</string>
<string name="permgrouprequest_activityRecognition" msgid="7626438016904799383">"Να επιτρέπεται στην εφαρμογή <b><xliff:g id="APP_NAME">%1$s</xliff:g></b> να έχει πρόσβαση στη σωματική σας δραστηριότητα;"</string>
<string name="permgrouplab_camera" msgid="4820372495894586615">"Κάμερα"</string>
<string name="permgroupdesc_camera" msgid="3250611594678347720">"γίνεται λήψη φωτογραφιών και εγγραφή βίντεο"</string>
<string name="permgrouprequest_camera" msgid="1299833592069671756">"Να επιτρέπεται στην εφαρμογή <b><xliff:g id="APP_NAME">%1$s</xliff:g></b> η λήψη φωτογραφιών και η εγγραφή βίντεο;"</string>
- <string name="permgrouplab_calllog" msgid="8798646184930388160">"Αρχεία καταγραφής κλήσεων"</string>
+ <string name="permgrouplab_calllog" msgid="8798646184930388160">"Αρχεία καταγρ. κλήσ."</string>
<string name="permgroupdesc_calllog" msgid="3006237336748283775">"ανάγνωση και εγγραφή αρχείου καταγραφής τηλεφωνικών κλήσεων"</string>
<string name="permgrouprequest_calllog" msgid="8487355309583773267">"Να επιτρέπεται στην εφαρμογή <b><xliff:g id="APP_NAME">%1$s</xliff:g></b> να έχει πρόσβαση στα αρχεία καταγραφής τηλεφωνικών κλήσεών σας;"</string>
<string name="permgrouplab_phone" msgid="5229115638567440675">"Τηλέφωνο"</string>
diff --git a/core/res/res/values-fr-rCA/strings.xml b/core/res/res/values-fr-rCA/strings.xml
index 32530d3..02c8043 100644
--- a/core/res/res/values-fr-rCA/strings.xml
+++ b/core/res/res/values-fr-rCA/strings.xml
@@ -299,7 +299,7 @@
<string name="permgrouplab_microphone" msgid="171539900250043464">"Microphone"</string>
<string name="permgroupdesc_microphone" msgid="4988812113943554584">"enregistrer des fichiers audio"</string>
<string name="permgrouprequest_microphone" msgid="9167492350681916038">"Autoriser <b><xliff:g id="APP_NAME">%1$s</xliff:g></b> à enregistrer l\'audio?"</string>
- <string name="permgrouplab_activityRecognition" msgid="1565108047054378642">"données d\'activité physique"</string>
+ <string name="permgrouplab_activityRecognition" msgid="1565108047054378642">"Activité physique"</string>
<string name="permgroupdesc_activityRecognition" msgid="6949472038320473478">"accéder à vos activités physiques"</string>
<string name="permgrouprequest_activityRecognition" msgid="7626438016904799383">"Autoriser « <xliff:g id="APP_NAME">%1$s</xliff:g> » à accéder à vos activités physiques?"</string>
<string name="permgrouplab_camera" msgid="4820372495894586615">"Appareil photo"</string>
diff --git a/core/res/res/values-iw/strings.xml b/core/res/res/values-iw/strings.xml
index 86e8b36..2888a53 100644
--- a/core/res/res/values-iw/strings.xml
+++ b/core/res/res/values-iw/strings.xml
@@ -304,13 +304,13 @@
<string name="permgrouprequest_storage" msgid="7885942926944299560">"לתת לאפליקציה <b><xliff:g id="APP_NAME">%1$s</xliff:g></b> הרשאת גישה לתמונות, למדיה ולקבצים במכשיר?"</string>
<string name="permgrouplab_microphone" msgid="171539900250043464">"מיקרופון"</string>
<string name="permgroupdesc_microphone" msgid="4988812113943554584">"הקלטת אודיו"</string>
- <string name="permgrouprequest_microphone" msgid="9167492350681916038">"לתת לאפליקציה <b><xliff:g id="APP_NAME">%1$s</xliff:g></b> הרשאה להקליט אודיו?"</string>
+ <string name="permgrouprequest_microphone" msgid="9167492350681916038">"לאשר לאפליקציית <b><xliff:g id="APP_NAME">%1$s</xliff:g></b> להקליט אודיו?"</string>
<string name="permgrouplab_activityRecognition" msgid="1565108047054378642">"פעילות גופנית"</string>
<string name="permgroupdesc_activityRecognition" msgid="6949472038320473478">"גישה לפעילות הגופנית שלך"</string>
<string name="permgrouprequest_activityRecognition" msgid="7626438016904799383">"האם לאפשר לאפליקציה <b><xliff:g id="APP_NAME">%1$s</xliff:g></b> גישה לפעילות הגופנית שלך?"</string>
<string name="permgrouplab_camera" msgid="4820372495894586615">"מצלמה"</string>
<string name="permgroupdesc_camera" msgid="3250611594678347720">"צילום תמונות והקלטת וידאו"</string>
- <string name="permgrouprequest_camera" msgid="1299833592069671756">"לאשר לאפליקציה של <b><xliff:g id="APP_NAME">%1$s</xliff:g></b> לצלם תמונות וסרטונים?"</string>
+ <string name="permgrouprequest_camera" msgid="1299833592069671756">"לאשר לאפליקציית <b><xliff:g id="APP_NAME">%1$s</xliff:g></b> לצלם תמונות וסרטונים?"</string>
<string name="permgrouplab_calllog" msgid="8798646184930388160">"יומני שיחות"</string>
<string name="permgroupdesc_calllog" msgid="3006237336748283775">"קריאה וכתיבה של יומן השיחות של הטלפון"</string>
<string name="permgrouprequest_calllog" msgid="8487355309583773267">"לתת לאפליקציה <b><xliff:g id="APP_NAME">%1$s</xliff:g></b> הרשאת גישה ליומני השיחות של הטלפון?"</string>
diff --git a/core/res/res/values-kn/strings.xml b/core/res/res/values-kn/strings.xml
index 904f8b0..3fb6766 100644
--- a/core/res/res/values-kn/strings.xml
+++ b/core/res/res/values-kn/strings.xml
@@ -305,13 +305,13 @@
<string name="permgrouplab_camera" msgid="4820372495894586615">"ಕ್ಯಾಮರಾ"</string>
<string name="permgroupdesc_camera" msgid="3250611594678347720">"ಚಿತ್ರಗಳನ್ನು ತೆಗೆಯಲು, ವೀಡಿಯೊ ರೆಕಾರ್ಡ್ ಮಾಡಲು"</string>
<string name="permgrouprequest_camera" msgid="1299833592069671756">"ಚಿತ್ರಗಳನ್ನು ಸೆರೆಹಿಡಿಯಲು ಮತ್ತು ವೀಡಿಯೊ ರೆಕಾರ್ಡ್ ಮಾಡಲು <b><xliff:g id="APP_NAME">%1$s</xliff:g></b> ಗೆ ಅನುಮತಿಸಬೇಕೇ?"</string>
- <string name="permgrouplab_calllog" msgid="8798646184930388160">"ಕರೆಯ ಲಾಗ್ಗಳು"</string>
+ <string name="permgrouplab_calllog" msgid="8798646184930388160">"ಕರೆಯ ಲಾಗ್"</string>
<string name="permgroupdesc_calllog" msgid="3006237336748283775">"ಪೋನ್ ಕರೆಯ ಲಾಗ್ ಅನ್ನು ಓದಿ ಮತ್ತು ಬರೆಯಿರಿ"</string>
<string name="permgrouprequest_calllog" msgid="8487355309583773267">"ನಿಮ್ಮ ಫೋನ್ ಕರೆಯ ಲಾಗ್ಗಳಿಗೆ ಪ್ರವೇಶ ಪಡೆಯಲು <b><xliff:g id="APP_NAME">%1$s</xliff:g></b> ಗೆ ಅನುಮತಿಸಬೇಕೇ?"</string>
<string name="permgrouplab_phone" msgid="5229115638567440675">"ಫೋನ್"</string>
<string name="permgroupdesc_phone" msgid="6234224354060641055">"ಫೋನ್ ಕರೆ ಮಾಡಲು ಹಾಗೂ ನಿರ್ವಹಿಸಲು"</string>
<string name="permgrouprequest_phone" msgid="9166979577750581037">"ಫೋನ್ ಕರೆಗಳನ್ನು ಮಾಡಲು ಮತ್ತು ನಿರ್ವಹಿಸಲು <b><xliff:g id="APP_NAME">%1$s</xliff:g></b> ಗೆ ಅನುಮತಿಸಬೇಕೇ?"</string>
- <string name="permgrouplab_sensors" msgid="4838614103153567532">"ದೇಹದ ಸೆನ್ಸರ್ಗಳು"</string>
+ <string name="permgrouplab_sensors" msgid="4838614103153567532">"ದೇಹದ ಸೆನ್ಸರ್"</string>
<string name="permgroupdesc_sensors" msgid="7147968539346634043">"ನಿಮ್ಮ ಮುಖ್ಯ ಲಕ್ಷಣಗಳ ಕುರಿತು ಸೆನ್ಸಾರ್ ಡೇಟಾವನ್ನು ಪ್ರವೇಶಿಸಿ"</string>
<string name="permgrouprequest_sensors" msgid="6349806962814556786">"ನಿಮ್ಮ ಮುಖ್ಯ ಲಕ್ಷಣಗಳ ಕುರಿತು ಸೆನ್ಸರ್ ಡೇಟಾವನ್ನು <b><xliff:g id="APP_NAME">%1$s</xliff:g></b> ಗೆ ಅನುಮತಿಸಬೇಕೇ?"</string>
<string name="capability_title_canRetrieveWindowContent" msgid="3901717936930170320">"ವಿಂಡೋ ವಿಷಯವನ್ನು ಹಿಂಪಡೆಯುತ್ತದೆ"</string>
diff --git a/core/res/res/values-ky/strings.xml b/core/res/res/values-ky/strings.xml
index dcb766d..db54c42 100644
--- a/core/res/res/values-ky/strings.xml
+++ b/core/res/res/values-ky/strings.xml
@@ -305,7 +305,7 @@
<string name="permgrouplab_camera" msgid="4820372495894586615">"Камера"</string>
<string name="permgroupdesc_camera" msgid="3250611594678347720">"сүрөт жана видео тартууга"</string>
<string name="permgrouprequest_camera" msgid="1299833592069671756">"<b><xliff:g id="APP_NAME">%1$s</xliff:g></b> колдонмосуна сүрөттөр менен видеолорду тартканга уруксат бересизби?"</string>
- <string name="permgrouplab_calllog" msgid="8798646184930388160">"Чалуулар тизмелери"</string>
+ <string name="permgrouplab_calllog" msgid="8798646184930388160">"Чалуулар тизмеси"</string>
<string name="permgroupdesc_calllog" msgid="3006237336748283775">"телефондогу чалуулар тизмесин окуу жана жазуу"</string>
<string name="permgrouprequest_calllog" msgid="8487355309583773267">"<b><xliff:g id="APP_NAME">%1$s</xliff:g></b> колдонмосуна телефондогу чалуулар тизмесин пайдаланууга уруксат берилсинби?"</string>
<string name="permgrouplab_phone" msgid="5229115638567440675">"Телефон"</string>
diff --git a/core/res/res/values-ro/strings.xml b/core/res/res/values-ro/strings.xml
index f1a6136..82ec2b6 100644
--- a/core/res/res/values-ro/strings.xml
+++ b/core/res/res/values-ro/strings.xml
@@ -301,13 +301,13 @@
<string name="permgrouprequest_storage" msgid="7885942926944299560">"Permiteți <b><xliff:g id="APP_NAME">%1$s</xliff:g></b> să acceseze fotografiile, conținutul media și fișierele de pe dispozitiv?"</string>
<string name="permgrouplab_microphone" msgid="171539900250043464">"Microfon"</string>
<string name="permgroupdesc_microphone" msgid="4988812113943554584">"înregistreze sunet"</string>
- <string name="permgrouprequest_microphone" msgid="9167492350681916038">"Pemiteți <b><xliff:g id="APP_NAME">%1$s</xliff:g></b> să înregistreze conținut audio?"</string>
+ <string name="permgrouprequest_microphone" msgid="9167492350681916038">"Pemiteți <b><xliff:g id="APP_NAME">%1$s</xliff:g></b> să înregistreze audio?"</string>
<string name="permgrouplab_activityRecognition" msgid="1565108047054378642">"Activitate fizică"</string>
<string name="permgroupdesc_activityRecognition" msgid="6949472038320473478">"accesați activitatea fizică"</string>
<string name="permgrouprequest_activityRecognition" msgid="7626438016904799383">"Permiteți aplicației <b><xliff:g id="APP_NAME">%1$s</xliff:g></b> să vă acceseze activitatea fizică?"</string>
<string name="permgrouplab_camera" msgid="4820372495894586615">"Camera foto"</string>
<string name="permgroupdesc_camera" msgid="3250611594678347720">"fotografieze și să înregistreze videoclipuri"</string>
- <string name="permgrouprequest_camera" msgid="1299833592069671756">"Permiteți <b><xliff:g id="APP_NAME">%1$s</xliff:g></b> să facă fotografii și să înregistreze videoclipuri?"</string>
+ <string name="permgrouprequest_camera" msgid="1299833592069671756">"Permiteți <b><xliff:g id="APP_NAME">%1$s</xliff:g></b> să fotografieze și să înregistreze video?"</string>
<string name="permgrouplab_calllog" msgid="8798646184930388160">"Jurnale de apeluri"</string>
<string name="permgroupdesc_calllog" msgid="3006237336748283775">"să citească și să scrie jurnalul de apeluri telefonice"</string>
<string name="permgrouprequest_calllog" msgid="8487355309583773267">"Permiteți <b><xliff:g id="APP_NAME">%1$s</xliff:g></b> să vă acceseze jurnalele de apeluri?"</string>
diff --git a/core/res/res/values-sk/strings.xml b/core/res/res/values-sk/strings.xml
index 1549f4d..18a8794 100644
--- a/core/res/res/values-sk/strings.xml
+++ b/core/res/res/values-sk/strings.xml
@@ -310,7 +310,7 @@
<string name="permgrouprequest_activityRecognition" msgid="7626438016904799383">"Povoliť aplikácii <b><xliff:g id="APP_NAME">%1$s</xliff:g></b> prístup k vašej fyzickej aktivite?"</string>
<string name="permgrouplab_camera" msgid="4820372495894586615">"Fotoaparát"</string>
<string name="permgroupdesc_camera" msgid="3250611594678347720">"fotenie a natáčanie videí"</string>
- <string name="permgrouprequest_camera" msgid="1299833592069671756">"Povoliť aplikácii <b><xliff:g id="APP_NAME">%1$s</xliff:g></b> snímať fotky a zaznamenávať video?"</string>
+ <string name="permgrouprequest_camera" msgid="1299833592069671756">"Chcete povoliť aplikácii <b><xliff:g id="APP_NAME">%1$s</xliff:g></b> fotiť a nahrávať video?"</string>
<string name="permgrouplab_calllog" msgid="8798646184930388160">"Zoznam hovorov"</string>
<string name="permgroupdesc_calllog" msgid="3006237336748283775">"čítať a zapisovať do zoznamu hovorov"</string>
<string name="permgrouprequest_calllog" msgid="8487355309583773267">"Povoliť aplikácii <b><xliff:g id="APP_NAME">%1$s</xliff:g></b> prístup k zoznamu hovorov?"</string>
diff --git a/core/res/res/values-th/strings.xml b/core/res/res/values-th/strings.xml
index 5431796..fd77532 100644
--- a/core/res/res/values-th/strings.xml
+++ b/core/res/res/values-th/strings.xml
@@ -1234,7 +1234,7 @@
<string name="volume_unknown" msgid="1400219669770445902">"ระดับเสียง"</string>
<string name="volume_icon_description_bluetooth" msgid="6538894177255964340">"ระดับบลูทูธ"</string>
<string name="volume_icon_description_ringer" msgid="3326003847006162496">"ระดับเสียงเรียกเข้า"</string>
- <string name="volume_icon_description_incall" msgid="8890073218154543397">"ปริมาณการโทร"</string>
+ <string name="volume_icon_description_incall" msgid="8890073218154543397">"ระดับเสียงการโทร"</string>
<string name="volume_icon_description_media" msgid="4217311719665194215">"ระดับเสียงของสื่อ"</string>
<string name="volume_icon_description_notification" msgid="7044986546477282274">"ระดับเสียงของการแจ้งเตือน"</string>
<string name="ringtone_default" msgid="3789758980357696936">"เสียงเรียกเข้าเริ่มต้น"</string>
diff --git a/core/res/res/values/strings.xml b/core/res/res/values/strings.xml
index d39d507..585c4bb 100644
--- a/core/res/res/values/strings.xml
+++ b/core/res/res/values/strings.xml
@@ -5440,4 +5440,6 @@
<!-- ChooserActivity - Alphabetically sorted apps list label. [CHAR LIMIT=NONE] -->
<string name="chooser_all_apps_button_label">Apps list</string>
+ <!-- Prompt for the USB device resolver dialog with warning text for USB device dialogs. [CHAR LIMIT=200] -->
+ <string name="usb_device_resolve_prompt_warn">This app has not been granted record permission but could capture audio through this USB device.</string>
</resources>
diff --git a/core/res/res/values/symbols.xml b/core/res/res/values/symbols.xml
index 8d96c79..1313912 100644
--- a/core/res/res/values/symbols.xml
+++ b/core/res/res/values/symbols.xml
@@ -3876,4 +3876,6 @@
<java-symbol type="bool" name="config_showBuiltinWirelessChargingAnim" />
+ <java-symbol type="string" name="usb_device_resolve_prompt_warn" />
+
</resources>
diff --git a/core/tests/coretests/src/com/android/internal/app/ResolverWrapperAdapter.java b/core/tests/coretests/src/com/android/internal/app/ResolverWrapperAdapter.java
index e41df41..a2191b5 100644
--- a/core/tests/coretests/src/com/android/internal/app/ResolverWrapperAdapter.java
+++ b/core/tests/coretests/src/com/android/internal/app/ResolverWrapperAdapter.java
@@ -39,7 +39,7 @@
ResolverListCommunicator resolverListCommunicator) {
super(context, payloadIntents, initialIntents, rList, filterLastUsed,
resolverListController,
- useLayoutForBrowsables, resolverListCommunicator);
+ useLayoutForBrowsables, resolverListCommunicator, false);
}
public CountingIdlingResource getLabelIdlingResource() {
diff --git a/libs/hwui/TreeInfo.cpp b/libs/hwui/TreeInfo.cpp
index dc53dd6..750f869 100644
--- a/libs/hwui/TreeInfo.cpp
+++ b/libs/hwui/TreeInfo.cpp
@@ -24,7 +24,6 @@
: mode(mode)
, prepareTextures(mode == MODE_FULL)
, canvasContext(canvasContext)
- , damageGenerationId(canvasContext.getFrameNumber())
, disableForceDark(canvasContext.useForceDark() ? 0 : 1)
, screenSize(canvasContext.getNextFrameSize()) {}
diff --git a/libs/hwui/renderthread/CanvasContext.cpp b/libs/hwui/renderthread/CanvasContext.cpp
index e5c502c..4ca26c2 100644
--- a/libs/hwui/renderthread/CanvasContext.cpp
+++ b/libs/hwui/renderthread/CanvasContext.cpp
@@ -303,6 +303,7 @@
info.damageAccumulator = &mDamageAccumulator;
info.layerUpdateQueue = &mLayerUpdateQueue;
+ info.damageGenerationId = mDamageId++;
info.out.canDrawThisFrame = true;
mAnimationContext->startFrame(info.mode);
@@ -702,7 +703,7 @@
surface->query(NATIVE_WINDOW_WIDTH, &width);
surface->query(NATIVE_WINDOW_HEIGHT, &height);
- return width == mLastFrameWidth && height == mLastFrameHeight;
+ return width != mLastFrameWidth || height != mLastFrameHeight;
}
void CanvasContext::setRenderAheadDepth(int renderAhead) {
diff --git a/libs/hwui/renderthread/CanvasContext.h b/libs/hwui/renderthread/CanvasContext.h
index 6e3e43a..b192d46 100644
--- a/libs/hwui/renderthread/CanvasContext.h
+++ b/libs/hwui/renderthread/CanvasContext.h
@@ -245,6 +245,7 @@
// Need at least 4 because we do quad buffer. Add a 5th for good measure.
RingBuffer<SwapHistory, 5> mSwapHistory;
int64_t mFrameNumber = -1;
+ int64_t mDamageId = 0;
// last vsync for a dropped frame due to stuffed queue
nsecs_t mLastDropVsync = 0;
diff --git a/media/java/android/media/IMediaRouter2Client.aidl b/media/java/android/media/IMediaRouter2Client.aidl
index 26184af..72c33f99 100644
--- a/media/java/android/media/IMediaRouter2Client.aidl
+++ b/media/java/android/media/IMediaRouter2Client.aidl
@@ -16,12 +16,14 @@
package android.media;
-import android.media.MediaRoute2ProviderInfo;
+import android.media.MediaRoute2Info;
/**
* @hide
*/
oneway interface IMediaRouter2Client {
void notifyRestoreRoute();
- void notifyProviderInfosUpdated(in List<MediaRoute2ProviderInfo> providers);
+ void notifyRoutesAdded(in List<MediaRoute2Info> routes);
+ void notifyRoutesRemoved(in List<MediaRoute2Info> routes);
+ void notifyRoutesChanged(in List<MediaRoute2Info> routes);
}
diff --git a/media/java/android/media/MediaRoute2Info.java b/media/java/android/media/MediaRoute2Info.java
index 59bd96f..457ccb7 100644
--- a/media/java/android/media/MediaRoute2Info.java
+++ b/media/java/android/media/MediaRoute2Info.java
@@ -314,7 +314,7 @@
List<String> mSupportedCategories;
int mVolume;
int mVolumeMax;
- int mVolumeHandling;
+ int mVolumeHandling = PLAYBACK_VOLUME_FIXED;
Bundle mExtras;
public Builder(@NonNull String id, @NonNull String name) {
diff --git a/media/java/android/media/MediaRouter2.java b/media/java/android/media/MediaRouter2.java
index b52e2d6..ce18ab3 100644
--- a/media/java/android/media/MediaRouter2.java
+++ b/media/java/android/media/MediaRouter2.java
@@ -33,7 +33,9 @@
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
+import java.util.HashMap;
import java.util.List;
+import java.util.Map;
import java.util.Objects;
import java.util.concurrent.CopyOnWriteArrayList;
import java.util.concurrent.Executor;
@@ -51,23 +53,23 @@
@GuardedBy("sLock")
private static MediaRouter2 sInstance;
- private Context mContext;
+ private final Context mContext;
private final IMediaRouterService mMediaRouterService;
private final CopyOnWriteArrayList<CallbackRecord> mCallbackRecords =
new CopyOnWriteArrayList<>();
- @GuardedBy("sLock")
- private List<String> mControlCategories = Collections.emptyList();
+
+ private final String mPackageName;
+ private final Map<String, MediaRoute2Info> mRoutes = new HashMap<>();
+
+ private volatile List<String> mControlCategories = Collections.emptyList();
+
+ private MediaRoute2Info mSelectedRoute;
@GuardedBy("sLock")
private Client mClient;
- private final String mPackageName;
final Handler mHandler;
-
- List<MediaRoute2ProviderInfo> mProviders = Collections.emptyList();
- volatile List<MediaRoute2Info> mRoutes = Collections.emptyList();
-
- MediaRoute2Info mSelectedRoute;
+ volatile List<MediaRoute2Info> mFilteredRoutes = Collections.emptyList();
/**
* Gets an instance of the media router associated with the context.
@@ -137,6 +139,7 @@
}
}
}
+ //TODO: Is it thread-safe?
record.notifyRoutes();
//TODO: Update discovery request here.
@@ -181,31 +184,22 @@
public void setControlCategories(@NonNull Collection<String> controlCategories) {
Objects.requireNonNull(controlCategories, "control categories must not be null");
- Client client;
- List<String> newControlCategories = new ArrayList<>(controlCategories);
- synchronized (sLock) {
- mControlCategories = newControlCategories;
- client = mClient;
- }
- if (client != null) {
- try {
- mMediaRouterService.setControlCategories2(client, newControlCategories);
- } catch (RemoteException ex) {
- Log.e(TAG, "Unable to set control categories.", ex);
- }
- }
- mHandler.sendMessage(obtainMessage(MediaRouter2::refreshAndNotifyRoutes, this));
+ // To ensure invoking callbacks correctly according to control categories
+ mHandler.sendMessage(obtainMessage(MediaRouter2::setControlCategoriesOnHandler,
+ MediaRouter2.this, new ArrayList<>(controlCategories)));
}
+
/**
- * Gets the list of {@link MediaRoute2Info routes} currently known to the media router.
+ * Gets the unmodifiable list of {@link MediaRoute2Info routes} currently
+ * known to the media router.
*
* @return the list of routes that support at least one of the control categories set by
* the application
*/
@NonNull
public List<MediaRoute2Info> getRoutes() {
- return mRoutes;
+ return mFilteredRoutes;
}
/**
@@ -326,102 +320,145 @@
return -1;
}
- void onProviderInfosUpdated(List<MediaRoute2ProviderInfo> providers) {
- if (providers == null) {
- Log.w(TAG, "Providers info is null.");
- return;
- }
+ private void setControlCategoriesOnHandler(List<String> newControlCategories) {
+ List<String> prevControlCategories = mControlCategories;
+ List<MediaRoute2Info> addedRoutes = new ArrayList<>();
+ List<MediaRoute2Info> removedRoutes = new ArrayList<>();
+ List<MediaRoute2Info> filteredRoutes = new ArrayList<>();
- mProviders = providers;
- refreshAndNotifyRoutes();
- }
-
- void refreshAndNotifyRoutes() {
- ArrayList<MediaRoute2Info> routes = new ArrayList<>();
-
- List<String> controlCategories;
+ mControlCategories = newControlCategories;
+ Client client;
synchronized (sLock) {
- controlCategories = mControlCategories;
+ client = mClient;
+ }
+ if (client != null) {
+ try {
+ mMediaRouterService.setControlCategories2(client, mControlCategories);
+ } catch (RemoteException ex) {
+ Log.e(TAG, "Unable to set control categories.", ex);
+ }
}
- for (MediaRoute2ProviderInfo provider : mProviders) {
- updateProvider(provider, controlCategories, routes);
+ for (MediaRoute2Info route : mRoutes.values()) {
+ boolean preSupported = route.supportsControlCategory(prevControlCategories);
+ boolean postSupported = route.supportsControlCategory(newControlCategories);
+ if (postSupported) {
+ filteredRoutes.add(route);
+ }
+ if (preSupported == postSupported) {
+ continue;
+ }
+ if (preSupported) {
+ removedRoutes.add(route);
+ } else {
+ addedRoutes.add(route);
+ }
}
+ mFilteredRoutes = Collections.unmodifiableList(filteredRoutes);
- //TODO: Can orders be changed?
- if (!Objects.equals(mRoutes, routes)) {
- mRoutes = Collections.unmodifiableList(routes);
- notifyRouteListChanged(mRoutes);
+ if (removedRoutes.size() > 0) {
+ notifyRoutesRemoved(removedRoutes);
+ }
+ if (addedRoutes.size() > 0) {
+ notifyRoutesAdded(addedRoutes);
}
}
- void updateProvider(MediaRoute2ProviderInfo provider, List<String> controlCategories,
- List<MediaRoute2Info> outRoutes) {
- if (provider == null || !provider.isValid()) {
- Log.w(TAG, "Ignoring invalid provider : " + provider);
- return;
- }
-
- final Collection<MediaRoute2Info> routes = provider.getRoutes();
+ void addRoutesOnHandler(List<MediaRoute2Info> routes) {
+ List<MediaRoute2Info> addedRoutes = new ArrayList<>();
for (MediaRoute2Info route : routes) {
- if (!route.isValid()) {
- Log.w(TAG, "Ignoring invalid route : " + route);
- continue;
+ mRoutes.put(route.getUniqueId(), route);
+ if (route.supportsControlCategory(mControlCategories)) {
+ addedRoutes.add(route);
}
- if (!route.supportsControlCategory(controlCategories)) {
- continue;
- }
- MediaRoute2Info preRoute = findRouteById(route.getId());
- if (!route.equals(preRoute)) {
- notifyRouteChanged(route);
- }
- outRoutes.add(route);
+ }
+ if (addedRoutes.size() > 0) {
+ refreshFilteredRoutes();
+ notifyRoutesAdded(addedRoutes);
}
}
- MediaRoute2Info findRouteById(String id) {
- for (MediaRoute2Info route : mRoutes) {
- if (route.getId().equals(id)) return route;
+ void removeRoutesOnHandler(List<MediaRoute2Info> routes) {
+ List<MediaRoute2Info> removedRoutes = new ArrayList<>();
+ for (MediaRoute2Info route : routes) {
+ mRoutes.remove(route.getUniqueId());
+ if (route.supportsControlCategory(mControlCategories)) {
+ removedRoutes.add(route);
+ }
}
- return null;
+ if (removedRoutes.size() > 0) {
+ refreshFilteredRoutes();
+ notifyRoutesRemoved(removedRoutes);
+ }
}
- void notifyRouteListChanged(List<MediaRoute2Info> routes) {
+ void changeRoutesOnHandler(List<MediaRoute2Info> routes) {
+ List<MediaRoute2Info> changedRoutes = new ArrayList<>();
+ for (MediaRoute2Info route : routes) {
+ mRoutes.put(route.getUniqueId(), route);
+ if (route.supportsControlCategory(mControlCategories)) {
+ changedRoutes.add(route);
+ }
+ }
+ if (changedRoutes.size() > 0) {
+ refreshFilteredRoutes();
+ notifyRoutesChanged(changedRoutes);
+ }
+ }
+
+ private void refreshFilteredRoutes() {
+ List<MediaRoute2Info> filteredRoutes = new ArrayList<>();
+
+ for (MediaRoute2Info route : mRoutes.values()) {
+ if (route.supportsControlCategory(mControlCategories)) {
+ filteredRoutes.add(route);
+ }
+ }
+ mFilteredRoutes = Collections.unmodifiableList(filteredRoutes);
+ }
+
+ private void notifyRoutesAdded(List<MediaRoute2Info> routes) {
+ for (CallbackRecord record: mCallbackRecords) {
+ record.mExecutor.execute(
+ () -> record.mCallback.onRoutesAdded(routes));
+ }
+ }
+
+ private void notifyRoutesRemoved(List<MediaRoute2Info> routes) {
+ for (CallbackRecord record: mCallbackRecords) {
+ record.mExecutor.execute(
+ () -> record.mCallback.onRoutesRemoved(routes));
+ }
+ }
+
+ private void notifyRoutesChanged(List<MediaRoute2Info> routes) {
for (CallbackRecord record: mCallbackRecords) {
record.mExecutor.execute(
() -> record.mCallback.onRoutesChanged(routes));
}
}
- void notifyRouteChanged(MediaRoute2Info route) {
- for (CallbackRecord record: mCallbackRecords) {
- record.mExecutor.execute(
- () -> record.mCallback.onRouteChanged(route));
- }
- }
-
/**
* Interface for receiving events about media routing changes.
*/
public static class Callback {
//TODO: clean up these callbacks
- /**
- * Called when a route is added.
- */
- public void onRouteAdded(MediaRoute2Info routeInfo) {}
/**
- * Called when a route is changed.
+ * Called when routes are added.
+ * @param routes the list of routes that have been added. It's never empty.
*/
- public void onRouteChanged(MediaRoute2Info routeInfo) {}
+ public void onRoutesAdded(@NonNull List<MediaRoute2Info> routes) {}
/**
- * Called when a route is removed.
+ * Called when routes are removed.
+ * @param routes the list of routes that have been removed. It's never empty.
*/
- public void onRouteRemoved(MediaRoute2Info routeInfo) {}
+ public void onRoutesRemoved(@NonNull List<MediaRoute2Info> routes) {}
/**
- * Called when the list of routes is changed.
+ * Called when routes are changed.
+ * @param routes the list of routes that have been changed. It's never empty.
*/
public void onRoutesChanged(@NonNull List<MediaRoute2Info> routes) {}
}
@@ -436,11 +473,10 @@
}
void notifyRoutes() {
- final List<MediaRoute2Info> routes = mRoutes;
+ final List<MediaRoute2Info> routes = mFilteredRoutes;
// notify only when bound to media router service.
- //TODO: Correct the condition when control category, default route, .. are finalized.
if (routes.size() > 0) {
- mExecutor.execute(() -> mCallback.onRoutesChanged(routes));
+ mExecutor.execute(() -> mCallback.onRoutesAdded(routes));
}
}
}
@@ -450,9 +486,21 @@
public void notifyRestoreRoute() throws RemoteException {}
@Override
- public void notifyProviderInfosUpdated(List<MediaRoute2ProviderInfo> info) {
- mHandler.sendMessage(obtainMessage(MediaRouter2::onProviderInfosUpdated,
- MediaRouter2.this, info));
+ public void notifyRoutesAdded(List<MediaRoute2Info> routes) {
+ mHandler.sendMessage(obtainMessage(MediaRouter2::addRoutesOnHandler,
+ MediaRouter2.this, routes));
+ }
+
+ @Override
+ public void notifyRoutesRemoved(List<MediaRoute2Info> routes) {
+ mHandler.sendMessage(obtainMessage(MediaRouter2::removeRoutesOnHandler,
+ MediaRouter2.this, routes));
+ }
+
+ @Override
+ public void notifyRoutesChanged(List<MediaRoute2Info> routes) {
+ mHandler.sendMessage(obtainMessage(MediaRouter2::changeRoutesOnHandler,
+ MediaRouter2.this, routes));
}
}
}
diff --git a/media/java/android/media/MediaRouter2Manager.java b/media/java/android/media/MediaRouter2Manager.java
index 0d7b6ff..7e848a0 100644
--- a/media/java/android/media/MediaRouter2Manager.java
+++ b/media/java/android/media/MediaRouter2Manager.java
@@ -67,7 +67,7 @@
@NonNull
List<MediaRoute2Info> mRoutes = Collections.emptyList();
@NonNull
- ConcurrentMap<String, List<String>> mControlCategoryMap = new ConcurrentHashMap<>();
+ final ConcurrentMap<String, List<String>> mControlCategoryMap = new ConcurrentHashMap<>();
/**
* Gets an instance of media router manager that controls media route of other applications.
@@ -427,6 +427,8 @@
* A client may refresh available routes for each application.
*/
public void onRoutesChanged(@NonNull List<MediaRoute2Info> routes) {}
+
+ //TODO: add onControlCategoriesChanged to notify available routes are changed
}
final class CallbackRecord {
diff --git a/media/tests/MediaRouter/src/com/android/mediaroutertest/MediaRouterManagerTest.java b/media/tests/MediaRouter/src/com/android/mediaroutertest/MediaRouterManagerTest.java
index ca43d04..acf8998 100644
--- a/media/tests/MediaRouter/src/com/android/mediaroutertest/MediaRouterManagerTest.java
+++ b/media/tests/MediaRouter/src/com/android/mediaroutertest/MediaRouterManagerTest.java
@@ -22,6 +22,7 @@
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotEquals;
import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
import static org.mockito.ArgumentMatchers.argThat;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.timeout;
@@ -272,29 +273,28 @@
@Test
public void testControlVolumeWithRouter() throws Exception {
- MediaRouter2.Callback mockCallback = mock(MediaRouter2.Callback.class);
-
Map<String, MediaRoute2Info> routes = waitAndGetRoutes(CONTROL_CATEGORIES_ALL);
- mRouter2.registerCallback(mExecutor, mockCallback);
MediaRoute2Info volRoute = routes.get(ROUTE_ID_VARIABLE_VOLUME);
int originalVolume = volRoute.getVolume();
int deltaVolume = (originalVolume == volRoute.getVolumeMax() ? -1 : 1);
- int targetVolume = originalVolume + deltaVolume;
- mRouter2.requestSetVolume(volRoute, targetVolume);
- verify(mockCallback, timeout(TIMEOUT_MS).atLeastOnce())
- .onRouteChanged(argThat(route ->
- route.getId().equals(volRoute.getId())
- && route.getVolume() == targetVolume));
+ CountDownLatch latch1 = new CountDownLatch(1);
+ MediaRouter2.Callback callback1 =
+ createVolumeChangeCallback(ROUTE_ID_VARIABLE_VOLUME,
+ originalVolume + deltaVolume, latch1);
+ mRouter2.registerCallback(mExecutor, callback1);
+ mRouter2.requestUpdateVolume(volRoute, deltaVolume);
+ assertTrue(latch1.await(TIMEOUT_MS, TimeUnit.MILLISECONDS));
+ mRouter2.unregisterCallback(callback1);
- mRouter2.requestUpdateVolume(volRoute, -deltaVolume);
- verify(mockCallback, timeout(TIMEOUT_MS).atLeastOnce())
- .onRouteChanged(argThat(route ->
- route.getId().equals(volRoute.getId())
- && route.getVolume() == originalVolume));
-
- mRouter2.unregisterCallback(mockCallback);
+ CountDownLatch latch2 = new CountDownLatch(1);
+ MediaRouter2.Callback callback2 =
+ createVolumeChangeCallback(ROUTE_ID_VARIABLE_VOLUME, originalVolume, latch2);
+ mRouter2.registerCallback(mExecutor, callback2);
+ mRouter2.requestSetVolume(volRoute, originalVolume);
+ assertTrue(latch1.await(TIMEOUT_MS, TimeUnit.MILLISECONDS));
+ mRouter2.unregisterCallback(callback1);
}
@Test
@@ -312,13 +312,13 @@
int targetVolume = originalVolume + deltaVolume;
mManager.requestSetVolume(volRoute, targetVolume);
- verify(mockCallback, timeout(TIMEOUT_MS).atLeastOnce())
+ verify(managerCallback, timeout(TIMEOUT_MS).atLeastOnce())
.onRouteChanged(argThat(route ->
route.getId().equals(volRoute.getId())
&& route.getVolume() == targetVolume));
mManager.requestUpdateVolume(volRoute, -deltaVolume);
- verify(mockCallback, timeout(TIMEOUT_MS).atLeastOnce())
+ verify(managerCallback, timeout(TIMEOUT_MS).atLeastOnce())
.onRouteChanged(argThat(route ->
route.getId().equals(volRoute.getId())
&& route.getVolume() == originalVolume));
@@ -347,14 +347,14 @@
CountDownLatch latch = new CountDownLatch(1);
MediaRouter2.Callback callback = new MediaRouter2.Callback() {
@Override
- public void onRoutesChanged(List<MediaRoute2Info> routes) {
- if (routes.size() > 0) latch.countDown();
+ public void onRoutesAdded(List<MediaRoute2Info> added) {
+ if (added.size() > 0) latch.countDown();
}
};
mRouter2.setControlCategories(controlCategories);
mRouter2.registerCallback(mExecutor, callback);
try {
- latch.await(TIMEOUT_MS, TimeUnit.MILLISECONDS);
+ assertTrue(latch.await(TIMEOUT_MS, TimeUnit.MILLISECONDS));
return createRouteMap(mRouter2.getRoutes());
} finally {
mRouter2.unregisterCallback(callback);
@@ -370,14 +370,18 @@
MediaRouter2Manager.Callback managerCallback = new MediaRouter2Manager.Callback() {
@Override
public void onRoutesChanged(List<MediaRoute2Info> routes) {
- if (routes.size() > 0) latch.countDown();
+ if (routes.size() > 0) {
+ latch.countDown();
+ }
}
};
mManager.registerCallback(mExecutor, managerCallback);
mRouter2.setControlCategories(controlCategories);
mRouter2.registerCallback(mExecutor, routerCallback);
try {
- latch.await(TIMEOUT_MS, TimeUnit.MILLISECONDS);
+ assertTrue(latch.await(TIMEOUT_MS, TimeUnit.MILLISECONDS));
+ //TODO: currently this returns empty list occasionally.
+ //Maybe due to control category is not set yet
return createRouteMap(mManager.getAvailableRoutes(mPackageName));
} finally {
mRouter2.unregisterCallback(routerCallback);
@@ -385,6 +389,20 @@
}
}
+ MediaRouter2.Callback createVolumeChangeCallback(String routeId,
+ int targetVolume, CountDownLatch latch) {
+ MediaRouter2.Callback callback = new MediaRouter2.Callback() {
+ @Override
+ public void onRoutesChanged(List<MediaRoute2Info> changed) {
+ MediaRoute2Info volRoute = createRouteMap(changed).get(routeId);
+ if (volRoute != null && volRoute.getVolume() == targetVolume) {
+ latch.countDown();
+ }
+ }
+ };
+ return callback;
+ }
+
// Helper for getting routes easily
static Map<String, MediaRoute2Info> createRouteMap(List<MediaRoute2Info> routes) {
Map<String, MediaRoute2Info> routeMap = new HashMap<>();
diff --git a/packages/CarSystemUI/src/com/android/systemui/CarComponentBinder.java b/packages/CarSystemUI/src/com/android/systemui/CarComponentBinder.java
index c40eda9..f11eff8 100644
--- a/packages/CarSystemUI/src/com/android/systemui/CarComponentBinder.java
+++ b/packages/CarSystemUI/src/com/android/systemui/CarComponentBinder.java
@@ -17,6 +17,7 @@
package com.android.systemui;
import com.android.systemui.dagger.DefaultActivityBinder;
+import com.android.systemui.dagger.DefaultBroadcastReceiverBinder;
import com.android.systemui.dagger.DefaultServiceBinder;
import dagger.Module;
@@ -26,6 +27,7 @@
*/
@Module(includes = {
DefaultActivityBinder.class,
+ DefaultBroadcastReceiverBinder.class,
DefaultServiceBinder.class,
CarSystemUIBinder.class})
public class CarComponentBinder {
diff --git a/packages/CarSystemUI/src/com/android/systemui/CarSystemUIBinder.java b/packages/CarSystemUI/src/com/android/systemui/CarSystemUIBinder.java
index 57e7fb3..706727b 100644
--- a/packages/CarSystemUI/src/com/android/systemui/CarSystemUIBinder.java
+++ b/packages/CarSystemUI/src/com/android/systemui/CarSystemUIBinder.java
@@ -42,6 +42,7 @@
import com.android.systemui.power.PowerUI;
import com.android.systemui.recents.Recents;
import com.android.systemui.recents.RecentsModule;
+import com.android.systemui.shared.plugins.PluginManager;
import com.android.systemui.statusbar.CommandQueue;
import com.android.systemui.statusbar.FeatureFlags;
import com.android.systemui.statusbar.NavigationBarController;
@@ -88,9 +89,11 @@
import com.android.systemui.statusbar.policy.KeyguardStateController;
import com.android.systemui.statusbar.policy.NetworkController;
import com.android.systemui.statusbar.policy.RemoteInputQuickSettingsDisabler;
+import com.android.systemui.statusbar.policy.RemoteInputUriController;
import com.android.systemui.statusbar.policy.UserSwitcherController;
import com.android.systemui.statusbar.policy.ZenModeController;
import com.android.systemui.statusbar.tv.TvStatusBar;
+import com.android.systemui.theme.ThemeOverlayController;
import com.android.systemui.util.InjectionInflationController;
import com.android.systemui.util.leak.GarbageMonitor;
import com.android.systemui.volume.VolumeUI;
@@ -181,6 +184,18 @@
public abstract SystemUI bindsSizeCompatModeActivityController(
SizeCompatModeActivityController sysui);
+ /** Inject into SliceBroadcastRelayHandler. */
+ @Binds
+ @IntoMap
+ @ClassKey(SliceBroadcastRelayHandler.class)
+ public abstract SystemUI bindSliceBroadcastRelayHandler(SliceBroadcastRelayHandler sysui);
+
+ /** Inject into ThemeOverlayController. */
+ @Binds
+ @IntoMap
+ @ClassKey(ThemeOverlayController.class)
+ public abstract SystemUI bindThemeOverlayController(ThemeOverlayController sysui);
+
/** Inject into StatusBar. */
@Binds
@IntoMap
@@ -275,7 +290,9 @@
PowerManager powerManager,
DozeScrimController dozeScrimController,
CommandQueue commandQueue,
- CarNavigationBarController carNavigationBarController) {
+ PluginManager pluginManager,
+ CarNavigationBarController carNavigationBarController,
+ RemoteInputUriController remoteInputUriController) {
return new CarStatusBar(
context,
featureFlags,
@@ -341,6 +358,8 @@
powerManager,
dozeScrimController,
commandQueue,
+ pluginManager,
+ remoteInputUriController,
carNavigationBarController);
}
}
diff --git a/packages/CarSystemUI/src/com/android/systemui/statusbar/car/CarStatusBar.java b/packages/CarSystemUI/src/com/android/systemui/statusbar/car/CarStatusBar.java
index a463d37..110b32b 100644
--- a/packages/CarSystemUI/src/com/android/systemui/statusbar/car/CarStatusBar.java
+++ b/packages/CarSystemUI/src/com/android/systemui/statusbar/car/CarStatusBar.java
@@ -80,6 +80,7 @@
import com.android.systemui.plugins.FalsingManager;
import com.android.systemui.plugins.qs.QS;
import com.android.systemui.qs.car.CarQSFragment;
+import com.android.systemui.shared.plugins.PluginManager;
import com.android.systemui.statusbar.CommandQueue;
import com.android.systemui.statusbar.FeatureFlags;
import com.android.systemui.statusbar.FlingAnimationUtils;
@@ -127,6 +128,7 @@
import com.android.systemui.statusbar.policy.KeyguardStateController;
import com.android.systemui.statusbar.policy.NetworkController;
import com.android.systemui.statusbar.policy.RemoteInputQuickSettingsDisabler;
+import com.android.systemui.statusbar.policy.RemoteInputUriController;
import com.android.systemui.statusbar.policy.UserSwitcherController;
import com.android.systemui.statusbar.policy.ZenModeController;
import com.android.systemui.util.InjectionInflationController;
@@ -299,6 +301,8 @@
PowerManager powerManager,
DozeScrimController dozeScrimController,
CommandQueue commandQueue,
+ PluginManager pluginManager,
+ RemoteInputUriController remoteInputUriController,
/* Car Settings injected components. */
CarNavigationBarController carNavigationBarController) {
super(
@@ -366,7 +370,9 @@
dozeServiceHost,
powerManager,
dozeScrimController,
- commandQueue);
+ commandQueue,
+ pluginManager,
+ remoteInputUriController);
mScrimController = scrimController;
mCarNavigationBarController = carNavigationBarController;
}
diff --git a/packages/SettingsLib/res/values-af/strings.xml b/packages/SettingsLib/res/values-af/strings.xml
index f25b5eb..843967d 100644
--- a/packages/SettingsLib/res/values-af/strings.xml
+++ b/packages/SettingsLib/res/values-af/strings.xml
@@ -61,6 +61,8 @@
<string name="speed_label_medium" msgid="3175763313268941953">"Middelmatig"</string>
<string name="speed_label_fast" msgid="7715732164050975057">"Vinnig"</string>
<string name="speed_label_very_fast" msgid="2265363430784523409">"Baie vinnig"</string>
+ <!-- no translation found for wifi_passpoint_expired (1711402866023391443) -->
+ <skip />
<string name="preference_summary_default_combination" msgid="8532964268242666060">"<xliff:g id="STATE">%1$s</xliff:g> / <xliff:g id="DESCRIPTION">%2$s</xliff:g>"</string>
<string name="bluetooth_disconnected" msgid="6557104142667339895">"Ontkoppel"</string>
<string name="bluetooth_disconnecting" msgid="8913264760027764974">"Ontkoppel tans…"</string>
@@ -466,4 +468,6 @@
<string name="zen_mode_forever" msgid="2704305038191592967">"Totdat jy dit afskakel"</string>
<string name="time_unit_just_now" msgid="6363336622778342422">"Sopas"</string>
<string name="media_transfer_this_device_name" msgid="1636276898262571213">"Hierdie toestel"</string>
+ <!-- no translation found for profile_connect_timeout_subtext (2401801610868184557) -->
+ <skip />
</resources>
diff --git a/packages/SettingsLib/res/values-am/strings.xml b/packages/SettingsLib/res/values-am/strings.xml
index 6332c848..871a7fc 100644
--- a/packages/SettingsLib/res/values-am/strings.xml
+++ b/packages/SettingsLib/res/values-am/strings.xml
@@ -61,6 +61,8 @@
<string name="speed_label_medium" msgid="3175763313268941953">"መካከለኛ"</string>
<string name="speed_label_fast" msgid="7715732164050975057">"ፈጣን"</string>
<string name="speed_label_very_fast" msgid="2265363430784523409">"እጅግ በጣም ፈጣን"</string>
+ <!-- no translation found for wifi_passpoint_expired (1711402866023391443) -->
+ <skip />
<string name="preference_summary_default_combination" msgid="8532964268242666060">"<xliff:g id="STATE">%1$s</xliff:g> / <xliff:g id="DESCRIPTION">%2$s</xliff:g>"</string>
<string name="bluetooth_disconnected" msgid="6557104142667339895">"ተለያይቷል"</string>
<string name="bluetooth_disconnecting" msgid="8913264760027764974">"በመለያየት ላይ..."</string>
@@ -466,4 +468,6 @@
<string name="zen_mode_forever" msgid="2704305038191592967">"እስኪያጠፉት ድረስ"</string>
<string name="time_unit_just_now" msgid="6363336622778342422">"ልክ አሁን"</string>
<string name="media_transfer_this_device_name" msgid="1636276898262571213">"ይህ መሣሪያ"</string>
+ <!-- no translation found for profile_connect_timeout_subtext (2401801610868184557) -->
+ <skip />
</resources>
diff --git a/packages/SettingsLib/res/values-ar/strings.xml b/packages/SettingsLib/res/values-ar/strings.xml
index 8c72527..9ee6322 100644
--- a/packages/SettingsLib/res/values-ar/strings.xml
+++ b/packages/SettingsLib/res/values-ar/strings.xml
@@ -61,6 +61,8 @@
<string name="speed_label_medium" msgid="3175763313268941953">"متوسطة"</string>
<string name="speed_label_fast" msgid="7715732164050975057">"سريعة"</string>
<string name="speed_label_very_fast" msgid="2265363430784523409">"سريعة جدًا"</string>
+ <!-- no translation found for wifi_passpoint_expired (1711402866023391443) -->
+ <skip />
<string name="preference_summary_default_combination" msgid="8532964268242666060">"<xliff:g id="STATE">%1$s</xliff:g> / <xliff:g id="DESCRIPTION">%2$s</xliff:g>"</string>
<string name="bluetooth_disconnected" msgid="6557104142667339895">"غير متصل"</string>
<string name="bluetooth_disconnecting" msgid="8913264760027764974">"جارٍ قطع الاتصال..."</string>
@@ -470,4 +472,6 @@
<string name="zen_mode_forever" msgid="2704305038191592967">"إلى أن توقف الوضع يدويًا"</string>
<string name="time_unit_just_now" msgid="6363336622778342422">"للتو"</string>
<string name="media_transfer_this_device_name" msgid="1636276898262571213">"هذا الجهاز"</string>
+ <!-- no translation found for profile_connect_timeout_subtext (2401801610868184557) -->
+ <skip />
</resources>
diff --git a/packages/SettingsLib/res/values-as/strings.xml b/packages/SettingsLib/res/values-as/strings.xml
index a7ea1e0..9dcd8ba 100644
--- a/packages/SettingsLib/res/values-as/strings.xml
+++ b/packages/SettingsLib/res/values-as/strings.xml
@@ -43,8 +43,7 @@
<string name="available_via_passpoint" msgid="1617440946846329613">"%1$sৰ মাধ্যমেৰে উপলব্ধ"</string>
<string name="tap_to_sign_up" msgid="6449724763052579434">"ছাইন আপ কৰিবলৈ টিপক"</string>
<string name="wifi_connected_no_internet" msgid="8202906332837777829">"সংযোজিত, ইণ্টাৰনেট নাই"</string>
- <!-- no translation found for private_dns_broken (7356676011023412490) -->
- <skip />
+ <string name="private_dns_broken" msgid="7356676011023412490">"ব্যক্তিগত DNS ছাৰ্ভাৰ এক্সেছ কৰিব নোৱাৰি"</string>
<string name="wifi_limited_connection" msgid="7717855024753201527">"ইণ্টাৰনেট সংযোগ সীমিত"</string>
<string name="wifi_status_no_internet" msgid="5784710974669608361">"ইণ্টাৰনেট সংযোগ নাই"</string>
<string name="wifi_status_sign_in_required" msgid="123517180404752756">"ছাইন ইন কৰা দৰকাৰী"</string>
@@ -62,6 +61,8 @@
<string name="speed_label_medium" msgid="3175763313268941953">"মধ্যমীয়া"</string>
<string name="speed_label_fast" msgid="7715732164050975057">"দ্ৰুত"</string>
<string name="speed_label_very_fast" msgid="2265363430784523409">"অতি দ্ৰুত"</string>
+ <!-- no translation found for wifi_passpoint_expired (1711402866023391443) -->
+ <skip />
<string name="preference_summary_default_combination" msgid="8532964268242666060">"<xliff:g id="STATE">%1$s</xliff:g> / <xliff:g id="DESCRIPTION">%2$s</xliff:g>"</string>
<string name="bluetooth_disconnected" msgid="6557104142667339895">"সংযোগ বিচ্ছিন্ন কৰা হ’ল"</string>
<string name="bluetooth_disconnecting" msgid="8913264760027764974">"সংযোগ বিচ্ছিন্ন কৰি থকা হৈছে…"</string>
@@ -467,4 +468,6 @@
<string name="zen_mode_forever" msgid="2704305038191592967">"আপুনি অফ নকৰা পর্যন্ত"</string>
<string name="time_unit_just_now" msgid="6363336622778342422">"এই মাত্ৰ"</string>
<string name="media_transfer_this_device_name" msgid="1636276898262571213">"এই ডিভাইচটো"</string>
+ <!-- no translation found for profile_connect_timeout_subtext (2401801610868184557) -->
+ <skip />
</resources>
diff --git a/packages/SettingsLib/res/values-az/strings.xml b/packages/SettingsLib/res/values-az/strings.xml
index cb7db78..fda96b4 100644
--- a/packages/SettingsLib/res/values-az/strings.xml
+++ b/packages/SettingsLib/res/values-az/strings.xml
@@ -61,6 +61,8 @@
<string name="speed_label_medium" msgid="3175763313268941953">"Orta"</string>
<string name="speed_label_fast" msgid="7715732164050975057">"Sürətli"</string>
<string name="speed_label_very_fast" msgid="2265363430784523409">"Çox Sürətli"</string>
+ <!-- no translation found for wifi_passpoint_expired (1711402866023391443) -->
+ <skip />
<string name="preference_summary_default_combination" msgid="8532964268242666060">"<xliff:g id="STATE">%1$s</xliff:g> / <xliff:g id="DESCRIPTION">%2$s</xliff:g>"</string>
<string name="bluetooth_disconnected" msgid="6557104142667339895">"Ayrıldı"</string>
<string name="bluetooth_disconnecting" msgid="8913264760027764974">"Ayrılır..."</string>
@@ -466,4 +468,6 @@
<string name="zen_mode_forever" msgid="2704305038191592967">"Deaktiv edənə qədər"</string>
<string name="time_unit_just_now" msgid="6363336622778342422">"İndicə"</string>
<string name="media_transfer_this_device_name" msgid="1636276898262571213">"Bu cihaz"</string>
+ <!-- no translation found for profile_connect_timeout_subtext (2401801610868184557) -->
+ <skip />
</resources>
diff --git a/packages/SettingsLib/res/values-b+sr+Latn/strings.xml b/packages/SettingsLib/res/values-b+sr+Latn/strings.xml
index 75feb32..4dfbd8e 100644
--- a/packages/SettingsLib/res/values-b+sr+Latn/strings.xml
+++ b/packages/SettingsLib/res/values-b+sr+Latn/strings.xml
@@ -61,6 +61,8 @@
<string name="speed_label_medium" msgid="3175763313268941953">"Srednja"</string>
<string name="speed_label_fast" msgid="7715732164050975057">"Brza"</string>
<string name="speed_label_very_fast" msgid="2265363430784523409">"Veoma brza"</string>
+ <!-- no translation found for wifi_passpoint_expired (1711402866023391443) -->
+ <skip />
<string name="preference_summary_default_combination" msgid="8532964268242666060">"<xliff:g id="STATE">%1$s</xliff:g>/<xliff:g id="DESCRIPTION">%2$s</xliff:g>"</string>
<string name="bluetooth_disconnected" msgid="6557104142667339895">"Veza je prekinuta"</string>
<string name="bluetooth_disconnecting" msgid="8913264760027764974">"Prekidanje veze..."</string>
@@ -467,4 +469,6 @@
<string name="zen_mode_forever" msgid="2704305038191592967">"Dok ne isključite"</string>
<string name="time_unit_just_now" msgid="6363336622778342422">"Upravo"</string>
<string name="media_transfer_this_device_name" msgid="1636276898262571213">"Ovaj uređaj"</string>
+ <!-- no translation found for profile_connect_timeout_subtext (2401801610868184557) -->
+ <skip />
</resources>
diff --git a/packages/SettingsLib/res/values-be/strings.xml b/packages/SettingsLib/res/values-be/strings.xml
index 677aa24..577c1eb 100644
--- a/packages/SettingsLib/res/values-be/strings.xml
+++ b/packages/SettingsLib/res/values-be/strings.xml
@@ -61,6 +61,8 @@
<string name="speed_label_medium" msgid="3175763313268941953">"Сярэдняя"</string>
<string name="speed_label_fast" msgid="7715732164050975057">"Хуткая"</string>
<string name="speed_label_very_fast" msgid="2265363430784523409">"Вельмі хуткая"</string>
+ <!-- no translation found for wifi_passpoint_expired (1711402866023391443) -->
+ <skip />
<string name="preference_summary_default_combination" msgid="8532964268242666060">"<xliff:g id="STATE">%1$s</xliff:g> / <xliff:g id="DESCRIPTION">%2$s</xliff:g>"</string>
<string name="bluetooth_disconnected" msgid="6557104142667339895">"Адключана"</string>
<string name="bluetooth_disconnecting" msgid="8913264760027764974">"Адключэнне..."</string>
@@ -468,4 +470,6 @@
<string name="zen_mode_forever" msgid="2704305038191592967">"Пакуль не выключыце"</string>
<string name="time_unit_just_now" msgid="6363336622778342422">"Толькі што"</string>
<string name="media_transfer_this_device_name" msgid="1636276898262571213">"Гэта прылада"</string>
+ <!-- no translation found for profile_connect_timeout_subtext (2401801610868184557) -->
+ <skip />
</resources>
diff --git a/packages/SettingsLib/res/values-bg/strings.xml b/packages/SettingsLib/res/values-bg/strings.xml
index 1620422..1007b38 100644
--- a/packages/SettingsLib/res/values-bg/strings.xml
+++ b/packages/SettingsLib/res/values-bg/strings.xml
@@ -61,6 +61,8 @@
<string name="speed_label_medium" msgid="3175763313268941953">"Средна"</string>
<string name="speed_label_fast" msgid="7715732164050975057">"Бърза"</string>
<string name="speed_label_very_fast" msgid="2265363430784523409">"Много бърза"</string>
+ <!-- no translation found for wifi_passpoint_expired (1711402866023391443) -->
+ <skip />
<string name="preference_summary_default_combination" msgid="8532964268242666060">"<xliff:g id="STATE">%1$s</xliff:g>/<xliff:g id="DESCRIPTION">%2$s</xliff:g>"</string>
<string name="bluetooth_disconnected" msgid="6557104142667339895">"Изкл."</string>
<string name="bluetooth_disconnecting" msgid="8913264760027764974">"Изключва се..."</string>
@@ -466,4 +468,6 @@
<string name="zen_mode_forever" msgid="2704305038191592967">"До изключване"</string>
<string name="time_unit_just_now" msgid="6363336622778342422">"Току-що"</string>
<string name="media_transfer_this_device_name" msgid="1636276898262571213">"Това устройство"</string>
+ <!-- no translation found for profile_connect_timeout_subtext (2401801610868184557) -->
+ <skip />
</resources>
diff --git a/packages/SettingsLib/res/values-bn/strings.xml b/packages/SettingsLib/res/values-bn/strings.xml
index b1e37a6..a92e8e4 100644
--- a/packages/SettingsLib/res/values-bn/strings.xml
+++ b/packages/SettingsLib/res/values-bn/strings.xml
@@ -61,6 +61,8 @@
<string name="speed_label_medium" msgid="3175763313268941953">"মাঝারি"</string>
<string name="speed_label_fast" msgid="7715732164050975057">"দ্রুত"</string>
<string name="speed_label_very_fast" msgid="2265363430784523409">"খুব দ্রুত"</string>
+ <!-- no translation found for wifi_passpoint_expired (1711402866023391443) -->
+ <skip />
<string name="preference_summary_default_combination" msgid="8532964268242666060">"<xliff:g id="STATE">%1$s</xliff:g> / <xliff:g id="DESCRIPTION">%2$s</xliff:g>"</string>
<string name="bluetooth_disconnected" msgid="6557104142667339895">"ডিসকানেক্ট করা হয়েছে"</string>
<string name="bluetooth_disconnecting" msgid="8913264760027764974">"ডিসকানেক্ট হচ্ছে..."</string>
@@ -466,4 +468,6 @@
<string name="zen_mode_forever" msgid="2704305038191592967">"যতক্ষণ না আপনি বন্ধ করছেন"</string>
<string name="time_unit_just_now" msgid="6363336622778342422">"এখনই"</string>
<string name="media_transfer_this_device_name" msgid="1636276898262571213">"এই ডিভাইস"</string>
+ <!-- no translation found for profile_connect_timeout_subtext (2401801610868184557) -->
+ <skip />
</resources>
diff --git a/packages/SettingsLib/res/values-bs/strings.xml b/packages/SettingsLib/res/values-bs/strings.xml
index 911a831..af7219d 100644
--- a/packages/SettingsLib/res/values-bs/strings.xml
+++ b/packages/SettingsLib/res/values-bs/strings.xml
@@ -61,6 +61,8 @@
<string name="speed_label_medium" msgid="3175763313268941953">"Srednja brzina"</string>
<string name="speed_label_fast" msgid="7715732164050975057">"Brzo"</string>
<string name="speed_label_very_fast" msgid="2265363430784523409">"Veoma brzo"</string>
+ <!-- no translation found for wifi_passpoint_expired (1711402866023391443) -->
+ <skip />
<string name="preference_summary_default_combination" msgid="8532964268242666060">"<xliff:g id="STATE">%1$s</xliff:g> / <xliff:g id="DESCRIPTION">%2$s</xliff:g>"</string>
<string name="bluetooth_disconnected" msgid="6557104142667339895">"Isključen"</string>
<string name="bluetooth_disconnecting" msgid="8913264760027764974">"Prekidanje veze…"</string>
@@ -467,4 +469,6 @@
<string name="zen_mode_forever" msgid="2704305038191592967">"Dok ne isključite"</string>
<string name="time_unit_just_now" msgid="6363336622778342422">"Upravo"</string>
<string name="media_transfer_this_device_name" msgid="1636276898262571213">"Ovaj uređaj"</string>
+ <!-- no translation found for profile_connect_timeout_subtext (2401801610868184557) -->
+ <skip />
</resources>
diff --git a/packages/SettingsLib/res/values-ca/strings.xml b/packages/SettingsLib/res/values-ca/strings.xml
index 58c2b67..ad6a131 100644
--- a/packages/SettingsLib/res/values-ca/strings.xml
+++ b/packages/SettingsLib/res/values-ca/strings.xml
@@ -61,6 +61,8 @@
<string name="speed_label_medium" msgid="3175763313268941953">"Mitjana"</string>
<string name="speed_label_fast" msgid="7715732164050975057">"Ràpida"</string>
<string name="speed_label_very_fast" msgid="2265363430784523409">"Molt ràpida"</string>
+ <!-- no translation found for wifi_passpoint_expired (1711402866023391443) -->
+ <skip />
<string name="preference_summary_default_combination" msgid="8532964268242666060">"<xliff:g id="STATE">%1$s</xliff:g> / <xliff:g id="DESCRIPTION">%2$s</xliff:g>"</string>
<string name="bluetooth_disconnected" msgid="6557104142667339895">"Desconnectat"</string>
<string name="bluetooth_disconnecting" msgid="8913264760027764974">"S\'està desconnectant..."</string>
@@ -466,4 +468,6 @@
<string name="zen_mode_forever" msgid="2704305038191592967">"Fins que no ho desactivis"</string>
<string name="time_unit_just_now" msgid="6363336622778342422">"Ara mateix"</string>
<string name="media_transfer_this_device_name" msgid="1636276898262571213">"Aquest dispositiu"</string>
+ <!-- no translation found for profile_connect_timeout_subtext (2401801610868184557) -->
+ <skip />
</resources>
diff --git a/packages/SettingsLib/res/values-cs/strings.xml b/packages/SettingsLib/res/values-cs/strings.xml
index 3c3d5b8..577200c 100644
--- a/packages/SettingsLib/res/values-cs/strings.xml
+++ b/packages/SettingsLib/res/values-cs/strings.xml
@@ -61,6 +61,8 @@
<string name="speed_label_medium" msgid="3175763313268941953">"Střední"</string>
<string name="speed_label_fast" msgid="7715732164050975057">"Rychlá"</string>
<string name="speed_label_very_fast" msgid="2265363430784523409">"Velmi rychlá"</string>
+ <!-- no translation found for wifi_passpoint_expired (1711402866023391443) -->
+ <skip />
<string name="preference_summary_default_combination" msgid="8532964268242666060">"<xliff:g id="STATE">%1$s</xliff:g> / <xliff:g id="DESCRIPTION">%2$s</xliff:g>"</string>
<string name="bluetooth_disconnected" msgid="6557104142667339895">"Odpojeno"</string>
<string name="bluetooth_disconnecting" msgid="8913264760027764974">"Odpojování..."</string>
@@ -468,4 +470,6 @@
<string name="zen_mode_forever" msgid="2704305038191592967">"Dokud tuto funkci nevypnete"</string>
<string name="time_unit_just_now" msgid="6363336622778342422">"Právě teď"</string>
<string name="media_transfer_this_device_name" msgid="1636276898262571213">"Toto zařízení"</string>
+ <!-- no translation found for profile_connect_timeout_subtext (2401801610868184557) -->
+ <skip />
</resources>
diff --git a/packages/SettingsLib/res/values-da/strings.xml b/packages/SettingsLib/res/values-da/strings.xml
index bf5d6cf..43bd1f15 100644
--- a/packages/SettingsLib/res/values-da/strings.xml
+++ b/packages/SettingsLib/res/values-da/strings.xml
@@ -61,6 +61,8 @@
<string name="speed_label_medium" msgid="3175763313268941953">"Middel"</string>
<string name="speed_label_fast" msgid="7715732164050975057">"Hurtig"</string>
<string name="speed_label_very_fast" msgid="2265363430784523409">"Meget hurtig"</string>
+ <!-- no translation found for wifi_passpoint_expired (1711402866023391443) -->
+ <skip />
<string name="preference_summary_default_combination" msgid="8532964268242666060">"<xliff:g id="STATE">%1$s</xliff:g> – <xliff:g id="DESCRIPTION">%2$s</xliff:g>"</string>
<string name="bluetooth_disconnected" msgid="6557104142667339895">"Afbrudt"</string>
<string name="bluetooth_disconnecting" msgid="8913264760027764974">"Afbryder ..."</string>
@@ -466,4 +468,6 @@
<string name="zen_mode_forever" msgid="2704305038191592967">"Indtil du deaktiverer"</string>
<string name="time_unit_just_now" msgid="6363336622778342422">"Lige nu"</string>
<string name="media_transfer_this_device_name" msgid="1636276898262571213">"Denne enhed"</string>
+ <!-- no translation found for profile_connect_timeout_subtext (2401801610868184557) -->
+ <skip />
</resources>
diff --git a/packages/SettingsLib/res/values-de/strings.xml b/packages/SettingsLib/res/values-de/strings.xml
index a6dbd5a..8f6d123 100644
--- a/packages/SettingsLib/res/values-de/strings.xml
+++ b/packages/SettingsLib/res/values-de/strings.xml
@@ -61,6 +61,8 @@
<string name="speed_label_medium" msgid="3175763313268941953">"Mittel"</string>
<string name="speed_label_fast" msgid="7715732164050975057">"Schnell"</string>
<string name="speed_label_very_fast" msgid="2265363430784523409">"Sehr schnell"</string>
+ <!-- no translation found for wifi_passpoint_expired (1711402866023391443) -->
+ <skip />
<string name="preference_summary_default_combination" msgid="8532964268242666060">"<xliff:g id="STATE">%1$s</xliff:g> – <xliff:g id="DESCRIPTION">%2$s</xliff:g>"</string>
<string name="bluetooth_disconnected" msgid="6557104142667339895">"Nicht verbunden"</string>
<string name="bluetooth_disconnecting" msgid="8913264760027764974">"Verbindung wird getrennt..."</string>
@@ -466,4 +468,6 @@
<string name="zen_mode_forever" msgid="2704305038191592967">"Bis zur Deaktivierung"</string>
<string name="time_unit_just_now" msgid="6363336622778342422">"gerade eben"</string>
<string name="media_transfer_this_device_name" msgid="1636276898262571213">"Dieses Gerät"</string>
+ <!-- no translation found for profile_connect_timeout_subtext (2401801610868184557) -->
+ <skip />
</resources>
diff --git a/packages/SettingsLib/res/values-el/strings.xml b/packages/SettingsLib/res/values-el/strings.xml
index fdba74a..fcdc410 100644
--- a/packages/SettingsLib/res/values-el/strings.xml
+++ b/packages/SettingsLib/res/values-el/strings.xml
@@ -61,6 +61,8 @@
<string name="speed_label_medium" msgid="3175763313268941953">"Μέτρια"</string>
<string name="speed_label_fast" msgid="7715732164050975057">"Γρήγορη"</string>
<string name="speed_label_very_fast" msgid="2265363430784523409">"Πολύ γρήγορη"</string>
+ <!-- no translation found for wifi_passpoint_expired (1711402866023391443) -->
+ <skip />
<string name="preference_summary_default_combination" msgid="8532964268242666060">"<xliff:g id="STATE">%1$s</xliff:g> / <xliff:g id="DESCRIPTION">%2$s</xliff:g>"</string>
<string name="bluetooth_disconnected" msgid="6557104142667339895">"Αποσυνδέθηκε"</string>
<string name="bluetooth_disconnecting" msgid="8913264760027764974">"Αποσύνδεση..."</string>
@@ -466,4 +468,6 @@
<string name="zen_mode_forever" msgid="2704305038191592967">"Μέχρι την απενεργοποίηση"</string>
<string name="time_unit_just_now" msgid="6363336622778342422">"Μόλις τώρα"</string>
<string name="media_transfer_this_device_name" msgid="1636276898262571213">"Αυτή η συσκευή"</string>
+ <!-- no translation found for profile_connect_timeout_subtext (2401801610868184557) -->
+ <skip />
</resources>
diff --git a/packages/SettingsLib/res/values-en-rAU/strings.xml b/packages/SettingsLib/res/values-en-rAU/strings.xml
index 581adf8..65b19ee 100644
--- a/packages/SettingsLib/res/values-en-rAU/strings.xml
+++ b/packages/SettingsLib/res/values-en-rAU/strings.xml
@@ -61,6 +61,8 @@
<string name="speed_label_medium" msgid="3175763313268941953">"Medium"</string>
<string name="speed_label_fast" msgid="7715732164050975057">"Fast"</string>
<string name="speed_label_very_fast" msgid="2265363430784523409">"Very fast"</string>
+ <!-- no translation found for wifi_passpoint_expired (1711402866023391443) -->
+ <skip />
<string name="preference_summary_default_combination" msgid="8532964268242666060">"<xliff:g id="STATE">%1$s</xliff:g>/<xliff:g id="DESCRIPTION">%2$s</xliff:g>"</string>
<string name="bluetooth_disconnected" msgid="6557104142667339895">"Disconnected"</string>
<string name="bluetooth_disconnecting" msgid="8913264760027764974">"Disconnecting…"</string>
@@ -466,4 +468,6 @@
<string name="zen_mode_forever" msgid="2704305038191592967">"Until you turn off"</string>
<string name="time_unit_just_now" msgid="6363336622778342422">"Just now"</string>
<string name="media_transfer_this_device_name" msgid="1636276898262571213">"This device"</string>
+ <!-- no translation found for profile_connect_timeout_subtext (2401801610868184557) -->
+ <skip />
</resources>
diff --git a/packages/SettingsLib/res/values-en-rCA/strings.xml b/packages/SettingsLib/res/values-en-rCA/strings.xml
index 581adf8..65b19ee 100644
--- a/packages/SettingsLib/res/values-en-rCA/strings.xml
+++ b/packages/SettingsLib/res/values-en-rCA/strings.xml
@@ -61,6 +61,8 @@
<string name="speed_label_medium" msgid="3175763313268941953">"Medium"</string>
<string name="speed_label_fast" msgid="7715732164050975057">"Fast"</string>
<string name="speed_label_very_fast" msgid="2265363430784523409">"Very fast"</string>
+ <!-- no translation found for wifi_passpoint_expired (1711402866023391443) -->
+ <skip />
<string name="preference_summary_default_combination" msgid="8532964268242666060">"<xliff:g id="STATE">%1$s</xliff:g>/<xliff:g id="DESCRIPTION">%2$s</xliff:g>"</string>
<string name="bluetooth_disconnected" msgid="6557104142667339895">"Disconnected"</string>
<string name="bluetooth_disconnecting" msgid="8913264760027764974">"Disconnecting…"</string>
@@ -466,4 +468,6 @@
<string name="zen_mode_forever" msgid="2704305038191592967">"Until you turn off"</string>
<string name="time_unit_just_now" msgid="6363336622778342422">"Just now"</string>
<string name="media_transfer_this_device_name" msgid="1636276898262571213">"This device"</string>
+ <!-- no translation found for profile_connect_timeout_subtext (2401801610868184557) -->
+ <skip />
</resources>
diff --git a/packages/SettingsLib/res/values-en-rGB/strings.xml b/packages/SettingsLib/res/values-en-rGB/strings.xml
index 581adf8..65b19ee 100644
--- a/packages/SettingsLib/res/values-en-rGB/strings.xml
+++ b/packages/SettingsLib/res/values-en-rGB/strings.xml
@@ -61,6 +61,8 @@
<string name="speed_label_medium" msgid="3175763313268941953">"Medium"</string>
<string name="speed_label_fast" msgid="7715732164050975057">"Fast"</string>
<string name="speed_label_very_fast" msgid="2265363430784523409">"Very fast"</string>
+ <!-- no translation found for wifi_passpoint_expired (1711402866023391443) -->
+ <skip />
<string name="preference_summary_default_combination" msgid="8532964268242666060">"<xliff:g id="STATE">%1$s</xliff:g>/<xliff:g id="DESCRIPTION">%2$s</xliff:g>"</string>
<string name="bluetooth_disconnected" msgid="6557104142667339895">"Disconnected"</string>
<string name="bluetooth_disconnecting" msgid="8913264760027764974">"Disconnecting…"</string>
@@ -466,4 +468,6 @@
<string name="zen_mode_forever" msgid="2704305038191592967">"Until you turn off"</string>
<string name="time_unit_just_now" msgid="6363336622778342422">"Just now"</string>
<string name="media_transfer_this_device_name" msgid="1636276898262571213">"This device"</string>
+ <!-- no translation found for profile_connect_timeout_subtext (2401801610868184557) -->
+ <skip />
</resources>
diff --git a/packages/SettingsLib/res/values-en-rIN/strings.xml b/packages/SettingsLib/res/values-en-rIN/strings.xml
index 581adf8..65b19ee 100644
--- a/packages/SettingsLib/res/values-en-rIN/strings.xml
+++ b/packages/SettingsLib/res/values-en-rIN/strings.xml
@@ -61,6 +61,8 @@
<string name="speed_label_medium" msgid="3175763313268941953">"Medium"</string>
<string name="speed_label_fast" msgid="7715732164050975057">"Fast"</string>
<string name="speed_label_very_fast" msgid="2265363430784523409">"Very fast"</string>
+ <!-- no translation found for wifi_passpoint_expired (1711402866023391443) -->
+ <skip />
<string name="preference_summary_default_combination" msgid="8532964268242666060">"<xliff:g id="STATE">%1$s</xliff:g>/<xliff:g id="DESCRIPTION">%2$s</xliff:g>"</string>
<string name="bluetooth_disconnected" msgid="6557104142667339895">"Disconnected"</string>
<string name="bluetooth_disconnecting" msgid="8913264760027764974">"Disconnecting…"</string>
@@ -466,4 +468,6 @@
<string name="zen_mode_forever" msgid="2704305038191592967">"Until you turn off"</string>
<string name="time_unit_just_now" msgid="6363336622778342422">"Just now"</string>
<string name="media_transfer_this_device_name" msgid="1636276898262571213">"This device"</string>
+ <!-- no translation found for profile_connect_timeout_subtext (2401801610868184557) -->
+ <skip />
</resources>
diff --git a/packages/SettingsLib/res/values-en-rXC/strings.xml b/packages/SettingsLib/res/values-en-rXC/strings.xml
index e75d7bc..3843085 100644
--- a/packages/SettingsLib/res/values-en-rXC/strings.xml
+++ b/packages/SettingsLib/res/values-en-rXC/strings.xml
@@ -61,6 +61,7 @@
<string name="speed_label_medium" msgid="3175763313268941953">"Medium"</string>
<string name="speed_label_fast" msgid="7715732164050975057">"Fast"</string>
<string name="speed_label_very_fast" msgid="2265363430784523409">"Very Fast"</string>
+ <string name="wifi_passpoint_expired" msgid="1711402866023391443">"Expired"</string>
<string name="preference_summary_default_combination" msgid="8532964268242666060">"<xliff:g id="STATE">%1$s</xliff:g> / <xliff:g id="DESCRIPTION">%2$s</xliff:g>"</string>
<string name="bluetooth_disconnected" msgid="6557104142667339895">"Disconnected"</string>
<string name="bluetooth_disconnecting" msgid="8913264760027764974">"Disconnecting…"</string>
@@ -466,4 +467,5 @@
<string name="zen_mode_forever" msgid="2704305038191592967">"Until you turn off"</string>
<string name="time_unit_just_now" msgid="6363336622778342422">"Just now"</string>
<string name="media_transfer_this_device_name" msgid="1636276898262571213">"This device"</string>
+ <string name="profile_connect_timeout_subtext" msgid="2401801610868184557">"Problem connecting. Turn device off & back on"</string>
</resources>
diff --git a/packages/SettingsLib/res/values-es-rUS/strings.xml b/packages/SettingsLib/res/values-es-rUS/strings.xml
index 97cce55..2e1a132 100644
--- a/packages/SettingsLib/res/values-es-rUS/strings.xml
+++ b/packages/SettingsLib/res/values-es-rUS/strings.xml
@@ -61,6 +61,8 @@
<string name="speed_label_medium" msgid="3175763313268941953">"Media"</string>
<string name="speed_label_fast" msgid="7715732164050975057">"Rápida"</string>
<string name="speed_label_very_fast" msgid="2265363430784523409">"Muy rápida"</string>
+ <!-- no translation found for wifi_passpoint_expired (1711402866023391443) -->
+ <skip />
<string name="preference_summary_default_combination" msgid="8532964268242666060">"<xliff:g id="STATE">%1$s</xliff:g>/<xliff:g id="DESCRIPTION">%2$s</xliff:g>"</string>
<string name="bluetooth_disconnected" msgid="6557104142667339895">"Desconectado"</string>
<string name="bluetooth_disconnecting" msgid="8913264760027764974">"Desconectando…"</string>
@@ -466,4 +468,6 @@
<string name="zen_mode_forever" msgid="2704305038191592967">"Hasta que lo desactives"</string>
<string name="time_unit_just_now" msgid="6363336622778342422">"Recién"</string>
<string name="media_transfer_this_device_name" msgid="1636276898262571213">"Este dispositivo"</string>
+ <!-- no translation found for profile_connect_timeout_subtext (2401801610868184557) -->
+ <skip />
</resources>
diff --git a/packages/SettingsLib/res/values-es/strings.xml b/packages/SettingsLib/res/values-es/strings.xml
index 7ba1a94..31ac2a1 100644
--- a/packages/SettingsLib/res/values-es/strings.xml
+++ b/packages/SettingsLib/res/values-es/strings.xml
@@ -61,6 +61,8 @@
<string name="speed_label_medium" msgid="3175763313268941953">"Media"</string>
<string name="speed_label_fast" msgid="7715732164050975057">"Rápida"</string>
<string name="speed_label_very_fast" msgid="2265363430784523409">"Muy rápida"</string>
+ <!-- no translation found for wifi_passpoint_expired (1711402866023391443) -->
+ <skip />
<string name="preference_summary_default_combination" msgid="8532964268242666060">"<xliff:g id="STATE">%1$s</xliff:g>/<xliff:g id="DESCRIPTION">%2$s</xliff:g>"</string>
<string name="bluetooth_disconnected" msgid="6557104142667339895">"Desconectado"</string>
<string name="bluetooth_disconnecting" msgid="8913264760027764974">"Desconectando…"</string>
@@ -466,4 +468,6 @@
<string name="zen_mode_forever" msgid="2704305038191592967">"Hasta que se desactive"</string>
<string name="time_unit_just_now" msgid="6363336622778342422">"Justo ahora"</string>
<string name="media_transfer_this_device_name" msgid="1636276898262571213">"Este dispositivo"</string>
+ <!-- no translation found for profile_connect_timeout_subtext (2401801610868184557) -->
+ <skip />
</resources>
diff --git a/packages/SettingsLib/res/values-et/strings.xml b/packages/SettingsLib/res/values-et/strings.xml
index 0e98752..983132a 100644
--- a/packages/SettingsLib/res/values-et/strings.xml
+++ b/packages/SettingsLib/res/values-et/strings.xml
@@ -61,6 +61,8 @@
<string name="speed_label_medium" msgid="3175763313268941953">"Keskmine"</string>
<string name="speed_label_fast" msgid="7715732164050975057">"Kiire"</string>
<string name="speed_label_very_fast" msgid="2265363430784523409">"Väga kiire"</string>
+ <!-- no translation found for wifi_passpoint_expired (1711402866023391443) -->
+ <skip />
<string name="preference_summary_default_combination" msgid="8532964268242666060">"<xliff:g id="STATE">%1$s</xliff:g> / <xliff:g id="DESCRIPTION">%2$s</xliff:g>"</string>
<string name="bluetooth_disconnected" msgid="6557104142667339895">"Ühendus katkestatud"</string>
<string name="bluetooth_disconnecting" msgid="8913264760027764974">"Ühenduse katkestamine ..."</string>
@@ -466,4 +468,6 @@
<string name="zen_mode_forever" msgid="2704305038191592967">"Kuni välja lülitate"</string>
<string name="time_unit_just_now" msgid="6363336622778342422">"Äsja"</string>
<string name="media_transfer_this_device_name" msgid="1636276898262571213">"See seade"</string>
+ <!-- no translation found for profile_connect_timeout_subtext (2401801610868184557) -->
+ <skip />
</resources>
diff --git a/packages/SettingsLib/res/values-eu/strings.xml b/packages/SettingsLib/res/values-eu/strings.xml
index 872e9a5..727c656 100644
--- a/packages/SettingsLib/res/values-eu/strings.xml
+++ b/packages/SettingsLib/res/values-eu/strings.xml
@@ -61,6 +61,8 @@
<string name="speed_label_medium" msgid="3175763313268941953">"Tartekoa"</string>
<string name="speed_label_fast" msgid="7715732164050975057">"Bizkorra"</string>
<string name="speed_label_very_fast" msgid="2265363430784523409">"Oso bizkorra"</string>
+ <!-- no translation found for wifi_passpoint_expired (1711402866023391443) -->
+ <skip />
<string name="preference_summary_default_combination" msgid="8532964268242666060">"<xliff:g id="STATE">%1$s</xliff:g> / <xliff:g id="DESCRIPTION">%2$s</xliff:g>"</string>
<string name="bluetooth_disconnected" msgid="6557104142667339895">"Deskonektatuta"</string>
<string name="bluetooth_disconnecting" msgid="8913264760027764974">"Deskonektatzen…"</string>
@@ -466,4 +468,6 @@
<string name="zen_mode_forever" msgid="2704305038191592967">"Zuk desaktibatu arte"</string>
<string name="time_unit_just_now" msgid="6363336622778342422">"Oraintxe"</string>
<string name="media_transfer_this_device_name" msgid="1636276898262571213">"Gailu hau"</string>
+ <!-- no translation found for profile_connect_timeout_subtext (2401801610868184557) -->
+ <skip />
</resources>
diff --git a/packages/SettingsLib/res/values-fa/strings.xml b/packages/SettingsLib/res/values-fa/strings.xml
index 6e281fe..f93af2a 100644
--- a/packages/SettingsLib/res/values-fa/strings.xml
+++ b/packages/SettingsLib/res/values-fa/strings.xml
@@ -61,6 +61,8 @@
<string name="speed_label_medium" msgid="3175763313268941953">"متوسط"</string>
<string name="speed_label_fast" msgid="7715732164050975057">"سریع"</string>
<string name="speed_label_very_fast" msgid="2265363430784523409">"خیلی سریع"</string>
+ <!-- no translation found for wifi_passpoint_expired (1711402866023391443) -->
+ <skip />
<string name="preference_summary_default_combination" msgid="8532964268242666060">"<xliff:g id="STATE">%1$s</xliff:g> / <xliff:g id="DESCRIPTION">%2$s</xliff:g>"</string>
<string name="bluetooth_disconnected" msgid="6557104142667339895">"اتصال قطع شد"</string>
<string name="bluetooth_disconnecting" msgid="8913264760027764974">"در حال قطع اتصال..."</string>
@@ -466,4 +468,6 @@
<string name="zen_mode_forever" msgid="2704305038191592967">"تا زمانیکه آن را خاموش کنید"</string>
<string name="time_unit_just_now" msgid="6363336622778342422">"هماکنون"</string>
<string name="media_transfer_this_device_name" msgid="1636276898262571213">"این دستگاه"</string>
+ <!-- no translation found for profile_connect_timeout_subtext (2401801610868184557) -->
+ <skip />
</resources>
diff --git a/packages/SettingsLib/res/values-fi/strings.xml b/packages/SettingsLib/res/values-fi/strings.xml
index 8c3630a..8550826 100644
--- a/packages/SettingsLib/res/values-fi/strings.xml
+++ b/packages/SettingsLib/res/values-fi/strings.xml
@@ -61,6 +61,8 @@
<string name="speed_label_medium" msgid="3175763313268941953">"Kohtuullinen"</string>
<string name="speed_label_fast" msgid="7715732164050975057">"Nopea"</string>
<string name="speed_label_very_fast" msgid="2265363430784523409">"Hyvin nopea"</string>
+ <!-- no translation found for wifi_passpoint_expired (1711402866023391443) -->
+ <skip />
<string name="preference_summary_default_combination" msgid="8532964268242666060">"<xliff:g id="STATE">%1$s</xliff:g> / <xliff:g id="DESCRIPTION">%2$s</xliff:g>"</string>
<string name="bluetooth_disconnected" msgid="6557104142667339895">"Yhteys katkaistu"</string>
<string name="bluetooth_disconnecting" msgid="8913264760027764974">"Katkaistaan yhteyttä..."</string>
@@ -466,4 +468,6 @@
<string name="zen_mode_forever" msgid="2704305038191592967">"Kunnes poistat sen käytöstä"</string>
<string name="time_unit_just_now" msgid="6363336622778342422">"Äsken"</string>
<string name="media_transfer_this_device_name" msgid="1636276898262571213">"Tämä laite"</string>
+ <!-- no translation found for profile_connect_timeout_subtext (2401801610868184557) -->
+ <skip />
</resources>
diff --git a/packages/SettingsLib/res/values-fr-rCA/strings.xml b/packages/SettingsLib/res/values-fr-rCA/strings.xml
index 6c5834a..5c84be7 100644
--- a/packages/SettingsLib/res/values-fr-rCA/strings.xml
+++ b/packages/SettingsLib/res/values-fr-rCA/strings.xml
@@ -61,6 +61,8 @@
<string name="speed_label_medium" msgid="3175763313268941953">"Moyenne"</string>
<string name="speed_label_fast" msgid="7715732164050975057">"Élevée"</string>
<string name="speed_label_very_fast" msgid="2265363430784523409">"Très rapide"</string>
+ <!-- no translation found for wifi_passpoint_expired (1711402866023391443) -->
+ <skip />
<string name="preference_summary_default_combination" msgid="8532964268242666060">"<xliff:g id="STATE">%1$s</xliff:g> : <xliff:g id="DESCRIPTION">%2$s</xliff:g>"</string>
<string name="bluetooth_disconnected" msgid="6557104142667339895">"Déconnecté"</string>
<string name="bluetooth_disconnecting" msgid="8913264760027764974">"Déconnexion…"</string>
@@ -466,4 +468,6 @@
<string name="zen_mode_forever" msgid="2704305038191592967">"Jusqu\'à la désactivation"</string>
<string name="time_unit_just_now" msgid="6363336622778342422">"À l\'instant"</string>
<string name="media_transfer_this_device_name" msgid="1636276898262571213">"Cet appareil"</string>
+ <!-- no translation found for profile_connect_timeout_subtext (2401801610868184557) -->
+ <skip />
</resources>
diff --git a/packages/SettingsLib/res/values-fr/strings.xml b/packages/SettingsLib/res/values-fr/strings.xml
index 508556e..a6711c7 100644
--- a/packages/SettingsLib/res/values-fr/strings.xml
+++ b/packages/SettingsLib/res/values-fr/strings.xml
@@ -61,6 +61,8 @@
<string name="speed_label_medium" msgid="3175763313268941953">"Moyenne"</string>
<string name="speed_label_fast" msgid="7715732164050975057">"Élevée"</string>
<string name="speed_label_very_fast" msgid="2265363430784523409">"Très élevée"</string>
+ <!-- no translation found for wifi_passpoint_expired (1711402866023391443) -->
+ <skip />
<string name="preference_summary_default_combination" msgid="8532964268242666060">"<xliff:g id="STATE">%1$s</xliff:g>/<xliff:g id="DESCRIPTION">%2$s</xliff:g>"</string>
<string name="bluetooth_disconnected" msgid="6557104142667339895">"Déconnecté"</string>
<string name="bluetooth_disconnecting" msgid="8913264760027764974">"Déconnexion…"</string>
@@ -466,4 +468,6 @@
<string name="zen_mode_forever" msgid="2704305038191592967">"Jusqu\'à la désactivation"</string>
<string name="time_unit_just_now" msgid="6363336622778342422">"À l\'instant"</string>
<string name="media_transfer_this_device_name" msgid="1636276898262571213">"Cet appareil"</string>
+ <!-- no translation found for profile_connect_timeout_subtext (2401801610868184557) -->
+ <skip />
</resources>
diff --git a/packages/SettingsLib/res/values-gl/strings.xml b/packages/SettingsLib/res/values-gl/strings.xml
index 1a3ae3d..c70c453 100644
--- a/packages/SettingsLib/res/values-gl/strings.xml
+++ b/packages/SettingsLib/res/values-gl/strings.xml
@@ -61,6 +61,8 @@
<string name="speed_label_medium" msgid="3175763313268941953">"Media"</string>
<string name="speed_label_fast" msgid="7715732164050975057">"Rápida"</string>
<string name="speed_label_very_fast" msgid="2265363430784523409">"Moi rápida"</string>
+ <!-- no translation found for wifi_passpoint_expired (1711402866023391443) -->
+ <skip />
<string name="preference_summary_default_combination" msgid="8532964268242666060">"<xliff:g id="STATE">%1$s</xliff:g>/<xliff:g id="DESCRIPTION">%2$s</xliff:g>"</string>
<string name="bluetooth_disconnected" msgid="6557104142667339895">"Desconectado"</string>
<string name="bluetooth_disconnecting" msgid="8913264760027764974">"Desconectando..."</string>
@@ -466,4 +468,6 @@
<string name="zen_mode_forever" msgid="2704305038191592967">"Ata a desactivación"</string>
<string name="time_unit_just_now" msgid="6363336622778342422">"Agora mesmo"</string>
<string name="media_transfer_this_device_name" msgid="1636276898262571213">"Este dispositivo"</string>
+ <!-- no translation found for profile_connect_timeout_subtext (2401801610868184557) -->
+ <skip />
</resources>
diff --git a/packages/SettingsLib/res/values-gu/strings.xml b/packages/SettingsLib/res/values-gu/strings.xml
index b3f5185..34a8355a 100644
--- a/packages/SettingsLib/res/values-gu/strings.xml
+++ b/packages/SettingsLib/res/values-gu/strings.xml
@@ -61,6 +61,8 @@
<string name="speed_label_medium" msgid="3175763313268941953">"મધ્યમ"</string>
<string name="speed_label_fast" msgid="7715732164050975057">"ઝડપી"</string>
<string name="speed_label_very_fast" msgid="2265363430784523409">"ખૂબ ઝડપી"</string>
+ <!-- no translation found for wifi_passpoint_expired (1711402866023391443) -->
+ <skip />
<string name="preference_summary_default_combination" msgid="8532964268242666060">"<xliff:g id="STATE">%1$s</xliff:g> / <xliff:g id="DESCRIPTION">%2$s</xliff:g>"</string>
<string name="bluetooth_disconnected" msgid="6557104142667339895">"ડિસ્કનેક્ટ કર્યું"</string>
<string name="bluetooth_disconnecting" msgid="8913264760027764974">"ડિસ્કનેક્ટ થઈ રહ્યું છે..."</string>
@@ -466,4 +468,6 @@
<string name="zen_mode_forever" msgid="2704305038191592967">"તમે બંધ ન કરો ત્યાં સુધી"</string>
<string name="time_unit_just_now" msgid="6363336622778342422">"હમણાં જ"</string>
<string name="media_transfer_this_device_name" msgid="1636276898262571213">"આ ડિવાઇસ"</string>
+ <!-- no translation found for profile_connect_timeout_subtext (2401801610868184557) -->
+ <skip />
</resources>
diff --git a/packages/SettingsLib/res/values-hi/strings.xml b/packages/SettingsLib/res/values-hi/strings.xml
index 454773c..758ce27 100644
--- a/packages/SettingsLib/res/values-hi/strings.xml
+++ b/packages/SettingsLib/res/values-hi/strings.xml
@@ -61,6 +61,8 @@
<string name="speed_label_medium" msgid="3175763313268941953">"मध्यम"</string>
<string name="speed_label_fast" msgid="7715732164050975057">"तेज़"</string>
<string name="speed_label_very_fast" msgid="2265363430784523409">"अत्यधिक तेज़"</string>
+ <!-- no translation found for wifi_passpoint_expired (1711402866023391443) -->
+ <skip />
<string name="preference_summary_default_combination" msgid="8532964268242666060">"<xliff:g id="STATE">%1$s</xliff:g> / <xliff:g id="DESCRIPTION">%2$s</xliff:g>"</string>
<string name="bluetooth_disconnected" msgid="6557104142667339895">"डिसकनेक्ट किया गया"</string>
<string name="bluetooth_disconnecting" msgid="8913264760027764974">"डिस्कनेक्ट हो रहा है..."</string>
@@ -466,4 +468,6 @@
<string name="zen_mode_forever" msgid="2704305038191592967">"जब तक आप इसे बंद नहीं करते"</string>
<string name="time_unit_just_now" msgid="6363336622778342422">"अभी-अभी"</string>
<string name="media_transfer_this_device_name" msgid="1636276898262571213">"यह डिवाइस"</string>
+ <!-- no translation found for profile_connect_timeout_subtext (2401801610868184557) -->
+ <skip />
</resources>
diff --git a/packages/SettingsLib/res/values-hr/strings.xml b/packages/SettingsLib/res/values-hr/strings.xml
index 0ec154b..2f89a66 100644
--- a/packages/SettingsLib/res/values-hr/strings.xml
+++ b/packages/SettingsLib/res/values-hr/strings.xml
@@ -61,6 +61,8 @@
<string name="speed_label_medium" msgid="3175763313268941953">"Srednje"</string>
<string name="speed_label_fast" msgid="7715732164050975057">"Brzo"</string>
<string name="speed_label_very_fast" msgid="2265363430784523409">"Vrlo brzo"</string>
+ <!-- no translation found for wifi_passpoint_expired (1711402866023391443) -->
+ <skip />
<string name="preference_summary_default_combination" msgid="8532964268242666060">"<xliff:g id="STATE">%1$s</xliff:g>/<xliff:g id="DESCRIPTION">%2$s</xliff:g>"</string>
<string name="bluetooth_disconnected" msgid="6557104142667339895">"Niste povezani"</string>
<string name="bluetooth_disconnecting" msgid="8913264760027764974">"Isključivanje…"</string>
@@ -467,4 +469,6 @@
<string name="zen_mode_forever" msgid="2704305038191592967">"Dok ne isključite"</string>
<string name="time_unit_just_now" msgid="6363336622778342422">"Upravo sad"</string>
<string name="media_transfer_this_device_name" msgid="1636276898262571213">"Ovaj uređaj"</string>
+ <!-- no translation found for profile_connect_timeout_subtext (2401801610868184557) -->
+ <skip />
</resources>
diff --git a/packages/SettingsLib/res/values-hu/strings.xml b/packages/SettingsLib/res/values-hu/strings.xml
index 4a0af7d..8f6e776 100644
--- a/packages/SettingsLib/res/values-hu/strings.xml
+++ b/packages/SettingsLib/res/values-hu/strings.xml
@@ -61,6 +61,8 @@
<string name="speed_label_medium" msgid="3175763313268941953">"Közepes"</string>
<string name="speed_label_fast" msgid="7715732164050975057">"Gyors"</string>
<string name="speed_label_very_fast" msgid="2265363430784523409">"Nagyon gyors"</string>
+ <!-- no translation found for wifi_passpoint_expired (1711402866023391443) -->
+ <skip />
<string name="preference_summary_default_combination" msgid="8532964268242666060">"<xliff:g id="STATE">%1$s</xliff:g> / <xliff:g id="DESCRIPTION">%2$s</xliff:g>"</string>
<string name="bluetooth_disconnected" msgid="6557104142667339895">"Szétkapcsolva"</string>
<string name="bluetooth_disconnecting" msgid="8913264760027764974">"Szétkapcsolás..."</string>
@@ -466,4 +468,6 @@
<string name="zen_mode_forever" msgid="2704305038191592967">"Kikapcsolásig"</string>
<string name="time_unit_just_now" msgid="6363336622778342422">"Az imént"</string>
<string name="media_transfer_this_device_name" msgid="1636276898262571213">"Ez az eszköz"</string>
+ <!-- no translation found for profile_connect_timeout_subtext (2401801610868184557) -->
+ <skip />
</resources>
diff --git a/packages/SettingsLib/res/values-hy/strings.xml b/packages/SettingsLib/res/values-hy/strings.xml
index cc0ecb81..3791b94 100644
--- a/packages/SettingsLib/res/values-hy/strings.xml
+++ b/packages/SettingsLib/res/values-hy/strings.xml
@@ -61,6 +61,8 @@
<string name="speed_label_medium" msgid="3175763313268941953">"Միջին"</string>
<string name="speed_label_fast" msgid="7715732164050975057">"Արագ"</string>
<string name="speed_label_very_fast" msgid="2265363430784523409">"Շատ արագ"</string>
+ <!-- no translation found for wifi_passpoint_expired (1711402866023391443) -->
+ <skip />
<string name="preference_summary_default_combination" msgid="8532964268242666060">"<xliff:g id="STATE">%1$s</xliff:g> / <xliff:g id="DESCRIPTION">%2$s</xliff:g>"</string>
<string name="bluetooth_disconnected" msgid="6557104142667339895">"Անջատված է"</string>
<string name="bluetooth_disconnecting" msgid="8913264760027764974">"Անջատվում է..."</string>
@@ -466,4 +468,6 @@
<string name="zen_mode_forever" msgid="2704305038191592967">"Մինչև չանջատեք"</string>
<string name="time_unit_just_now" msgid="6363336622778342422">"Հենց նոր"</string>
<string name="media_transfer_this_device_name" msgid="1636276898262571213">"Այս սարքը"</string>
+ <!-- no translation found for profile_connect_timeout_subtext (2401801610868184557) -->
+ <skip />
</resources>
diff --git a/packages/SettingsLib/res/values-in/strings.xml b/packages/SettingsLib/res/values-in/strings.xml
index 0733c1f..1a82484 100644
--- a/packages/SettingsLib/res/values-in/strings.xml
+++ b/packages/SettingsLib/res/values-in/strings.xml
@@ -61,6 +61,8 @@
<string name="speed_label_medium" msgid="3175763313268941953">"Sedang"</string>
<string name="speed_label_fast" msgid="7715732164050975057">"Cepat"</string>
<string name="speed_label_very_fast" msgid="2265363430784523409">"Sangat Cepat"</string>
+ <!-- no translation found for wifi_passpoint_expired (1711402866023391443) -->
+ <skip />
<string name="preference_summary_default_combination" msgid="8532964268242666060">"<xliff:g id="STATE">%1$s</xliff:g>/<xliff:g id="DESCRIPTION">%2$s</xliff:g>"</string>
<string name="bluetooth_disconnected" msgid="6557104142667339895">"Sambungan terputus"</string>
<string name="bluetooth_disconnecting" msgid="8913264760027764974">"Memutus sambungan..."</string>
@@ -466,4 +468,6 @@
<string name="zen_mode_forever" msgid="2704305038191592967">"Sampai Anda menonaktifkannya"</string>
<string name="time_unit_just_now" msgid="6363336622778342422">"Baru saja"</string>
<string name="media_transfer_this_device_name" msgid="1636276898262571213">"Perangkat ini"</string>
+ <!-- no translation found for profile_connect_timeout_subtext (2401801610868184557) -->
+ <skip />
</resources>
diff --git a/packages/SettingsLib/res/values-is/strings.xml b/packages/SettingsLib/res/values-is/strings.xml
index 28ed8fc..c75e12b 100644
--- a/packages/SettingsLib/res/values-is/strings.xml
+++ b/packages/SettingsLib/res/values-is/strings.xml
@@ -61,6 +61,8 @@
<string name="speed_label_medium" msgid="3175763313268941953">"Miðlungshratt"</string>
<string name="speed_label_fast" msgid="7715732164050975057">"Hratt"</string>
<string name="speed_label_very_fast" msgid="2265363430784523409">"Mjög hratt"</string>
+ <!-- no translation found for wifi_passpoint_expired (1711402866023391443) -->
+ <skip />
<string name="preference_summary_default_combination" msgid="8532964268242666060">"<xliff:g id="STATE">%1$s</xliff:g> / <xliff:g id="DESCRIPTION">%2$s</xliff:g>"</string>
<string name="bluetooth_disconnected" msgid="6557104142667339895">"Aftengt"</string>
<string name="bluetooth_disconnecting" msgid="8913264760027764974">"Aftengist…"</string>
@@ -466,4 +468,6 @@
<string name="zen_mode_forever" msgid="2704305038191592967">"Þar til þú slekkur"</string>
<string name="time_unit_just_now" msgid="6363336622778342422">"Rétt í þessu"</string>
<string name="media_transfer_this_device_name" msgid="1636276898262571213">"Þetta tæki"</string>
+ <!-- no translation found for profile_connect_timeout_subtext (2401801610868184557) -->
+ <skip />
</resources>
diff --git a/packages/SettingsLib/res/values-it/strings.xml b/packages/SettingsLib/res/values-it/strings.xml
index b0569b0..b00d06d 100644
--- a/packages/SettingsLib/res/values-it/strings.xml
+++ b/packages/SettingsLib/res/values-it/strings.xml
@@ -61,6 +61,8 @@
<string name="speed_label_medium" msgid="3175763313268941953">"Media"</string>
<string name="speed_label_fast" msgid="7715732164050975057">"Veloce"</string>
<string name="speed_label_very_fast" msgid="2265363430784523409">"Molto veloce"</string>
+ <!-- no translation found for wifi_passpoint_expired (1711402866023391443) -->
+ <skip />
<string name="preference_summary_default_combination" msgid="8532964268242666060">"<xliff:g id="STATE">%1$s</xliff:g>/<xliff:g id="DESCRIPTION">%2$s</xliff:g>"</string>
<string name="bluetooth_disconnected" msgid="6557104142667339895">"Disconnesso"</string>
<string name="bluetooth_disconnecting" msgid="8913264760027764974">"Disconnessione..."</string>
@@ -466,4 +468,6 @@
<string name="zen_mode_forever" msgid="2704305038191592967">"Fino alla disattivazione"</string>
<string name="time_unit_just_now" msgid="6363336622778342422">"Adesso"</string>
<string name="media_transfer_this_device_name" msgid="1636276898262571213">"Questo dispositivo"</string>
+ <!-- no translation found for profile_connect_timeout_subtext (2401801610868184557) -->
+ <skip />
</resources>
diff --git a/packages/SettingsLib/res/values-iw/strings.xml b/packages/SettingsLib/res/values-iw/strings.xml
index f7d4fcd..8aeb9af 100644
--- a/packages/SettingsLib/res/values-iw/strings.xml
+++ b/packages/SettingsLib/res/values-iw/strings.xml
@@ -43,8 +43,7 @@
<string name="available_via_passpoint" msgid="1617440946846329613">"זמינה דרך %1$s"</string>
<string name="tap_to_sign_up" msgid="6449724763052579434">"יש להקיש כדי להירשם"</string>
<string name="wifi_connected_no_internet" msgid="8202906332837777829">"מחובר. אין אינטרנט"</string>
- <!-- no translation found for private_dns_broken (7356676011023412490) -->
- <skip />
+ <string name="private_dns_broken" msgid="7356676011023412490">"לא ניתן לגשת לשרת DNS הפרטי"</string>
<string name="wifi_limited_connection" msgid="7717855024753201527">"חיבור מוגבל"</string>
<string name="wifi_status_no_internet" msgid="5784710974669608361">"אין אינטרנט"</string>
<string name="wifi_status_sign_in_required" msgid="123517180404752756">"נדרשת כניסה"</string>
@@ -62,6 +61,8 @@
<string name="speed_label_medium" msgid="3175763313268941953">"בינונית"</string>
<string name="speed_label_fast" msgid="7715732164050975057">"מהירה"</string>
<string name="speed_label_very_fast" msgid="2265363430784523409">"מהירה מאוד"</string>
+ <!-- no translation found for wifi_passpoint_expired (1711402866023391443) -->
+ <skip />
<string name="preference_summary_default_combination" msgid="8532964268242666060">"<xliff:g id="STATE">%1$s</xliff:g> / <xliff:g id="DESCRIPTION">%2$s</xliff:g>"</string>
<string name="bluetooth_disconnected" msgid="6557104142667339895">"מנותק"</string>
<string name="bluetooth_disconnecting" msgid="8913264760027764974">"מתנתק..."</string>
@@ -469,4 +470,6 @@
<string name="zen_mode_forever" msgid="2704305038191592967">"עד הכיבוי"</string>
<string name="time_unit_just_now" msgid="6363336622778342422">"הרגע"</string>
<string name="media_transfer_this_device_name" msgid="1636276898262571213">"המכשיר הזה"</string>
+ <!-- no translation found for profile_connect_timeout_subtext (2401801610868184557) -->
+ <skip />
</resources>
diff --git a/packages/SettingsLib/res/values-ja/strings.xml b/packages/SettingsLib/res/values-ja/strings.xml
index 4d5c86c..bd17074 100644
--- a/packages/SettingsLib/res/values-ja/strings.xml
+++ b/packages/SettingsLib/res/values-ja/strings.xml
@@ -61,6 +61,8 @@
<string name="speed_label_medium" msgid="3175763313268941953">"普通"</string>
<string name="speed_label_fast" msgid="7715732164050975057">"速い"</string>
<string name="speed_label_very_fast" msgid="2265363430784523409">"非常に速い"</string>
+ <!-- no translation found for wifi_passpoint_expired (1711402866023391443) -->
+ <skip />
<string name="preference_summary_default_combination" msgid="8532964268242666060">"<xliff:g id="STATE">%1$s</xliff:g> / <xliff:g id="DESCRIPTION">%2$s</xliff:g>"</string>
<string name="bluetooth_disconnected" msgid="6557104142667339895">"切断"</string>
<string name="bluetooth_disconnecting" msgid="8913264760027764974">"切断中..."</string>
@@ -466,4 +468,6 @@
<string name="zen_mode_forever" msgid="2704305038191592967">"OFF にするまで"</string>
<string name="time_unit_just_now" msgid="6363336622778342422">"たった今"</string>
<string name="media_transfer_this_device_name" msgid="1636276898262571213">"このデバイス"</string>
+ <!-- no translation found for profile_connect_timeout_subtext (2401801610868184557) -->
+ <skip />
</resources>
diff --git a/packages/SettingsLib/res/values-ka/strings.xml b/packages/SettingsLib/res/values-ka/strings.xml
index 20342bc..b1fa87f 100644
--- a/packages/SettingsLib/res/values-ka/strings.xml
+++ b/packages/SettingsLib/res/values-ka/strings.xml
@@ -61,6 +61,8 @@
<string name="speed_label_medium" msgid="3175763313268941953">"საშუალო"</string>
<string name="speed_label_fast" msgid="7715732164050975057">"სწრაფი"</string>
<string name="speed_label_very_fast" msgid="2265363430784523409">"ძალიან სწრაფი"</string>
+ <!-- no translation found for wifi_passpoint_expired (1711402866023391443) -->
+ <skip />
<string name="preference_summary_default_combination" msgid="8532964268242666060">"<xliff:g id="STATE">%1$s</xliff:g> / <xliff:g id="DESCRIPTION">%2$s</xliff:g>"</string>
<string name="bluetooth_disconnected" msgid="6557104142667339895">"კავშირი გაწყვეტილია"</string>
<string name="bluetooth_disconnecting" msgid="8913264760027764974">"მიმდინარეობს გათიშვა…"</string>
@@ -466,4 +468,6 @@
<string name="zen_mode_forever" msgid="2704305038191592967">"გამორთვამდე"</string>
<string name="time_unit_just_now" msgid="6363336622778342422">"ახლახან"</string>
<string name="media_transfer_this_device_name" msgid="1636276898262571213">"ეს მოწყობილობა"</string>
+ <!-- no translation found for profile_connect_timeout_subtext (2401801610868184557) -->
+ <skip />
</resources>
diff --git a/packages/SettingsLib/res/values-kk/strings.xml b/packages/SettingsLib/res/values-kk/strings.xml
index 7b6d29e..e4dc6ef 100644
--- a/packages/SettingsLib/res/values-kk/strings.xml
+++ b/packages/SettingsLib/res/values-kk/strings.xml
@@ -61,6 +61,8 @@
<string name="speed_label_medium" msgid="3175763313268941953">"Орташа"</string>
<string name="speed_label_fast" msgid="7715732164050975057">"Жылдам"</string>
<string name="speed_label_very_fast" msgid="2265363430784523409">"Өте жылдам"</string>
+ <!-- no translation found for wifi_passpoint_expired (1711402866023391443) -->
+ <skip />
<string name="preference_summary_default_combination" msgid="8532964268242666060">"<xliff:g id="STATE">%1$s</xliff:g> / <xliff:g id="DESCRIPTION">%2$s</xliff:g>"</string>
<string name="bluetooth_disconnected" msgid="6557104142667339895">"Ажыратылған"</string>
<string name="bluetooth_disconnecting" msgid="8913264760027764974">"Ажыратылуда…"</string>
@@ -466,4 +468,6 @@
<string name="zen_mode_forever" msgid="2704305038191592967">"Өшірілгенге дейін"</string>
<string name="time_unit_just_now" msgid="6363336622778342422">"Дәл қазір"</string>
<string name="media_transfer_this_device_name" msgid="1636276898262571213">"Осы құрылғы"</string>
+ <!-- no translation found for profile_connect_timeout_subtext (2401801610868184557) -->
+ <skip />
</resources>
diff --git a/packages/SettingsLib/res/values-km/strings.xml b/packages/SettingsLib/res/values-km/strings.xml
index 115be8e..5ca7fe7 100644
--- a/packages/SettingsLib/res/values-km/strings.xml
+++ b/packages/SettingsLib/res/values-km/strings.xml
@@ -61,6 +61,8 @@
<string name="speed_label_medium" msgid="3175763313268941953">"មធ្យម"</string>
<string name="speed_label_fast" msgid="7715732164050975057">"លឿន"</string>
<string name="speed_label_very_fast" msgid="2265363430784523409">"លឿនណាស់"</string>
+ <!-- no translation found for wifi_passpoint_expired (1711402866023391443) -->
+ <skip />
<string name="preference_summary_default_combination" msgid="8532964268242666060">"<xliff:g id="STATE">%1$s</xliff:g> / <xliff:g id="DESCRIPTION">%2$s</xliff:g>"</string>
<string name="bluetooth_disconnected" msgid="6557104142667339895">"បានផ្ដាច់"</string>
<string name="bluetooth_disconnecting" msgid="8913264760027764974">"កំពុងផ្ដាច់…"</string>
@@ -466,4 +468,6 @@
<string name="zen_mode_forever" msgid="2704305038191592967">"រហូតទាល់តែអ្នកបិទ"</string>
<string name="time_unit_just_now" msgid="6363336622778342422">"អម្បាញ់មិញ"</string>
<string name="media_transfer_this_device_name" msgid="1636276898262571213">"ឧបករណ៍នេះ"</string>
+ <!-- no translation found for profile_connect_timeout_subtext (2401801610868184557) -->
+ <skip />
</resources>
diff --git a/packages/SettingsLib/res/values-kn/strings.xml b/packages/SettingsLib/res/values-kn/strings.xml
index ac8bfb1..cbdb62c 100644
--- a/packages/SettingsLib/res/values-kn/strings.xml
+++ b/packages/SettingsLib/res/values-kn/strings.xml
@@ -43,8 +43,7 @@
<string name="available_via_passpoint" msgid="1617440946846329613">"%1$s ಮೂಲಕ ಲಭ್ಯವಿದೆ"</string>
<string name="tap_to_sign_up" msgid="6449724763052579434">"ಸೈನ್ ಅಪ್ ಮಾಡಲು ಟ್ಯಾಪ್ ಮಾಡಿ"</string>
<string name="wifi_connected_no_internet" msgid="8202906332837777829">"ಸಂಪರ್ಕಪಡಿಸಲಾಗಿದೆ, ಇಂಟರ್ನೆಟ್ ಇಲ್ಲ"</string>
- <!-- no translation found for private_dns_broken (7356676011023412490) -->
- <skip />
+ <string name="private_dns_broken" msgid="7356676011023412490">"ಖಾಸಗಿ DNS ಸರ್ವರ್ ಅನ್ನು ಪ್ರವೇಶಿಸಲು ಸಾಧ್ಯವಿಲ್ಲ"</string>
<string name="wifi_limited_connection" msgid="7717855024753201527">"ಸೀಮಿತ ಸಂಪರ್ಕ"</string>
<string name="wifi_status_no_internet" msgid="5784710974669608361">"ಇಂಟರ್ನೆಟ್ ಇಲ್ಲ"</string>
<string name="wifi_status_sign_in_required" msgid="123517180404752756">"ಸೈನ್ ಇನ್ ಮಾಡುವ ಅಗತ್ಯವಿದೆ"</string>
@@ -62,6 +61,8 @@
<string name="speed_label_medium" msgid="3175763313268941953">"ಮಧ್ಯಮ"</string>
<string name="speed_label_fast" msgid="7715732164050975057">"ವೇಗ"</string>
<string name="speed_label_very_fast" msgid="2265363430784523409">"ತುಂಬಾ ವೇಗವಾಗಿದೆ"</string>
+ <!-- no translation found for wifi_passpoint_expired (1711402866023391443) -->
+ <skip />
<string name="preference_summary_default_combination" msgid="8532964268242666060">"<xliff:g id="STATE">%1$s</xliff:g> / <xliff:g id="DESCRIPTION">%2$s</xliff:g>"</string>
<string name="bluetooth_disconnected" msgid="6557104142667339895">"ಸಂಪರ್ಕ ಕಡಿತಗೊಳಿಸಲಾಗಿದೆ"</string>
<string name="bluetooth_disconnecting" msgid="8913264760027764974">"ಸಂಪರ್ಕ ಕಡಿತಗೊಳಿಸಲಾಗುತ್ತಿದೆ..."</string>
@@ -467,4 +468,6 @@
<string name="zen_mode_forever" msgid="2704305038191592967">"ನೀವು ಆಫ್ ಮಾಡುವವರೆಗೆ"</string>
<string name="time_unit_just_now" msgid="6363336622778342422">"ಇದೀಗ"</string>
<string name="media_transfer_this_device_name" msgid="1636276898262571213">"ಈ ಸಾಧನ"</string>
+ <!-- no translation found for profile_connect_timeout_subtext (2401801610868184557) -->
+ <skip />
</resources>
diff --git a/packages/SettingsLib/res/values-ko/strings.xml b/packages/SettingsLib/res/values-ko/strings.xml
index 4e54310..9d4a947 100644
--- a/packages/SettingsLib/res/values-ko/strings.xml
+++ b/packages/SettingsLib/res/values-ko/strings.xml
@@ -61,6 +61,8 @@
<string name="speed_label_medium" msgid="3175763313268941953">"보통"</string>
<string name="speed_label_fast" msgid="7715732164050975057">"빠름"</string>
<string name="speed_label_very_fast" msgid="2265363430784523409">"매우 빠름"</string>
+ <!-- no translation found for wifi_passpoint_expired (1711402866023391443) -->
+ <skip />
<string name="preference_summary_default_combination" msgid="8532964268242666060">"<xliff:g id="STATE">%1$s</xliff:g>/<xliff:g id="DESCRIPTION">%2$s</xliff:g>"</string>
<string name="bluetooth_disconnected" msgid="6557104142667339895">"연결 끊김"</string>
<string name="bluetooth_disconnecting" msgid="8913264760027764974">"연결을 끊는 중…"</string>
@@ -466,4 +468,6 @@
<string name="zen_mode_forever" msgid="2704305038191592967">"사용 중지할 때까지"</string>
<string name="time_unit_just_now" msgid="6363336622778342422">"조금 전"</string>
<string name="media_transfer_this_device_name" msgid="1636276898262571213">"이 기기"</string>
+ <!-- no translation found for profile_connect_timeout_subtext (2401801610868184557) -->
+ <skip />
</resources>
diff --git a/packages/SettingsLib/res/values-ky/strings.xml b/packages/SettingsLib/res/values-ky/strings.xml
index e891b5a..46e002f 100644
--- a/packages/SettingsLib/res/values-ky/strings.xml
+++ b/packages/SettingsLib/res/values-ky/strings.xml
@@ -61,6 +61,8 @@
<string name="speed_label_medium" msgid="3175763313268941953">"Орто"</string>
<string name="speed_label_fast" msgid="7715732164050975057">"Ылдам"</string>
<string name="speed_label_very_fast" msgid="2265363430784523409">"Абдан ылдам"</string>
+ <!-- no translation found for wifi_passpoint_expired (1711402866023391443) -->
+ <skip />
<string name="preference_summary_default_combination" msgid="8532964268242666060">"<xliff:g id="STATE">%1$s</xliff:g>/<xliff:g id="DESCRIPTION">%2$s</xliff:g>"</string>
<string name="bluetooth_disconnected" msgid="6557104142667339895">"Ажыратылган"</string>
<string name="bluetooth_disconnecting" msgid="8913264760027764974">"Ажыратылууда…"</string>
@@ -466,4 +468,6 @@
<string name="zen_mode_forever" msgid="2704305038191592967">"Бул функция өчүрүлгөнгө чейин"</string>
<string name="time_unit_just_now" msgid="6363336622778342422">"Азыр эле"</string>
<string name="media_transfer_this_device_name" msgid="1636276898262571213">"Ушул түзмөк"</string>
+ <!-- no translation found for profile_connect_timeout_subtext (2401801610868184557) -->
+ <skip />
</resources>
diff --git a/packages/SettingsLib/res/values-lo/strings.xml b/packages/SettingsLib/res/values-lo/strings.xml
index 406a42b..981685e 100644
--- a/packages/SettingsLib/res/values-lo/strings.xml
+++ b/packages/SettingsLib/res/values-lo/strings.xml
@@ -61,6 +61,8 @@
<string name="speed_label_medium" msgid="3175763313268941953">"ປານກາງ"</string>
<string name="speed_label_fast" msgid="7715732164050975057">"ໄວ"</string>
<string name="speed_label_very_fast" msgid="2265363430784523409">"ໄວຫຼາຍ"</string>
+ <!-- no translation found for wifi_passpoint_expired (1711402866023391443) -->
+ <skip />
<string name="preference_summary_default_combination" msgid="8532964268242666060">"<xliff:g id="STATE">%1$s</xliff:g> / <xliff:g id="DESCRIPTION">%2$s</xliff:g>"</string>
<string name="bluetooth_disconnected" msgid="6557104142667339895">"ຕັດການເຊື່ອມຕໍ່ແລ້ວ"</string>
<string name="bluetooth_disconnecting" msgid="8913264760027764974">"ກຳລັງຢຸດການເຊື່ອມຕໍ່..."</string>
@@ -466,4 +468,6 @@
<string name="zen_mode_forever" msgid="2704305038191592967">"ຈົນກວ່າທ່ານຈະປິດ"</string>
<string name="time_unit_just_now" msgid="6363336622778342422">"ຕອນນີ້"</string>
<string name="media_transfer_this_device_name" msgid="1636276898262571213">"ອຸປະກອນນີ້"</string>
+ <!-- no translation found for profile_connect_timeout_subtext (2401801610868184557) -->
+ <skip />
</resources>
diff --git a/packages/SettingsLib/res/values-lt/strings.xml b/packages/SettingsLib/res/values-lt/strings.xml
index b305fd90..6d23090 100644
--- a/packages/SettingsLib/res/values-lt/strings.xml
+++ b/packages/SettingsLib/res/values-lt/strings.xml
@@ -61,6 +61,8 @@
<string name="speed_label_medium" msgid="3175763313268941953">"Vidutinis"</string>
<string name="speed_label_fast" msgid="7715732164050975057">"Greitas"</string>
<string name="speed_label_very_fast" msgid="2265363430784523409">"Labai greitas"</string>
+ <!-- no translation found for wifi_passpoint_expired (1711402866023391443) -->
+ <skip />
<string name="preference_summary_default_combination" msgid="8532964268242666060">"<xliff:g id="STATE">%1$s</xliff:g> / <xliff:g id="DESCRIPTION">%2$s</xliff:g>"</string>
<string name="bluetooth_disconnected" msgid="6557104142667339895">"Atsijungęs (-usi)"</string>
<string name="bluetooth_disconnecting" msgid="8913264760027764974">"Atjungiama..."</string>
@@ -468,4 +470,6 @@
<string name="zen_mode_forever" msgid="2704305038191592967">"Kol išjungsite"</string>
<string name="time_unit_just_now" msgid="6363336622778342422">"Ką tik"</string>
<string name="media_transfer_this_device_name" msgid="1636276898262571213">"Šis įrenginys"</string>
+ <!-- no translation found for profile_connect_timeout_subtext (2401801610868184557) -->
+ <skip />
</resources>
diff --git a/packages/SettingsLib/res/values-lv/strings.xml b/packages/SettingsLib/res/values-lv/strings.xml
index c9e2c11..76304e0 100644
--- a/packages/SettingsLib/res/values-lv/strings.xml
+++ b/packages/SettingsLib/res/values-lv/strings.xml
@@ -61,6 +61,8 @@
<string name="speed_label_medium" msgid="3175763313268941953">"Vidējs"</string>
<string name="speed_label_fast" msgid="7715732164050975057">"Ātrs"</string>
<string name="speed_label_very_fast" msgid="2265363430784523409">"Ļoti ātrs"</string>
+ <!-- no translation found for wifi_passpoint_expired (1711402866023391443) -->
+ <skip />
<string name="preference_summary_default_combination" msgid="8532964268242666060">"<xliff:g id="STATE">%1$s</xliff:g> / <xliff:g id="DESCRIPTION">%2$s</xliff:g>"</string>
<string name="bluetooth_disconnected" msgid="6557104142667339895">"Atvienots"</string>
<string name="bluetooth_disconnecting" msgid="8913264760027764974">"Notiek atvienošana..."</string>
@@ -467,4 +469,6 @@
<string name="zen_mode_forever" msgid="2704305038191592967">"Līdz brīdim, kad izslēgsiet"</string>
<string name="time_unit_just_now" msgid="6363336622778342422">"Tikko"</string>
<string name="media_transfer_this_device_name" msgid="1636276898262571213">"Šī ierīce"</string>
+ <!-- no translation found for profile_connect_timeout_subtext (2401801610868184557) -->
+ <skip />
</resources>
diff --git a/packages/SettingsLib/res/values-mk/strings.xml b/packages/SettingsLib/res/values-mk/strings.xml
index e06d414..d0a284a 100644
--- a/packages/SettingsLib/res/values-mk/strings.xml
+++ b/packages/SettingsLib/res/values-mk/strings.xml
@@ -61,6 +61,8 @@
<string name="speed_label_medium" msgid="3175763313268941953">"Средна"</string>
<string name="speed_label_fast" msgid="7715732164050975057">"Брза"</string>
<string name="speed_label_very_fast" msgid="2265363430784523409">"Многу брза"</string>
+ <!-- no translation found for wifi_passpoint_expired (1711402866023391443) -->
+ <skip />
<string name="preference_summary_default_combination" msgid="8532964268242666060">"<xliff:g id="STATE">%1$s</xliff:g>/<xliff:g id="DESCRIPTION">%2$s</xliff:g>"</string>
<string name="bluetooth_disconnected" msgid="6557104142667339895">"Исклучено"</string>
<string name="bluetooth_disconnecting" msgid="8913264760027764974">"Се исклучува..."</string>
@@ -466,4 +468,6 @@
<string name="zen_mode_forever" msgid="2704305038191592967">"Додека не го исклучите"</string>
<string name="time_unit_just_now" msgid="6363336622778342422">"Неодамнешни"</string>
<string name="media_transfer_this_device_name" msgid="1636276898262571213">"Овој уред"</string>
+ <!-- no translation found for profile_connect_timeout_subtext (2401801610868184557) -->
+ <skip />
</resources>
diff --git a/packages/SettingsLib/res/values-ml/strings.xml b/packages/SettingsLib/res/values-ml/strings.xml
index 36e632a..b5649aa 100644
--- a/packages/SettingsLib/res/values-ml/strings.xml
+++ b/packages/SettingsLib/res/values-ml/strings.xml
@@ -61,6 +61,8 @@
<string name="speed_label_medium" msgid="3175763313268941953">"ഇടത്തരം"</string>
<string name="speed_label_fast" msgid="7715732164050975057">"വേഗത്തിൽ"</string>
<string name="speed_label_very_fast" msgid="2265363430784523409">"വളരെ വേഗത്തിൽ"</string>
+ <!-- no translation found for wifi_passpoint_expired (1711402866023391443) -->
+ <skip />
<string name="preference_summary_default_combination" msgid="8532964268242666060">"<xliff:g id="STATE">%1$s</xliff:g> / <xliff:g id="DESCRIPTION">%2$s</xliff:g>"</string>
<string name="bluetooth_disconnected" msgid="6557104142667339895">"വിച്ഛേദിച്ചു"</string>
<string name="bluetooth_disconnecting" msgid="8913264760027764974">"വിച്ഛേദിക്കുന്നു..."</string>
@@ -466,4 +468,6 @@
<string name="zen_mode_forever" msgid="2704305038191592967">"നിങ്ങൾ ഓഫാക്കുന്നത് വരെ"</string>
<string name="time_unit_just_now" msgid="6363336622778342422">"ഇപ്പോൾ"</string>
<string name="media_transfer_this_device_name" msgid="1636276898262571213">"ഈ ഉപകരണം"</string>
+ <!-- no translation found for profile_connect_timeout_subtext (2401801610868184557) -->
+ <skip />
</resources>
diff --git a/packages/SettingsLib/res/values-mn/strings.xml b/packages/SettingsLib/res/values-mn/strings.xml
index 1a5a0af..9391142 100644
--- a/packages/SettingsLib/res/values-mn/strings.xml
+++ b/packages/SettingsLib/res/values-mn/strings.xml
@@ -61,6 +61,8 @@
<string name="speed_label_medium" msgid="3175763313268941953">"Дунд"</string>
<string name="speed_label_fast" msgid="7715732164050975057">"Хурдан"</string>
<string name="speed_label_very_fast" msgid="2265363430784523409">"Маш хурдан"</string>
+ <!-- no translation found for wifi_passpoint_expired (1711402866023391443) -->
+ <skip />
<string name="preference_summary_default_combination" msgid="8532964268242666060">"<xliff:g id="STATE">%1$s</xliff:g> / <xliff:g id="DESCRIPTION">%2$s</xliff:g>"</string>
<string name="bluetooth_disconnected" msgid="6557104142667339895">"Салгагдсан"</string>
<string name="bluetooth_disconnecting" msgid="8913264760027764974">"Салгаж байна…"</string>
@@ -466,4 +468,6 @@
<string name="zen_mode_forever" msgid="2704305038191592967">"Таныг унтраах хүртэл"</string>
<string name="time_unit_just_now" msgid="6363336622778342422">"Дөнгөж сая"</string>
<string name="media_transfer_this_device_name" msgid="1636276898262571213">"Энэ төхөөрөмж"</string>
+ <!-- no translation found for profile_connect_timeout_subtext (2401801610868184557) -->
+ <skip />
</resources>
diff --git a/packages/SettingsLib/res/values-mr/strings.xml b/packages/SettingsLib/res/values-mr/strings.xml
index 7510107..224aa11 100644
--- a/packages/SettingsLib/res/values-mr/strings.xml
+++ b/packages/SettingsLib/res/values-mr/strings.xml
@@ -43,8 +43,7 @@
<string name="available_via_passpoint" msgid="1617440946846329613">"%1$s द्वारे उपलब्ध"</string>
<string name="tap_to_sign_up" msgid="6449724763052579434">"साइन अप करण्यासाठी टॅप करा"</string>
<string name="wifi_connected_no_internet" msgid="8202906332837777829">"कनेक्ट केले, इंटरनेट नाही"</string>
- <!-- no translation found for private_dns_broken (7356676011023412490) -->
- <skip />
+ <string name="private_dns_broken" msgid="7356676011023412490">"खाजगी DNS सर्व्हर अॅक्सेस करू शकत नाही"</string>
<string name="wifi_limited_connection" msgid="7717855024753201527">"मर्यादित कनेक्शन"</string>
<string name="wifi_status_no_internet" msgid="5784710974669608361">"इंटरनेट नाही"</string>
<string name="wifi_status_sign_in_required" msgid="123517180404752756">"साइन इन करणे आवश्यक आहे"</string>
@@ -62,6 +61,8 @@
<string name="speed_label_medium" msgid="3175763313268941953">"मध्यम"</string>
<string name="speed_label_fast" msgid="7715732164050975057">"जलद"</string>
<string name="speed_label_very_fast" msgid="2265363430784523409">"खूप जलद"</string>
+ <!-- no translation found for wifi_passpoint_expired (1711402866023391443) -->
+ <skip />
<string name="preference_summary_default_combination" msgid="8532964268242666060">"<xliff:g id="STATE">%1$s</xliff:g> / <xliff:g id="DESCRIPTION">%2$s</xliff:g>"</string>
<string name="bluetooth_disconnected" msgid="6557104142667339895">"डिस्कनेक्ट केले"</string>
<string name="bluetooth_disconnecting" msgid="8913264760027764974">"डिस्कनेक्ट करत आहे..."</string>
@@ -467,4 +468,6 @@
<string name="zen_mode_forever" msgid="2704305038191592967">"तुम्ही बंद करेपर्यंत"</string>
<string name="time_unit_just_now" msgid="6363336622778342422">"आत्ताच"</string>
<string name="media_transfer_this_device_name" msgid="1636276898262571213">"हे डिव्हाइस"</string>
+ <!-- no translation found for profile_connect_timeout_subtext (2401801610868184557) -->
+ <skip />
</resources>
diff --git a/packages/SettingsLib/res/values-ms/strings.xml b/packages/SettingsLib/res/values-ms/strings.xml
index 82bd697..1c88ba3 100644
--- a/packages/SettingsLib/res/values-ms/strings.xml
+++ b/packages/SettingsLib/res/values-ms/strings.xml
@@ -61,6 +61,8 @@
<string name="speed_label_medium" msgid="3175763313268941953">"Sederhana"</string>
<string name="speed_label_fast" msgid="7715732164050975057">"Laju"</string>
<string name="speed_label_very_fast" msgid="2265363430784523409">"Sangat Laju"</string>
+ <!-- no translation found for wifi_passpoint_expired (1711402866023391443) -->
+ <skip />
<string name="preference_summary_default_combination" msgid="8532964268242666060">"<xliff:g id="STATE">%1$s</xliff:g> / <xliff:g id="DESCRIPTION">%2$s</xliff:g>"</string>
<string name="bluetooth_disconnected" msgid="6557104142667339895">"Diputuskan sambungan"</string>
<string name="bluetooth_disconnecting" msgid="8913264760027764974">"Memutuskan sambungan..."</string>
@@ -466,4 +468,6 @@
<string name="zen_mode_forever" msgid="2704305038191592967">"Sehingga anda matikan"</string>
<string name="time_unit_just_now" msgid="6363336622778342422">"Sebentar tadi"</string>
<string name="media_transfer_this_device_name" msgid="1636276898262571213">"Peranti ini"</string>
+ <!-- no translation found for profile_connect_timeout_subtext (2401801610868184557) -->
+ <skip />
</resources>
diff --git a/packages/SettingsLib/res/values-my/strings.xml b/packages/SettingsLib/res/values-my/strings.xml
index 9636f06..d6a2b93 100644
--- a/packages/SettingsLib/res/values-my/strings.xml
+++ b/packages/SettingsLib/res/values-my/strings.xml
@@ -61,6 +61,8 @@
<string name="speed_label_medium" msgid="3175763313268941953">"အတော်အသင့်"</string>
<string name="speed_label_fast" msgid="7715732164050975057">"မြန်"</string>
<string name="speed_label_very_fast" msgid="2265363430784523409">"အလွန်မြန်"</string>
+ <!-- no translation found for wifi_passpoint_expired (1711402866023391443) -->
+ <skip />
<string name="preference_summary_default_combination" msgid="8532964268242666060">"<xliff:g id="STATE">%1$s</xliff:g> / <xliff:g id="DESCRIPTION">%2$s</xliff:g>"</string>
<string name="bluetooth_disconnected" msgid="6557104142667339895">"ချိတ်ဆက်မှုပြတ်တောက်သည်"</string>
<string name="bluetooth_disconnecting" msgid="8913264760027764974">"အဆက်အသွယ်ဖြတ်တောက်သည်"</string>
@@ -466,4 +468,6 @@
<string name="zen_mode_forever" msgid="2704305038191592967">"သင်ပိတ်လိုက်သည် အထိ"</string>
<string name="time_unit_just_now" msgid="6363336622778342422">"ယခုလေးတင်"</string>
<string name="media_transfer_this_device_name" msgid="1636276898262571213">"ဤစက်ပစ္စည်း"</string>
+ <!-- no translation found for profile_connect_timeout_subtext (2401801610868184557) -->
+ <skip />
</resources>
diff --git a/packages/SettingsLib/res/values-nb/strings.xml b/packages/SettingsLib/res/values-nb/strings.xml
index 99af7c8..51d84a0 100644
--- a/packages/SettingsLib/res/values-nb/strings.xml
+++ b/packages/SettingsLib/res/values-nb/strings.xml
@@ -61,6 +61,8 @@
<string name="speed_label_medium" msgid="3175763313268941953">"Middels"</string>
<string name="speed_label_fast" msgid="7715732164050975057">"Rask"</string>
<string name="speed_label_very_fast" msgid="2265363430784523409">"Veldig rask"</string>
+ <!-- no translation found for wifi_passpoint_expired (1711402866023391443) -->
+ <skip />
<string name="preference_summary_default_combination" msgid="8532964268242666060">"<xliff:g id="STATE">%1$s</xliff:g> / <xliff:g id="DESCRIPTION">%2$s</xliff:g>"</string>
<string name="bluetooth_disconnected" msgid="6557104142667339895">"Frakoblet"</string>
<string name="bluetooth_disconnecting" msgid="8913264760027764974">"Kobler fra…"</string>
@@ -466,4 +468,6 @@
<string name="zen_mode_forever" msgid="2704305038191592967">"Til du slår av"</string>
<string name="time_unit_just_now" msgid="6363336622778342422">"Nå nettopp"</string>
<string name="media_transfer_this_device_name" msgid="1636276898262571213">"Denne enheten"</string>
+ <!-- no translation found for profile_connect_timeout_subtext (2401801610868184557) -->
+ <skip />
</resources>
diff --git a/packages/SettingsLib/res/values-ne/strings.xml b/packages/SettingsLib/res/values-ne/strings.xml
index cdf2c7d..b41b0c7 100644
--- a/packages/SettingsLib/res/values-ne/strings.xml
+++ b/packages/SettingsLib/res/values-ne/strings.xml
@@ -61,6 +61,8 @@
<string name="speed_label_medium" msgid="3175763313268941953">"मध्यम"</string>
<string name="speed_label_fast" msgid="7715732164050975057">"छिटो"</string>
<string name="speed_label_very_fast" msgid="2265363430784523409">"धेरै छिटो"</string>
+ <!-- no translation found for wifi_passpoint_expired (1711402866023391443) -->
+ <skip />
<string name="preference_summary_default_combination" msgid="8532964268242666060">"<xliff:g id="STATE">%1$s</xliff:g> / <xliff:g id="DESCRIPTION">%2$s</xliff:g>"</string>
<string name="bluetooth_disconnected" msgid="6557104142667339895">"विच्छेदन गरियो"</string>
<string name="bluetooth_disconnecting" msgid="8913264760027764974">"जडान हटाइँदै ..."</string>
@@ -466,4 +468,6 @@
<string name="zen_mode_forever" msgid="2704305038191592967">"तपाईंले निष्क्रिय नपार्दासम्म"</string>
<string name="time_unit_just_now" msgid="6363336622778342422">"अहिले भर्खरै"</string>
<string name="media_transfer_this_device_name" msgid="1636276898262571213">"यो यन्त्र"</string>
+ <!-- no translation found for profile_connect_timeout_subtext (2401801610868184557) -->
+ <skip />
</resources>
diff --git a/packages/SettingsLib/res/values-nl/strings.xml b/packages/SettingsLib/res/values-nl/strings.xml
index 709e98d..70d652d 100644
--- a/packages/SettingsLib/res/values-nl/strings.xml
+++ b/packages/SettingsLib/res/values-nl/strings.xml
@@ -61,6 +61,8 @@
<string name="speed_label_medium" msgid="3175763313268941953">"Gemiddeld"</string>
<string name="speed_label_fast" msgid="7715732164050975057">"Snel"</string>
<string name="speed_label_very_fast" msgid="2265363430784523409">"Zeer snel"</string>
+ <!-- no translation found for wifi_passpoint_expired (1711402866023391443) -->
+ <skip />
<string name="preference_summary_default_combination" msgid="8532964268242666060">"<xliff:g id="STATE">%1$s</xliff:g>/<xliff:g id="DESCRIPTION">%2$s</xliff:g>"</string>
<string name="bluetooth_disconnected" msgid="6557104142667339895">"Verbinding verbroken"</string>
<string name="bluetooth_disconnecting" msgid="8913264760027764974">"Verbinding verbreken..."</string>
@@ -466,4 +468,6 @@
<string name="zen_mode_forever" msgid="2704305038191592967">"Totdat je uitschakelt"</string>
<string name="time_unit_just_now" msgid="6363336622778342422">"Zojuist"</string>
<string name="media_transfer_this_device_name" msgid="1636276898262571213">"Dit apparaat"</string>
+ <!-- no translation found for profile_connect_timeout_subtext (2401801610868184557) -->
+ <skip />
</resources>
diff --git a/packages/SettingsLib/res/values-or/strings.xml b/packages/SettingsLib/res/values-or/strings.xml
index abe0198..c4e0e300 100644
--- a/packages/SettingsLib/res/values-or/strings.xml
+++ b/packages/SettingsLib/res/values-or/strings.xml
@@ -43,8 +43,7 @@
<string name="available_via_passpoint" msgid="1617440946846329613">"%1$s ମାଧ୍ୟମରେ ଉପଲବ୍ଧ"</string>
<string name="tap_to_sign_up" msgid="6449724763052579434">"ସାଇନ୍ ଅପ୍ ପାଇଁ ଟାପ୍ କରନ୍ତୁ"</string>
<string name="wifi_connected_no_internet" msgid="8202906332837777829">"ସଂଯୁକ୍ତ, ଇଣ୍ଟର୍ନେଟ୍ ନାହିଁ"</string>
- <!-- no translation found for private_dns_broken (7356676011023412490) -->
- <skip />
+ <string name="private_dns_broken" msgid="7356676011023412490">"ବ୍ୟକ୍ତିଗତ DNS ସର୍ଭର୍ ଆକ୍ସେସ୍ କରିହେବ ନାହିଁ"</string>
<string name="wifi_limited_connection" msgid="7717855024753201527">"ସୀମିତ ସଂଯୋଗ"</string>
<string name="wifi_status_no_internet" msgid="5784710974669608361">"କୌଣସି ଇଣ୍ଟରନେଟ୍ ନାହିଁ"</string>
<string name="wifi_status_sign_in_required" msgid="123517180404752756">"ସାଇନ୍-ଇନ୍ ଆବଶ୍ୟକ"</string>
@@ -62,6 +61,8 @@
<string name="speed_label_medium" msgid="3175763313268941953">"ମଧ୍ୟମ"</string>
<string name="speed_label_fast" msgid="7715732164050975057">"ଦ୍ରୁତ"</string>
<string name="speed_label_very_fast" msgid="2265363430784523409">"ଅତି ଦ୍ରୁତ"</string>
+ <!-- no translation found for wifi_passpoint_expired (1711402866023391443) -->
+ <skip />
<string name="preference_summary_default_combination" msgid="8532964268242666060">"<xliff:g id="STATE">%1$s</xliff:g> / <xliff:g id="DESCRIPTION">%2$s</xliff:g>"</string>
<string name="bluetooth_disconnected" msgid="6557104142667339895">"ବିଛିନ୍ନ ହେଲା"</string>
<string name="bluetooth_disconnecting" msgid="8913264760027764974">"ବିଚ୍ଛିନ୍ନ କରୁଛି…"</string>
@@ -467,4 +468,6 @@
<string name="zen_mode_forever" msgid="2704305038191592967">"ଆପଣ ବନ୍ଦ ନକରିବା ପର୍ଯ୍ୟନ୍ତ"</string>
<string name="time_unit_just_now" msgid="6363336622778342422">"ଏହିକ୍ଷଣି"</string>
<string name="media_transfer_this_device_name" msgid="1636276898262571213">"ଏହି ଡିଭାଇସ୍"</string>
+ <!-- no translation found for profile_connect_timeout_subtext (2401801610868184557) -->
+ <skip />
</resources>
diff --git a/packages/SettingsLib/res/values-pa/strings.xml b/packages/SettingsLib/res/values-pa/strings.xml
index b372185..732b78a 100644
--- a/packages/SettingsLib/res/values-pa/strings.xml
+++ b/packages/SettingsLib/res/values-pa/strings.xml
@@ -61,6 +61,8 @@
<string name="speed_label_medium" msgid="3175763313268941953">"ਔਸਤ"</string>
<string name="speed_label_fast" msgid="7715732164050975057">"ਤੇਜ਼"</string>
<string name="speed_label_very_fast" msgid="2265363430784523409">"ਬਹੁਤ ਤੇਜ਼"</string>
+ <!-- no translation found for wifi_passpoint_expired (1711402866023391443) -->
+ <skip />
<string name="preference_summary_default_combination" msgid="8532964268242666060">"<xliff:g id="STATE">%1$s</xliff:g> / <xliff:g id="DESCRIPTION">%2$s</xliff:g>"</string>
<string name="bluetooth_disconnected" msgid="6557104142667339895">"ਡਿਸਕਨੈਕਟ ਕੀਤਾ"</string>
<string name="bluetooth_disconnecting" msgid="8913264760027764974">"ਡਿਸਕਨੈਕਟ ਕਰ ਰਿਹਾ ਹੈ..."</string>
@@ -466,4 +468,6 @@
<string name="zen_mode_forever" msgid="2704305038191592967">"ਜਦੋਂ ਤੱਕ ਤੁਸੀਂ ਬੰਦ ਨਹੀਂ ਕਰਦੇ"</string>
<string name="time_unit_just_now" msgid="6363336622778342422">"ਹੁਣੇ ਹੀ"</string>
<string name="media_transfer_this_device_name" msgid="1636276898262571213">"ਇਹ ਡੀਵਾਈਸ"</string>
+ <!-- no translation found for profile_connect_timeout_subtext (2401801610868184557) -->
+ <skip />
</resources>
diff --git a/packages/SettingsLib/res/values-pl/strings.xml b/packages/SettingsLib/res/values-pl/strings.xml
index e7a8f22..ce49b75 100644
--- a/packages/SettingsLib/res/values-pl/strings.xml
+++ b/packages/SettingsLib/res/values-pl/strings.xml
@@ -43,8 +43,7 @@
<string name="available_via_passpoint" msgid="1617440946846329613">"Dostępne przez %1$s"</string>
<string name="tap_to_sign_up" msgid="6449724763052579434">"Kliknij, by się zarejestrować"</string>
<string name="wifi_connected_no_internet" msgid="8202906332837777829">"Połączono, brak internetu"</string>
- <!-- no translation found for private_dns_broken (7356676011023412490) -->
- <skip />
+ <string name="private_dns_broken" msgid="7356676011023412490">"Brak dostępu do prywatnego serwera DNS"</string>
<string name="wifi_limited_connection" msgid="7717855024753201527">"Ograniczone połączenie"</string>
<string name="wifi_status_no_internet" msgid="5784710974669608361">"Brak internetu"</string>
<string name="wifi_status_sign_in_required" msgid="123517180404752756">"Musisz się zalogować"</string>
@@ -62,6 +61,8 @@
<string name="speed_label_medium" msgid="3175763313268941953">"Średnia"</string>
<string name="speed_label_fast" msgid="7715732164050975057">"Szybka"</string>
<string name="speed_label_very_fast" msgid="2265363430784523409">"Bardzo szybka"</string>
+ <!-- no translation found for wifi_passpoint_expired (1711402866023391443) -->
+ <skip />
<string name="preference_summary_default_combination" msgid="8532964268242666060">"<xliff:g id="STATE">%1$s</xliff:g> / <xliff:g id="DESCRIPTION">%2$s</xliff:g>"</string>
<string name="bluetooth_disconnected" msgid="6557104142667339895">"Rozłączona"</string>
<string name="bluetooth_disconnecting" msgid="8913264760027764974">"Rozłączanie..."</string>
@@ -469,4 +470,6 @@
<string name="zen_mode_forever" msgid="2704305038191592967">"Dopóki nie wyłączysz"</string>
<string name="time_unit_just_now" msgid="6363336622778342422">"Przed chwilą"</string>
<string name="media_transfer_this_device_name" msgid="1636276898262571213">"To urządzenie"</string>
+ <!-- no translation found for profile_connect_timeout_subtext (2401801610868184557) -->
+ <skip />
</resources>
diff --git a/packages/SettingsLib/res/values-pt-rBR/strings.xml b/packages/SettingsLib/res/values-pt-rBR/strings.xml
index 6e75fba..4b194ec 100644
--- a/packages/SettingsLib/res/values-pt-rBR/strings.xml
+++ b/packages/SettingsLib/res/values-pt-rBR/strings.xml
@@ -61,6 +61,8 @@
<string name="speed_label_medium" msgid="3175763313268941953">"Média"</string>
<string name="speed_label_fast" msgid="7715732164050975057">"Rápida"</string>
<string name="speed_label_very_fast" msgid="2265363430784523409">"Muito rápida"</string>
+ <!-- no translation found for wifi_passpoint_expired (1711402866023391443) -->
+ <skip />
<string name="preference_summary_default_combination" msgid="8532964268242666060">"<xliff:g id="STATE">%1$s</xliff:g> / <xliff:g id="DESCRIPTION">%2$s</xliff:g>"</string>
<string name="bluetooth_disconnected" msgid="6557104142667339895">"Desconectado"</string>
<string name="bluetooth_disconnecting" msgid="8913264760027764974">"Desconectando…"</string>
@@ -466,4 +468,6 @@
<string name="zen_mode_forever" msgid="2704305038191592967">"Até você desativar"</string>
<string name="time_unit_just_now" msgid="6363336622778342422">"Agora"</string>
<string name="media_transfer_this_device_name" msgid="1636276898262571213">"Este dispositivo"</string>
+ <!-- no translation found for profile_connect_timeout_subtext (2401801610868184557) -->
+ <skip />
</resources>
diff --git a/packages/SettingsLib/res/values-pt-rPT/strings.xml b/packages/SettingsLib/res/values-pt-rPT/strings.xml
index 4ee0a17..966ba3f 100644
--- a/packages/SettingsLib/res/values-pt-rPT/strings.xml
+++ b/packages/SettingsLib/res/values-pt-rPT/strings.xml
@@ -61,6 +61,8 @@
<string name="speed_label_medium" msgid="3175763313268941953">"Média"</string>
<string name="speed_label_fast" msgid="7715732164050975057">"Rápida"</string>
<string name="speed_label_very_fast" msgid="2265363430784523409">"Muito rápida"</string>
+ <!-- no translation found for wifi_passpoint_expired (1711402866023391443) -->
+ <skip />
<string name="preference_summary_default_combination" msgid="8532964268242666060">"<xliff:g id="STATE">%1$s</xliff:g>/<xliff:g id="DESCRIPTION">%2$s</xliff:g>"</string>
<string name="bluetooth_disconnected" msgid="6557104142667339895">"Desligado"</string>
<string name="bluetooth_disconnecting" msgid="8913264760027764974">"A desligar..."</string>
@@ -466,4 +468,6 @@
<string name="zen_mode_forever" msgid="2704305038191592967">"Até ser desativado"</string>
<string name="time_unit_just_now" msgid="6363336622778342422">"Agora mesmo"</string>
<string name="media_transfer_this_device_name" msgid="1636276898262571213">"Este dispositivo"</string>
+ <!-- no translation found for profile_connect_timeout_subtext (2401801610868184557) -->
+ <skip />
</resources>
diff --git a/packages/SettingsLib/res/values-pt/strings.xml b/packages/SettingsLib/res/values-pt/strings.xml
index 6e75fba..4b194ec 100644
--- a/packages/SettingsLib/res/values-pt/strings.xml
+++ b/packages/SettingsLib/res/values-pt/strings.xml
@@ -61,6 +61,8 @@
<string name="speed_label_medium" msgid="3175763313268941953">"Média"</string>
<string name="speed_label_fast" msgid="7715732164050975057">"Rápida"</string>
<string name="speed_label_very_fast" msgid="2265363430784523409">"Muito rápida"</string>
+ <!-- no translation found for wifi_passpoint_expired (1711402866023391443) -->
+ <skip />
<string name="preference_summary_default_combination" msgid="8532964268242666060">"<xliff:g id="STATE">%1$s</xliff:g> / <xliff:g id="DESCRIPTION">%2$s</xliff:g>"</string>
<string name="bluetooth_disconnected" msgid="6557104142667339895">"Desconectado"</string>
<string name="bluetooth_disconnecting" msgid="8913264760027764974">"Desconectando…"</string>
@@ -466,4 +468,6 @@
<string name="zen_mode_forever" msgid="2704305038191592967">"Até você desativar"</string>
<string name="time_unit_just_now" msgid="6363336622778342422">"Agora"</string>
<string name="media_transfer_this_device_name" msgid="1636276898262571213">"Este dispositivo"</string>
+ <!-- no translation found for profile_connect_timeout_subtext (2401801610868184557) -->
+ <skip />
</resources>
diff --git a/packages/SettingsLib/res/values-ro/strings.xml b/packages/SettingsLib/res/values-ro/strings.xml
index c5725d3..117962d 100644
--- a/packages/SettingsLib/res/values-ro/strings.xml
+++ b/packages/SettingsLib/res/values-ro/strings.xml
@@ -61,6 +61,8 @@
<string name="speed_label_medium" msgid="3175763313268941953">"Medie"</string>
<string name="speed_label_fast" msgid="7715732164050975057">"Rapidă"</string>
<string name="speed_label_very_fast" msgid="2265363430784523409">"Foarte rapidă"</string>
+ <!-- no translation found for wifi_passpoint_expired (1711402866023391443) -->
+ <skip />
<string name="preference_summary_default_combination" msgid="8532964268242666060">"<xliff:g id="STATE">%1$s</xliff:g>/<xliff:g id="DESCRIPTION">%2$s</xliff:g>"</string>
<string name="bluetooth_disconnected" msgid="6557104142667339895">"Deconectat"</string>
<string name="bluetooth_disconnecting" msgid="8913264760027764974">"În curs de deconectare..."</string>
@@ -467,4 +469,6 @@
<string name="zen_mode_forever" msgid="2704305038191592967">"Până când dezactivați"</string>
<string name="time_unit_just_now" msgid="6363336622778342422">"Chiar acum"</string>
<string name="media_transfer_this_device_name" msgid="1636276898262571213">"Acest dispozitiv"</string>
+ <!-- no translation found for profile_connect_timeout_subtext (2401801610868184557) -->
+ <skip />
</resources>
diff --git a/packages/SettingsLib/res/values-ru/strings.xml b/packages/SettingsLib/res/values-ru/strings.xml
index 6e98601..fcbbed9 100644
--- a/packages/SettingsLib/res/values-ru/strings.xml
+++ b/packages/SettingsLib/res/values-ru/strings.xml
@@ -61,6 +61,8 @@
<string name="speed_label_medium" msgid="3175763313268941953">"Средняя"</string>
<string name="speed_label_fast" msgid="7715732164050975057">"Быстрая"</string>
<string name="speed_label_very_fast" msgid="2265363430784523409">"Очень быстрая"</string>
+ <!-- no translation found for wifi_passpoint_expired (1711402866023391443) -->
+ <skip />
<string name="preference_summary_default_combination" msgid="8532964268242666060">"<xliff:g id="STATE">%1$s</xliff:g> / <xliff:g id="DESCRIPTION">%2$s</xliff:g>"</string>
<string name="bluetooth_disconnected" msgid="6557104142667339895">"Нет подключения"</string>
<string name="bluetooth_disconnecting" msgid="8913264760027764974">"Отключение..."</string>
@@ -468,4 +470,6 @@
<string name="zen_mode_forever" msgid="2704305038191592967">"Пока вы не отключите"</string>
<string name="time_unit_just_now" msgid="6363336622778342422">"Только что"</string>
<string name="media_transfer_this_device_name" msgid="1636276898262571213">"Это устройство"</string>
+ <!-- no translation found for profile_connect_timeout_subtext (2401801610868184557) -->
+ <skip />
</resources>
diff --git a/packages/SettingsLib/res/values-si/strings.xml b/packages/SettingsLib/res/values-si/strings.xml
index 0f67a65..374e5c4 100644
--- a/packages/SettingsLib/res/values-si/strings.xml
+++ b/packages/SettingsLib/res/values-si/strings.xml
@@ -61,6 +61,8 @@
<string name="speed_label_medium" msgid="3175763313268941953">"මධ්යම"</string>
<string name="speed_label_fast" msgid="7715732164050975057">"වේගවත්"</string>
<string name="speed_label_very_fast" msgid="2265363430784523409">"ඉතා වේගවත්"</string>
+ <!-- no translation found for wifi_passpoint_expired (1711402866023391443) -->
+ <skip />
<string name="preference_summary_default_combination" msgid="8532964268242666060">"<xliff:g id="STATE">%1$s</xliff:g> / <xliff:g id="DESCRIPTION">%2$s</xliff:g>"</string>
<string name="bluetooth_disconnected" msgid="6557104142667339895">"විසන්ධි වුණි"</string>
<string name="bluetooth_disconnecting" msgid="8913264760027764974">"විසන්ධි වෙමින්…"</string>
@@ -466,4 +468,6 @@
<string name="zen_mode_forever" msgid="2704305038191592967">"ඔබ ක්රියාවිරහිත කරන තුරු"</string>
<string name="time_unit_just_now" msgid="6363336622778342422">"මේ දැන්"</string>
<string name="media_transfer_this_device_name" msgid="1636276898262571213">"මෙම උපාංගය"</string>
+ <!-- no translation found for profile_connect_timeout_subtext (2401801610868184557) -->
+ <skip />
</resources>
diff --git a/packages/SettingsLib/res/values-sk/strings.xml b/packages/SettingsLib/res/values-sk/strings.xml
index e4b4848..4a660c1 100644
--- a/packages/SettingsLib/res/values-sk/strings.xml
+++ b/packages/SettingsLib/res/values-sk/strings.xml
@@ -61,6 +61,8 @@
<string name="speed_label_medium" msgid="3175763313268941953">"Stredná"</string>
<string name="speed_label_fast" msgid="7715732164050975057">"Vysoká"</string>
<string name="speed_label_very_fast" msgid="2265363430784523409">"Veľmi vysoká"</string>
+ <!-- no translation found for wifi_passpoint_expired (1711402866023391443) -->
+ <skip />
<string name="preference_summary_default_combination" msgid="8532964268242666060">"<xliff:g id="STATE">%1$s</xliff:g> / <xliff:g id="DESCRIPTION">%2$s</xliff:g>"</string>
<string name="bluetooth_disconnected" msgid="6557104142667339895">"Odpojený"</string>
<string name="bluetooth_disconnecting" msgid="8913264760027764974">"Prebieha odpájanie..."</string>
@@ -468,4 +470,6 @@
<string name="zen_mode_forever" msgid="2704305038191592967">"Dokiaľ túto funkciu nevypnete"</string>
<string name="time_unit_just_now" msgid="6363336622778342422">"Teraz"</string>
<string name="media_transfer_this_device_name" msgid="1636276898262571213">"Toto zariadenie"</string>
+ <!-- no translation found for profile_connect_timeout_subtext (2401801610868184557) -->
+ <skip />
</resources>
diff --git a/packages/SettingsLib/res/values-sl/strings.xml b/packages/SettingsLib/res/values-sl/strings.xml
index 3e181c2..e806fae 100644
--- a/packages/SettingsLib/res/values-sl/strings.xml
+++ b/packages/SettingsLib/res/values-sl/strings.xml
@@ -61,6 +61,8 @@
<string name="speed_label_medium" msgid="3175763313268941953">"Srednje hitra"</string>
<string name="speed_label_fast" msgid="7715732164050975057">"Hitra"</string>
<string name="speed_label_very_fast" msgid="2265363430784523409">"Zelo hitra"</string>
+ <!-- no translation found for wifi_passpoint_expired (1711402866023391443) -->
+ <skip />
<string name="preference_summary_default_combination" msgid="8532964268242666060">"<xliff:g id="STATE">%1$s</xliff:g>/<xliff:g id="DESCRIPTION">%2$s</xliff:g>"</string>
<string name="bluetooth_disconnected" msgid="6557104142667339895">"Prekinjena povezava"</string>
<string name="bluetooth_disconnecting" msgid="8913264760027764974">"Prekinjanje povezave ..."</string>
@@ -468,4 +470,6 @@
<string name="zen_mode_forever" msgid="2704305038191592967">"Dokler ne izklopite"</string>
<string name="time_unit_just_now" msgid="6363336622778342422">"pravkar"</string>
<string name="media_transfer_this_device_name" msgid="1636276898262571213">"Ta naprava"</string>
+ <!-- no translation found for profile_connect_timeout_subtext (2401801610868184557) -->
+ <skip />
</resources>
diff --git a/packages/SettingsLib/res/values-sq/strings.xml b/packages/SettingsLib/res/values-sq/strings.xml
index 5380302..8aa2917 100644
--- a/packages/SettingsLib/res/values-sq/strings.xml
+++ b/packages/SettingsLib/res/values-sq/strings.xml
@@ -61,6 +61,8 @@
<string name="speed_label_medium" msgid="3175763313268941953">"Mesatare"</string>
<string name="speed_label_fast" msgid="7715732164050975057">"E shpejtë"</string>
<string name="speed_label_very_fast" msgid="2265363430784523409">"Shumë e shpejtë"</string>
+ <!-- no translation found for wifi_passpoint_expired (1711402866023391443) -->
+ <skip />
<string name="preference_summary_default_combination" msgid="8532964268242666060">"<xliff:g id="STATE">%1$s</xliff:g> / <xliff:g id="DESCRIPTION">%2$s</xliff:g>"</string>
<string name="bluetooth_disconnected" msgid="6557104142667339895">"Shkëputur"</string>
<string name="bluetooth_disconnecting" msgid="8913264760027764974">"Po shkëputet..."</string>
@@ -466,4 +468,6 @@
<string name="zen_mode_forever" msgid="2704305038191592967">"Deri sa ta çaktivizosh"</string>
<string name="time_unit_just_now" msgid="6363336622778342422">"Pikërisht tani"</string>
<string name="media_transfer_this_device_name" msgid="1636276898262571213">"Kjo pajisje"</string>
+ <!-- no translation found for profile_connect_timeout_subtext (2401801610868184557) -->
+ <skip />
</resources>
diff --git a/packages/SettingsLib/res/values-sr/strings.xml b/packages/SettingsLib/res/values-sr/strings.xml
index d68c9e8..01c9b80 100644
--- a/packages/SettingsLib/res/values-sr/strings.xml
+++ b/packages/SettingsLib/res/values-sr/strings.xml
@@ -61,6 +61,8 @@
<string name="speed_label_medium" msgid="3175763313268941953">"Средња"</string>
<string name="speed_label_fast" msgid="7715732164050975057">"Брза"</string>
<string name="speed_label_very_fast" msgid="2265363430784523409">"Веома брза"</string>
+ <!-- no translation found for wifi_passpoint_expired (1711402866023391443) -->
+ <skip />
<string name="preference_summary_default_combination" msgid="8532964268242666060">"<xliff:g id="STATE">%1$s</xliff:g>/<xliff:g id="DESCRIPTION">%2$s</xliff:g>"</string>
<string name="bluetooth_disconnected" msgid="6557104142667339895">"Веза је прекинута"</string>
<string name="bluetooth_disconnecting" msgid="8913264760027764974">"Прекидање везе..."</string>
@@ -467,4 +469,6 @@
<string name="zen_mode_forever" msgid="2704305038191592967">"Док не искључите"</string>
<string name="time_unit_just_now" msgid="6363336622778342422">"Управо"</string>
<string name="media_transfer_this_device_name" msgid="1636276898262571213">"Овај уређај"</string>
+ <!-- no translation found for profile_connect_timeout_subtext (2401801610868184557) -->
+ <skip />
</resources>
diff --git a/packages/SettingsLib/res/values-sv/strings.xml b/packages/SettingsLib/res/values-sv/strings.xml
index 45841f0..0f9abc9 100644
--- a/packages/SettingsLib/res/values-sv/strings.xml
+++ b/packages/SettingsLib/res/values-sv/strings.xml
@@ -61,6 +61,8 @@
<string name="speed_label_medium" msgid="3175763313268941953">"Medelsnabb"</string>
<string name="speed_label_fast" msgid="7715732164050975057">"Snabb"</string>
<string name="speed_label_very_fast" msgid="2265363430784523409">"Mycket snabb"</string>
+ <!-- no translation found for wifi_passpoint_expired (1711402866023391443) -->
+ <skip />
<string name="preference_summary_default_combination" msgid="8532964268242666060">"<xliff:g id="STATE">%1$s</xliff:g>/<xliff:g id="DESCRIPTION">%2$s</xliff:g>"</string>
<string name="bluetooth_disconnected" msgid="6557104142667339895">"Kopplas ifrån"</string>
<string name="bluetooth_disconnecting" msgid="8913264760027764974">"Kopplar ifrån…"</string>
@@ -466,4 +468,6 @@
<string name="zen_mode_forever" msgid="2704305038191592967">"Tills du inaktiverar funktionen"</string>
<string name="time_unit_just_now" msgid="6363336622778342422">"Nyss"</string>
<string name="media_transfer_this_device_name" msgid="1636276898262571213">"Den här enheten"</string>
+ <!-- no translation found for profile_connect_timeout_subtext (2401801610868184557) -->
+ <skip />
</resources>
diff --git a/packages/SettingsLib/res/values-sw/strings.xml b/packages/SettingsLib/res/values-sw/strings.xml
index a8e73d7..3ccf8a4 100644
--- a/packages/SettingsLib/res/values-sw/strings.xml
+++ b/packages/SettingsLib/res/values-sw/strings.xml
@@ -61,6 +61,8 @@
<string name="speed_label_medium" msgid="3175763313268941953">"Wastani"</string>
<string name="speed_label_fast" msgid="7715732164050975057">"Haraka"</string>
<string name="speed_label_very_fast" msgid="2265363430784523409">"Haraka Sana"</string>
+ <!-- no translation found for wifi_passpoint_expired (1711402866023391443) -->
+ <skip />
<string name="preference_summary_default_combination" msgid="8532964268242666060">"<xliff:g id="STATE">%1$s</xliff:g> / <xliff:g id="DESCRIPTION">%2$s</xliff:g>"</string>
<string name="bluetooth_disconnected" msgid="6557104142667339895">"Haijaunganishwa"</string>
<string name="bluetooth_disconnecting" msgid="8913264760027764974">"Inatenganisha..."</string>
@@ -466,4 +468,6 @@
<string name="zen_mode_forever" msgid="2704305038191592967">"Hadi utakapoizima"</string>
<string name="time_unit_just_now" msgid="6363336622778342422">"Sasa hivi"</string>
<string name="media_transfer_this_device_name" msgid="1636276898262571213">"Kifaa hiki"</string>
+ <!-- no translation found for profile_connect_timeout_subtext (2401801610868184557) -->
+ <skip />
</resources>
diff --git a/packages/SettingsLib/res/values-ta/strings.xml b/packages/SettingsLib/res/values-ta/strings.xml
index 83fe954..4c6bd22 100644
--- a/packages/SettingsLib/res/values-ta/strings.xml
+++ b/packages/SettingsLib/res/values-ta/strings.xml
@@ -61,6 +61,8 @@
<string name="speed_label_medium" msgid="3175763313268941953">"நடுத்தரம்"</string>
<string name="speed_label_fast" msgid="7715732164050975057">"வேகம்"</string>
<string name="speed_label_very_fast" msgid="2265363430784523409">"மிகவும் வேகமானது"</string>
+ <!-- no translation found for wifi_passpoint_expired (1711402866023391443) -->
+ <skip />
<string name="preference_summary_default_combination" msgid="8532964268242666060">"<xliff:g id="STATE">%1$s</xliff:g> / <xliff:g id="DESCRIPTION">%2$s</xliff:g>"</string>
<string name="bluetooth_disconnected" msgid="6557104142667339895">"தொடர்பு துண்டிக்கப்பட்டது"</string>
<string name="bluetooth_disconnecting" msgid="8913264760027764974">"துண்டிக்கிறது..."</string>
@@ -466,4 +468,6 @@
<string name="zen_mode_forever" msgid="2704305038191592967">"ஆஃப் செய்யும் வரை"</string>
<string name="time_unit_just_now" msgid="6363336622778342422">"சற்றுமுன்"</string>
<string name="media_transfer_this_device_name" msgid="1636276898262571213">"இந்தச் சாதனம்"</string>
+ <!-- no translation found for profile_connect_timeout_subtext (2401801610868184557) -->
+ <skip />
</resources>
diff --git a/packages/SettingsLib/res/values-te/strings.xml b/packages/SettingsLib/res/values-te/strings.xml
index ad0f673..f1f192b 100644
--- a/packages/SettingsLib/res/values-te/strings.xml
+++ b/packages/SettingsLib/res/values-te/strings.xml
@@ -61,6 +61,8 @@
<string name="speed_label_medium" msgid="3175763313268941953">"మధ్యస్థం"</string>
<string name="speed_label_fast" msgid="7715732164050975057">"వేగవంతం"</string>
<string name="speed_label_very_fast" msgid="2265363430784523409">"చాలా వేగవంతం"</string>
+ <!-- no translation found for wifi_passpoint_expired (1711402866023391443) -->
+ <skip />
<string name="preference_summary_default_combination" msgid="8532964268242666060">"<xliff:g id="STATE">%1$s</xliff:g> / <xliff:g id="DESCRIPTION">%2$s</xliff:g>"</string>
<string name="bluetooth_disconnected" msgid="6557104142667339895">"డిస్కనెక్ట్ చేయబడింది"</string>
<string name="bluetooth_disconnecting" msgid="8913264760027764974">"డిస్కనెక్ట్ చేస్తోంది..."</string>
@@ -466,4 +468,6 @@
<string name="zen_mode_forever" msgid="2704305038191592967">"మీరు ఆఫ్ చేసే వరకు"</string>
<string name="time_unit_just_now" msgid="6363336622778342422">"ఇప్పుడే"</string>
<string name="media_transfer_this_device_name" msgid="1636276898262571213">"ఈ పరికరం"</string>
+ <!-- no translation found for profile_connect_timeout_subtext (2401801610868184557) -->
+ <skip />
</resources>
diff --git a/packages/SettingsLib/res/values-th/strings.xml b/packages/SettingsLib/res/values-th/strings.xml
index c9e232d..e7d7d5b 100644
--- a/packages/SettingsLib/res/values-th/strings.xml
+++ b/packages/SettingsLib/res/values-th/strings.xml
@@ -61,6 +61,8 @@
<string name="speed_label_medium" msgid="3175763313268941953">"ปานกลาง"</string>
<string name="speed_label_fast" msgid="7715732164050975057">"เร็ว"</string>
<string name="speed_label_very_fast" msgid="2265363430784523409">"เร็วมาก"</string>
+ <!-- no translation found for wifi_passpoint_expired (1711402866023391443) -->
+ <skip />
<string name="preference_summary_default_combination" msgid="8532964268242666060">"<xliff:g id="STATE">%1$s</xliff:g>/<xliff:g id="DESCRIPTION">%2$s</xliff:g>"</string>
<string name="bluetooth_disconnected" msgid="6557104142667339895">"ตัดการเชื่อมต่อ"</string>
<string name="bluetooth_disconnecting" msgid="8913264760027764974">"กำลังตัดการเชื่อมต่อ..."</string>
@@ -466,4 +468,6 @@
<string name="zen_mode_forever" msgid="2704305038191592967">"จนกว่าคุณจะปิด"</string>
<string name="time_unit_just_now" msgid="6363336622778342422">"เมื่อสักครู่"</string>
<string name="media_transfer_this_device_name" msgid="1636276898262571213">"อุปกรณ์นี้"</string>
+ <!-- no translation found for profile_connect_timeout_subtext (2401801610868184557) -->
+ <skip />
</resources>
diff --git a/packages/SettingsLib/res/values-tl/strings.xml b/packages/SettingsLib/res/values-tl/strings.xml
index 74307f8..a221355 100644
--- a/packages/SettingsLib/res/values-tl/strings.xml
+++ b/packages/SettingsLib/res/values-tl/strings.xml
@@ -61,6 +61,8 @@
<string name="speed_label_medium" msgid="3175763313268941953">"Katamtaman"</string>
<string name="speed_label_fast" msgid="7715732164050975057">"Mabilis"</string>
<string name="speed_label_very_fast" msgid="2265363430784523409">"Napakabilis"</string>
+ <!-- no translation found for wifi_passpoint_expired (1711402866023391443) -->
+ <skip />
<string name="preference_summary_default_combination" msgid="8532964268242666060">"<xliff:g id="STATE">%1$s</xliff:g> / <xliff:g id="DESCRIPTION">%2$s</xliff:g>"</string>
<string name="bluetooth_disconnected" msgid="6557104142667339895">"Hindi nakakonekta"</string>
<string name="bluetooth_disconnecting" msgid="8913264760027764974">"Nadidiskonekta..."</string>
@@ -466,4 +468,6 @@
<string name="zen_mode_forever" msgid="2704305038191592967">"Hanggang sa i-off mo"</string>
<string name="time_unit_just_now" msgid="6363336622778342422">"Ngayon lang"</string>
<string name="media_transfer_this_device_name" msgid="1636276898262571213">"Ang device na ito"</string>
+ <!-- no translation found for profile_connect_timeout_subtext (2401801610868184557) -->
+ <skip />
</resources>
diff --git a/packages/SettingsLib/res/values-tr/strings.xml b/packages/SettingsLib/res/values-tr/strings.xml
index b95d941..49aecf8 100644
--- a/packages/SettingsLib/res/values-tr/strings.xml
+++ b/packages/SettingsLib/res/values-tr/strings.xml
@@ -61,6 +61,8 @@
<string name="speed_label_medium" msgid="3175763313268941953">"Orta"</string>
<string name="speed_label_fast" msgid="7715732164050975057">"Hızlı"</string>
<string name="speed_label_very_fast" msgid="2265363430784523409">"Çok Hızlı"</string>
+ <!-- no translation found for wifi_passpoint_expired (1711402866023391443) -->
+ <skip />
<string name="preference_summary_default_combination" msgid="8532964268242666060">"<xliff:g id="STATE">%1$s</xliff:g> / <xliff:g id="DESCRIPTION">%2$s</xliff:g>"</string>
<string name="bluetooth_disconnected" msgid="6557104142667339895">"Bağlantı kesildi"</string>
<string name="bluetooth_disconnecting" msgid="8913264760027764974">"Bağlantı kesiliyor…"</string>
@@ -466,4 +468,6 @@
<string name="zen_mode_forever" msgid="2704305038191592967">"Siz kapatana kadar"</string>
<string name="time_unit_just_now" msgid="6363336622778342422">"Az önce"</string>
<string name="media_transfer_this_device_name" msgid="1636276898262571213">"Bu cihaz"</string>
+ <!-- no translation found for profile_connect_timeout_subtext (2401801610868184557) -->
+ <skip />
</resources>
diff --git a/packages/SettingsLib/res/values-uk/strings.xml b/packages/SettingsLib/res/values-uk/strings.xml
index 61a0c3e..cf86f4d 100644
--- a/packages/SettingsLib/res/values-uk/strings.xml
+++ b/packages/SettingsLib/res/values-uk/strings.xml
@@ -61,6 +61,8 @@
<string name="speed_label_medium" msgid="3175763313268941953">"Середня"</string>
<string name="speed_label_fast" msgid="7715732164050975057">"Швидка"</string>
<string name="speed_label_very_fast" msgid="2265363430784523409">"Дуже швидка"</string>
+ <!-- no translation found for wifi_passpoint_expired (1711402866023391443) -->
+ <skip />
<string name="preference_summary_default_combination" msgid="8532964268242666060">"<xliff:g id="STATE">%1$s</xliff:g>: <xliff:g id="DESCRIPTION">%2$s</xliff:g>"</string>
<string name="bluetooth_disconnected" msgid="6557104142667339895">"Роз’єднано"</string>
<string name="bluetooth_disconnecting" msgid="8913264760027764974">"Відключення..."</string>
@@ -468,4 +470,6 @@
<string name="zen_mode_forever" msgid="2704305038191592967">"Доки не вимкнути"</string>
<string name="time_unit_just_now" msgid="6363336622778342422">"Щойно"</string>
<string name="media_transfer_this_device_name" msgid="1636276898262571213">"Цей пристрій"</string>
+ <!-- no translation found for profile_connect_timeout_subtext (2401801610868184557) -->
+ <skip />
</resources>
diff --git a/packages/SettingsLib/res/values-ur/strings.xml b/packages/SettingsLib/res/values-ur/strings.xml
index f21e891..de93a4a 100644
--- a/packages/SettingsLib/res/values-ur/strings.xml
+++ b/packages/SettingsLib/res/values-ur/strings.xml
@@ -43,8 +43,7 @@
<string name="available_via_passpoint" msgid="1617440946846329613">"دستیاب بذریعہ %1$s"</string>
<string name="tap_to_sign_up" msgid="6449724763052579434">"سائن اپ کے لیے تھپتھپائیں"</string>
<string name="wifi_connected_no_internet" msgid="8202906332837777829">"منسلک، انٹرنیٹ نہیں ہے"</string>
- <!-- no translation found for private_dns_broken (7356676011023412490) -->
- <skip />
+ <string name="private_dns_broken" msgid="7356676011023412490">"نجی DNS سرور تک رسائی حاصل نہیں کی جا سکی"</string>
<string name="wifi_limited_connection" msgid="7717855024753201527">"محدود کنکشن"</string>
<string name="wifi_status_no_internet" msgid="5784710974669608361">"انٹرنیٹ نہیں ہے"</string>
<string name="wifi_status_sign_in_required" msgid="123517180404752756">"سائن ان درکار ہے"</string>
@@ -62,6 +61,8 @@
<string name="speed_label_medium" msgid="3175763313268941953">"متوسط"</string>
<string name="speed_label_fast" msgid="7715732164050975057">"تیز"</string>
<string name="speed_label_very_fast" msgid="2265363430784523409">"بہت تیز"</string>
+ <!-- no translation found for wifi_passpoint_expired (1711402866023391443) -->
+ <skip />
<string name="preference_summary_default_combination" msgid="8532964268242666060">"<xliff:g id="STATE">%1$s</xliff:g> / <xliff:g id="DESCRIPTION">%2$s</xliff:g>"</string>
<string name="bluetooth_disconnected" msgid="6557104142667339895">"منقطع"</string>
<string name="bluetooth_disconnecting" msgid="8913264760027764974">"منقطع کیا جارہا ہے…"</string>
@@ -467,4 +468,6 @@
<string name="zen_mode_forever" msgid="2704305038191592967">"یہاں تک کہ آپ آف کر دیں"</string>
<string name="time_unit_just_now" msgid="6363336622778342422">"ابھی ابھی"</string>
<string name="media_transfer_this_device_name" msgid="1636276898262571213">"یہ آلہ"</string>
+ <!-- no translation found for profile_connect_timeout_subtext (2401801610868184557) -->
+ <skip />
</resources>
diff --git a/packages/SettingsLib/res/values-uz/strings.xml b/packages/SettingsLib/res/values-uz/strings.xml
index a0a79e3..42847e13 100644
--- a/packages/SettingsLib/res/values-uz/strings.xml
+++ b/packages/SettingsLib/res/values-uz/strings.xml
@@ -61,6 +61,8 @@
<string name="speed_label_medium" msgid="3175763313268941953">"O‘rtacha"</string>
<string name="speed_label_fast" msgid="7715732164050975057">"Tez"</string>
<string name="speed_label_very_fast" msgid="2265363430784523409">"Juda tez"</string>
+ <!-- no translation found for wifi_passpoint_expired (1711402866023391443) -->
+ <skip />
<string name="preference_summary_default_combination" msgid="8532964268242666060">"<xliff:g id="STATE">%1$s</xliff:g> / <xliff:g id="DESCRIPTION">%2$s</xliff:g>"</string>
<string name="bluetooth_disconnected" msgid="6557104142667339895">"Uzildi"</string>
<string name="bluetooth_disconnecting" msgid="8913264760027764974">"Uzilyapti…"</string>
@@ -466,4 +468,6 @@
<string name="zen_mode_forever" msgid="2704305038191592967">"Rejimdan chiqilgunicha"</string>
<string name="time_unit_just_now" msgid="6363336622778342422">"Hozir"</string>
<string name="media_transfer_this_device_name" msgid="1636276898262571213">"Shu qurilma"</string>
+ <!-- no translation found for profile_connect_timeout_subtext (2401801610868184557) -->
+ <skip />
</resources>
diff --git a/packages/SettingsLib/res/values-vi/strings.xml b/packages/SettingsLib/res/values-vi/strings.xml
index 3723b83..433e924 100644
--- a/packages/SettingsLib/res/values-vi/strings.xml
+++ b/packages/SettingsLib/res/values-vi/strings.xml
@@ -61,6 +61,8 @@
<string name="speed_label_medium" msgid="3175763313268941953">"Trung bình"</string>
<string name="speed_label_fast" msgid="7715732164050975057">"Nhanh"</string>
<string name="speed_label_very_fast" msgid="2265363430784523409">"Rất nhanh"</string>
+ <!-- no translation found for wifi_passpoint_expired (1711402866023391443) -->
+ <skip />
<string name="preference_summary_default_combination" msgid="8532964268242666060">"<xliff:g id="STATE">%1$s</xliff:g> / <xliff:g id="DESCRIPTION">%2$s</xliff:g>"</string>
<string name="bluetooth_disconnected" msgid="6557104142667339895">"Đã ngắt kết nối"</string>
<string name="bluetooth_disconnecting" msgid="8913264760027764974">"Đang ngắt kết nối…"</string>
@@ -466,4 +468,6 @@
<string name="zen_mode_forever" msgid="2704305038191592967">"Cho đến khi bạn tắt"</string>
<string name="time_unit_just_now" msgid="6363336622778342422">"Vừa xong"</string>
<string name="media_transfer_this_device_name" msgid="1636276898262571213">"Thiết bị này"</string>
+ <!-- no translation found for profile_connect_timeout_subtext (2401801610868184557) -->
+ <skip />
</resources>
diff --git a/packages/SettingsLib/res/values-zh-rCN/strings.xml b/packages/SettingsLib/res/values-zh-rCN/strings.xml
index f1200ee..c967372 100644
--- a/packages/SettingsLib/res/values-zh-rCN/strings.xml
+++ b/packages/SettingsLib/res/values-zh-rCN/strings.xml
@@ -61,6 +61,8 @@
<string name="speed_label_medium" msgid="3175763313268941953">"适中"</string>
<string name="speed_label_fast" msgid="7715732164050975057">"快"</string>
<string name="speed_label_very_fast" msgid="2265363430784523409">"很快"</string>
+ <!-- no translation found for wifi_passpoint_expired (1711402866023391443) -->
+ <skip />
<string name="preference_summary_default_combination" msgid="8532964268242666060">"<xliff:g id="STATE">%1$s</xliff:g> / <xliff:g id="DESCRIPTION">%2$s</xliff:g>"</string>
<string name="bluetooth_disconnected" msgid="6557104142667339895">"已断开连接"</string>
<string name="bluetooth_disconnecting" msgid="8913264760027764974">"正在断开连接..."</string>
@@ -466,4 +468,6 @@
<string name="zen_mode_forever" msgid="2704305038191592967">"直到您将其关闭"</string>
<string name="time_unit_just_now" msgid="6363336622778342422">"刚刚"</string>
<string name="media_transfer_this_device_name" msgid="1636276898262571213">"此设备"</string>
+ <!-- no translation found for profile_connect_timeout_subtext (2401801610868184557) -->
+ <skip />
</resources>
diff --git a/packages/SettingsLib/res/values-zh-rHK/strings.xml b/packages/SettingsLib/res/values-zh-rHK/strings.xml
index 57ab472..325425c 100644
--- a/packages/SettingsLib/res/values-zh-rHK/strings.xml
+++ b/packages/SettingsLib/res/values-zh-rHK/strings.xml
@@ -61,6 +61,8 @@
<string name="speed_label_medium" msgid="3175763313268941953">"適中"</string>
<string name="speed_label_fast" msgid="7715732164050975057">"快"</string>
<string name="speed_label_very_fast" msgid="2265363430784523409">"非常快"</string>
+ <!-- no translation found for wifi_passpoint_expired (1711402866023391443) -->
+ <skip />
<string name="preference_summary_default_combination" msgid="8532964268242666060">"<xliff:g id="STATE">%1$s</xliff:g>/<xliff:g id="DESCRIPTION">%2$s</xliff:g>"</string>
<string name="bluetooth_disconnected" msgid="6557104142667339895">"已中斷連線"</string>
<string name="bluetooth_disconnecting" msgid="8913264760027764974">"正在中斷連線..."</string>
@@ -466,4 +468,6 @@
<string name="zen_mode_forever" msgid="2704305038191592967">"直至您關閉為止"</string>
<string name="time_unit_just_now" msgid="6363336622778342422">"剛剛"</string>
<string name="media_transfer_this_device_name" msgid="1636276898262571213">"此裝置"</string>
+ <!-- no translation found for profile_connect_timeout_subtext (2401801610868184557) -->
+ <skip />
</resources>
diff --git a/packages/SettingsLib/res/values-zh-rTW/strings.xml b/packages/SettingsLib/res/values-zh-rTW/strings.xml
index 630619b..82477ea 100644
--- a/packages/SettingsLib/res/values-zh-rTW/strings.xml
+++ b/packages/SettingsLib/res/values-zh-rTW/strings.xml
@@ -61,6 +61,8 @@
<string name="speed_label_medium" msgid="3175763313268941953">"適中"</string>
<string name="speed_label_fast" msgid="7715732164050975057">"快"</string>
<string name="speed_label_very_fast" msgid="2265363430784523409">"非常快"</string>
+ <!-- no translation found for wifi_passpoint_expired (1711402866023391443) -->
+ <skip />
<string name="preference_summary_default_combination" msgid="8532964268242666060">"<xliff:g id="STATE">%1$s</xliff:g> / <xliff:g id="DESCRIPTION">%2$s</xliff:g>"</string>
<string name="bluetooth_disconnected" msgid="6557104142667339895">"已中斷連線"</string>
<string name="bluetooth_disconnecting" msgid="8913264760027764974">"正在中斷連線…"</string>
@@ -466,4 +468,6 @@
<string name="zen_mode_forever" msgid="2704305038191592967">"直到你關閉為止"</string>
<string name="time_unit_just_now" msgid="6363336622778342422">"剛剛"</string>
<string name="media_transfer_this_device_name" msgid="1636276898262571213">"這個裝置"</string>
+ <!-- no translation found for profile_connect_timeout_subtext (2401801610868184557) -->
+ <skip />
</resources>
diff --git a/packages/SettingsLib/res/values-zu/strings.xml b/packages/SettingsLib/res/values-zu/strings.xml
index ede336e..d4e8166 100644
--- a/packages/SettingsLib/res/values-zu/strings.xml
+++ b/packages/SettingsLib/res/values-zu/strings.xml
@@ -61,6 +61,8 @@
<string name="speed_label_medium" msgid="3175763313268941953">"Okumaphakathi"</string>
<string name="speed_label_fast" msgid="7715732164050975057">"Sheshayo"</string>
<string name="speed_label_very_fast" msgid="2265363430784523409">"Kushesha kakhulu"</string>
+ <!-- no translation found for wifi_passpoint_expired (1711402866023391443) -->
+ <skip />
<string name="preference_summary_default_combination" msgid="8532964268242666060">"<xliff:g id="STATE">%1$s</xliff:g> / <xliff:g id="DESCRIPTION">%2$s</xliff:g>"</string>
<string name="bluetooth_disconnected" msgid="6557104142667339895">"Ayixhunyiwe"</string>
<string name="bluetooth_disconnecting" msgid="8913264760027764974">"Inqamula uxhumano kwi-inthanethi..."</string>
@@ -466,4 +468,6 @@
<string name="zen_mode_forever" msgid="2704305038191592967">"Uze uvale isikrini"</string>
<string name="time_unit_just_now" msgid="6363336622778342422">"Khona manje"</string>
<string name="media_transfer_this_device_name" msgid="1636276898262571213">"Le divayisi"</string>
+ <!-- no translation found for profile_connect_timeout_subtext (2401801610868184557) -->
+ <skip />
</resources>
diff --git a/packages/SettingsLib/src/com/android/settingslib/wifi/WifiUtils.java b/packages/SettingsLib/src/com/android/settingslib/wifi/WifiUtils.java
index 658a0b5..6f19559 100644
--- a/packages/SettingsLib/src/com/android/settingslib/wifi/WifiUtils.java
+++ b/packages/SettingsLib/src/com/android/settingslib/wifi/WifiUtils.java
@@ -93,7 +93,7 @@
if (bssid != null) {
visibility.append(" ").append(bssid);
}
- visibility.append(" technology = ").append(info.getWifiTechnology());
+ visibility.append(" standard = ").append(info.getWifiStandard());
visibility.append(" rssi=").append(info.getRssi());
visibility.append(" ");
visibility.append(" score=").append(info.score);
diff --git a/packages/SystemUI/docs/broadcasts.md b/packages/SystemUI/docs/broadcasts.md
new file mode 100644
index 0000000..56a637f
--- /dev/null
+++ b/packages/SystemUI/docs/broadcasts.md
@@ -0,0 +1,89 @@
+# Using SystemUI's BroadcastDispatcher
+
+## What is this dispatcher?
+
+This is an internal dispatcher class for global broadcasts that SystemUI components want to receive. The dispatcher consolidates most `BroadcastReceiver` that exist in SystemUI by merging the `IntentFilter` and subscribing a single `BroadcastReceiver` per user with the system.
+
+## Why use the dispatcher?
+
+Having a single `BroadcastReceiver` in SystemUI improves the multi dispatch situation that occurs whenever many classes are filtering for the same intent action. In particular:
+* All supported `BroadcastReceiver` will be aggregated into one single receiver per user.
+* Whenever there is a broadcast, the number of IPC calls from `system_server` into SystemUI will be reduced to one per user (plus one for `USER_ALL`). This is meaninful for actions that are filtered by `BroadcastReceiver` in multiple classes.
+*There could be more than one per user in the case of unsupported filters.*
+* The dispatcher immediately moves out of the main thread upon broadcast, giving back control to `system_server`. This improves the total dispatch time for broadcasts and prevents from timing out.
+* The dispatcher significantly reduces time spent in main thread by handling most operations in a background thread and only using the main thread for subscribing/unsubscribind and dispatching where appropriate.
+
+## Should I use the dispatcher?
+
+The dispatcher supports `BroadcastReceiver` dynamic subscriptions in the following cases:
+
+* The `IntentFilter` contains at least one action.
+* The `IntentFilter` may or may not contain categories.
+* The `IntentFilter` **does not** contain data types, data schemes, data authorities or data paths.
+* The broadcast **is not** gated behind a permission.
+
+Additionally, the dispatcher supports the following:
+
+* Subscriptions can be done in any thread.
+* Broadcasts will be dispatched on the main thread (same as `system_server`) by default but a `Handler` can be specified for dispatching
+* A `UserHandle` can be provided to filter the broadcasts by user.
+
+If introducing a new `BroadcastReceiver` (not declared in `AndroidManifest`) that satisfies the constraints above, use the dispatcher to reduce the load on `system_server`.
+
+Do not use the dispatcher to obtain the last broadcast (by passing a null `BroadcastReceiver`). `BroadcastDispatcher#registerReceiver` **does not** return the last sticky Intent.
+
+Additionally, if listening to some broadcast is latency critical (beyond 100ms of latency), consider registering with Context instead.
+
+## How do I use the dispatcher?
+
+Acquire the dispatcher by using `@Inject` to obtain a `BroadcastDispatcher`. Then, use the following methods in that instance.
+
+### Subscribe
+
+```kotlin
+/**
+ * Register a receiver for broadcast with the dispatcher
+ *
+ * @param receiver A receiver to dispatch the [Intent]
+ * @param filter A filter to determine what broadcasts should be dispatched to this receiver.
+ * It will only take into account actions and categories for filtering. It must
+ * have at least one action.
+ * @param handler A handler to dispatch [BroadcastReceiver.onReceive]. By default, it is the
+ * main handler. Pass `null` to use the default.
+ * @param user A user handle to determine which broadcast should be dispatched to this receiver.
+ * By default, it is the current user.
+ * @throws IllegalArgumentException if the filter has other constraints that are not actions or
+ * categories or the filter has no actions.
+ */
+@JvmOverloads
+fun registerReceiver(BroadcastReceiver, IntentFilter, Handler? = mainHandler, UserHandle = context.user)
+```
+
+All subscriptions are done with the same overloaded method. As specified in the doc, in order to pass a `UserHandle` with the default `Handler`, pass `null` for the `Handler`.
+
+In the same way as with `Context`, subscribing the same `BroadcastReceiver` for the same user using different filters will result on two subscriptions, not in replacing the filter.
+
+### Unsubscribe
+
+There are two methods to unsubscribe a given `BroadcastReceiver`. One that will remove it for all users and another where the user can be specified. This allows using separate subscriptions of the same receiver for different users and manipulating them separately.
+
+```kotlin
+/**
+ * Unregister receiver for all users.
+ * <br>
+ * This will remove every registration of [receiver], not those done just with [UserHandle.ALL].
+ *
+ * @param receiver The receiver to unregister. It will be unregistered for all users.
+ */
+fun unregisterReceiver(BroadcastReceiver)
+
+/**
+ * Unregister receiver for a particular user.
+ *
+ * @param receiver The receiver to unregister. It will be unregistered for all users.
+ * @param user The user associated to the registered [receiver]. It can be [UserHandle.ALL].
+ */
+fun unregisterReceiverForUser(BroadcastReceiver, UserHandle)
+```
+
+Unregistering can be done even if the `BroadcastReceiver` has never been registered with `BroadcastDispatcher`. In that case, it is a No-Op.
diff --git a/packages/SystemUI/shared/src/com/android/systemui/shared/system/TaskStackChangeListener.java b/packages/SystemUI/shared/src/com/android/systemui/shared/system/TaskStackChangeListener.java
index 6186589..5f92b28 100644
--- a/packages/SystemUI/shared/src/com/android/systemui/shared/system/TaskStackChangeListener.java
+++ b/packages/SystemUI/shared/src/com/android/systemui/shared/system/TaskStackChangeListener.java
@@ -89,6 +89,14 @@
onTaskMovedToFront(taskInfo.taskId);
}
+ /**
+ * Called when a task’s description is changed due to an activity calling
+ * ActivityManagerService.setTaskDescription
+ *
+ * @param taskInfo info about the task which changed, with {@link TaskInfo#taskDescription}
+ */
+ public void onTaskDescriptionChanged(RunningTaskInfo taskInfo) { }
+
public void onActivityRequestedOrientationChanged(int taskId, int requestedOrientation) { }
public void onSizeCompatModeActivityChanged(int displayId, IBinder activityToken) { }
diff --git a/packages/SystemUI/shared/src/com/android/systemui/shared/system/TaskStackChangeListeners.java b/packages/SystemUI/shared/src/com/android/systemui/shared/system/TaskStackChangeListeners.java
index 8d823ca..074ef53 100644
--- a/packages/SystemUI/shared/src/com/android/systemui/shared/system/TaskStackChangeListeners.java
+++ b/packages/SystemUI/shared/src/com/android/systemui/shared/system/TaskStackChangeListeners.java
@@ -230,6 +230,11 @@
.sendToTarget();
}
+ @Override
+ public void onTaskDescriptionChanged(RunningTaskInfo taskInfo) {
+ mHandler.obtainMessage(H.ON_TASK_DESCRIPTION_CHANGED, taskInfo).sendToTarget();
+ }
+
private final class H extends Handler {
private static final int ON_TASK_STACK_CHANGED = 1;
private static final int ON_TASK_SNAPSHOT_CHANGED = 2;
@@ -254,6 +259,7 @@
private static final int ON_TASK_LIST_UPDATED = 21;
private static final int ON_SINGLE_TASK_DISPLAY_EMPTY = 22;
private static final int ON_TASK_LIST_FROZEN_UNFROZEN = 23;
+ private static final int ON_TASK_DESCRIPTION_CHANGED = 24;
public H(Looper looper) {
@@ -421,6 +427,13 @@
}
break;
}
+ case ON_TASK_DESCRIPTION_CHANGED: {
+ final RunningTaskInfo info = (RunningTaskInfo) msg.obj;
+ for (int i = mTaskStackListeners.size() - 1; i >= 0; i--) {
+ mTaskStackListeners.get(i).onTaskDescriptionChanged(info);
+ }
+ break;
+ }
}
}
}
diff --git a/packages/SystemUI/src/com/android/keyguard/EmergencyButton.java b/packages/SystemUI/src/com/android/keyguard/EmergencyButton.java
index 1c30762..ecd8c8d 100644
--- a/packages/SystemUI/src/com/android/keyguard/EmergencyButton.java
+++ b/packages/SystemUI/src/com/android/keyguard/EmergencyButton.java
@@ -50,14 +50,6 @@
* allows the user to return to the call.
*/
public class EmergencyButton extends Button {
- private static final Intent INTENT_EMERGENCY_DIAL = new Intent()
- .setAction(EmergencyDialerConstants.ACTION_DIAL)
- .setPackage("com.android.phone")
- .setFlags(Intent.FLAG_ACTIVITY_NEW_TASK
- | Intent.FLAG_ACTIVITY_EXCLUDE_FROM_RECENTS
- | Intent.FLAG_ACTIVITY_CLEAR_TOP)
- .putExtra(EmergencyDialerConstants.EXTRA_ENTRY_TYPE,
- EmergencyDialerConstants.ENTRY_TYPE_LOCKSCREEN_BUTTON);
private static final String LOG_TAG = "EmergencyButton";
private final EmergencyAffordanceManager mEmergencyAffordanceManager;
@@ -189,7 +181,15 @@
} else {
Dependency.get(KeyguardUpdateMonitor.class).reportEmergencyCallAction(
true /* bypassHandler */);
- getContext().startActivityAsUser(INTENT_EMERGENCY_DIAL,
+ Intent emergencyDialIntent =
+ getTelecommManager().createLaunchEmergencyDialerIntent(null /* number*/)
+ .setFlags(Intent.FLAG_ACTIVITY_NEW_TASK
+ | Intent.FLAG_ACTIVITY_EXCLUDE_FROM_RECENTS
+ | Intent.FLAG_ACTIVITY_CLEAR_TOP)
+ .putExtra(EmergencyDialerConstants.EXTRA_ENTRY_TYPE,
+ EmergencyDialerConstants.ENTRY_TYPE_LOCKSCREEN_BUTTON);
+
+ getContext().startActivityAsUser(emergencyDialIntent,
ActivityOptions.makeCustomAnimation(getContext(), 0, 0).toBundle(),
new UserHandle(KeyguardUpdateMonitor.getCurrentUser()));
}
diff --git a/packages/SystemUI/src/com/android/keyguard/KeyguardUpdateMonitor.java b/packages/SystemUI/src/com/android/keyguard/KeyguardUpdateMonitor.java
index 8373fb2..6685db1 100644
--- a/packages/SystemUI/src/com/android/keyguard/KeyguardUpdateMonitor.java
+++ b/packages/SystemUI/src/com/android/keyguard/KeyguardUpdateMonitor.java
@@ -102,6 +102,7 @@
import com.android.systemui.DumpController;
import com.android.systemui.Dumpable;
import com.android.systemui.R;
+import com.android.systemui.broadcast.BroadcastDispatcher;
import com.android.systemui.dagger.qualifiers.MainLooper;
import com.android.systemui.shared.system.ActivityManagerWrapper;
import com.android.systemui.shared.system.TaskStackChangeListener;
@@ -1502,6 +1503,7 @@
@VisibleForTesting
@Inject
protected KeyguardUpdateMonitor(Context context, @MainLooper Looper mainLooper,
+ BroadcastDispatcher broadcastDispatcher,
DumpController dumpController) {
mContext = context;
mSubscriptionManager = SubscriptionManager.from(context);
@@ -1645,12 +1647,12 @@
filter.addAction(TelephonyManager.ACTION_PHONE_STATE_CHANGED);
filter.addAction(AudioManager.RINGER_MODE_CHANGED_ACTION);
filter.addAction(DevicePolicyManager.ACTION_DEVICE_POLICY_MANAGER_STATE_CHANGED);
- context.registerReceiver(mBroadcastReceiver, filter, null, mHandler);
+ broadcastDispatcher.registerReceiver(mBroadcastReceiver, filter, mHandler);
final IntentFilter bootCompleteFilter = new IntentFilter();
bootCompleteFilter.setPriority(IntentFilter.SYSTEM_HIGH_PRIORITY);
bootCompleteFilter.addAction(Intent.ACTION_BOOT_COMPLETED);
- context.registerReceiver(mBroadcastReceiver, bootCompleteFilter, null, mHandler);
+ broadcastDispatcher.registerReceiver(mBroadcastReceiver, bootCompleteFilter, mHandler);
final IntentFilter allUserFilter = new IntentFilter();
allUserFilter.addAction(Intent.ACTION_USER_INFO_CHANGED);
@@ -1661,8 +1663,8 @@
allUserFilter.addAction(ACTION_USER_UNLOCKED);
allUserFilter.addAction(ACTION_USER_STOPPED);
allUserFilter.addAction(ACTION_USER_REMOVED);
- context.registerReceiverAsUser(mBroadcastAllReceiver, UserHandle.ALL, allUserFilter,
- null, mHandler);
+ broadcastDispatcher.registerReceiver(mBroadcastAllReceiver, allUserFilter, mHandler,
+ UserHandle.ALL);
mSubscriptionManager.addOnSubscriptionsChangedListener(mSubscriptionListener);
try {
diff --git a/packages/SystemUI/src/com/android/keyguard/clock/ClockManager.java b/packages/SystemUI/src/com/android/keyguard/clock/ClockManager.java
index 9e2464e..dfabe69 100644
--- a/packages/SystemUI/src/com/android/keyguard/clock/ClockManager.java
+++ b/packages/SystemUI/src/com/android/keyguard/clock/ClockManager.java
@@ -32,6 +32,7 @@
import androidx.annotation.VisibleForTesting;
import androidx.lifecycle.Observer;
+import com.android.systemui.broadcast.BroadcastDispatcher;
import com.android.systemui.colorextraction.SysuiColorExtractor;
import com.android.systemui.dock.DockManager;
import com.android.systemui.dock.DockManager.DockEventListener;
@@ -125,9 +126,9 @@
@Inject
public ClockManager(Context context, InjectionInflationController injectionInflater,
PluginManager pluginManager, SysuiColorExtractor colorExtractor,
- @Nullable DockManager dockManager) {
+ @Nullable DockManager dockManager, BroadcastDispatcher broadcastDispatcher) {
this(context, injectionInflater, pluginManager, colorExtractor,
- context.getContentResolver(), new CurrentUserObservable(context),
+ context.getContentResolver(), new CurrentUserObservable(broadcastDispatcher),
new SettingsWrapper(context.getContentResolver()), dockManager);
}
diff --git a/packages/SystemUI/src/com/android/systemui/BatteryMeterView.java b/packages/SystemUI/src/com/android/systemui/BatteryMeterView.java
index fef9198..2afcb12 100644
--- a/packages/SystemUI/src/com/android/systemui/BatteryMeterView.java
+++ b/packages/SystemUI/src/com/android/systemui/BatteryMeterView.java
@@ -51,6 +51,7 @@
import com.android.settingslib.Utils;
import com.android.settingslib.graph.ThemedBatteryDrawable;
+import com.android.systemui.broadcast.BroadcastDispatcher;
import com.android.systemui.plugins.DarkIconDispatcher;
import com.android.systemui.plugins.DarkIconDispatcher.DarkReceiver;
import com.android.systemui.settings.CurrentUserTracker;
@@ -112,16 +113,13 @@
private int mNonAdaptedForegroundColor;
private int mNonAdaptedBackgroundColor;
- public BatteryMeterView(Context context) {
- this(context, null, 0);
- }
-
public BatteryMeterView(Context context, AttributeSet attrs) {
this(context, attrs, 0);
}
public BatteryMeterView(Context context, AttributeSet attrs, int defStyle) {
super(context, attrs, defStyle);
+ BroadcastDispatcher broadcastDispatcher = Dependency.get(BroadcastDispatcher.class);
setOrientation(LinearLayout.HORIZONTAL);
setGravity(Gravity.CENTER_VERTICAL | Gravity.START);
@@ -161,7 +159,7 @@
// Init to not dark at all.
onDarkChanged(new Rect(), 0, DarkIconDispatcher.DEFAULT_ICON_TINT);
- mUserTracker = new CurrentUserTracker(mContext) {
+ mUserTracker = new CurrentUserTracker(broadcastDispatcher) {
@Override
public void onUserSwitched(int newUserId) {
mUser = newUserId;
diff --git a/packages/SystemUI/src/com/android/systemui/GuestResumeSessionReceiver.java b/packages/SystemUI/src/com/android/systemui/GuestResumeSessionReceiver.java
index 3a8536b..4afa969 100644
--- a/packages/SystemUI/src/com/android/systemui/GuestResumeSessionReceiver.java
+++ b/packages/SystemUI/src/com/android/systemui/GuestResumeSessionReceiver.java
@@ -32,6 +32,7 @@
import android.util.Log;
import android.view.WindowManagerGlobal;
+import com.android.systemui.broadcast.BroadcastDispatcher;
import com.android.systemui.statusbar.phone.SystemUIDialog;
/**
@@ -45,10 +46,14 @@
private Dialog mNewSessionDialog;
- public void register(Context context) {
+ /**
+ * Register this receiver with the {@link BroadcastDispatcher}
+ *
+ * @param broadcastDispatcher to register the receiver.
+ */
+ public void register(BroadcastDispatcher broadcastDispatcher) {
IntentFilter f = new IntentFilter(Intent.ACTION_USER_SWITCHED);
- context.registerReceiverAsUser(this, UserHandle.SYSTEM,
- f, null /* permission */, null /* scheduler */);
+ broadcastDispatcher.registerReceiver(this, f, null /* handler */, UserHandle.SYSTEM);
}
@Override
diff --git a/packages/SystemUI/src/com/android/systemui/LatencyTester.java b/packages/SystemUI/src/com/android/systemui/LatencyTester.java
index 30a60ab..1a47dac 100644
--- a/packages/SystemUI/src/com/android/systemui/LatencyTester.java
+++ b/packages/SystemUI/src/com/android/systemui/LatencyTester.java
@@ -29,6 +29,7 @@
import com.android.internal.util.LatencyTracker;
import com.android.keyguard.KeyguardUpdateMonitor;
+import com.android.systemui.broadcast.BroadcastDispatcher;
import com.android.systemui.statusbar.phone.BiometricUnlockController;
import javax.inject.Inject;
@@ -49,13 +50,16 @@
"com.android.systemui.latency.ACTION_TURN_ON_SCREEN";
private final BiometricUnlockController mBiometricUnlockController;
private final PowerManager mPowerManager;
+ private final BroadcastDispatcher mBroadcastDispatcher;
@Inject
public LatencyTester(Context context, BiometricUnlockController biometricUnlockController,
- PowerManager powerManager) {
+ PowerManager powerManager, BroadcastDispatcher broadcastDispatcher) {
super(context);
+
mBiometricUnlockController = biometricUnlockController;
mPowerManager = powerManager;
+ mBroadcastDispatcher = broadcastDispatcher;
}
@Override
@@ -67,7 +71,7 @@
IntentFilter filter = new IntentFilter();
filter.addAction(ACTION_FINGERPRINT_WAKE);
filter.addAction(ACTION_TURN_ON_SCREEN);
- mContext.registerReceiver(new BroadcastReceiver() {
+ mBroadcastDispatcher.registerReceiver(new BroadcastReceiver() {
@Override
public void onReceive(Context context, Intent intent) {
String action = intent.getAction();
diff --git a/packages/SystemUI/src/com/android/systemui/ScreenDecorations.java b/packages/SystemUI/src/com/android/systemui/ScreenDecorations.java
index 8a99e45..ab7eec5 100644
--- a/packages/SystemUI/src/com/android/systemui/ScreenDecorations.java
+++ b/packages/SystemUI/src/com/android/systemui/ScreenDecorations.java
@@ -67,6 +67,8 @@
import com.android.internal.util.Preconditions;
import com.android.systemui.RegionInterceptingFrameLayout.RegionInterceptableView;
+import com.android.systemui.broadcast.BroadcastDispatcher;
+import com.android.systemui.dagger.qualifiers.MainHandler;
import com.android.systemui.fragments.FragmentHostManager;
import com.android.systemui.fragments.FragmentHostManager.FragmentListener;
import com.android.systemui.plugins.qs.QS;
@@ -103,6 +105,9 @@
private final Lazy<StatusBar> mStatusBarLazy;
private DisplayManager mDisplayManager;
+ private final BroadcastDispatcher mBroadcastDispatcher;
+ private final Handler mMainHandler;
+ private final TunerService mTunerService;
private DisplayManager.DisplayListener mDisplayListener;
@VisibleForTesting
@@ -140,9 +145,16 @@
}
@Inject
- public ScreenDecorations(Context context, Lazy<StatusBar> statusBarLazy) {
+ public ScreenDecorations(Context context,
+ Lazy<StatusBar> statusBarLazy,
+ @MainHandler Handler handler,
+ BroadcastDispatcher broadcastDispatcher,
+ TunerService tunerService) {
super(context);
mStatusBarLazy = statusBarLazy;
+ mMainHandler = handler;
+ mBroadcastDispatcher = broadcastDispatcher;
+ mTunerService = tunerService;
}
@Override
@@ -239,8 +251,7 @@
mWindowManager.getDefaultDisplay().getMetrics(metrics);
mDensity = metrics.density;
- Dependency.get(Dependency.MAIN_HANDLER).post(
- () -> Dependency.get(TunerService.class).addTunable(this, SIZE));
+ mMainHandler.post(() -> mTunerService.addTunable(this, SIZE));
// Watch color inversion and invert the overlay as needed.
mColorInversionSetting = new SecureSetting(mContext, mHandler,
@@ -255,7 +266,7 @@
IntentFilter filter = new IntentFilter();
filter.addAction(Intent.ACTION_USER_SWITCHED);
- mContext.registerReceiver(mIntentReceiver, filter, null /* permission */, mHandler);
+ mBroadcastDispatcher.registerReceiver(mIntentReceiver, filter, mHandler);
mOverlay.addOnLayoutChangeListener(new OnLayoutChangeListener() {
@Override
diff --git a/packages/SystemUI/src/com/android/systemui/SliceBroadcastRelayHandler.java b/packages/SystemUI/src/com/android/systemui/SliceBroadcastRelayHandler.java
index 92fbd25..7a4ef2b 100644
--- a/packages/SystemUI/src/com/android/systemui/SliceBroadcastRelayHandler.java
+++ b/packages/SystemUI/src/com/android/systemui/SliceBroadcastRelayHandler.java
@@ -28,19 +28,27 @@
import com.android.internal.annotations.VisibleForTesting;
import com.android.settingslib.SliceBroadcastRelay;
+import com.android.systemui.broadcast.BroadcastDispatcher;
+
+import javax.inject.Inject;
+import javax.inject.Singleton;
/**
* Allows settings to register certain broadcasts to launch the settings app for pinned slices.
* @see SliceBroadcastRelay
*/
+@Singleton
public class SliceBroadcastRelayHandler extends SystemUI {
private static final String TAG = "SliceBroadcastRelay";
private static final boolean DEBUG = false;
private final ArrayMap<Uri, BroadcastRelay> mRelays = new ArrayMap<>();
+ private final BroadcastDispatcher mBroadcastDispatcher;
- public SliceBroadcastRelayHandler(Context context) {
+ @Inject
+ public SliceBroadcastRelayHandler(Context context, BroadcastDispatcher broadcastDispatcher) {
super(context);
+ mBroadcastDispatcher = broadcastDispatcher;
}
@Override
@@ -48,9 +56,10 @@
if (DEBUG) Log.d(TAG, "Start");
IntentFilter filter = new IntentFilter(SliceBroadcastRelay.ACTION_REGISTER);
filter.addAction(SliceBroadcastRelay.ACTION_UNREGISTER);
- mContext.registerReceiver(mReceiver, filter);
+ mBroadcastDispatcher.registerReceiver(mReceiver, filter);
}
+ // This does not use BroadcastDispatcher as the filter may have schemas or mime types.
@VisibleForTesting
void handleIntent(Intent intent) {
if (SliceBroadcastRelay.ACTION_REGISTER.equals(intent.getAction())) {
diff --git a/packages/SystemUI/src/com/android/systemui/SystemUIAppComponentFactory.java b/packages/SystemUI/src/com/android/systemui/SystemUIAppComponentFactory.java
index 746515a..cacbf96 100644
--- a/packages/SystemUI/src/com/android/systemui/SystemUIAppComponentFactory.java
+++ b/packages/SystemUI/src/com/android/systemui/SystemUIAppComponentFactory.java
@@ -19,6 +19,7 @@
import android.app.Activity;
import android.app.Application;
import android.app.Service;
+import android.content.BroadcastReceiver;
import android.content.ContentProvider;
import android.content.Context;
import android.content.Intent;
@@ -125,6 +126,25 @@
return super.instantiateServiceCompat(cl, className, intent);
}
+ @NonNull
+ @Override
+ public BroadcastReceiver instantiateReceiverCompat(@NonNull ClassLoader cl,
+ @NonNull String className, @Nullable Intent intent)
+ throws InstantiationException, IllegalAccessException, ClassNotFoundException {
+ if (mComponentHelper == null) {
+ // This shouldn't happen, but does when a device is freshly formatted.
+ // Bug filed against framework to take a look: http://b/141008541
+ SystemUIFactory.getInstance().getRootComponent().inject(
+ SystemUIAppComponentFactory.this);
+ }
+ BroadcastReceiver receiver = mComponentHelper.resolveBroadcastReceiver(className);
+ if (receiver != null) {
+ return receiver;
+ }
+
+ return super.instantiateReceiverCompat(cl, className, intent);
+ }
+
/**
* A callback that receives a Context when one is ready.
*/
diff --git a/packages/SystemUI/src/com/android/systemui/SystemUIApplication.java b/packages/SystemUI/src/com/android/systemui/SystemUIApplication.java
index 022bf06..aab4041 100644
--- a/packages/SystemUI/src/com/android/systemui/SystemUIApplication.java
+++ b/packages/SystemUI/src/com/android/systemui/SystemUIApplication.java
@@ -24,23 +24,14 @@
import android.content.IntentFilter;
import android.content.pm.ApplicationInfo;
import android.content.res.Configuration;
-import android.os.Handler;
-import android.os.Looper;
import android.os.Process;
import android.os.SystemProperties;
import android.os.Trace;
import android.os.UserHandle;
-import android.util.ArraySet;
import android.util.Log;
import android.util.TimingsTraceLog;
import com.android.systemui.dagger.ContextComponentHelper;
-import com.android.systemui.plugins.OverlayPlugin;
-import com.android.systemui.plugins.PluginListener;
-import com.android.systemui.shared.plugins.PluginManager;
-import com.android.systemui.statusbar.phone.DozeParameters;
-import com.android.systemui.statusbar.phone.StatusBar;
-import com.android.systemui.statusbar.phone.StatusBarWindowController;
import com.android.systemui.util.NotificationChannels;
import java.lang.reflect.Constructor;
@@ -224,65 +215,6 @@
}
Dependency.get(InitController.class).executePostInitTasks();
log.traceEnd();
- final Handler mainHandler = new Handler(Looper.getMainLooper());
- Dependency.get(PluginManager.class).addPluginListener(
- new PluginListener<OverlayPlugin>() {
- private ArraySet<OverlayPlugin> mOverlays = new ArraySet<>();
-
- @Override
- public void onPluginConnected(OverlayPlugin plugin, Context pluginContext) {
- mainHandler.post(new Runnable() {
- @Override
- public void run() {
- StatusBar statusBar = getComponent(StatusBar.class);
- if (statusBar != null) {
- plugin.setup(statusBar.getStatusBarWindow(),
- statusBar.getNavigationBarView(), new Callback(plugin),
- Dependency.get(DozeParameters.class));
- }
- }
- });
- }
-
- @Override
- public void onPluginDisconnected(OverlayPlugin plugin) {
- mainHandler.post(new Runnable() {
- @Override
- public void run() {
- mOverlays.remove(plugin);
- Dependency.get(StatusBarWindowController.class).setForcePluginOpen(
- mOverlays.size() != 0);
- }
- });
- }
-
- class Callback implements OverlayPlugin.Callback {
- private final OverlayPlugin mPlugin;
-
- Callback(OverlayPlugin plugin) {
- mPlugin = plugin;
- }
-
- @Override
- public void onHoldStatusBarOpenChange() {
- if (mPlugin.holdStatusBarOpen()) {
- mOverlays.add(mPlugin);
- } else {
- mOverlays.remove(mPlugin);
- }
- mainHandler.post(new Runnable() {
- @Override
- public void run() {
- Dependency.get(StatusBarWindowController.class)
- .setStateListener(b -> mOverlays.forEach(
- o -> o.setCollapseDesired(b)));
- Dependency.get(StatusBarWindowController.class)
- .setForcePluginOpen(mOverlays.size() != 0);
- }
- });
- }
- }
- }, OverlayPlugin.class, true /* Allow multiple plugins */);
mServicesStarted = true;
}
diff --git a/packages/SystemUI/src/com/android/systemui/assist/AssistHandleReminderExpBehavior.java b/packages/SystemUI/src/com/android/systemui/assist/AssistHandleReminderExpBehavior.java
index 3ff1b97..9a277e8 100644
--- a/packages/SystemUI/src/com/android/systemui/assist/AssistHandleReminderExpBehavior.java
+++ b/packages/SystemUI/src/com/android/systemui/assist/AssistHandleReminderExpBehavior.java
@@ -34,6 +34,7 @@
import com.android.internal.config.sysui.SystemUiDeviceConfigFlags;
import com.android.systemui.assist.AssistHandleBehaviorController.BehaviorController;
+import com.android.systemui.broadcast.BroadcastDispatcher;
import com.android.systemui.keyguard.WakefulnessLifecycle;
import com.android.systemui.model.SysUiState;
import com.android.systemui.plugins.statusbar.StatusBarStateController;
@@ -161,6 +162,7 @@
private final Lazy<SysUiState> mSysUiFlagContainer;
private final Lazy<WakefulnessLifecycle> mWakefulnessLifecycle;
private final Lazy<PackageManagerWrapper> mPackageManagerWrapper;
+ private final Lazy<BroadcastDispatcher> mBroadcastDispatcher;
private boolean mOnLockscreen;
private boolean mIsDozing;
@@ -193,7 +195,8 @@
Lazy<OverviewProxyService> overviewProxyService,
Lazy<SysUiState> sysUiFlagContainer,
Lazy<WakefulnessLifecycle> wakefulnessLifecycle,
- Lazy<PackageManagerWrapper> packageManagerWrapper) {
+ Lazy<PackageManagerWrapper> packageManagerWrapper,
+ Lazy<BroadcastDispatcher> broadcastDispatcher) {
mClock = clock;
mHandler = handler;
mPhenotypeHelper = phenotypeHelper;
@@ -207,6 +210,7 @@
for (String action : DEFAULT_HOME_CHANGE_ACTIONS) {
mDefaultHomeIntentFilter.addAction(action);
}
+ mBroadcastDispatcher = broadcastDispatcher;
}
@Override
@@ -215,7 +219,8 @@
mAssistHandleCallbacks = callbacks;
mConsecutiveTaskSwitches = 0;
mDefaultHome = getCurrentDefaultHome();
- context.registerReceiver(mDefaultHomeBroadcastReceiver, mDefaultHomeIntentFilter);
+ mBroadcastDispatcher.get()
+ .registerReceiver(mDefaultHomeBroadcastReceiver, mDefaultHomeIntentFilter);
mOnLockscreen = onLockscreen(mStatusBarStateController.get().getState());
mIsDozing = mStatusBarStateController.get().isDozing();
mStatusBarStateController.get().addCallback(mStatusBarStateListener);
diff --git a/packages/SystemUI/src/com/android/systemui/assist/AssistManager.java b/packages/SystemUI/src/com/android/systemui/assist/AssistManager.java
index b7a6167..398826c 100644
--- a/packages/SystemUI/src/com/android/systemui/assist/AssistManager.java
+++ b/packages/SystemUI/src/com/android/systemui/assist/AssistManager.java
@@ -45,6 +45,7 @@
import com.android.systemui.Dependency;
import com.android.systemui.R;
import com.android.systemui.assist.ui.DefaultUiController;
+import com.android.systemui.broadcast.BroadcastDispatcher;
import com.android.systemui.recents.OverviewProxyService;
import com.android.systemui.statusbar.CommandQueue;
import com.android.systemui.statusbar.policy.DeviceProvisionedController;
@@ -161,14 +162,15 @@
Context context,
AssistUtils assistUtils,
AssistHandleBehaviorController handleController,
- CommandQueue commandQueue) {
+ CommandQueue commandQueue,
+ BroadcastDispatcher broadcastDispatcher) {
mContext = context;
mDeviceProvisionedController = controller;
mCommandQueue = commandQueue;
mWindowManager = (WindowManager) mContext.getSystemService(Context.WINDOW_SERVICE);
mAssistUtils = assistUtils;
mAssistDisclosure = new AssistDisclosure(context, new Handler());
- mPhoneStateMonitor = new PhoneStateMonitor(context);
+ mPhoneStateMonitor = new PhoneStateMonitor(context, broadcastDispatcher);
mHandleController = handleController;
registerVoiceInteractionSessionListener();
diff --git a/packages/SystemUI/src/com/android/systemui/assist/PhoneStateMonitor.java b/packages/SystemUI/src/com/android/systemui/assist/PhoneStateMonitor.java
index e73dc4a..95d611a 100644
--- a/packages/SystemUI/src/com/android/systemui/assist/PhoneStateMonitor.java
+++ b/packages/SystemUI/src/com/android/systemui/assist/PhoneStateMonitor.java
@@ -29,6 +29,7 @@
import com.android.systemui.Dependency;
import com.android.systemui.SysUiServiceProvider;
+import com.android.systemui.broadcast.BroadcastDispatcher;
import com.android.systemui.plugins.statusbar.StatusBarStateController;
import com.android.systemui.shared.system.ActivityManagerWrapper;
import com.android.systemui.shared.system.PackageManagerWrapper;
@@ -67,7 +68,7 @@
private boolean mLauncherShowing;
@Nullable private ComponentName mDefaultHome;
- PhoneStateMonitor(Context context) {
+ PhoneStateMonitor(Context context, BroadcastDispatcher broadcastDispatcher) {
mContext = context;
mStatusBarStateController = Dependency.get(StatusBarStateController.class);
@@ -77,7 +78,7 @@
for (String action : DEFAULT_HOME_CHANGE_ACTIONS) {
intentFilter.addAction(action);
}
- mContext.registerReceiver(new BroadcastReceiver() {
+ broadcastDispatcher.registerReceiver(new BroadcastReceiver() {
@Override
public void onReceive(Context context, Intent intent) {
mDefaultHome = getCurrentDefaultHome();
diff --git a/packages/SystemUI/src/com/android/systemui/broadcast/UserBroadcastDispatcher.kt b/packages/SystemUI/src/com/android/systemui/broadcast/UserBroadcastDispatcher.kt
index ddda95a..24357a7 100644
--- a/packages/SystemUI/src/com/android/systemui/broadcast/UserBroadcastDispatcher.kt
+++ b/packages/SystemUI/src/com/android/systemui/broadcast/UserBroadcastDispatcher.kt
@@ -31,6 +31,7 @@
import java.io.FileDescriptor
import java.io.PrintWriter
import java.util.concurrent.atomic.AtomicBoolean
+import java.util.concurrent.atomic.AtomicInteger
private const val MSG_REGISTER_RECEIVER = 0
private const val MSG_UNREGISTER_RECEIVER = 1
@@ -50,6 +51,13 @@
private val bgLooper: Looper
) : BroadcastReceiver(), Dumpable {
+ companion object {
+ // Used only for debugging. If not debugging, this variable will not be accessed and all
+ // received broadcasts will be tagged with 0. However, as DEBUG is false, nothing will be
+ // logged
+ val index = AtomicInteger(0)
+ }
+
private val bgHandler = object : Handler(bgLooper) {
override fun handleMessage(msg: Message) {
when (msg.what) {
@@ -97,7 +105,10 @@
private val receiverToReceiverData = ArrayMap<BroadcastReceiver, MutableSet<ReceiverData>>()
override fun onReceive(context: Context, intent: Intent) {
- bgHandler.post(HandleBroadcastRunnable(actionsToReceivers, context, intent, pendingResult))
+ val id = if (DEBUG) index.getAndIncrement() else 0
+ if (DEBUG) Log.w(TAG, "[$id] Received $intent")
+ bgHandler.post(
+ HandleBroadcastRunnable(actionsToReceivers, context, intent, pendingResult, id))
}
/**
@@ -161,17 +172,19 @@
val actionsToReceivers: Map<String, Set<ReceiverData>>,
val context: Context,
val intent: Intent,
- val pendingResult: PendingResult
+ val pendingResult: PendingResult,
+ val index: Int
) : Runnable {
override fun run() {
- if (DEBUG) Log.w(TAG, "Dispatching $intent")
+ if (DEBUG) Log.w(TAG, "[$index] Dispatching $intent")
actionsToReceivers.get(intent.action)
?.filter {
it.filter.hasAction(intent.action) &&
it.filter.matchCategories(intent.categories) == null }
?.forEach {
it.handler.post {
- if (DEBUG) Log.w(TAG, "Dispatching to ${it.receiver}")
+ if (DEBUG) Log.w(TAG,
+ "[$index] Dispatching ${intent.action} to ${it.receiver}")
it.receiver.pendingResult = pendingResult
it.receiver.onReceive(context, intent)
}
diff --git a/packages/SystemUI/src/com/android/systemui/dagger/ContextComponentHelper.java b/packages/SystemUI/src/com/android/systemui/dagger/ContextComponentHelper.java
index 37a447f..1e7449c 100644
--- a/packages/SystemUI/src/com/android/systemui/dagger/ContextComponentHelper.java
+++ b/packages/SystemUI/src/com/android/systemui/dagger/ContextComponentHelper.java
@@ -18,6 +18,7 @@
import android.app.Activity;
import android.app.Service;
+import android.content.BroadcastReceiver;
import com.android.systemui.SystemUI;
import com.android.systemui.recents.RecentsImplementation;
@@ -37,4 +38,7 @@
/** Turns a classname into an instance of the class or returns null. */
SystemUI resolveSystemUI(String className);
+
+ /** Turns a classname into an instance of the class or returns null. */
+ BroadcastReceiver resolveBroadcastReceiver(String className);
}
diff --git a/packages/SystemUI/src/com/android/systemui/dagger/ContextComponentResolver.java b/packages/SystemUI/src/com/android/systemui/dagger/ContextComponentResolver.java
index 06339bd..f91d795 100644
--- a/packages/SystemUI/src/com/android/systemui/dagger/ContextComponentResolver.java
+++ b/packages/SystemUI/src/com/android/systemui/dagger/ContextComponentResolver.java
@@ -18,6 +18,7 @@
import android.app.Activity;
import android.app.Service;
+import android.content.BroadcastReceiver;
import com.android.systemui.SystemUI;
import com.android.systemui.recents.RecentsImplementation;
@@ -37,16 +38,19 @@
private final Map<Class<?>, Provider<Service>> mServiceCreators;
private final Map<Class<?>, Provider<SystemUI>> mSystemUICreators;
private final Map<Class<?>, Provider<RecentsImplementation>> mRecentsCreators;
+ private final Map<Class<?>, Provider<BroadcastReceiver>> mBroadcastReceiverCreators;
@Inject
ContextComponentResolver(Map<Class<?>, Provider<Activity>> activityCreators,
Map<Class<?>, Provider<Service>> serviceCreators,
Map<Class<?>, Provider<SystemUI>> systemUICreators,
- Map<Class<?>, Provider<RecentsImplementation>> recentsCreators) {
+ Map<Class<?>, Provider<RecentsImplementation>> recentsCreators,
+ Map<Class<?>, Provider<BroadcastReceiver>> broadcastReceiverCreators) {
mActivityCreators = activityCreators;
mServiceCreators = serviceCreators;
mSystemUICreators = systemUICreators;
mRecentsCreators = recentsCreators;
+ mBroadcastReceiverCreators = broadcastReceiverCreators;
}
/**
@@ -58,6 +62,14 @@
}
/**
+ * Looks up the BroadcastReceiver class name to see if Dagger has an instance of it.
+ */
+ @Override
+ public BroadcastReceiver resolveBroadcastReceiver(String className) {
+ return resolve(className, mBroadcastReceiverCreators);
+ }
+
+ /**
* Looks up the RecentsImplementation class name to see if Dagger has an instance of it.
*/
@Override
diff --git a/packages/SystemUI/src/com/android/systemui/dagger/DefaultActivityBinder.java b/packages/SystemUI/src/com/android/systemui/dagger/DefaultActivityBinder.java
index 61ded13..4593164 100644
--- a/packages/SystemUI/src/com/android/systemui/dagger/DefaultActivityBinder.java
+++ b/packages/SystemUI/src/com/android/systemui/dagger/DefaultActivityBinder.java
@@ -19,7 +19,11 @@
import android.app.Activity;
import com.android.systemui.ForegroundServicesDialog;
+import com.android.systemui.keyguard.WorkLockActivity;
+import com.android.systemui.settings.BrightnessDialog;
import com.android.systemui.tuner.TunerActivity;
+import com.android.systemui.usb.UsbDebuggingActivity;
+import com.android.systemui.usb.UsbDebuggingSecondaryUserActivity;
import dagger.Binds;
import dagger.Module;
@@ -42,4 +46,29 @@
@IntoMap
@ClassKey(ForegroundServicesDialog.class)
public abstract Activity bindForegroundServicesDialog(ForegroundServicesDialog activity);
+
+ /** Inject into WorkLockActivity. */
+ @Binds
+ @IntoMap
+ @ClassKey(WorkLockActivity.class)
+ public abstract Activity bindWorkLockActivity(WorkLockActivity activity);
+
+ /** Inject into BrightnessDialog. */
+ @Binds
+ @IntoMap
+ @ClassKey(BrightnessDialog.class)
+ public abstract Activity bindBrightnessDialog(BrightnessDialog activity);
+
+ /** Inject into UsbDebuggingActivity. */
+ @Binds
+ @IntoMap
+ @ClassKey(UsbDebuggingActivity.class)
+ public abstract Activity bindUsbDebuggingActivity(UsbDebuggingActivity activity);
+
+ /** Inject into UsbDebuggingSecondaryUserActivity. */
+ @Binds
+ @IntoMap
+ @ClassKey(UsbDebuggingSecondaryUserActivity.class)
+ public abstract Activity bindUsbDebuggingSecondaryUserActivity(
+ UsbDebuggingSecondaryUserActivity activity);
}
diff --git a/packages/SystemUI/src/com/android/systemui/dagger/DefaultBroadcastReceiverBinder.java b/packages/SystemUI/src/com/android/systemui/dagger/DefaultBroadcastReceiverBinder.java
new file mode 100644
index 0000000..56d0fa2
--- /dev/null
+++ b/packages/SystemUI/src/com/android/systemui/dagger/DefaultBroadcastReceiverBinder.java
@@ -0,0 +1,39 @@
+/*
+ * Copyright (C) 2019 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.systemui.dagger;
+
+import android.content.BroadcastReceiver;
+
+import com.android.systemui.screenshot.GlobalScreenshot.ActionProxyReceiver;
+
+import dagger.Binds;
+import dagger.Module;
+import dagger.multibindings.ClassKey;
+import dagger.multibindings.IntoMap;
+
+/**
+ * BroadcastReceivers that are injectable should go here.
+ */
+@Module
+public abstract class DefaultBroadcastReceiverBinder {
+ /** */
+ @Binds
+ @IntoMap
+ @ClassKey(ActionProxyReceiver.class)
+ public abstract BroadcastReceiver bindActionProxyReceiver(
+ ActionProxyReceiver broadcastReceiver);
+}
diff --git a/packages/SystemUI/src/com/android/systemui/dagger/DefaultComponentBinder.java b/packages/SystemUI/src/com/android/systemui/dagger/DefaultComponentBinder.java
index d8989ee..18fe3ec 100644
--- a/packages/SystemUI/src/com/android/systemui/dagger/DefaultComponentBinder.java
+++ b/packages/SystemUI/src/com/android/systemui/dagger/DefaultComponentBinder.java
@@ -23,6 +23,9 @@
*
* See {@link ContextComponentResolver}
*/
-@Module(includes = {DefaultActivityBinder.class, DefaultServiceBinder.class, SystemUIBinder.class})
+@Module(includes = {DefaultActivityBinder.class,
+ DefaultBroadcastReceiverBinder.class,
+ DefaultServiceBinder.class,
+ SystemUIBinder.class})
public abstract class DefaultComponentBinder {
}
diff --git a/packages/SystemUI/src/com/android/systemui/dagger/DefaultServiceBinder.java b/packages/SystemUI/src/com/android/systemui/dagger/DefaultServiceBinder.java
index 14bb80c..85cd51c 100644
--- a/packages/SystemUI/src/com/android/systemui/dagger/DefaultServiceBinder.java
+++ b/packages/SystemUI/src/com/android/systemui/dagger/DefaultServiceBinder.java
@@ -21,6 +21,7 @@
import com.android.systemui.ImageWallpaper;
import com.android.systemui.doze.DozeService;
import com.android.systemui.keyguard.KeyguardService;
+import com.android.systemui.screenshot.TakeScreenshotService;
import dagger.Binds;
import dagger.Module;
@@ -49,4 +50,10 @@
@IntoMap
@ClassKey(KeyguardService.class)
public abstract Service bindKeyguardService(KeyguardService service);
+
+ /** */
+ @Binds
+ @IntoMap
+ @ClassKey(TakeScreenshotService.class)
+ public abstract Service bindTakeScreenshotService(TakeScreenshotService service);
}
diff --git a/packages/SystemUI/src/com/android/systemui/dagger/DependencyProvider.java b/packages/SystemUI/src/com/android/systemui/dagger/DependencyProvider.java
index 11879bb..6d61b2f 100644
--- a/packages/SystemUI/src/com/android/systemui/dagger/DependencyProvider.java
+++ b/packages/SystemUI/src/com/android/systemui/dagger/DependencyProvider.java
@@ -27,12 +27,15 @@
import android.os.Looper;
import android.os.Process;
import android.os.ServiceManager;
+import android.os.UserManager;
import android.util.DisplayMetrics;
import android.view.IWindowManager;
+import android.view.LayoutInflater;
import com.android.internal.logging.MetricsLogger;
import com.android.internal.statusbar.IStatusBarService;
import com.android.internal.widget.LockPatternUtils;
+import com.android.systemui.broadcast.BroadcastDispatcher;
import com.android.systemui.dagger.qualifiers.BgHandler;
import com.android.systemui.dagger.qualifiers.BgLooper;
import com.android.systemui.dagger.qualifiers.MainHandler;
@@ -153,6 +156,13 @@
ServiceManager.getService(Context.NOTIFICATION_SERVICE));
}
+ /** */
+ @Singleton
+ @Provides
+ public LayoutInflater providerLayoutInflater(Context context) {
+ return LayoutInflater.from(context);
+ }
+
@Singleton
@Provides
public LeakDetector provideLeakDetector() {
@@ -217,8 +227,8 @@
@Singleton
@Provides
public DeviceProvisionedController provideDeviceProvisionedController(Context context,
- @MainHandler Handler mainHandler) {
- return new DeviceProvisionedControllerImpl(context, mainHandler);
+ @MainHandler Handler mainHandler, BroadcastDispatcher broadcastDispatcher) {
+ return new DeviceProvisionedControllerImpl(context, mainHandler, broadcastDispatcher);
}
/** */
@@ -232,4 +242,11 @@
public AlwaysOnDisplayPolicy provideAlwaysOnDisplayPolicy(Context context) {
return new AlwaysOnDisplayPolicy(context);
}
+
+ /** */
+ @Singleton
+ @Provides
+ public UserManager providesUserManager(Context context) {
+ return context.getSystemService(UserManager.class);
+ }
}
diff --git a/packages/SystemUI/src/com/android/systemui/dagger/SystemUIBinder.java b/packages/SystemUI/src/com/android/systemui/dagger/SystemUIBinder.java
index ead6de2..3b0c9ae 100644
--- a/packages/SystemUI/src/com/android/systemui/dagger/SystemUIBinder.java
+++ b/packages/SystemUI/src/com/android/systemui/dagger/SystemUIBinder.java
@@ -30,6 +30,7 @@
import com.android.systemui.LatencyTester;
import com.android.systemui.ScreenDecorations;
import com.android.systemui.SizeCompatModeActivityController;
+import com.android.systemui.SliceBroadcastRelayHandler;
import com.android.systemui.SystemUI;
import com.android.systemui.UiOffloadThread;
import com.android.systemui.appops.AppOpsController;
@@ -48,6 +49,7 @@
import com.android.systemui.power.PowerUI;
import com.android.systemui.recents.Recents;
import com.android.systemui.recents.RecentsModule;
+import com.android.systemui.shared.plugins.PluginManager;
import com.android.systemui.statusbar.CommandQueue;
import com.android.systemui.statusbar.FeatureFlags;
import com.android.systemui.statusbar.NavigationBarController;
@@ -94,9 +96,11 @@
import com.android.systemui.statusbar.policy.KeyguardStateController;
import com.android.systemui.statusbar.policy.NetworkController;
import com.android.systemui.statusbar.policy.RemoteInputQuickSettingsDisabler;
+import com.android.systemui.statusbar.policy.RemoteInputUriController;
import com.android.systemui.statusbar.policy.UserSwitcherController;
import com.android.systemui.statusbar.policy.ZenModeController;
import com.android.systemui.statusbar.tv.TvStatusBar;
+import com.android.systemui.theme.ThemeOverlayController;
import com.android.systemui.util.InjectionInflationController;
import com.android.systemui.util.leak.GarbageMonitor;
import com.android.systemui.volume.VolumeUI;
@@ -183,12 +187,24 @@
public abstract SystemUI bindsSizeCompatModeActivityController(
SizeCompatModeActivityController sysui);
+ /** Inject into SliceBroadcastRelayHandler. */
+ @Binds
+ @IntoMap
+ @ClassKey(SliceBroadcastRelayHandler.class)
+ public abstract SystemUI bindSliceBroadcastRelayHandler(SliceBroadcastRelayHandler sysui);
+
/** Inject into StatusBar. */
@Binds
@IntoMap
@ClassKey(StatusBar.class)
public abstract SystemUI bindsStatusBar(StatusBar sysui);
+ /** Inject into ThemeOverlayController. */
+ @Binds
+ @IntoMap
+ @ClassKey(ThemeOverlayController.class)
+ public abstract SystemUI bindThemeOverlayController(ThemeOverlayController sysui);
+
/** Inject into TvStatusBar. */
@Binds
@IntoMap
@@ -271,7 +287,9 @@
DozeServiceHost dozeServiceHost,
PowerManager powerManager,
DozeScrimController dozeScrimController,
- CommandQueue commandQueue) {
+ CommandQueue commandQueue,
+ PluginManager pluginManager,
+ RemoteInputUriController remoteInputUriController) {
return new StatusBar(
context,
featureFlags,
@@ -337,7 +355,9 @@
dozeServiceHost,
powerManager,
dozeScrimController,
- commandQueue);
+ commandQueue,
+ pluginManager,
+ remoteInputUriController);
}
}
diff --git a/packages/SystemUI/src/com/android/systemui/doze/DozeFactory.java b/packages/SystemUI/src/com/android/systemui/doze/DozeFactory.java
index 33f68cf..eaa72dc 100644
--- a/packages/SystemUI/src/com/android/systemui/doze/DozeFactory.java
+++ b/packages/SystemUI/src/com/android/systemui/doze/DozeFactory.java
@@ -29,6 +29,7 @@
import com.android.keyguard.KeyguardUpdateMonitor;
import com.android.systemui.R;
import com.android.systemui.SystemUIApplication;
+import com.android.systemui.broadcast.BroadcastDispatcher;
import com.android.systemui.dock.DockManager;
import com.android.systemui.keyguard.WakefulnessLifecycle;
import com.android.systemui.plugins.FalsingManager;
@@ -58,6 +59,7 @@
private final DelayedWakeLock.Builder mDelayedWakeLockBuilder;
private final Handler mHandler;
private final BiometricUnlockController mBiometricUnlockController;
+ private final BroadcastDispatcher mBroadcastDispatcher;
@Inject
public DozeFactory(FalsingManager falsingManager, DozeLog dozeLog,
@@ -67,7 +69,8 @@
DockManager dockManager, @Nullable IWallpaperManager wallpaperManager,
ProximitySensor proximitySensor,
DelayedWakeLock.Builder delayedWakeLockBuilder, Handler handler,
- BiometricUnlockController biometricUnlockController) {
+ BiometricUnlockController biometricUnlockController,
+ BroadcastDispatcher broadcastDispatcher) {
mFalsingManager = falsingManager;
mDozeLog = dozeLog;
mDozeParameters = dozeParameters;
@@ -82,6 +85,7 @@
mDelayedWakeLockBuilder = delayedWakeLockBuilder;
mHandler = handler;
mBiometricUnlockController = biometricUnlockController;
+ mBroadcastDispatcher = broadcastDispatcher;
}
/** Creates a DozeMachine with its parts for {@code dozeService}. */
@@ -123,8 +127,8 @@
DozeParameters params, Handler handler) {
Sensor sensor = DozeSensors.findSensorWithType(sensorManager,
context.getString(R.string.doze_brightness_sensor_type));
- return new DozeScreenBrightness(context, service, sensorManager, sensor, host, handler,
- params.getPolicy());
+ return new DozeScreenBrightness(context, service, sensorManager, sensor,
+ mBroadcastDispatcher, host, handler, params.getPolicy());
}
private DozeTriggers createDozeTriggers(Context context, AsyncSensorManager sensorManager,
@@ -134,7 +138,7 @@
boolean allowPulseTriggers = true;
return new DozeTriggers(context, machine, host, alarmManager, config, params,
sensorManager, handler, wakeLock, allowPulseTriggers, dockManager,
- mProximitySensor, dozeLog);
+ mProximitySensor, dozeLog, mBroadcastDispatcher);
}
diff --git a/packages/SystemUI/src/com/android/systemui/doze/DozeScreenBrightness.java b/packages/SystemUI/src/com/android/systemui/doze/DozeScreenBrightness.java
index bd6882c..39a2562 100644
--- a/packages/SystemUI/src/com/android/systemui/doze/DozeScreenBrightness.java
+++ b/packages/SystemUI/src/com/android/systemui/doze/DozeScreenBrightness.java
@@ -31,6 +31,7 @@
import android.provider.Settings;
import com.android.internal.annotations.VisibleForTesting;
+import com.android.systemui.broadcast.BroadcastDispatcher;
/**
* Controls the screen brightness when dozing.
@@ -49,6 +50,7 @@
private final Handler mHandler;
private final SensorManager mSensorManager;
private final Sensor mLightSensor;
+ private final BroadcastDispatcher mBroadcastDispatcher;
private final int[] mSensorToBrightness;
private final int[] mSensorToScrimOpacity;
private final boolean mDebuggable;
@@ -69,13 +71,15 @@
@VisibleForTesting
public DozeScreenBrightness(Context context, DozeMachine.Service service,
- SensorManager sensorManager, Sensor lightSensor, DozeHost host,
+ SensorManager sensorManager, Sensor lightSensor,
+ BroadcastDispatcher broadcastDispatcher, DozeHost host,
Handler handler, int defaultDozeBrightness, int[] sensorToBrightness,
int[] sensorToScrimOpacity, boolean debuggable) {
mContext = context;
mDozeService = service;
mSensorManager = sensorManager;
mLightSensor = lightSensor;
+ mBroadcastDispatcher = broadcastDispatcher;
mDozeHost = host;
mHandler = handler;
mDebuggable = debuggable;
@@ -87,14 +91,15 @@
if (mDebuggable) {
IntentFilter filter = new IntentFilter();
filter.addAction(ACTION_AOD_BRIGHTNESS);
- mContext.registerReceiverAsUser(this, UserHandle.ALL, filter, null, handler);
+ mBroadcastDispatcher.registerReceiver(this, filter, handler, UserHandle.ALL);
}
}
public DozeScreenBrightness(Context context, DozeMachine.Service service,
- SensorManager sensorManager, Sensor lightSensor, DozeHost host,
- Handler handler, AlwaysOnDisplayPolicy policy) {
- this(context, service, sensorManager, lightSensor, host, handler,
+ SensorManager sensorManager, Sensor lightSensor,
+ BroadcastDispatcher broadcastDispatcher, DozeHost host, Handler handler,
+ AlwaysOnDisplayPolicy policy) {
+ this(context, service, sensorManager, lightSensor, broadcastDispatcher, host, handler,
context.getResources().getInteger(
com.android.internal.R.integer.config_screenBrightnessDoze),
policy.screenBrightnessArray, policy.dimmingScrimArray, DEBUG_AOD_BRIGHTNESS);
@@ -127,7 +132,7 @@
private void onDestroy() {
setLightSensorEnabled(false);
if (mDebuggable) {
- mContext.unregisterReceiver(this);
+ mBroadcastDispatcher.unregisterReceiver(this);
}
}
diff --git a/packages/SystemUI/src/com/android/systemui/doze/DozeTriggers.java b/packages/SystemUI/src/com/android/systemui/doze/DozeTriggers.java
index b212884..1134268 100644
--- a/packages/SystemUI/src/com/android/systemui/doze/DozeTriggers.java
+++ b/packages/SystemUI/src/com/android/systemui/doze/DozeTriggers.java
@@ -36,6 +36,7 @@
import com.android.internal.logging.MetricsLogger;
import com.android.internal.logging.nano.MetricsProto.MetricsEvent;
import com.android.systemui.Dependency;
+import com.android.systemui.broadcast.BroadcastDispatcher;
import com.android.systemui.dock.DockManager;
import com.android.systemui.statusbar.phone.DozeParameters;
import com.android.systemui.util.Assert;
@@ -80,6 +81,7 @@
private final DockEventListener mDockEventListener = new DockEventListener();
private final DockManager mDockManager;
private final ProximitySensor.ProximityCheck mProxCheck;
+ private final BroadcastDispatcher mBroadcastDispatcher;
private long mNotificationPulseTime;
private boolean mPulsePending;
@@ -91,7 +93,7 @@
DozeParameters dozeParameters, AsyncSensorManager sensorManager, Handler handler,
WakeLock wakeLock, boolean allowPulseTriggers, DockManager dockManager,
ProximitySensor proximitySensor,
- DozeLog dozeLog) {
+ DozeLog dozeLog, BroadcastDispatcher broadcastDispatcher) {
mContext = context;
mMachine = machine;
mDozeHost = dozeHost;
@@ -107,6 +109,7 @@
mDockManager = dockManager;
mProxCheck = new ProximitySensor.ProximityCheck(proximitySensor, handler);
mDozeLog = dozeLog;
+ mBroadcastDispatcher = broadcastDispatcher;
}
private void onNotification(Runnable onPulseSuppressedListener) {
@@ -299,7 +302,7 @@
public void transitionTo(DozeMachine.State oldState, DozeMachine.State newState) {
switch (newState) {
case INITIALIZED:
- mBroadcastReceiver.register(mContext);
+ mBroadcastReceiver.register(mBroadcastDispatcher);
mDozeHost.addCallback(mHostCallback);
if (mDockManager != null) {
mDockManager.addListener(mDockEventListener);
@@ -334,7 +337,7 @@
mDozeSensors.updateListening();
break;
case FINISH:
- mBroadcastReceiver.unregister(mContext);
+ mBroadcastReceiver.unregister(mBroadcastDispatcher);
mDozeHost.removeCallback(mHostCallback);
if (mDockManager != null) {
mDockManager.removeListener(mDockEventListener);
@@ -437,22 +440,22 @@
}
}
- public void register(Context context) {
+ public void register(BroadcastDispatcher broadcastDispatcher) {
if (mRegistered) {
return;
}
IntentFilter filter = new IntentFilter(PULSE_ACTION);
filter.addAction(UiModeManager.ACTION_ENTER_CAR_MODE);
filter.addAction(Intent.ACTION_USER_SWITCHED);
- context.registerReceiver(this, filter);
+ broadcastDispatcher.registerReceiver(this, filter);
mRegistered = true;
}
- public void unregister(Context context) {
+ public void unregister(BroadcastDispatcher broadcastDispatcher) {
if (!mRegistered) {
return;
}
- context.unregisterReceiver(this);
+ broadcastDispatcher.unregisterReceiver(this);
mRegistered = false;
}
}
diff --git a/packages/SystemUI/src/com/android/systemui/globalactions/GlobalActionsDialog.java b/packages/SystemUI/src/com/android/systemui/globalactions/GlobalActionsDialog.java
index 22846bc..bb2d142 100644
--- a/packages/SystemUI/src/com/android/systemui/globalactions/GlobalActionsDialog.java
+++ b/packages/SystemUI/src/com/android/systemui/globalactions/GlobalActionsDialog.java
@@ -52,6 +52,7 @@
import android.provider.Settings;
import android.service.dreams.DreamService;
import android.service.dreams.IDreamManager;
+import android.telecom.TelecomManager;
import android.telephony.PhoneStateListener;
import android.telephony.ServiceState;
import android.telephony.TelephonyManager;
@@ -145,6 +146,7 @@
private final DevicePolicyManager mDevicePolicyManager;
private final LockPatternUtils mLockPatternUtils;
private final KeyguardManager mKeyguardManager;
+ private final BroadcastDispatcher mBroadcastDispatcher;
private ArrayList<Action> mItems;
private ActionsDialog mDialog;
@@ -182,13 +184,14 @@
Context.DEVICE_POLICY_SERVICE);
mLockPatternUtils = new LockPatternUtils(mContext);
mKeyguardManager = (KeyguardManager) mContext.getSystemService(Context.KEYGUARD_SERVICE);
+ mBroadcastDispatcher = Dependency.get(BroadcastDispatcher.class);
// receive broadcasts
IntentFilter filter = new IntentFilter();
filter.addAction(Intent.ACTION_CLOSE_SYSTEM_DIALOGS);
filter.addAction(Intent.ACTION_SCREEN_OFF);
filter.addAction(TelephonyIntents.ACTION_EMERGENCY_CALLBACK_MODE_CHANGED);
- Dependency.get(BroadcastDispatcher.class).registerReceiver(mBroadcastReceiver, filter);
+ mBroadcastDispatcher.registerReceiver(mBroadcastReceiver, filter);
ConnectivityManager cm = (ConnectivityManager)
context.getSystemService(Context.CONNECTIVITY_SERVICE);
@@ -563,7 +566,8 @@
@Override
public void onPress() {
MetricsLogger.action(mContext, MetricsEvent.ACTION_EMERGENCY_DIALER_FROM_POWER_MENU);
- Intent intent = new Intent(EmergencyDialerConstants.ACTION_DIAL);
+ Intent intent = mContext.getSystemService(TelecomManager.class)
+ .createLaunchEmergencyDialerIntent(null /* number */);
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK
| Intent.FLAG_ACTIVITY_EXCLUDE_FROM_RECENTS
| Intent.FLAG_ACTIVITY_CLEAR_TOP);
@@ -899,7 +903,7 @@
mAdapter.notifyDataSetChanged();
if (mShowSilentToggle) {
IntentFilter filter = new IntentFilter(AudioManager.RINGER_MODE_CHANGED_ACTION);
- mContext.registerReceiver(mRingerModeReceiver, filter);
+ mBroadcastDispatcher.registerReceiver(mRingerModeReceiver, filter);
}
}
@@ -917,7 +921,7 @@
mWindowManagerFuncs.onGlobalActionsHidden();
if (mShowSilentToggle) {
try {
- mContext.unregisterReceiver(mRingerModeReceiver);
+ mBroadcastDispatcher.unregisterReceiver(mRingerModeReceiver);
} catch (IllegalArgumentException ie) {
// ignore this
Log.w(TAG, ie);
diff --git a/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java b/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java
index 411bf9a..3b1edcc 100644
--- a/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java
+++ b/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java
@@ -87,6 +87,7 @@
import com.android.systemui.SystemUI;
import com.android.systemui.SystemUIFactory;
import com.android.systemui.UiOffloadThread;
+import com.android.systemui.broadcast.BroadcastDispatcher;
import com.android.systemui.plugins.FalsingManager;
import com.android.systemui.statusbar.phone.BiometricUnlockController;
import com.android.systemui.statusbar.phone.KeyguardBypassController;
@@ -319,6 +320,7 @@
*/
private boolean mWaitingUntilKeyguardVisible = false;
private final LockPatternUtils mLockPatternUtils;
+ private final BroadcastDispatcher mBroadcastDispatcher;
private boolean mKeyguardDonePending = false;
private boolean mHideAnimationRun = false;
private boolean mHideAnimationRunning = false;
@@ -685,8 +687,10 @@
public KeyguardViewMediator(
Context context,
FalsingManager falsingManager,
- LockPatternUtils lockPatternUtils) {
- this(context, falsingManager, lockPatternUtils, SystemUIFactory.getInstance());
+ LockPatternUtils lockPatternUtils,
+ BroadcastDispatcher broadcastDispatcher) {
+ this(context, falsingManager, lockPatternUtils, broadcastDispatcher,
+ SystemUIFactory.getInstance());
}
@VisibleForTesting
@@ -694,10 +698,12 @@
Context context,
FalsingManager falsingManager,
LockPatternUtils lockPatternUtils,
+ BroadcastDispatcher broadcastDispatcher,
SystemUIFactory systemUIFactory) {
super(context);
mFalsingManager = falsingManager;
mLockPatternUtils = lockPatternUtils;
+ mBroadcastDispatcher = broadcastDispatcher;
mStatusBarKeyguardViewManager = systemUIFactory.createStatusBarKeyguardViewManager(
mContext,
mViewMediatorCallback,
@@ -722,7 +728,7 @@
IntentFilter filter = new IntentFilter();
filter.addAction(Intent.ACTION_SHUTDOWN);
- mContext.registerReceiver(mBroadcastReceiver, filter);
+ mBroadcastDispatcher.registerReceiver(mBroadcastReceiver, filter);
final IntentFilter delayedActionFilter = new IntentFilter();
delayedActionFilter.addAction(DELAYED_KEYGUARD_ACTION);
diff --git a/packages/SystemUI/src/com/android/systemui/keyguard/WorkLockActivity.java b/packages/SystemUI/src/com/android/systemui/keyguard/WorkLockActivity.java
index 4d061e1..86c532c 100644
--- a/packages/SystemUI/src/com/android/systemui/keyguard/WorkLockActivity.java
+++ b/packages/SystemUI/src/com/android/systemui/keyguard/WorkLockActivity.java
@@ -36,6 +36,9 @@
import com.android.internal.annotations.VisibleForTesting;
import com.android.systemui.R;
+import com.android.systemui.broadcast.BroadcastDispatcher;
+
+import javax.inject.Inject;
/**
* Bouncer between work activities and the activity used to confirm credentials before unlocking
@@ -67,14 +70,21 @@
* @see KeyguardManager
*/
private KeyguardManager mKgm;
+ private final BroadcastDispatcher mBroadcastDispatcher;
+
+ @Inject
+ public WorkLockActivity(BroadcastDispatcher broadcastDispatcher) {
+ super();
+ mBroadcastDispatcher = broadcastDispatcher;
+ }
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
- registerReceiverAsUser(mLockEventReceiver, UserHandle.ALL,
- new IntentFilter(Intent.ACTION_DEVICE_LOCKED_CHANGED), /* permission */ null,
- /* scheduler */ null);
+ mBroadcastDispatcher.registerReceiver(mLockEventReceiver,
+ new IntentFilter(Intent.ACTION_DEVICE_LOCKED_CHANGED), null /* handler */,
+ UserHandle.ALL);
// Once the receiver is registered, check whether anything happened between now and the time
// when this activity was launched. If it did and the user is unlocked now, just quit.
diff --git a/packages/SystemUI/src/com/android/systemui/pip/BasePipManager.java b/packages/SystemUI/src/com/android/systemui/pip/BasePipManager.java
index 05be425..75e260e 100644
--- a/packages/SystemUI/src/com/android/systemui/pip/BasePipManager.java
+++ b/packages/SystemUI/src/com/android/systemui/pip/BasePipManager.java
@@ -19,10 +19,12 @@
import android.content.Context;
import android.content.res.Configuration;
+import com.android.systemui.broadcast.BroadcastDispatcher;
+
import java.io.PrintWriter;
public interface BasePipManager {
- void initialize(Context context);
+ void initialize(Context context, BroadcastDispatcher broadcastDispatcher);
void showPictureInPictureMenu();
default void expandPip() {}
default void hidePipMenu(Runnable onStartCallback, Runnable onEndCallback) {}
diff --git a/packages/SystemUI/src/com/android/systemui/pip/PipUI.java b/packages/SystemUI/src/com/android/systemui/pip/PipUI.java
index feb5d19..583ce67 100644
--- a/packages/SystemUI/src/com/android/systemui/pip/PipUI.java
+++ b/packages/SystemUI/src/com/android/systemui/pip/PipUI.java
@@ -26,6 +26,7 @@
import android.os.UserManager;
import com.android.systemui.SystemUI;
+import com.android.systemui.broadcast.BroadcastDispatcher;
import com.android.systemui.statusbar.CommandQueue;
import java.io.FileDescriptor;
@@ -42,12 +43,15 @@
private final CommandQueue mCommandQueue;
private BasePipManager mPipManager;
+ private final BroadcastDispatcher mBroadcastDispatcher;
private boolean mSupportsPip;
@Inject
- public PipUI(Context context, CommandQueue commandQueue) {
+ public PipUI(Context context, CommandQueue commandQueue,
+ BroadcastDispatcher broadcastDispatcher) {
super(context);
+ mBroadcastDispatcher = broadcastDispatcher;
mCommandQueue = commandQueue;
}
@@ -68,7 +72,7 @@
mPipManager = pm.hasSystemFeature(FEATURE_LEANBACK_ONLY)
? com.android.systemui.pip.tv.PipManager.getInstance()
: com.android.systemui.pip.phone.PipManager.getInstance();
- mPipManager.initialize(mContext);
+ mPipManager.initialize(mContext, mBroadcastDispatcher);
mCommandQueue.addCallback(this);
}
diff --git a/packages/SystemUI/src/com/android/systemui/pip/phone/PipManager.java b/packages/SystemUI/src/com/android/systemui/pip/phone/PipManager.java
index 369073c..c33b8d9 100644
--- a/packages/SystemUI/src/com/android/systemui/pip/phone/PipManager.java
+++ b/packages/SystemUI/src/com/android/systemui/pip/phone/PipManager.java
@@ -37,6 +37,7 @@
import com.android.systemui.Dependency;
import com.android.systemui.UiOffloadThread;
+import com.android.systemui.broadcast.BroadcastDispatcher;
import com.android.systemui.pip.BasePipManager;
import com.android.systemui.pip.PipBoundsHandler;
import com.android.systemui.shared.system.ActivityManagerWrapper;
@@ -200,7 +201,7 @@
/**
* Initializes {@link PipManager}.
*/
- public void initialize(Context context) {
+ public void initialize(Context context, BroadcastDispatcher broadcastDispatcher) {
mContext = context;
mActivityManager = ActivityManager.getService();
mActivityTaskManager = ActivityTaskManager.getService();
@@ -214,7 +215,7 @@
mPipBoundsHandler = new PipBoundsHandler(context);
mInputConsumerController = InputConsumerController.getPipInputConsumer();
- mMediaController = new PipMediaController(context, mActivityManager);
+ mMediaController = new PipMediaController(context, mActivityManager, broadcastDispatcher);
mMenuController = new PipMenuActivityController(context, mActivityManager, mMediaController,
mInputConsumerController);
mTouchHandler = new PipTouchHandler(context, mActivityManager, mActivityTaskManager,
diff --git a/packages/SystemUI/src/com/android/systemui/pip/phone/PipMediaController.java b/packages/SystemUI/src/com/android/systemui/pip/phone/PipMediaController.java
index 174a7ef..e57b416 100644
--- a/packages/SystemUI/src/com/android/systemui/pip/phone/PipMediaController.java
+++ b/packages/SystemUI/src/com/android/systemui/pip/phone/PipMediaController.java
@@ -37,6 +37,7 @@
import com.android.systemui.Dependency;
import com.android.systemui.R;
+import com.android.systemui.broadcast.BroadcastDispatcher;
import com.android.systemui.statusbar.policy.UserInfoController;
import java.util.ArrayList;
@@ -109,7 +110,8 @@
private ArrayList<ActionListener> mListeners = new ArrayList<>();
- public PipMediaController(Context context, IActivityManager activityManager) {
+ public PipMediaController(Context context, IActivityManager activityManager,
+ BroadcastDispatcher broadcastDispatcher) {
mContext = context;
mActivityManager = activityManager;
IntentFilter mediaControlFilter = new IntentFilter();
@@ -117,7 +119,7 @@
mediaControlFilter.addAction(ACTION_PAUSE);
mediaControlFilter.addAction(ACTION_NEXT);
mediaControlFilter.addAction(ACTION_PREV);
- mContext.registerReceiver(mPlayPauseActionReceiver, mediaControlFilter);
+ broadcastDispatcher.registerReceiver(mPlayPauseActionReceiver, mediaControlFilter);
createMediaActions();
mMediaSessionManager =
diff --git a/packages/SystemUI/src/com/android/systemui/pip/tv/PipManager.java b/packages/SystemUI/src/com/android/systemui/pip/tv/PipManager.java
index 81d6973..195fca8 100644
--- a/packages/SystemUI/src/com/android/systemui/pip/tv/PipManager.java
+++ b/packages/SystemUI/src/com/android/systemui/pip/tv/PipManager.java
@@ -48,6 +48,7 @@
import com.android.systemui.Dependency;
import com.android.systemui.R;
import com.android.systemui.UiOffloadThread;
+import com.android.systemui.broadcast.BroadcastDispatcher;
import com.android.systemui.pip.BasePipManager;
import com.android.systemui.pip.PipBoundsHandler;
import com.android.systemui.shared.system.ActivityManagerWrapper;
@@ -227,7 +228,7 @@
/**
* Initializes {@link PipManager}.
*/
- public void initialize(Context context) {
+ public void initialize(Context context, BroadcastDispatcher broadcastDispatcher) {
if (mInitialized) {
return;
}
@@ -238,8 +239,8 @@
ActivityManagerWrapper.getInstance().registerTaskStackListener(mTaskStackListener);
IntentFilter intentFilter = new IntentFilter();
intentFilter.addAction(Intent.ACTION_MEDIA_RESOURCE_GRANTED);
- mContext.registerReceiverAsUser(mBroadcastReceiver, UserHandle.ALL, intentFilter,
- null, null);
+ broadcastDispatcher.registerReceiver(mBroadcastReceiver, intentFilter,
+ null /* handler */, UserHandle.ALL);
if (sSettingsPackageAndClassNamePairList == null) {
String[] settings = mContext.getResources().getStringArray(
@@ -286,7 +287,7 @@
Log.e(TAG, "Failed to register pinned stack listener", e);
}
- mPipNotification = new PipNotification(context);
+ mPipNotification = new PipNotification(context, broadcastDispatcher);
}
private void loadConfigurationsAndApply(Configuration newConfig) {
diff --git a/packages/SystemUI/src/com/android/systemui/pip/tv/PipNotification.java b/packages/SystemUI/src/com/android/systemui/pip/tv/PipNotification.java
index d50f294e4..ca15131 100644
--- a/packages/SystemUI/src/com/android/systemui/pip/tv/PipNotification.java
+++ b/packages/SystemUI/src/com/android/systemui/pip/tv/PipNotification.java
@@ -34,6 +34,7 @@
import com.android.internal.messages.nano.SystemMessageProto.SystemMessage;
import com.android.systemui.R;
+import com.android.systemui.broadcast.BroadcastDispatcher;
import com.android.systemui.util.NotificationChannels;
/**
@@ -143,7 +144,7 @@
}
};
- public PipNotification(Context context) {
+ public PipNotification(Context context, BroadcastDispatcher broadcastDispatcher) {
mNotificationManager = (NotificationManager) context.getSystemService(
Context.NOTIFICATION_SERVICE);
@@ -161,7 +162,7 @@
IntentFilter intentFilter = new IntentFilter();
intentFilter.addAction(ACTION_MENU);
intentFilter.addAction(ACTION_CLOSE);
- context.registerReceiver(mEventReceiver, intentFilter);
+ broadcastDispatcher.registerReceiver(mEventReceiver, intentFilter);
onConfigurationChanged(context);
}
diff --git a/packages/SystemUI/src/com/android/systemui/privacy/PrivacyItemController.kt b/packages/SystemUI/src/com/android/systemui/privacy/PrivacyItemController.kt
index ca16e84..d592492 100644
--- a/packages/SystemUI/src/com/android/systemui/privacy/PrivacyItemController.kt
+++ b/packages/SystemUI/src/com/android/systemui/privacy/PrivacyItemController.kt
@@ -34,6 +34,7 @@
import com.android.systemui.R
import com.android.systemui.appops.AppOpItem
import com.android.systemui.appops.AppOpsController
+import com.android.systemui.broadcast.BroadcastDispatcher
import com.android.systemui.dagger.qualifiers.BgHandler
import com.android.systemui.dagger.qualifiers.MainHandler
import java.io.FileDescriptor
@@ -47,10 +48,11 @@
@Singleton
class PrivacyItemController @Inject constructor(
- val context: Context,
+ private val context: Context,
private val appOpsController: AppOpsController,
@MainHandler private val uiHandler: Handler,
- @BgHandler private val bgHandler: Handler
+ @BgHandler private val bgHandler: Handler,
+ private val broadcastDispatcher: BroadcastDispatcher
) : Dumpable {
@VisibleForTesting
@@ -138,15 +140,15 @@
}
private fun unregisterReceiver() {
- context.unregisterReceiver(userSwitcherReceiver)
+ broadcastDispatcher.unregisterReceiver(userSwitcherReceiver)
}
private fun registerReceiver() {
- context.registerReceiverAsUser(userSwitcherReceiver, UserHandle.ALL, IntentFilter().apply {
+ broadcastDispatcher.registerReceiver(userSwitcherReceiver, IntentFilter().apply {
intents.forEach {
addAction(it)
}
- }, null, null)
+ }, null /* handler */, UserHandle.ALL)
}
private fun update(updateUsers: Boolean) {
diff --git a/packages/SystemUI/src/com/android/systemui/qs/QSPanel.java b/packages/SystemUI/src/com/android/systemui/qs/QSPanel.java
index 39f0865..cac9025 100644
--- a/packages/SystemUI/src/com/android/systemui/qs/QSPanel.java
+++ b/packages/SystemUI/src/com/android/systemui/qs/QSPanel.java
@@ -50,6 +50,7 @@
import com.android.systemui.DumpController;
import com.android.systemui.Dumpable;
import com.android.systemui.R;
+import com.android.systemui.broadcast.BroadcastDispatcher;
import com.android.systemui.plugins.qs.DetailAdapter;
import com.android.systemui.plugins.qs.QSTile;
import com.android.systemui.plugins.qs.QSTileView;
@@ -125,12 +126,13 @@
}
public QSPanel(Context context, AttributeSet attrs, DumpController dumpController) {
- this(context, attrs, dumpController, null);
+ this(context, attrs, dumpController, null, Dependency.get(BroadcastDispatcher.class));
}
@Inject
public QSPanel(@Named(VIEW_CONTEXT) Context context, AttributeSet attrs,
- DumpController dumpController, PluginManager pluginManager) {
+ DumpController dumpController, PluginManager pluginManager,
+ BroadcastDispatcher broadcastDispatcher) {
super(context, attrs);
mContext = context;
@@ -177,7 +179,7 @@
updateResources();
mBrightnessController = new BrightnessController(getContext(),
- findViewById(R.id.brightness_slider));
+ findViewById(R.id.brightness_slider), broadcastDispatcher);
mDumpController = dumpController;
mPluginManager = pluginManager;
if (mPluginManager != null && Settings.System.getInt(
diff --git a/packages/SystemUI/src/com/android/systemui/qs/QSTileHost.java b/packages/SystemUI/src/com/android/systemui/qs/QSTileHost.java
index b395c3c..6d434b1 100644
--- a/packages/SystemUI/src/com/android/systemui/qs/QSTileHost.java
+++ b/packages/SystemUI/src/com/android/systemui/qs/QSTileHost.java
@@ -34,6 +34,7 @@
import com.android.systemui.Dumpable;
import com.android.systemui.R;
import com.android.systemui.SysUiServiceProvider;
+import com.android.systemui.broadcast.BroadcastDispatcher;
import com.android.systemui.dagger.qualifiers.BgLooper;
import com.android.systemui.dagger.qualifiers.MainHandler;
import com.android.systemui.plugins.PluginListener;
@@ -80,6 +81,7 @@
private final TunerService mTunerService;
private final PluginManager mPluginManager;
private final DumpController mDumpController;
+ private final BroadcastDispatcher mBroadcastDispatcher;
private final List<Callback> mCallbacks = new ArrayList<>();
private AutoTileManager mAutoTiles;
@@ -99,14 +101,16 @@
PluginManager pluginManager,
TunerService tunerService,
Provider<AutoTileManager> autoTiles,
- DumpController dumpController) {
+ DumpController dumpController,
+ BroadcastDispatcher broadcastDispatcher) {
mIconController = iconController;
mContext = context;
mTunerService = tunerService;
mPluginManager = pluginManager;
mDumpController = dumpController;
+ mBroadcastDispatcher = broadcastDispatcher;
- mServices = new TileServices(this, bgLooper);
+ mServices = new TileServices(this, bgLooper, mBroadcastDispatcher);
defaultFactory.setHost(this);
mQsFactories.add(defaultFactory);
@@ -334,7 +338,8 @@
Intent intent = new Intent().setComponent(component);
TileLifecycleManager lifecycleManager = new TileLifecycleManager(new Handler(),
mContext, mServices, new Tile(), intent,
- new UserHandle(ActivityManager.getCurrentUser()));
+ new UserHandle(ActivityManager.getCurrentUser()),
+ mBroadcastDispatcher);
lifecycleManager.onStopListening();
lifecycleManager.onTileRemoved();
TileLifecycleManager.setTileAdded(mContext, component, false);
diff --git a/packages/SystemUI/src/com/android/systemui/qs/QuickStatusBarHeader.java b/packages/SystemUI/src/com/android/systemui/qs/QuickStatusBarHeader.java
index 24ac27e..19af235 100644
--- a/packages/SystemUI/src/com/android/systemui/qs/QuickStatusBarHeader.java
+++ b/packages/SystemUI/src/com/android/systemui/qs/QuickStatusBarHeader.java
@@ -61,6 +61,7 @@
import com.android.systemui.BatteryMeterView;
import com.android.systemui.DualToneHandler;
import com.android.systemui.R;
+import com.android.systemui.broadcast.BroadcastDispatcher;
import com.android.systemui.plugins.ActivityStarter;
import com.android.systemui.plugins.DarkIconDispatcher;
import com.android.systemui.plugins.DarkIconDispatcher.DarkReceiver;
@@ -150,6 +151,7 @@
private boolean mPermissionsHubEnabled;
private PrivacyItemController mPrivacyItemController;
+ private BroadcastDispatcher mBroadcastDispatcher;
private final BroadcastReceiver mRingerReceiver = new BroadcastReceiver() {
@Override
@@ -189,7 +191,7 @@
NextAlarmController nextAlarmController, ZenModeController zenModeController,
StatusBarIconController statusBarIconController,
ActivityStarter activityStarter, PrivacyItemController privacyItemController,
- CommandQueue commandQueue) {
+ CommandQueue commandQueue, BroadcastDispatcher broadcastDispatcher) {
super(context, attrs);
mAlarmController = nextAlarmController;
mZenController = zenModeController;
@@ -198,6 +200,7 @@
mPrivacyItemController = privacyItemController;
mDualToneHandler = new DualToneHandler(
new ContextThemeWrapper(context, R.style.QSHeaderTheme));
+ mBroadcastDispatcher = broadcastDispatcher;
mCommandQueue = commandQueue;
}
@@ -551,14 +554,14 @@
if (listening) {
mZenController.addCallback(this);
mAlarmController.addCallback(this);
- mContext.registerReceiver(mRingerReceiver,
+ mBroadcastDispatcher.registerReceiver(mRingerReceiver,
new IntentFilter(AudioManager.INTERNAL_RINGER_MODE_CHANGED_ACTION));
mPrivacyItemController.addCallback(mPICCallback);
} else {
mZenController.removeCallback(this);
mAlarmController.removeCallback(this);
mPrivacyItemController.removeCallback(mPICCallback);
- mContext.unregisterReceiver(mRingerReceiver);
+ mBroadcastDispatcher.unregisterReceiver(mRingerReceiver);
mPrivacyChipLogged = false;
}
}
diff --git a/packages/SystemUI/src/com/android/systemui/qs/external/TileLifecycleManager.java b/packages/SystemUI/src/com/android/systemui/qs/external/TileLifecycleManager.java
index f59e0c2..9261412 100644
--- a/packages/SystemUI/src/com/android/systemui/qs/external/TileLifecycleManager.java
+++ b/packages/SystemUI/src/com/android/systemui/qs/external/TileLifecycleManager.java
@@ -38,6 +38,8 @@
import androidx.annotation.VisibleForTesting;
+import com.android.systemui.broadcast.BroadcastDispatcher;
+
import java.util.Objects;
import java.util.Set;
@@ -72,6 +74,7 @@
private final UserHandle mUser;
private final IBinder mToken = new Binder();
private final PackageManagerAdapter mPackageManagerAdapter;
+ private final BroadcastDispatcher mBroadcastDispatcher;
private Set<Integer> mQueuedMessages = new ArraySet<>();
private QSTileServiceWrapper mWrapper;
@@ -88,13 +91,15 @@
private boolean mIsBound;
public TileLifecycleManager(Handler handler, Context context, IQSService service, Tile tile,
- Intent intent, UserHandle user) {
- this(handler, context, service, tile, intent, user, new PackageManagerAdapter(context));
+ Intent intent, UserHandle user, BroadcastDispatcher broadcastDispatcher) {
+ this(handler, context, service, tile, intent, user, new PackageManagerAdapter(context),
+ broadcastDispatcher);
}
@VisibleForTesting
TileLifecycleManager(Handler handler, Context context, IQSService service, Tile tile,
- Intent intent, UserHandle user, PackageManagerAdapter packageManagerAdapter) {
+ Intent intent, UserHandle user, PackageManagerAdapter packageManagerAdapter,
+ BroadcastDispatcher broadcastDispatcher) {
mContext = context;
mHandler = handler;
mIntent = intent;
@@ -102,6 +107,7 @@
mIntent.putExtra(TileService.EXTRA_TOKEN, mToken);
mUser = user;
mPackageManagerAdapter = packageManagerAdapter;
+ mBroadcastDispatcher = broadcastDispatcher;
if (DEBUG) Log.d(TAG, "Creating " + mIntent + " " + mUser);
}
@@ -306,13 +312,14 @@
filter.addDataScheme("package");
mContext.registerReceiverAsUser(this, mUser, filter, null, mHandler);
filter = new IntentFilter(Intent.ACTION_USER_UNLOCKED);
- mContext.registerReceiverAsUser(this, mUser, filter, null, mHandler);
+ mBroadcastDispatcher.registerReceiver(this, filter, mHandler, mUser);
mReceiverRegistered = true;
}
private void stopPackageListening() {
if (DEBUG) Log.d(TAG, "stopPackageListening");
mContext.unregisterReceiver(this);
+ mBroadcastDispatcher.unregisterReceiver(this);
mReceiverRegistered = false;
}
diff --git a/packages/SystemUI/src/com/android/systemui/qs/external/TileServiceManager.java b/packages/SystemUI/src/com/android/systemui/qs/external/TileServiceManager.java
index 0b4e648..1902d65 100644
--- a/packages/SystemUI/src/com/android/systemui/qs/external/TileServiceManager.java
+++ b/packages/SystemUI/src/com/android/systemui/qs/external/TileServiceManager.java
@@ -34,6 +34,7 @@
import androidx.annotation.VisibleForTesting;
+import com.android.systemui.broadcast.BroadcastDispatcher;
import com.android.systemui.qs.external.TileLifecycleManager.TileChangeListener;
import java.util.List;
@@ -72,10 +73,10 @@
private boolean mStarted = false;
TileServiceManager(TileServices tileServices, Handler handler, ComponentName component,
- Tile tile) {
+ Tile tile, BroadcastDispatcher broadcastDispatcher) {
this(tileServices, handler, new TileLifecycleManager(handler,
tileServices.getContext(), tileServices, tile, new Intent().setComponent(component),
- new UserHandle(ActivityManager.getCurrentUser())));
+ new UserHandle(ActivityManager.getCurrentUser()), broadcastDispatcher));
}
@VisibleForTesting
diff --git a/packages/SystemUI/src/com/android/systemui/qs/external/TileServices.java b/packages/SystemUI/src/com/android/systemui/qs/external/TileServices.java
index 13cfa78..db7c6ad 100644
--- a/packages/SystemUI/src/com/android/systemui/qs/external/TileServices.java
+++ b/packages/SystemUI/src/com/android/systemui/qs/external/TileServices.java
@@ -37,6 +37,7 @@
import com.android.internal.statusbar.StatusBarIcon;
import com.android.systemui.Dependency;
+import com.android.systemui.broadcast.BroadcastDispatcher;
import com.android.systemui.qs.QSTileHost;
import com.android.systemui.statusbar.phone.StatusBarIconController;
import com.android.systemui.statusbar.policy.KeyguardStateController;
@@ -60,13 +61,15 @@
private final Handler mHandler;
private final Handler mMainHandler;
private final QSTileHost mHost;
+ private final BroadcastDispatcher mBroadcastDispatcher;
private int mMaxBound = DEFAULT_MAX_BOUND;
- public TileServices(QSTileHost host, Looper looper) {
+ public TileServices(QSTileHost host, Looper looper, BroadcastDispatcher broadcastDispatcher) {
mHost = host;
mContext = mHost.getContext();
- mContext.registerReceiver(mRequestListeningReceiver,
+ mBroadcastDispatcher = broadcastDispatcher;
+ mBroadcastDispatcher.registerReceiver(mRequestListeningReceiver,
new IntentFilter(TileService.ACTION_REQUEST_LISTENING));
mHandler = new Handler(looper);
mMainHandler = new Handler(Looper.getMainLooper());
@@ -82,7 +85,8 @@
public TileServiceManager getTileWrapper(CustomTile tile) {
ComponentName component = tile.getComponent();
- TileServiceManager service = onCreateTileService(component, tile.getQsTile());
+ TileServiceManager service = onCreateTileService(component, tile.getQsTile(),
+ mBroadcastDispatcher);
synchronized (mServices) {
mServices.put(tile, service);
mTiles.put(component, tile);
@@ -93,8 +97,10 @@
return service;
}
- protected TileServiceManager onCreateTileService(ComponentName component, Tile tile) {
- return new TileServiceManager(this, mHandler, component, tile);
+ protected TileServiceManager onCreateTileService(ComponentName component, Tile tile,
+ BroadcastDispatcher broadcastDispatcher) {
+ return new TileServiceManager(this, mHandler, component, tile,
+ broadcastDispatcher);
}
public void freeService(CustomTile tile, TileServiceManager service) {
@@ -323,7 +329,7 @@
public void destroy() {
synchronized (mServices) {
mServices.values().forEach(service -> service.handleDestroy());
- mContext.unregisterReceiver(mRequestListeningReceiver);
+ mBroadcastDispatcher.unregisterReceiver(mRequestListeningReceiver);
}
}
diff --git a/packages/SystemUI/src/com/android/systemui/qs/tiles/AirplaneModeTile.java b/packages/SystemUI/src/com/android/systemui/qs/tiles/AirplaneModeTile.java
index 19e20a9..da74663 100644
--- a/packages/SystemUI/src/com/android/systemui/qs/tiles/AirplaneModeTile.java
+++ b/packages/SystemUI/src/com/android/systemui/qs/tiles/AirplaneModeTile.java
@@ -33,6 +33,7 @@
import com.android.internal.telephony.TelephonyIntents;
import com.android.internal.telephony.TelephonyProperties;
import com.android.systemui.R;
+import com.android.systemui.broadcast.BroadcastDispatcher;
import com.android.systemui.plugins.ActivityStarter;
import com.android.systemui.plugins.qs.QSTile.BooleanState;
import com.android.systemui.qs.GlobalSetting;
@@ -46,13 +47,16 @@
private final Icon mIcon = ResourceIcon.get(com.android.internal.R.drawable.ic_qs_airplane);
private final GlobalSetting mSetting;
private final ActivityStarter mActivityStarter;
+ private final BroadcastDispatcher mBroadcastDispatcher;
private boolean mListening;
@Inject
- public AirplaneModeTile(QSHost host, ActivityStarter activityStarter) {
+ public AirplaneModeTile(QSHost host, ActivityStarter activityStarter,
+ BroadcastDispatcher broadcastDispatcher) {
super(host);
mActivityStarter = activityStarter;
+ mBroadcastDispatcher = broadcastDispatcher;
mSetting = new GlobalSetting(mContext, mHandler, Global.AIRPLANE_MODE_ON) {
@Override
@@ -133,9 +137,9 @@
if (listening) {
final IntentFilter filter = new IntentFilter();
filter.addAction(Intent.ACTION_AIRPLANE_MODE_CHANGED);
- mContext.registerReceiver(mReceiver, filter);
+ mBroadcastDispatcher.registerReceiver(mReceiver, filter);
} else {
- mContext.unregisterReceiver(mReceiver);
+ mBroadcastDispatcher.unregisterReceiver(mReceiver);
}
mSetting.setListening(listening);
}
diff --git a/packages/SystemUI/src/com/android/systemui/qs/tiles/DndTile.java b/packages/SystemUI/src/com/android/systemui/qs/tiles/DndTile.java
index 869fa6b..52d1a5b3 100644
--- a/packages/SystemUI/src/com/android/systemui/qs/tiles/DndTile.java
+++ b/packages/SystemUI/src/com/android/systemui/qs/tiles/DndTile.java
@@ -52,6 +52,7 @@
import com.android.systemui.Prefs;
import com.android.systemui.R;
import com.android.systemui.SysUIToast;
+import com.android.systemui.broadcast.BroadcastDispatcher;
import com.android.systemui.plugins.ActivityStarter;
import com.android.systemui.plugins.qs.DetailAdapter;
import com.android.systemui.plugins.qs.QSTile.BooleanState;
@@ -78,6 +79,7 @@
private final ZenModeController mController;
private final DndDetailAdapter mDetailAdapter;
private final ActivityStarter mActivityStarter;
+ private final BroadcastDispatcher mBroadcastDispatcher;
private boolean mListening;
private boolean mShowingDetail;
@@ -85,12 +87,13 @@
@Inject
public DndTile(QSHost host, ZenModeController zenModeController,
- ActivityStarter activityStarter) {
+ ActivityStarter activityStarter, BroadcastDispatcher broadcastDispatcher) {
super(host);
mController = zenModeController;
mActivityStarter = activityStarter;
mDetailAdapter = new DndDetailAdapter();
- mContext.registerReceiver(mReceiver, new IntentFilter(ACTION_SET_VISIBLE));
+ mBroadcastDispatcher = broadcastDispatcher;
+ broadcastDispatcher.registerReceiver(mReceiver, new IntentFilter(ACTION_SET_VISIBLE));
mReceiverRegistered = true;
mController.observe(getLifecycle(), mZenCallback);
}
@@ -99,7 +102,7 @@
protected void handleDestroy() {
super.handleDestroy();
if (mReceiverRegistered) {
- mContext.unregisterReceiver(mReceiver);
+ mBroadcastDispatcher.unregisterReceiver(mReceiver);
mReceiverRegistered = false;
}
}
diff --git a/packages/SystemUI/src/com/android/systemui/qs/tiles/NfcTile.java b/packages/SystemUI/src/com/android/systemui/qs/tiles/NfcTile.java
index 476a239..8bbfd24 100644
--- a/packages/SystemUI/src/com/android/systemui/qs/tiles/NfcTile.java
+++ b/packages/SystemUI/src/com/android/systemui/qs/tiles/NfcTile.java
@@ -29,6 +29,7 @@
import com.android.internal.logging.nano.MetricsProto.MetricsEvent;
import com.android.systemui.R;
+import com.android.systemui.broadcast.BroadcastDispatcher;
import com.android.systemui.plugins.qs.QSTile.BooleanState;
import com.android.systemui.qs.QSHost;
import com.android.systemui.qs.tileimpl.QSTileImpl;
@@ -39,12 +40,14 @@
public class NfcTile extends QSTileImpl<BooleanState> {
private NfcAdapter mAdapter;
+ private BroadcastDispatcher mBroadcastDispatcher;
private boolean mListening;
@Inject
- public NfcTile(QSHost host) {
+ public NfcTile(QSHost host, BroadcastDispatcher broadcastDispatcher) {
super(host);
+ mBroadcastDispatcher = broadcastDispatcher;
}
@Override
@@ -56,10 +59,10 @@
public void handleSetListening(boolean listening) {
mListening = listening;
if (mListening) {
- mContext.registerReceiver(mNfcReceiver,
+ mBroadcastDispatcher.registerReceiver(mNfcReceiver,
new IntentFilter(NfcAdapter.ACTION_ADAPTER_STATE_CHANGED));
} else {
- mContext.unregisterReceiver(mNfcReceiver);
+ mBroadcastDispatcher.unregisterReceiver(mNfcReceiver);
}
}
diff --git a/packages/SystemUI/src/com/android/systemui/screenshot/GlobalScreenshot.java b/packages/SystemUI/src/com/android/systemui/screenshot/GlobalScreenshot.java
index 8670d1bd..264d644 100644
--- a/packages/SystemUI/src/com/android/systemui/screenshot/GlobalScreenshot.java
+++ b/packages/SystemUI/src/com/android/systemui/screenshot/GlobalScreenshot.java
@@ -17,8 +17,10 @@
package com.android.systemui.screenshot;
import static android.content.Context.NOTIFICATION_SERVICE;
+import static android.provider.DeviceConfig.NAMESPACE_SYSTEMUI;
import static android.view.WindowManager.LayoutParams.LAYOUT_IN_DISPLAY_CUTOUT_MODE_ALWAYS;
+import static com.android.internal.config.sysui.SystemUiDeviceConfigFlags.SCREENSHOT_CORNER_FLOW;
import static com.android.systemui.screenshot.GlobalScreenshot.EXTRA_ACTION_INTENT;
import static com.android.systemui.screenshot.GlobalScreenshot.EXTRA_CANCEL_NOTIFICATION;
import static com.android.systemui.screenshot.GlobalScreenshot.EXTRA_DISALLOW_ENTER_PIP;
@@ -29,6 +31,7 @@
import android.animation.AnimatorSet;
import android.animation.ValueAnimator;
import android.animation.ValueAnimator.AnimatorUpdateListener;
+import android.annotation.Nullable;
import android.app.ActivityOptions;
import android.app.Notification;
import android.app.Notification.BigPictureStyle;
@@ -59,12 +62,17 @@
import android.net.Uri;
import android.os.AsyncTask;
import android.os.Environment;
+import android.os.Handler;
+import android.os.Looper;
+import android.os.Message;
import android.os.PowerManager;
import android.os.Process;
import android.os.UserHandle;
+import android.provider.DeviceConfig;
import android.provider.MediaStore;
import android.text.TextUtils;
import android.util.DisplayMetrics;
+import android.util.Log;
import android.util.Slog;
import android.view.Display;
import android.view.LayoutInflater;
@@ -79,8 +87,8 @@
import com.android.internal.messages.nano.SystemMessageProto.SystemMessage;
import com.android.systemui.R;
-import com.android.systemui.SysUiServiceProvider;
import com.android.systemui.SystemUI;
+import com.android.systemui.dagger.qualifiers.MainResources;
import com.android.systemui.shared.system.ActivityManagerWrapper;
import com.android.systemui.statusbar.phone.StatusBar;
import com.android.systemui.util.NotificationChannels;
@@ -96,7 +104,10 @@
import java.util.concurrent.ExecutionException;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.TimeoutException;
+import java.util.function.Function;
+import javax.inject.Inject;
+import javax.inject.Singleton;
/**
@@ -107,6 +118,7 @@
Bitmap image;
Uri imageUri;
Runnable finisher;
+ Function<PendingIntent, Void> onEditReady;
int iconSize;
int previewWidth;
int previewheight;
@@ -341,6 +353,9 @@
R.drawable.ic_screenshot_edit,
r.getString(com.android.internal.R.string.screenshot_edit), editAction);
mNotificationBuilder.addAction(editActionBuilder.build());
+ if (editAction != null && mParams.onEditReady != null) {
+ mParams.onEditReady.apply(editAction);
+ }
// Create a delete action for the notification
PendingIntent deleteAction = PendingIntent.getBroadcast(context, requestCode,
@@ -378,40 +393,46 @@
GlobalScreenshot.notifyScreenshotError(mParams.context, mNotificationManager,
mParams.errorMsgResId);
} else {
- // Show the final notification to indicate screenshot saved
- Context context = mParams.context;
- Resources r = context.getResources();
+ if (mParams.onEditReady != null) {
+ // Cancel the "saving screenshot" notification
+ mNotificationManager.cancel(SystemMessage.NOTE_GLOBAL_SCREENSHOT);
+ } else {
+ // Show the final notification to indicate screenshot saved
+ Context context = mParams.context;
+ Resources r = context.getResources();
- // Create the intent to show the screenshot in gallery
- Intent launchIntent = new Intent(Intent.ACTION_VIEW);
- launchIntent.setDataAndType(mParams.imageUri, "image/png");
- launchIntent.setFlags(
- Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_GRANT_READ_URI_PERMISSION);
+ // Create the intent to show the screenshot in gallery
+ Intent launchIntent = new Intent(Intent.ACTION_VIEW);
+ launchIntent.setDataAndType(mParams.imageUri, "image/png");
+ launchIntent.setFlags(
+ Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_GRANT_READ_URI_PERMISSION);
- final long now = System.currentTimeMillis();
+ final long now = System.currentTimeMillis();
- // Update the text and the icon for the existing notification
- mPublicNotificationBuilder
+ // Update the text and the icon for the existing notification
+ mPublicNotificationBuilder
+ .setContentTitle(r.getString(R.string.screenshot_saved_title))
+ .setContentText(r.getString(R.string.screenshot_saved_text))
+ .setContentIntent(
+ PendingIntent.getActivity(mParams.context, 0, launchIntent, 0))
+ .setWhen(now)
+ .setAutoCancel(true)
+ .setColor(context.getColor(
+ com.android.internal.R.color.system_notification_accent_color));
+ mNotificationBuilder
.setContentTitle(r.getString(R.string.screenshot_saved_title))
.setContentText(r.getString(R.string.screenshot_saved_text))
.setContentIntent(PendingIntent.getActivity(mParams.context, 0, launchIntent, 0))
.setWhen(now)
.setAutoCancel(true)
.setColor(context.getColor(
- com.android.internal.R.color.system_notification_accent_color));
- mNotificationBuilder
- .setContentTitle(r.getString(R.string.screenshot_saved_title))
- .setContentText(r.getString(R.string.screenshot_saved_text))
- .setContentIntent(PendingIntent.getActivity(mParams.context, 0, launchIntent, 0))
- .setWhen(now)
- .setAutoCancel(true)
- .setColor(context.getColor(
- com.android.internal.R.color.system_notification_accent_color))
- .setPublicVersion(mPublicNotificationBuilder.build())
- .setFlag(Notification.FLAG_NO_CLEAR, false);
+ com.android.internal.R.color.system_notification_accent_color))
+ .setPublicVersion(mPublicNotificationBuilder.build())
+ .setFlag(Notification.FLAG_NO_CLEAR, false);
- mNotificationManager.notify(SystemMessage.NOTE_GLOBAL_SCREENSHOT,
- mNotificationBuilder.build());
+ mNotificationManager.notify(SystemMessage.NOTE_GLOBAL_SCREENSHOT,
+ mNotificationBuilder.build());
+ }
}
mParams.finisher.run();
mParams.clearContext();
@@ -452,7 +473,8 @@
}
}
-class GlobalScreenshot {
+@Singleton
+public class GlobalScreenshot {
static final String SCREENSHOT_URI_ID = "android:screenshot_uri_id";
static final String EXTRA_ACTION_INTENT = "android:screenshot_action_intent";
static final String EXTRA_CANCEL_NOTIFICATION = "android:screenshot_cancel_notification";
@@ -470,8 +492,12 @@
private static final float SCREENSHOT_SCALE = 1f;
private static final float SCREENSHOT_DROP_IN_MIN_SCALE = SCREENSHOT_SCALE * 0.725f;
private static final float SCREENSHOT_DROP_OUT_MIN_SCALE = SCREENSHOT_SCALE * 0.45f;
+ private static final float SCREENSHOT_CORNER_MIN_SCALE = SCREENSHOT_SCALE * 0.2f;
private static final float SCREENSHOT_FAST_DROP_OUT_MIN_SCALE = SCREENSHOT_SCALE * 0.6f;
private static final float SCREENSHOT_DROP_OUT_MIN_SCALE_OFFSET = 0f;
+ private static final float SCREENSHOT_CORNER_MIN_SCALE_OFFSET = .1f;
+ private static final long SCREENSHOT_CORNER_TIMEOUT_MILLIS = 8000;
+ private static final int MESSAGE_CORNER_TIMEOUT = 2;
private final int mPreviewWidth;
private final int mPreviewHeight;
@@ -499,23 +525,34 @@
private MediaActionSound mCameraSound;
+ private final Handler mScreenshotHandler = new Handler(Looper.getMainLooper()) {
+ @Override
+ public void handleMessage(Message msg) {
+ switch (msg.what) {
+ case MESSAGE_CORNER_TIMEOUT:
+ GlobalScreenshot.this.clearScreenshot();
+ break;
+ default:
+ break;
+ }
+ }
+ };
+
/**
* @param context everything needs a context :(
*/
- public GlobalScreenshot(Context context) {
- Resources r = context.getResources();
+ @Inject
+ public GlobalScreenshot(Context context, @MainResources Resources resources,
+ LayoutInflater layoutInflater) {
mContext = context;
- LayoutInflater layoutInflater = (LayoutInflater)
- context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
// Inflate the screenshot layout
mScreenshotLayout = layoutInflater.inflate(R.layout.global_screenshot, null);
- mBackgroundView = (ImageView) mScreenshotLayout.findViewById(R.id.global_screenshot_background);
- mScreenshotView = (ImageView) mScreenshotLayout.findViewById(R.id.global_screenshot);
- mScreenshotFlash = (ImageView) mScreenshotLayout.findViewById(R.id.global_screenshot_flash);
- mScreenshotSelectorView = (ScreenshotSelectorView) mScreenshotLayout.findViewById(
- R.id.global_screenshot_selector);
+ mBackgroundView = mScreenshotLayout.findViewById(R.id.global_screenshot_background);
+ mScreenshotView = mScreenshotLayout.findViewById(R.id.global_screenshot);
+ mScreenshotFlash = mScreenshotLayout.findViewById(R.id.global_screenshot_flash);
+ mScreenshotSelectorView = mScreenshotLayout.findViewById(R.id.global_screenshot_selector);
mScreenshotLayout.setFocusable(true);
mScreenshotSelectorView.setFocusable(true);
mScreenshotSelectorView.setFocusableInTouchMode(true);
@@ -546,16 +583,16 @@
// Get the various target sizes
mNotificationIconSize =
- r.getDimensionPixelSize(android.R.dimen.notification_large_icon_height);
+ resources.getDimensionPixelSize(android.R.dimen.notification_large_icon_height);
// Scale has to account for both sides of the bg
- mBgPadding = (float) r.getDimensionPixelSize(R.dimen.global_screenshot_bg_padding);
+ mBgPadding = (float) resources.getDimensionPixelSize(R.dimen.global_screenshot_bg_padding);
mBgPaddingScale = mBgPadding / mDisplayMetrics.widthPixels;
// determine the optimal preview size
int panelWidth = 0;
try {
- panelWidth = r.getDimensionPixelSize(R.dimen.notification_panel_width);
+ panelWidth = resources.getDimensionPixelSize(R.dimen.notification_panel_width);
} catch (Resources.NotFoundException e) {
}
if (panelWidth <= 0) {
@@ -563,7 +600,7 @@
panelWidth = mDisplayMetrics.widthPixels;
}
mPreviewWidth = panelWidth;
- mPreviewHeight = r.getDimensionPixelSize(R.dimen.notification_max_height);
+ mPreviewHeight = resources.getDimensionPixelSize(R.dimen.notification_max_height);
// Setup the Camera shutter sound
mCameraSound = new MediaActionSound();
@@ -573,12 +610,14 @@
/**
* Creates a new worker thread and saves the screenshot to the media store.
*/
- private void saveScreenshotInWorkerThread(Runnable finisher) {
+ private void saveScreenshotInWorkerThread(
+ Runnable finisher, @Nullable Function<PendingIntent, Void> onEditReady) {
SaveImageInBackgroundData data = new SaveImageInBackgroundData();
data.context = mContext;
data.image = mScreenBitmap;
data.iconSize = mNotificationIconSize;
data.finisher = finisher;
+ data.onEditReady = onEditReady;
data.previewWidth = mPreviewWidth;
data.previewheight = mPreviewHeight;
if (mSaveInBgTask != null) {
@@ -588,6 +627,10 @@
.execute();
}
+ private void saveScreenshotInWorkerThread(Runnable finisher) {
+ saveScreenshotInWorkerThread(finisher, null);
+ }
+
/**
* Takes a screenshot of the current display and shows an animation.
*/
@@ -682,6 +725,22 @@
}
/**
+ * Clears current screenshot
+ */
+ private void clearScreenshot() {
+ if (mScreenshotLayout.isAttachedToWindow()) {
+ mWindowManager.removeView(mScreenshotLayout);
+ }
+
+ // Clear any references to the bitmap
+ mScreenBitmap = null;
+ mScreenshotView.setImageBitmap(null);
+ mBackgroundView.setVisibility(View.GONE);
+ mScreenshotView.setVisibility(View.GONE);
+ mScreenshotView.setLayerType(View.LAYER_TYPE_NONE, null);
+ }
+
+ /**
* Starts the animation after taking the screenshot
*/
private void startAnimation(final Runnable finisher, int w, int h, boolean statusBarVisible,
@@ -705,34 +764,55 @@
mScreenshotAnimation.removeAllListeners();
}
+ boolean useCornerFlow =
+ DeviceConfig.getBoolean(NAMESPACE_SYSTEMUI, SCREENSHOT_CORNER_FLOW, false);
mWindowManager.addView(mScreenshotLayout, mWindowLayoutParams);
ValueAnimator screenshotDropInAnim = createScreenshotDropInAnimation();
- ValueAnimator screenshotFadeOutAnim = createScreenshotDropOutAnimation(w, h,
- statusBarVisible, navBarVisible);
+ ValueAnimator screenshotFadeOutAnim = useCornerFlow
+ ? createScreenshotToCornerAnimation(w, h)
+ : createScreenshotDropOutAnimation(w, h, statusBarVisible, navBarVisible);
mScreenshotAnimation = new AnimatorSet();
mScreenshotAnimation.playSequentially(screenshotDropInAnim, screenshotFadeOutAnim);
mScreenshotAnimation.addListener(new AnimatorListenerAdapter() {
@Override
public void onAnimationEnd(Animator animation) {
// Save the screenshot once we have a bit of time now
- saveScreenshotInWorkerThread(finisher);
- mWindowManager.removeView(mScreenshotLayout);
-
- // Clear any references to the bitmap
- mScreenBitmap = null;
- mScreenshotView.setImageBitmap(null);
+ if (!useCornerFlow) {
+ saveScreenshotInWorkerThread(finisher);
+ clearScreenshot();
+ } else {
+ mScreenshotView.requestFocus();
+ mScreenshotView.setOnClickListener((v) -> {
+ // TODO: remove once we have a better UI to show that we aren't ready yet
+ Toast notReadyToast = Toast.makeText(
+ mContext, "Screenshot is not ready yet", Toast.LENGTH_SHORT);
+ notReadyToast.show();
+ });
+ saveScreenshotInWorkerThread(finisher, intent -> {
+ mScreenshotHandler.post(() -> mScreenshotView.setOnClickListener(v -> {
+ try {
+ intent.send();
+ clearScreenshot();
+ } catch (PendingIntent.CanceledException e) {
+ Log.e(TAG, "Edit intent cancelled", e);
+ }
+ mScreenshotHandler.removeMessages(MESSAGE_CORNER_TIMEOUT);
+ }));
+ return null;
+ });
+ mScreenshotHandler.sendMessageDelayed(
+ mScreenshotHandler.obtainMessage(MESSAGE_CORNER_TIMEOUT),
+ SCREENSHOT_CORNER_TIMEOUT_MILLIS);
+ }
}
});
- mScreenshotLayout.post(new Runnable() {
- @Override
- public void run() {
- // Play the shutter sound to notify that we've taken a screenshot
- mCameraSound.play(MediaActionSound.SHUTTER_CLICK);
+ mScreenshotHandler.post(() -> {
+ // Play the shutter sound to notify that we've taken a screenshot
+ mCameraSound.play(MediaActionSound.SHUTTER_CLICK);
- mScreenshotView.setLayerType(View.LAYER_TYPE_HARDWARE, null);
- mScreenshotView.buildLayer();
- mScreenshotAnimation.start();
- }
+ mScreenshotView.setLayerType(View.LAYER_TYPE_HARDWARE, null);
+ mScreenshotView.buildLayer();
+ mScreenshotAnimation.start();
});
}
private ValueAnimator createScreenshotDropInAnimation() {
@@ -877,6 +957,47 @@
return anim;
}
+ private ValueAnimator createScreenshotToCornerAnimation(int w, int h) {
+ ValueAnimator anim = ValueAnimator.ofFloat(0f, 1f);
+ anim.setStartDelay(SCREENSHOT_DROP_OUT_DELAY);
+
+ final float scaleDurationPct =
+ (float) SCREENSHOT_DROP_OUT_SCALE_DURATION / SCREENSHOT_DROP_OUT_DURATION;
+ final Interpolator scaleInterpolator = new Interpolator() {
+ @Override
+ public float getInterpolation(float x) {
+ if (x < scaleDurationPct) {
+ // Decelerate, and scale the input accordingly
+ return (float) (1f - Math.pow(1f - (x / scaleDurationPct), 2f));
+ }
+ return 1f;
+ }
+ };
+
+ // Determine the bounds of how to scale
+ float halfScreenWidth = (w - 2f * mBgPadding) / 2f;
+ float halfScreenHeight = (h - 2f * mBgPadding) / 2f;
+ final float offsetPct = SCREENSHOT_CORNER_MIN_SCALE_OFFSET;
+ final PointF finalPos = new PointF(
+ -halfScreenWidth + (SCREENSHOT_CORNER_MIN_SCALE + offsetPct) * halfScreenWidth,
+ halfScreenHeight - (SCREENSHOT_CORNER_MIN_SCALE + offsetPct) * halfScreenHeight);
+
+ // Animate the screenshot to the bottom left corner
+ anim.setDuration(SCREENSHOT_DROP_OUT_DURATION);
+ anim.addUpdateListener(animation -> {
+ float t = (Float) animation.getAnimatedValue();
+ float scaleT = (SCREENSHOT_DROP_IN_MIN_SCALE + mBgPaddingScale)
+ - scaleInterpolator.getInterpolation(t)
+ * (SCREENSHOT_DROP_IN_MIN_SCALE - SCREENSHOT_CORNER_MIN_SCALE);
+ mBackgroundView.setAlpha((1f - t) * BACKGROUND_ALPHA);
+ mScreenshotView.setScaleX(scaleT);
+ mScreenshotView.setScaleY(scaleT);
+ mScreenshotView.setTranslationX(t * finalPos.x);
+ mScreenshotView.setTranslationY(t * finalPos.y);
+ });
+ return anim;
+ }
+
static void notifyScreenshotError(Context context, NotificationManager nManager, int msgResId) {
Resources r = context.getResources();
String errorMsg = r.getString(msgResId);
@@ -917,6 +1038,12 @@
*/
public static class ActionProxyReceiver extends BroadcastReceiver {
static final int CLOSE_WINDOWS_TIMEOUT_MILLIS = 3000;
+ private final StatusBar mStatusBar;
+
+ @Inject
+ public ActionProxyReceiver(StatusBar statusBar) {
+ mStatusBar = statusBar;
+ }
@Override
public void onReceive(Context context, final Intent intent) {
@@ -939,8 +1066,8 @@
intent.getBooleanExtra(EXTRA_DISALLOW_ENTER_PIP, false));
context.startActivityAsUser(actionIntent, opts.toBundle(), UserHandle.CURRENT);
};
- StatusBar statusBar = SysUiServiceProvider.getComponent(context, StatusBar.class);
- statusBar.executeRunnableDismissingKeyguard(startActivityRunnable, null,
+
+ mStatusBar.executeRunnableDismissingKeyguard(startActivityRunnable, null,
true /* dismissShade */, true /* afterKeyguardGone */, true /* deferred */);
}
}
diff --git a/packages/SystemUI/src/com/android/systemui/screenshot/TakeScreenshotService.java b/packages/SystemUI/src/com/android/systemui/screenshot/TakeScreenshotService.java
index 34b8bfe..20d24e6 100644
--- a/packages/SystemUI/src/com/android/systemui/screenshot/TakeScreenshotService.java
+++ b/packages/SystemUI/src/com/android/systemui/screenshot/TakeScreenshotService.java
@@ -27,10 +27,15 @@
import android.util.Log;
import android.view.WindowManager;
+import javax.inject.Inject;
+import javax.inject.Singleton;
+
+@Singleton
public class TakeScreenshotService extends Service {
private static final String TAG = "TakeScreenshotService";
- private static GlobalScreenshot mScreenshot;
+ private final GlobalScreenshot mScreenshot;
+ private final UserManager mUserManager;
private Handler mHandler = new Handler() {
@Override
@@ -50,16 +55,12 @@
// If the storage for this user is locked, we have no place to store
// the screenshot, so skip taking it instead of showing a misleading
// animation and error notification.
- if (!getSystemService(UserManager.class).isUserUnlocked()) {
+ if (!mUserManager.isUserUnlocked()) {
Log.w(TAG, "Skipping screenshot because storage is locked!");
post(finisher);
return;
}
- if (mScreenshot == null) {
- mScreenshot = new GlobalScreenshot(TakeScreenshotService.this);
- }
-
switch (msg.what) {
case WindowManager.TAKE_SCREENSHOT_FULLSCREEN:
mScreenshot.takeScreenshot(finisher, msg.arg1 > 0, msg.arg2 > 0);
@@ -73,6 +74,12 @@
}
};
+ @Inject
+ public TakeScreenshotService(GlobalScreenshot globalScreenshot, UserManager userManager) {
+ mScreenshot = globalScreenshot;
+ mUserManager = userManager;
+ }
+
@Override
public IBinder onBind(Intent intent) {
return new Messenger(mHandler).getBinder();
diff --git a/packages/SystemUI/src/com/android/systemui/settings/BrightnessController.java b/packages/SystemUI/src/com/android/systemui/settings/BrightnessController.java
index 176676f..b1f1f38 100644
--- a/packages/SystemUI/src/com/android/systemui/settings/BrightnessController.java
+++ b/packages/SystemUI/src/com/android/systemui/settings/BrightnessController.java
@@ -44,6 +44,7 @@
import com.android.internal.logging.nano.MetricsProto.MetricsEvent;
import com.android.settingslib.RestrictedLockUtilsInternal;
import com.android.systemui.Dependency;
+import com.android.systemui.broadcast.BroadcastDispatcher;
import java.util.ArrayList;
@@ -281,12 +282,13 @@
}
};
- public BrightnessController(Context context, ToggleSlider control) {
+ public BrightnessController(Context context, ToggleSlider control,
+ BroadcastDispatcher broadcastDispatcher) {
mContext = context;
mControl = control;
mControl.setMax(GAMMA_SPACE_MAX);
mBackgroundHandler = new Handler((Looper) Dependency.get(Dependency.BG_LOOPER));
- mUserTracker = new CurrentUserTracker(mContext) {
+ mUserTracker = new CurrentUserTracker(broadcastDispatcher) {
@Override
public void onUserSwitched(int newUserId) {
mBackgroundHandler.post(mUpdateModeRunnable);
diff --git a/packages/SystemUI/src/com/android/systemui/settings/BrightnessDialog.java b/packages/SystemUI/src/com/android/systemui/settings/BrightnessDialog.java
index d8b4df5..70c2531 100644
--- a/packages/SystemUI/src/com/android/systemui/settings/BrightnessDialog.java
+++ b/packages/SystemUI/src/com/android/systemui/settings/BrightnessDialog.java
@@ -28,11 +28,21 @@
import com.android.internal.logging.MetricsLogger;
import com.android.internal.logging.nano.MetricsProto.MetricsEvent;
import com.android.systemui.R;
+import com.android.systemui.broadcast.BroadcastDispatcher;
+
+import javax.inject.Inject;
/** A dialog that provides controls for adjusting the screen brightness. */
public class BrightnessDialog extends Activity {
private BrightnessController mBrightnessController;
+ private final BroadcastDispatcher mBroadcastDispatcher;
+
+ @Inject
+ public BrightnessDialog(BroadcastDispatcher broadcastDispatcher) {
+ mBroadcastDispatcher = broadcastDispatcher;
+ }
+
@Override
protected void onCreate(Bundle savedInstanceState) {
@@ -49,7 +59,7 @@
setContentView(v);
final ToggleSliderView slider = findViewById(R.id.brightness_slider);
- mBrightnessController = new BrightnessController(this, slider);
+ mBrightnessController = new BrightnessController(this, slider, mBroadcastDispatcher);
}
@Override
diff --git a/packages/SystemUI/src/com/android/systemui/settings/CurrentUserObservable.java b/packages/SystemUI/src/com/android/systemui/settings/CurrentUserObservable.java
index 3cf08b4..3cdc01d 100644
--- a/packages/SystemUI/src/com/android/systemui/settings/CurrentUserObservable.java
+++ b/packages/SystemUI/src/com/android/systemui/settings/CurrentUserObservable.java
@@ -16,11 +16,11 @@
package com.android.systemui.settings;
-import android.content.Context;
-
import androidx.lifecycle.LiveData;
import androidx.lifecycle.MutableLiveData;
+import com.android.systemui.broadcast.BroadcastDispatcher;
+
/**
* A class that has an observable for the current user.
*/
@@ -42,8 +42,8 @@
}
};
- public CurrentUserObservable(Context context) {
- mTracker = new CurrentUserTracker(context) {
+ public CurrentUserObservable(BroadcastDispatcher broadcastDispatcher) {
+ mTracker = new CurrentUserTracker(broadcastDispatcher) {
@Override
public void onUserSwitched(int newUserId) {
mCurrentUser.setValue(newUserId);
diff --git a/packages/SystemUI/src/com/android/systemui/settings/CurrentUserTracker.java b/packages/SystemUI/src/com/android/systemui/settings/CurrentUserTracker.java
index 0b89dc1..9f79785 100644
--- a/packages/SystemUI/src/com/android/systemui/settings/CurrentUserTracker.java
+++ b/packages/SystemUI/src/com/android/systemui/settings/CurrentUserTracker.java
@@ -23,6 +23,7 @@
import android.content.IntentFilter;
import com.android.internal.annotations.VisibleForTesting;
+import com.android.systemui.broadcast.BroadcastDispatcher;
import java.util.ArrayList;
import java.util.List;
@@ -33,8 +34,8 @@
private Consumer<Integer> mCallback = this::onUserSwitched;
- public CurrentUserTracker(Context context) {
- this(UserReceiver.getInstance(context));
+ public CurrentUserTracker(BroadcastDispatcher broadcastDispatcher) {
+ this(UserReceiver.getInstance(broadcastDispatcher));
}
@VisibleForTesting
@@ -60,20 +61,20 @@
static class UserReceiver extends BroadcastReceiver {
private static UserReceiver sInstance;
- private Context mAppContext;
private boolean mReceiverRegistered;
private int mCurrentUserId;
+ private final BroadcastDispatcher mBroadcastDispatcher;
private List<Consumer<Integer>> mCallbacks = new ArrayList<>();
@VisibleForTesting
- UserReceiver(Context context) {
- mAppContext = context.getApplicationContext();
+ UserReceiver(BroadcastDispatcher broadcastDispatcher) {
+ mBroadcastDispatcher = broadcastDispatcher;
}
- static UserReceiver getInstance(Context context) {
+ static UserReceiver getInstance(BroadcastDispatcher broadcastDispatcher) {
if (sInstance == null) {
- sInstance = new UserReceiver(context);
+ sInstance = new UserReceiver(broadcastDispatcher);
}
return sInstance;
}
@@ -96,7 +97,7 @@
if (!mReceiverRegistered) {
mCurrentUserId = ActivityManager.getCurrentUser();
IntentFilter filter = new IntentFilter(Intent.ACTION_USER_SWITCHED);
- mAppContext.registerReceiver(this, filter);
+ mBroadcastDispatcher.registerReceiver(this, filter);
mReceiverRegistered = true;
}
}
@@ -105,7 +106,7 @@
if (mCallbacks.contains(callback)) {
mCallbacks.remove(callback);
if (mCallbacks.size() == 0 && mReceiverRegistered) {
- mAppContext.unregisterReceiver(this);
+ mBroadcastDispatcher.unregisterReceiver(this);
mReceiverRegistered = false;
}
}
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/NotificationLockscreenUserManagerImpl.java b/packages/SystemUI/src/com/android/systemui/statusbar/NotificationLockscreenUserManagerImpl.java
index 7adf7af..571d3d7 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/NotificationLockscreenUserManagerImpl.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/NotificationLockscreenUserManagerImpl.java
@@ -46,6 +46,7 @@
import com.android.keyguard.KeyguardUpdateMonitor;
import com.android.systemui.Dependency;
import com.android.systemui.Dumpable;
+import com.android.systemui.broadcast.BroadcastDispatcher;
import com.android.systemui.plugins.statusbar.StatusBarStateController;
import com.android.systemui.plugins.statusbar.StatusBarStateController.StateListener;
import com.android.systemui.recents.OverviewProxyService;
@@ -90,6 +91,7 @@
private final UserManager mUserManager;
private final IStatusBarService mBarService;
private final List<UserChangedListener> mListeners = new ArrayList<>();
+ private final BroadcastDispatcher mBroadcastDispatcher;
private boolean mShowLockscreenNotifications;
private boolean mAllowLockscreenRemoteInput;
@@ -180,7 +182,8 @@
}
@Inject
- public NotificationLockscreenUserManagerImpl(Context context) {
+ public NotificationLockscreenUserManagerImpl(Context context,
+ BroadcastDispatcher broadcastDispatcher) {
mContext = context;
mDevicePolicyManager = (DevicePolicyManager) mContext.getSystemService(
Context.DEVICE_POLICY_SERVICE);
@@ -191,6 +194,7 @@
Dependency.get(StatusBarStateController.class).addCallback(this);
mLockPatternUtils = new LockPatternUtils(context);
mKeyguardManager = context.getSystemService(KeyguardManager.class);
+ mBroadcastDispatcher = broadcastDispatcher;
}
public void setUpWithPresenter(NotificationPresenter presenter) {
@@ -244,15 +248,15 @@
UserHandle.USER_ALL);
}
- mContext.registerReceiverAsUser(mAllUsersReceiver, UserHandle.ALL,
+ mBroadcastDispatcher.registerReceiver(mAllUsersReceiver,
new IntentFilter(ACTION_DEVICE_POLICY_MANAGER_STATE_CHANGED),
- null, null);
+ null /* handler */, UserHandle.ALL);
IntentFilter filter = new IntentFilter();
filter.addAction(Intent.ACTION_USER_SWITCHED);
filter.addAction(Intent.ACTION_USER_ADDED);
filter.addAction(Intent.ACTION_USER_UNLOCKED);
- mContext.registerReceiver(mBaseBroadcastReceiver, filter);
+ mBroadcastDispatcher.registerReceiver(mBaseBroadcastReceiver, filter);
IntentFilter internalFilter = new IntentFilter();
internalFilter.addAction(NOTIFICATION_UNLOCKED_BY_WORK_CHALLENGE_ACTION);
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/NotificationRemoteInputManager.java b/packages/SystemUI/src/com/android/systemui/statusbar/NotificationRemoteInputManager.java
index c838ac5..35f06f9 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/NotificationRemoteInputManager.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/NotificationRemoteInputManager.java
@@ -59,6 +59,7 @@
import com.android.systemui.statusbar.notification.logging.NotificationLogger;
import com.android.systemui.statusbar.notification.row.ExpandableNotificationRow;
import com.android.systemui.statusbar.phone.ShadeController;
+import com.android.systemui.statusbar.policy.RemoteInputUriController;
import com.android.systemui.statusbar.policy.RemoteInputView;
import java.io.FileDescriptor;
@@ -121,6 +122,7 @@
private final UserManager mUserManager;
private final KeyguardManager mKeyguardManager;
private final StatusBarStateController mStatusBarStateController;
+ private final RemoteInputUriController mRemoteInputUriController;
protected RemoteInputController mRemoteInputController;
protected NotificationLifetimeExtender.NotificationSafeToRemoveCallback
@@ -260,7 +262,8 @@
NotificationEntryManager notificationEntryManager,
Lazy<ShadeController> shadeController,
StatusBarStateController statusBarStateController,
- @MainHandler Handler mainHandler) {
+ @MainHandler Handler mainHandler,
+ RemoteInputUriController remoteInputUriController) {
mContext = context;
mLockscreenUserManager = lockscreenUserManager;
mSmartReplyController = smartReplyController;
@@ -273,6 +276,7 @@
addLifetimeExtenders();
mKeyguardManager = context.getSystemService(KeyguardManager.class);
mStatusBarStateController = statusBarStateController;
+ mRemoteInputUriController = remoteInputUriController;
notificationEntryManager.addNotificationEntryListener(new NotificationEntryListener() {
@Override
@@ -300,7 +304,7 @@
/** Initializes this component with the provided dependencies. */
public void setUpWithCallback(Callback callback, RemoteInputController.Delegate delegate) {
mCallback = callback;
- mRemoteInputController = new RemoteInputController(delegate);
+ mRemoteInputController = new RemoteInputController(delegate, mRemoteInputUriController);
mRemoteInputController.addCallback(new RemoteInputController.Callback() {
@Override
public void onRemoteInputSent(NotificationEntry entry) {
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/RemoteInputController.java b/packages/SystemUI/src/com/android/systemui/statusbar/RemoteInputController.java
index 998cf52..778443c 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/RemoteInputController.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/RemoteInputController.java
@@ -19,12 +19,15 @@
import android.app.Notification;
import android.app.RemoteInput;
import android.content.Context;
+import android.net.Uri;
import android.os.SystemProperties;
+import android.service.notification.StatusBarNotification;
import android.util.ArrayMap;
import android.util.Pair;
import com.android.internal.util.Preconditions;
import com.android.systemui.statusbar.notification.collection.NotificationEntry;
+import com.android.systemui.statusbar.policy.RemoteInputUriController;
import com.android.systemui.statusbar.policy.RemoteInputView;
import java.lang.ref.WeakReference;
@@ -43,9 +46,12 @@
private final ArrayMap<String, Object> mSpinning = new ArrayMap<>();
private final ArrayList<Callback> mCallbacks = new ArrayList<>(3);
private final Delegate mDelegate;
+ private final RemoteInputUriController mRemoteInputUriController;
- public RemoteInputController(Delegate delegate) {
+ public RemoteInputController(Delegate delegate,
+ RemoteInputUriController remoteInputUriController) {
mDelegate = delegate;
+ mRemoteInputUriController = remoteInputUriController;
}
/**
@@ -272,6 +278,14 @@
mDelegate.lockScrollTo(entry);
}
+ /**
+ * Create a temporary grant which allows the app that submitted the notification access to the
+ * specified URI.
+ */
+ public void grantInlineReplyUriPermission(StatusBarNotification sbn, Uri data) {
+ mRemoteInputUriController.grantInlineReplyUriPermission(sbn, data);
+ }
+
public interface Callback {
default void onRemoteInputActive(boolean active) {}
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/ManagedProfileControllerImpl.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/ManagedProfileControllerImpl.java
index fbd8d8a..07e9f94 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/ManagedProfileControllerImpl.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/ManagedProfileControllerImpl.java
@@ -24,6 +24,8 @@
import android.os.UserHandle;
import android.os.UserManager;
+import com.android.systemui.broadcast.BroadcastDispatcher;
+
import java.util.ArrayList;
import java.util.LinkedList;
import java.util.List;
@@ -40,6 +42,7 @@
private final Context mContext;
private final UserManager mUserManager;
+ private final BroadcastDispatcher mBroadcastDispatcher;
private final LinkedList<UserInfo> mProfiles;
private boolean mListening;
private int mCurrentUser;
@@ -47,9 +50,10 @@
/**
*/
@Inject
- public ManagedProfileControllerImpl(Context context) {
+ public ManagedProfileControllerImpl(Context context, BroadcastDispatcher broadcastDispatcher) {
mContext = context;
mUserManager = UserManager.get(mContext);
+ mBroadcastDispatcher = broadcastDispatcher;
mProfiles = new LinkedList<UserInfo>();
}
@@ -129,9 +133,10 @@
filter.addAction(Intent.ACTION_MANAGED_PROFILE_REMOVED);
filter.addAction(Intent.ACTION_MANAGED_PROFILE_AVAILABLE);
filter.addAction(Intent.ACTION_MANAGED_PROFILE_UNAVAILABLE);
- mContext.registerReceiverAsUser(mReceiver, UserHandle.ALL, filter, null, null);
+ mBroadcastDispatcher.registerReceiver(
+ mReceiver, filter, null /* handler */, UserHandle.ALL);
} else {
- mContext.unregisterReceiver(mReceiver);
+ mBroadcastDispatcher.unregisterReceiver(mReceiver);
}
}
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBarPolicy.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBarPolicy.java
index 0645423..01cd2b4 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBarPolicy.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBarPolicy.java
@@ -41,6 +41,7 @@
import com.android.systemui.Dependency;
import com.android.systemui.R;
import com.android.systemui.UiOffloadThread;
+import com.android.systemui.broadcast.BroadcastDispatcher;
import com.android.systemui.privacy.PrivacyItem;
import com.android.systemui.privacy.PrivacyItemController;
import com.android.systemui.privacy.PrivacyItemControllerKt;
@@ -138,7 +139,7 @@
private AlarmManager.AlarmClockInfo mNextAlarm;
public PhoneStatusBarPolicy(Context context, StatusBarIconController iconController,
- CommandQueue commandQueue) {
+ CommandQueue commandQueue, BroadcastDispatcher broadcastDispatcher) {
mContext = context;
mIconController = iconController;
mCast = Dependency.get(CastController.class);
@@ -184,7 +185,7 @@
filter.addAction(Intent.ACTION_MANAGED_PROFILE_AVAILABLE);
filter.addAction(Intent.ACTION_MANAGED_PROFILE_UNAVAILABLE);
filter.addAction(Intent.ACTION_MANAGED_PROFILE_REMOVED);
- mContext.registerReceiver(mIntentReceiver, filter, null, mHandler);
+ broadcastDispatcher.registerReceiver(mIntentReceiver, filter, mHandler);
// listen for user / profile change.
try {
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java
index 4f9f131..4148a73 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java
@@ -100,6 +100,7 @@
import android.service.dreams.DreamService;
import android.service.dreams.IDreamManager;
import android.service.notification.StatusBarNotification;
+import android.util.ArraySet;
import android.util.DisplayMetrics;
import android.util.EventLog;
import android.util.Log;
@@ -168,7 +169,9 @@
import com.android.systemui.plugins.ActivityStarter;
import com.android.systemui.plugins.DarkIconDispatcher;
import com.android.systemui.plugins.FalsingManager;
+import com.android.systemui.plugins.OverlayPlugin;
import com.android.systemui.plugins.PluginDependencyProvider;
+import com.android.systemui.plugins.PluginListener;
import com.android.systemui.plugins.qs.QS;
import com.android.systemui.plugins.statusbar.NotificationSwipeActionHelper.SnoozeOption;
import com.android.systemui.plugins.statusbar.StatusBarStateController;
@@ -176,6 +179,7 @@
import com.android.systemui.qs.QSPanel;
import com.android.systemui.recents.Recents;
import com.android.systemui.recents.ScreenPinningRequest;
+import com.android.systemui.shared.plugins.PluginManager;
import com.android.systemui.shared.system.WindowManagerWrapper;
import com.android.systemui.stackdivider.Divider;
import com.android.systemui.stackdivider.WindowManagerProxy;
@@ -234,6 +238,7 @@
import com.android.systemui.statusbar.policy.NetworkController;
import com.android.systemui.statusbar.policy.OnHeadsUpChangedListener;
import com.android.systemui.statusbar.policy.RemoteInputQuickSettingsDisabler;
+import com.android.systemui.statusbar.policy.RemoteInputUriController;
import com.android.systemui.statusbar.policy.UserInfoController;
import com.android.systemui.statusbar.policy.UserInfoControllerImpl;
import com.android.systemui.statusbar.policy.UserSwitcherController;
@@ -396,6 +401,8 @@
private final NotifLog mNotifLog;
private final DozeParameters mDozeParameters;
private final Lazy<BiometricUnlockController> mBiometricUnlockControllerLazy;
+ private final PluginManager mPluginManager;
+ private final RemoteInputUriController mRemoteInputUriController;
// expanded notifications
protected NotificationPanelView mNotificationPanel; // the sliding/resizing panel within the notification window
@@ -697,7 +704,9 @@
DozeServiceHost dozeServiceHost,
PowerManager powerManager,
DozeScrimController dozeScrimController,
- CommandQueue commandQueue) {
+ CommandQueue commandQueue,
+ PluginManager pluginManager,
+ RemoteInputUriController remoteInputUriController) {
super(context);
mFeatureFlags = featureFlags;
mLightBarController = lightBarController;
@@ -763,7 +772,8 @@
mDozeScrimController = dozeScrimController;
mBiometricUnlockControllerLazy = biometricUnlockControllerLazy;
mCommandQueue = commandQueue;
-
+ mPluginManager = pluginManager;
+ mRemoteInputUriController = remoteInputUriController;
mBubbleExpandListener =
(isExpanding, key) -> {
mEntryManager.updateNotifications("onBubbleExpandChanged");
@@ -840,8 +850,8 @@
if (mWallpaperSupported) {
// Make sure we always have the most current wallpaper info.
IntentFilter wallpaperChangedFilter = new IntentFilter(Intent.ACTION_WALLPAPER_CHANGED);
- mContext.registerReceiverAsUser(mWallpaperChangedReceiver, UserHandle.ALL,
- wallpaperChangedFilter, null /* broadcastPermission */, null /* scheduler */);
+ mBroadcastDispatcher.registerReceiver(mWallpaperChangedReceiver, wallpaperChangedFilter,
+ null /* handler */, UserHandle.ALL);
mWallpaperChangedReceiver.onReceive(mContext, null);
} else if (DEBUG) {
Log.v(TAG, "start(): no wallpaper service ");
@@ -905,7 +915,8 @@
// end old BaseStatusBar.start().
// Lastly, call to the icon policy to install/update all the icons.
- mIconPolicy = new PhoneStatusBarPolicy(mContext, mIconController, mCommandQueue);
+ mIconPolicy = new PhoneStatusBarPolicy(mContext, mIconController, mCommandQueue,
+ mBroadcastDispatcher);
mSignalPolicy = new StatusBarSignalPolicy(mContext, mIconController);
mKeyguardStateController.addCallback(this);
@@ -929,6 +940,50 @@
int disabledFlags2 = result.mDisabledFlags2;
Dependency.get(InitController.class).addPostInitTask(
() -> setUpDisableFlags(disabledFlags1, disabledFlags2));
+
+ mPluginManager.addPluginListener(
+ new PluginListener<OverlayPlugin>() {
+ private ArraySet<OverlayPlugin> mOverlays = new ArraySet<>();
+
+ @Override
+ public void onPluginConnected(OverlayPlugin plugin, Context pluginContext) {
+ mMainThreadHandler.post(
+ () -> plugin.setup(getStatusBarWindow(), getNavigationBarView(),
+ new Callback(plugin), mDozeParameters));
+ }
+
+ @Override
+ public void onPluginDisconnected(OverlayPlugin plugin) {
+ mMainThreadHandler.post(() -> {
+ mOverlays.remove(plugin);
+ mStatusBarWindowController.setForcePluginOpen(mOverlays.size() != 0);
+ });
+ }
+
+ class Callback implements OverlayPlugin.Callback {
+ private final OverlayPlugin mPlugin;
+
+ Callback(OverlayPlugin plugin) {
+ mPlugin = plugin;
+ }
+
+ @Override
+ public void onHoldStatusBarOpenChange() {
+ if (mPlugin.holdStatusBarOpen()) {
+ mOverlays.add(mPlugin);
+ } else {
+ mOverlays.remove(mPlugin);
+ }
+ mMainThreadHandler.post(() -> {
+ mStatusBarWindowController
+ .setStateListener(b -> mOverlays.forEach(
+ o -> o.setCollapseDesired(b)));
+ mStatusBarWindowController
+ .setForcePluginOpen(mOverlays.size() != 0);
+ });
+ }
+ }
+ }, OverlayPlugin.class, true /* Allow multiple plugins */);
}
// ================================================================================
@@ -1244,6 +1299,8 @@
mGutsManager.setNotificationActivityStarter(mNotificationActivityStarter);
mEntryManager.setRowBinder(rowBinder);
+ mRemoteInputUriController.attach(mEntryManager);
+
rowBinder.setNotificationClicker(new NotificationClicker(
this, mBubbleController, mNotificationActivityStarter));
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/policy/BatteryControllerImpl.java b/packages/SystemUI/src/com/android/systemui/statusbar/policy/BatteryControllerImpl.java
index 3fc9b44..f0f9420 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/policy/BatteryControllerImpl.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/BatteryControllerImpl.java
@@ -34,6 +34,7 @@
import com.android.settingslib.fuelgauge.Estimate;
import com.android.settingslib.utils.PowerUtil;
import com.android.systemui.Dependency;
+import com.android.systemui.broadcast.BroadcastDispatcher;
import com.android.systemui.power.EnhancedEstimates;
import java.io.FileDescriptor;
@@ -58,6 +59,7 @@
private static final int UPDATE_GRANULARITY_MSEC = 1000 * 60;
private final EnhancedEstimates mEstimates;
+ private final BroadcastDispatcher mBroadcastDispatcher;
private final ArrayList<BatteryController.BatteryStateChangeCallback> mChangeCallbacks = new ArrayList<>();
private final ArrayList<EstimateFetchCompletion> mFetchCallbacks = new ArrayList<>();
private final PowerManager mPowerManager;
@@ -76,17 +78,20 @@
private boolean mFetchingEstimate = false;
@Inject
- public BatteryControllerImpl(Context context, EnhancedEstimates enhancedEstimates) {
- this(context, enhancedEstimates, context.getSystemService(PowerManager.class));
+ public BatteryControllerImpl(Context context, EnhancedEstimates enhancedEstimates,
+ BroadcastDispatcher broadcastDispatcher) {
+ this(context, enhancedEstimates, context.getSystemService(PowerManager.class),
+ broadcastDispatcher);
}
@VisibleForTesting
BatteryControllerImpl(Context context, EnhancedEstimates enhancedEstimates,
- PowerManager powerManager) {
+ PowerManager powerManager, BroadcastDispatcher broadcastDispatcher) {
mContext = context;
mHandler = new Handler();
mPowerManager = powerManager;
mEstimates = enhancedEstimates;
+ mBroadcastDispatcher = broadcastDispatcher;
registerReceiver();
updatePowerSave();
@@ -99,7 +104,7 @@
filter.addAction(PowerManager.ACTION_POWER_SAVE_MODE_CHANGED);
filter.addAction(PowerManager.ACTION_POWER_SAVE_MODE_CHANGING);
filter.addAction(ACTION_LEVEL_TEST);
- mContext.registerReceiver(this, filter);
+ mBroadcastDispatcher.registerReceiver(this, filter);
}
@Override
@@ -306,7 +311,7 @@
public void dispatchDemoCommand(String command, Bundle args) {
if (!mDemoMode && command.equals(COMMAND_ENTER)) {
mDemoMode = true;
- mContext.unregisterReceiver(this);
+ mBroadcastDispatcher.unregisterReceiver(this);
} else if (mDemoMode && command.equals(COMMAND_EXIT)) {
mDemoMode = false;
registerReceiver();
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/policy/Clock.java b/packages/SystemUI/src/com/android/systemui/statusbar/policy/Clock.java
index 568f590..dba3b92 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/policy/Clock.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/Clock.java
@@ -16,8 +16,6 @@
package com.android.systemui.statusbar.policy;
-import static com.android.systemui.util.InjectionInflationController.VIEW_CONTEXT;
-
import android.app.StatusBarManager;
import android.content.BroadcastReceiver;
import android.content.Context;
@@ -62,9 +60,6 @@
import java.util.Locale;
import java.util.TimeZone;
-import javax.inject.Inject;
-import javax.inject.Named;
-
/**
* Digital clock for the status bar.
*/
@@ -116,19 +111,12 @@
private final BroadcastDispatcher mBroadcastDispatcher;
public Clock(Context context, AttributeSet attrs) {
- this(context, attrs, null, Dependency.get(CommandQueue.class));
+ this(context, attrs, 0);
}
- @Inject
- public Clock(@Named(VIEW_CONTEXT) Context context, AttributeSet attrs,
- BroadcastDispatcher broadcastDispatcher, CommandQueue commandQueue) {
- this(context, attrs, 0, broadcastDispatcher, commandQueue);
- }
-
- public Clock(Context context, AttributeSet attrs, int defStyle,
- BroadcastDispatcher broadcastDispatcher, CommandQueue commandQueue) {
+ public Clock(Context context, AttributeSet attrs, int defStyle) {
super(context, attrs, defStyle);
- mCommandQueue = commandQueue;
+ mCommandQueue = Dependency.get(CommandQueue.class);
TypedArray a = context.getTheme().obtainStyledAttributes(
attrs,
R.styleable.Clock,
@@ -140,13 +128,13 @@
} finally {
a.recycle();
}
- mCurrentUserTracker = new CurrentUserTracker(context) {
+ mBroadcastDispatcher = Dependency.get(BroadcastDispatcher.class);
+ mCurrentUserTracker = new CurrentUserTracker(mBroadcastDispatcher) {
@Override
public void onUserSwitched(int newUserId) {
mCurrentUserId = newUserId;
}
};
- mBroadcastDispatcher = broadcastDispatcher;
}
@Override
@@ -197,8 +185,8 @@
filter.addAction(Intent.ACTION_CONFIGURATION_CHANGED);
filter.addAction(Intent.ACTION_USER_SWITCHED);
- getContext().registerReceiverAsUser(mIntentReceiver, UserHandle.ALL, filter,
- null, Dependency.get(Dependency.TIME_TICK_HANDLER));
+ mBroadcastDispatcher.registerReceiver(mIntentReceiver, filter,
+ Dependency.get(Dependency.TIME_TICK_HANDLER), UserHandle.ALL);
Dependency.get(TunerService.class).addTunable(this, CLOCK_SECONDS,
StatusBarIconController.ICON_BLACKLIST);
mCommandQueue.addCallback(this);
@@ -225,7 +213,7 @@
protected void onDetachedFromWindow() {
super.onDetachedFromWindow();
if (mAttached) {
- getContext().unregisterReceiver(mIntentReceiver);
+ mBroadcastDispatcher.unregisterReceiver(mIntentReceiver);
mAttached = false;
Dependency.get(TunerService.class).removeTunable(this);
mCommandQueue.removeCallback(this);
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/policy/DateView.java b/packages/SystemUI/src/com/android/systemui/statusbar/policy/DateView.java
index 74a30fa..d488767 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/policy/DateView.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/DateView.java
@@ -29,6 +29,7 @@
import com.android.systemui.Dependency;
import com.android.systemui.R;
+import com.android.systemui.broadcast.BroadcastDispatcher;
import java.util.Date;
import java.util.Locale;
@@ -41,6 +42,7 @@
private DateFormat mDateFormat;
private String mLastText;
private String mDatePattern;
+ private final BroadcastDispatcher mBroadcastDispatcher;
private BroadcastReceiver mIntentReceiver = new BroadcastReceiver() {
@Override
@@ -75,6 +77,7 @@
if (mDatePattern == null) {
mDatePattern = getContext().getString(R.string.system_ui_date_pattern);
}
+ mBroadcastDispatcher = Dependency.get(BroadcastDispatcher.class);
}
@Override
@@ -86,7 +89,7 @@
filter.addAction(Intent.ACTION_TIME_CHANGED);
filter.addAction(Intent.ACTION_TIMEZONE_CHANGED);
filter.addAction(Intent.ACTION_LOCALE_CHANGED);
- getContext().registerReceiver(mIntentReceiver, filter, null,
+ mBroadcastDispatcher.registerReceiver(mIntentReceiver, filter,
Dependency.get(Dependency.TIME_TICK_HANDLER));
updateClock();
@@ -97,7 +100,7 @@
super.onDetachedFromWindow();
mDateFormat = null; // reload the locale next time
- getContext().unregisterReceiver(mIntentReceiver);
+ mBroadcastDispatcher.unregisterReceiver(mIntentReceiver);
}
protected void updateClock() {
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/policy/DeviceProvisionedControllerImpl.java b/packages/SystemUI/src/com/android/systemui/statusbar/policy/DeviceProvisionedControllerImpl.java
index 0a40b3c..b6ffd58 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/policy/DeviceProvisionedControllerImpl.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/DeviceProvisionedControllerImpl.java
@@ -24,6 +24,7 @@
import android.provider.Settings.Secure;
import android.util.Log;
+import com.android.systemui.broadcast.BroadcastDispatcher;
import com.android.systemui.dagger.qualifiers.MainHandler;
import com.android.systemui.settings.CurrentUserTracker;
@@ -49,8 +50,9 @@
/**
*/
@Inject
- public DeviceProvisionedControllerImpl(Context context, @MainHandler Handler mainHandler) {
- super(context);
+ public DeviceProvisionedControllerImpl(Context context, @MainHandler Handler mainHandler,
+ BroadcastDispatcher broadcastDispatcher) {
+ super(broadcastDispatcher);
mContext = context;
mContentResolver = context.getContentResolver();
mDeviceProvisionedUri = Global.getUriFor(Global.DEVICE_PROVISIONED);
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/policy/LocationControllerImpl.java b/packages/SystemUI/src/com/android/systemui/statusbar/policy/LocationControllerImpl.java
index 5a97eed..3d51be7 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/policy/LocationControllerImpl.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/LocationControllerImpl.java
@@ -35,6 +35,7 @@
import androidx.annotation.VisibleForTesting;
+import com.android.systemui.broadcast.BroadcastDispatcher;
import com.android.systemui.dagger.qualifiers.BgLooper;
import com.android.systemui.util.Utils;
@@ -57,6 +58,7 @@
private AppOpsManager mAppOpsManager;
private StatusBarManager mStatusBarManager;
+ private BroadcastDispatcher mBroadcastDispatcher;
private boolean mAreActiveLocationRequests;
@@ -65,14 +67,16 @@
private final H mHandler = new H();
@Inject
- public LocationControllerImpl(Context context, @BgLooper Looper bgLooper) {
+ public LocationControllerImpl(Context context, @BgLooper Looper bgLooper,
+ BroadcastDispatcher broadcastDispatcher) {
mContext = context;
+ mBroadcastDispatcher = broadcastDispatcher;
// Register to listen for changes in location settings.
IntentFilter filter = new IntentFilter();
filter.addAction(LocationManager.HIGH_POWER_REQUEST_CHANGE_ACTION);
filter.addAction(LocationManager.MODE_CHANGED_ACTION);
- context.registerReceiverAsUser(this, UserHandle.ALL, filter, null, new Handler(bgLooper));
+ mBroadcastDispatcher.registerReceiver(this, filter, new Handler(bgLooper), UserHandle.ALL);
mAppOpsManager = (AppOpsManager) context.getSystemService(Context.APP_OPS_SERVICE);
mStatusBarManager
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/policy/NetworkControllerImpl.java b/packages/SystemUI/src/com/android/systemui/statusbar/policy/NetworkControllerImpl.java
index 60784c9..e5898ed 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/policy/NetworkControllerImpl.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/NetworkControllerImpl.java
@@ -64,6 +64,7 @@
import com.android.systemui.DemoMode;
import com.android.systemui.Dumpable;
import com.android.systemui.R;
+import com.android.systemui.broadcast.BroadcastDispatcher;
import com.android.systemui.dagger.qualifiers.BgLooper;
import com.android.systemui.settings.CurrentUserTracker;
import com.android.systemui.statusbar.policy.DeviceProvisionedController.DeviceProvisionedListener;
@@ -109,6 +110,7 @@
private final SubscriptionDefaults mSubDefaults;
private final DataSaverController mDataSaverController;
private final CurrentUserTracker mUserTracker;
+ private final BroadcastDispatcher mBroadcastDispatcher;
private final Object mLock = new Object();
private Config mConfig;
@@ -170,7 +172,8 @@
*/
@Inject
public NetworkControllerImpl(Context context, @BgLooper Looper bgLooper,
- DeviceProvisionedController deviceProvisionedController) {
+ DeviceProvisionedController deviceProvisionedController,
+ BroadcastDispatcher broadcastDispatcher) {
this(context, (ConnectivityManager) context.getSystemService(Context.CONNECTIVITY_SERVICE),
(TelephonyManager) context.getSystemService(Context.TELEPHONY_SERVICE),
(WifiManager) context.getSystemService(Context.WIFI_SERVICE),
@@ -179,7 +182,8 @@
new AccessPointControllerImpl(context),
new DataUsageController(context),
new SubscriptionDefaults(),
- deviceProvisionedController);
+ deviceProvisionedController,
+ broadcastDispatcher);
mReceiverHandler.post(mRegisterListeners);
}
@@ -191,12 +195,14 @@
AccessPointControllerImpl accessPointController,
DataUsageController dataUsageController,
SubscriptionDefaults defaultsHandler,
- DeviceProvisionedController deviceProvisionedController) {
+ DeviceProvisionedController deviceProvisionedController,
+ BroadcastDispatcher broadcastDispatcher) {
mContext = context;
mConfig = config;
mReceiverHandler = new Handler(bgLooper);
mCallbackHandler = callbackHandler;
mDataSaverController = new DataSaverControllerImpl(context);
+ mBroadcastDispatcher = broadcastDispatcher;
mSubscriptionManager = subManager;
mSubDefaults = defaultsHandler;
@@ -229,7 +235,7 @@
// AIRPLANE_MODE_CHANGED is sent at boot; we've probably already missed it
updateAirplaneMode(true /* force callback */);
- mUserTracker = new CurrentUserTracker(mContext) {
+ mUserTracker = new CurrentUserTracker(broadcastDispatcher) {
@Override
public void onUserSwitched(int newUserId) {
NetworkControllerImpl.this.onUserSwitched(newUserId);
@@ -315,7 +321,7 @@
filter.addAction(Intent.ACTION_AIRPLANE_MODE_CHANGED);
filter.addAction(Intent.ACTION_BOOT_COMPLETED);
filter.addAction(CarrierConfigManager.ACTION_CARRIER_CONFIG_CHANGED);
- mContext.registerReceiver(this, filter, null, mReceiverHandler);
+ mBroadcastDispatcher.registerReceiver(this, filter, mReceiverHandler);
mListening = true;
updateMobileControllers();
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/policy/RemoteInputUriController.java b/packages/SystemUI/src/com/android/systemui/statusbar/policy/RemoteInputUriController.java
new file mode 100644
index 0000000..4d912de
--- /dev/null
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/RemoteInputUriController.java
@@ -0,0 +1,84 @@
+/*
+ * Copyright (C) 2019 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.systemui.statusbar.policy;
+
+import android.net.Uri;
+import android.os.RemoteException;
+import android.service.notification.StatusBarNotification;
+import android.util.Log;
+
+import com.android.internal.statusbar.IStatusBarService;
+import com.android.internal.statusbar.NotificationVisibility;
+import com.android.systemui.statusbar.notification.NotificationEntryListener;
+import com.android.systemui.statusbar.notification.NotificationEntryManager;
+import com.android.systemui.statusbar.notification.collection.NotificationEntry;
+
+import javax.inject.Inject;
+import javax.inject.Singleton;
+
+/**
+ * Handles granting and revoking inline URI grants associated with RemoteInputs.
+ */
+@Singleton
+public class RemoteInputUriController {
+
+ private final IStatusBarService mStatusBarManagerService;
+ private static final String TAG = "RemoteInputUriController";
+
+ @Inject
+ public RemoteInputUriController(IStatusBarService statusBarService) {
+ mStatusBarManagerService = statusBarService;
+ }
+
+ /**
+ * Attach this controller as a listener to the provided NotificationEntryManager to ensure
+ * that RemoteInput URI grants are cleaned up when the notification entry is removed from
+ * the shade.
+ */
+ public void attach(NotificationEntryManager manager) {
+ manager.addNotificationEntryListener(mInlineUriListener);
+ }
+
+ /**
+ * Create a temporary grant which allows the app that submitted the notification access to the
+ * specified URI.
+ */
+ public void grantInlineReplyUriPermission(StatusBarNotification sbn, Uri data) {
+ try {
+ mStatusBarManagerService.grantInlineReplyUriPermission(
+ sbn.getKey(), data, sbn.getUser(), sbn.getPackageName());
+ } catch (Exception e) {
+ Log.e(TAG, "Failed to grant URI permissions:" + e.getMessage(), e);
+ }
+ }
+
+ /**
+ * Ensures that inline URI permissions are cleared when notification entries are removed from
+ * the shade.
+ */
+ private final NotificationEntryListener mInlineUriListener = new NotificationEntryListener() {
+ @Override
+ public void onEntryRemoved(NotificationEntry entry, NotificationVisibility visibility,
+ boolean removedByUser) {
+ try {
+ mStatusBarManagerService.clearInlineReplyUriPermissions(entry.getKey());
+ } catch (RemoteException ex) {
+ ex.rethrowFromSystemServer();
+ }
+ }
+ };
+}
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/policy/RemoteInputView.java b/packages/SystemUI/src/com/android/systemui/statusbar/policy/RemoteInputView.java
index 502a9bd..307e3bc 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/policy/RemoteInputView.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/RemoteInputView.java
@@ -173,12 +173,7 @@
protected Intent prepareRemoteInputFromData(String contentType, Uri data) {
HashMap<String, Uri> results = new HashMap<>();
results.put(contentType, data);
- try {
- mStatusBarManagerService.grantInlineReplyUriPermission(
- mEntry.getSbn().getKey(), data);
- } catch (Exception e) {
- Log.e(TAG, "Failed to grant URI permissions:" + e.getMessage(), e);
- }
+ mController.grantInlineReplyUriPermission(mEntry.getSbn(), data);
Intent fillInIntent = new Intent().addFlags(Intent.FLAG_RECEIVER_FOREGROUND);
RemoteInput.addDataResultToIntent(mRemoteInput, fillInIntent, results);
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/policy/SecurityControllerImpl.java b/packages/SystemUI/src/com/android/systemui/statusbar/policy/SecurityControllerImpl.java
index 0c68383..c161458 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/policy/SecurityControllerImpl.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/SecurityControllerImpl.java
@@ -48,6 +48,7 @@
import com.android.internal.net.LegacyVpnInfo;
import com.android.internal.net.VpnConfig;
import com.android.systemui.R;
+import com.android.systemui.broadcast.BroadcastDispatcher;
import com.android.systemui.dagger.qualifiers.BgHandler;
import com.android.systemui.settings.CurrentUserTracker;
@@ -100,13 +101,14 @@
/**
*/
@Inject
- public SecurityControllerImpl(Context context, @BgHandler Handler bgHandler) {
- this(context, bgHandler, null);
+ public SecurityControllerImpl(Context context, @BgHandler Handler bgHandler,
+ BroadcastDispatcher broadcastDispatcher) {
+ this(context, bgHandler, broadcastDispatcher, null);
}
public SecurityControllerImpl(Context context, Handler bgHandler,
- SecurityControllerCallback callback) {
- super(context);
+ BroadcastDispatcher broadcastDispatcher, SecurityControllerCallback callback) {
+ super(broadcastDispatcher);
mContext = context;
mBgHandler = bgHandler;
mDevicePolicyManager = (DevicePolicyManager)
@@ -124,8 +126,7 @@
IntentFilter filter = new IntentFilter();
filter.addAction(KeyChain.ACTION_TRUST_STORE_CHANGED);
filter.addAction(Intent.ACTION_USER_UNLOCKED);
- context.registerReceiverAsUser(mBroadcastReceiver, UserHandle.ALL, filter, null,
- bgHandler);
+ broadcastDispatcher.registerReceiver(mBroadcastReceiver, filter, bgHandler, UserHandle.ALL);
// TODO: re-register network callback on user change.
mConnectivityManager.registerNetworkCallback(REQUEST, mNetworkCallback);
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/policy/UserSwitcherController.java b/packages/SystemUI/src/com/android/systemui/statusbar/policy/UserSwitcherController.java
index 2c99668..075c6d4 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/policy/UserSwitcherController.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/UserSwitcherController.java
@@ -59,6 +59,7 @@
import com.android.systemui.Prefs.Key;
import com.android.systemui.R;
import com.android.systemui.SystemUISecondaryUserService;
+import com.android.systemui.broadcast.BroadcastDispatcher;
import com.android.systemui.dagger.qualifiers.MainHandler;
import com.android.systemui.plugins.ActivityStarter;
import com.android.systemui.plugins.qs.DetailAdapter;
@@ -96,6 +97,7 @@
private final KeyguardStateController mKeyguardStateController;
protected final Handler mHandler;
private final ActivityStarter mActivityStarter;
+ private final BroadcastDispatcher mBroadcastDispatcher;
private ArrayList<UserRecord> mUsers = new ArrayList<>();
private Dialog mExitGuestDialog;
@@ -111,10 +113,12 @@
@Inject
public UserSwitcherController(Context context, KeyguardStateController keyguardStateController,
- @MainHandler Handler handler, ActivityStarter activityStarter) {
+ @MainHandler Handler handler, ActivityStarter activityStarter,
+ BroadcastDispatcher broadcastDispatcher) {
mContext = context;
+ mBroadcastDispatcher = broadcastDispatcher;
if (!UserManager.isGuestUserEphemeral()) {
- mGuestResumeSessionReceiver.register(context);
+ mGuestResumeSessionReceiver.register(mBroadcastDispatcher);
}
mKeyguardStateController = keyguardStateController;
mHandler = handler;
@@ -127,8 +131,8 @@
filter.addAction(Intent.ACTION_USER_SWITCHED);
filter.addAction(Intent.ACTION_USER_STOPPED);
filter.addAction(Intent.ACTION_USER_UNLOCKED);
- mContext.registerReceiverAsUser(mReceiver, UserHandle.SYSTEM, filter,
- null /* permission */, null /* scheduler */);
+ mBroadcastDispatcher.registerReceiver(
+ mReceiver, filter, null /* handler */, UserHandle.SYSTEM);
mSecondaryUserServiceIntent = new Intent(context, SystemUISecondaryUserService.class);
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/policy/ZenModeControllerImpl.java b/packages/SystemUI/src/com/android/systemui/statusbar/policy/ZenModeControllerImpl.java
index 1c7a195..a2028e6 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/policy/ZenModeControllerImpl.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/ZenModeControllerImpl.java
@@ -39,6 +39,7 @@
import com.android.internal.annotations.VisibleForTesting;
import com.android.systemui.Dumpable;
+import com.android.systemui.broadcast.BroadcastDispatcher;
import com.android.systemui.dagger.qualifiers.MainHandler;
import com.android.systemui.qs.GlobalSetting;
import com.android.systemui.settings.CurrentUserTracker;
@@ -77,8 +78,9 @@
private NotificationManager.Policy mConsolidatedNotificationPolicy;
@Inject
- public ZenModeControllerImpl(Context context, @MainHandler Handler handler) {
- super(context);
+ public ZenModeControllerImpl(Context context, @MainHandler Handler handler,
+ BroadcastDispatcher broadcastDispatcher) {
+ super(broadcastDispatcher);
mContext = context;
mModeSetting = new GlobalSetting(mContext, handler, Global.ZEN_MODE) {
@Override
diff --git a/packages/SystemUI/src/com/android/systemui/theme/ThemeOverlayController.java b/packages/SystemUI/src/com/android/systemui/theme/ThemeOverlayController.java
index 9a58a35..128bb21 100644
--- a/packages/SystemUI/src/com/android/systemui/theme/ThemeOverlayController.java
+++ b/packages/SystemUI/src/com/android/systemui/theme/ThemeOverlayController.java
@@ -36,6 +36,7 @@
import com.android.systemui.Dependency;
import com.android.systemui.R;
import com.android.systemui.SystemUI;
+import com.android.systemui.broadcast.BroadcastDispatcher;
import com.google.android.collect.Sets;
@@ -45,6 +46,9 @@
import java.util.Map;
import java.util.Set;
+import javax.inject.Inject;
+import javax.inject.Singleton;
+
/**
* Controls the application of theme overlays across the system for all users.
* This service is responsible for:
@@ -54,15 +58,19 @@
* - Observing work profile changes and applying overlays from the primary user to their
* associated work profiles
*/
+@Singleton
public class ThemeOverlayController extends SystemUI {
private static final String TAG = "ThemeOverlayController";
private static final boolean DEBUG = false;
private ThemeOverlayManager mThemeManager;
private UserManager mUserManager;
+ private BroadcastDispatcher mBroadcastDispatcher;
- public ThemeOverlayController(Context context) {
+ @Inject
+ public ThemeOverlayController(Context context, BroadcastDispatcher broadcastDispatcher) {
super(context);
+ mBroadcastDispatcher = broadcastDispatcher;
}
@Override
@@ -78,13 +86,13 @@
final IntentFilter filter = new IntentFilter();
filter.addAction(Intent.ACTION_USER_SWITCHED);
filter.addAction(Intent.ACTION_MANAGED_PROFILE_ADDED);
- mContext.registerReceiverAsUser(new BroadcastReceiver() {
+ mBroadcastDispatcher.registerReceiver(new BroadcastReceiver() {
@Override
public void onReceive(Context context, Intent intent) {
if (DEBUG) Log.d(TAG, "Updating overlays for user switch / profile added.");
updateThemeOverlays();
}
- }, UserHandle.ALL, filter, null, bgHandler);
+ }, filter, bgHandler, UserHandle.ALL);
mContext.getContentResolver().registerContentObserver(
Settings.Secure.getUriFor(Settings.Secure.THEME_CUSTOMIZATION_OVERLAY_PACKAGES),
false,
diff --git a/packages/SystemUI/src/com/android/systemui/tuner/TunerServiceImpl.java b/packages/SystemUI/src/com/android/systemui/tuner/TunerServiceImpl.java
index 2d6027c..ce0032e 100644
--- a/packages/SystemUI/src/com/android/systemui/tuner/TunerServiceImpl.java
+++ b/packages/SystemUI/src/com/android/systemui/tuner/TunerServiceImpl.java
@@ -34,6 +34,7 @@
import com.android.internal.util.ArrayUtils;
import com.android.systemui.DejankUtils;
import com.android.systemui.DemoMode;
+import com.android.systemui.broadcast.BroadcastDispatcher;
import com.android.systemui.dagger.qualifiers.MainHandler;
import com.android.systemui.qs.QSTileHost;
import com.android.systemui.settings.CurrentUserTracker;
@@ -82,7 +83,7 @@
*/
@Inject
public TunerServiceImpl(Context context, @MainHandler Handler mainHandler,
- LeakDetector leakDetector) {
+ LeakDetector leakDetector, BroadcastDispatcher broadcastDispatcher) {
mContext = context;
mContentResolver = mContext.getContentResolver();
mLeakDetector = leakDetector;
@@ -95,7 +96,7 @@
}
mCurrentUser = ActivityManager.getCurrentUser();
- mUserTracker = new CurrentUserTracker(mContext) {
+ mUserTracker = new CurrentUserTracker(broadcastDispatcher) {
@Override
public void onUserSwitched(int newUserId) {
mCurrentUser = newUserId;
diff --git a/packages/SystemUI/src/com/android/systemui/usb/UsbDebuggingActivity.java b/packages/SystemUI/src/com/android/systemui/usb/UsbDebuggingActivity.java
index 4d12cc9..2f13f39 100644
--- a/packages/SystemUI/src/com/android/systemui/usb/UsbDebuggingActivity.java
+++ b/packages/SystemUI/src/com/android/systemui/usb/UsbDebuggingActivity.java
@@ -42,6 +42,9 @@
import com.android.internal.app.AlertActivity;
import com.android.internal.app.AlertController;
import com.android.systemui.R;
+import com.android.systemui.broadcast.BroadcastDispatcher;
+
+import javax.inject.Inject;
public class UsbDebuggingActivity extends AlertActivity
implements DialogInterface.OnClickListener {
@@ -49,12 +52,20 @@
private CheckBox mAlwaysAllow;
private UsbDisconnectedReceiver mDisconnectedReceiver;
+ private final BroadcastDispatcher mBroadcastDispatcher;
private String mKey;
+ @Inject
+ public UsbDebuggingActivity(BroadcastDispatcher broadcastDispatcher) {
+ super();
+ mBroadcastDispatcher = broadcastDispatcher;
+ }
+
@Override
public void onCreate(Bundle icicle) {
Window window = getWindow();
- window.addSystemFlags(WindowManager.LayoutParams.SYSTEM_FLAG_HIDE_NON_SYSTEM_OVERLAY_WINDOWS);
+ window.addSystemFlags(
+ WindowManager.LayoutParams.SYSTEM_FLAG_HIDE_NON_SYSTEM_OVERLAY_WINDOWS);
window.setType(WindowManager.LayoutParams.TYPE_SYSTEM_DIALOG);
super.onCreate(icicle);
@@ -138,13 +149,13 @@
public void onStart() {
super.onStart();
IntentFilter filter = new IntentFilter(UsbManager.ACTION_USB_STATE);
- registerReceiver(mDisconnectedReceiver, filter);
+ mBroadcastDispatcher.registerReceiver(mDisconnectedReceiver, filter);
}
@Override
protected void onStop() {
if (mDisconnectedReceiver != null) {
- unregisterReceiver(mDisconnectedReceiver);
+ mBroadcastDispatcher.unregisterReceiver(mDisconnectedReceiver);
}
super.onStop();
}
diff --git a/packages/SystemUI/src/com/android/systemui/usb/UsbDebuggingSecondaryUserActivity.java b/packages/SystemUI/src/com/android/systemui/usb/UsbDebuggingSecondaryUserActivity.java
index bafd1f1..032b72e 100644
--- a/packages/SystemUI/src/com/android/systemui/usb/UsbDebuggingSecondaryUserActivity.java
+++ b/packages/SystemUI/src/com/android/systemui/usb/UsbDebuggingSecondaryUserActivity.java
@@ -29,10 +29,19 @@
import com.android.internal.app.AlertActivity;
import com.android.internal.app.AlertController;
import com.android.systemui.R;
+import com.android.systemui.broadcast.BroadcastDispatcher;
+
+import javax.inject.Inject;
public class UsbDebuggingSecondaryUserActivity extends AlertActivity
implements DialogInterface.OnClickListener {
private UsbDisconnectedReceiver mDisconnectedReceiver;
+ private final BroadcastDispatcher mBroadcastDispatcher;
+
+ @Inject
+ public UsbDebuggingSecondaryUserActivity(BroadcastDispatcher broadcastDispatcher) {
+ mBroadcastDispatcher = broadcastDispatcher;
+ }
@Override
public void onCreate(Bundle icicle) {
@@ -74,13 +83,13 @@
super.onStart();
IntentFilter filter = new IntentFilter(UsbManager.ACTION_USB_STATE);
- registerReceiver(mDisconnectedReceiver, filter);
+ mBroadcastDispatcher.registerReceiver(mDisconnectedReceiver, filter);
}
@Override
protected void onStop() {
if (mDisconnectedReceiver != null) {
- unregisterReceiver(mDisconnectedReceiver);
+ mBroadcastDispatcher.unregisterReceiver(mDisconnectedReceiver);
}
super.onStop();
}
diff --git a/packages/SystemUI/src/com/android/systemui/usb/UsbResolverActivity.java b/packages/SystemUI/src/com/android/systemui/usb/UsbResolverActivity.java
index 0b27327..2e30d32 100644
--- a/packages/SystemUI/src/com/android/systemui/usb/UsbResolverActivity.java
+++ b/packages/SystemUI/src/com/android/systemui/usb/UsbResolverActivity.java
@@ -87,8 +87,10 @@
}
mDevice = (UsbDevice)target.getParcelableExtra(UsbManager.EXTRA_DEVICE);
+ boolean hasAudioCapture = false;
if (mDevice != null) {
mDisconnectedReceiver = new UsbDisconnectedReceiver(this, mDevice);
+ hasAudioCapture = mDevice.getHasAudioCapture();
} else {
mAccessory = (UsbAccessory)target.getParcelableExtra(UsbManager.EXTRA_ACCESSORY);
if (mAccessory == null) {
@@ -119,6 +121,8 @@
}
}
}
+ getIntent().putExtra(
+ ResolverActivity.EXTRA_IS_AUDIO_CAPTURE_DEVICE, hasAudioCapture);
CharSequence title = getResources().getText(com.android.internal.R.string.chooseUsbActivity);
super.onCreate(savedInstanceState, target, title, null, rList, true);
diff --git a/packages/SystemUI/src/com/android/systemui/util/EmergencyDialerConstants.java b/packages/SystemUI/src/com/android/systemui/util/EmergencyDialerConstants.java
index d101ccb..e93e241 100644
--- a/packages/SystemUI/src/com/android/systemui/util/EmergencyDialerConstants.java
+++ b/packages/SystemUI/src/com/android/systemui/util/EmergencyDialerConstants.java
@@ -21,11 +21,10 @@
* Please keep these constants being consistent with those in com.android.phone.EmergencyDialer.
*/
public class EmergencyDialerConstants {
- // Intent action for emergency dialer activity.
- public static final String ACTION_DIAL = "com.android.phone.EmergencyDialer.DIAL";
/**
- * Extra included in {@link #ACTION_DIAL} to indicate the entry type that user starts
+ * Extra included in {@link android.telecom.TelecomManager#createLaunchEmergencyDialerIntent}
+ * to indicate the entry type that user starts
* the emergency dialer.
*/
public static final String EXTRA_ENTRY_TYPE =
diff --git a/packages/SystemUI/src/com/android/systemui/util/InjectionInflationController.java b/packages/SystemUI/src/com/android/systemui/util/InjectionInflationController.java
index 5ed027d..60d7678 100644
--- a/packages/SystemUI/src/com/android/systemui/util/InjectionInflationController.java
+++ b/packages/SystemUI/src/com/android/systemui/util/InjectionInflationController.java
@@ -37,7 +37,6 @@
import com.android.systemui.statusbar.notification.stack.NotificationStackScrollLayout;
import com.android.systemui.statusbar.phone.LockIcon;
import com.android.systemui.statusbar.phone.NotificationPanelView;
-import com.android.systemui.statusbar.policy.Clock;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
@@ -179,11 +178,6 @@
* Creates the QSCustomizer.
*/
QSCustomizer createQSCustomizer();
-
- /**
- * Creates a Clock.
- */
- Clock createClock();
}
/**
diff --git a/packages/SystemUI/tests/src/com/android/keyguard/KeyguardUpdateMonitorTest.java b/packages/SystemUI/tests/src/com/android/keyguard/KeyguardUpdateMonitorTest.java
index 7d28392..c1da53b 100644
--- a/packages/SystemUI/tests/src/com/android/keyguard/KeyguardUpdateMonitorTest.java
+++ b/packages/SystemUI/tests/src/com/android/keyguard/KeyguardUpdateMonitorTest.java
@@ -26,6 +26,7 @@
import static org.mockito.ArgumentMatchers.anyInt;
import static org.mockito.ArgumentMatchers.anyString;
import static org.mockito.ArgumentMatchers.eq;
+import static org.mockito.Mockito.atLeastOnce;
import static org.mockito.Mockito.clearInvocations;
import static org.mockito.Mockito.doAnswer;
import static org.mockito.Mockito.never;
@@ -37,6 +38,7 @@
import android.app.trust.TrustManager;
import android.content.Context;
import android.content.Intent;
+import android.content.IntentFilter;
import android.content.pm.PackageManager;
import android.hardware.biometrics.BiometricManager;
import android.hardware.biometrics.BiometricSourceType;
@@ -44,6 +46,8 @@
import android.hardware.face.FaceManager;
import android.hardware.fingerprint.FingerprintManager;
import android.os.Bundle;
+import android.os.Handler;
+import android.os.UserHandle;
import android.os.UserManager;
import android.telephony.ServiceState;
import android.telephony.SubscriptionInfo;
@@ -58,6 +62,7 @@
import com.android.internal.telephony.TelephonyIntents;
import com.android.systemui.DumpController;
import com.android.systemui.SysuiTestCase;
+import com.android.systemui.broadcast.BroadcastDispatcher;
import com.android.systemui.statusbar.phone.KeyguardBypassController;
import org.junit.Assert;
@@ -109,6 +114,8 @@
private KeyguardBypassController mKeyguardBypassController;
@Mock
private SubscriptionManager mSubscriptionManager;
+ @Mock
+ private BroadcastDispatcher mBroadcastDispatcher;
private TestableLooper mTestableLooper;
private TestableKeyguardUpdateMonitor mKeyguardUpdateMonitor;
@@ -143,6 +150,16 @@
}
@Test
+ public void testReceiversRegistered() {
+ verify(mBroadcastDispatcher, atLeastOnce()).registerReceiver(
+ eq(mKeyguardUpdateMonitor.mBroadcastReceiver),
+ any(IntentFilter.class), any(Handler.class));
+ verify(mBroadcastDispatcher, atLeastOnce()).registerReceiver(
+ eq(mKeyguardUpdateMonitor.mBroadcastAllReceiver),
+ any(IntentFilter.class), any(Handler.class), eq(UserHandle.ALL));
+ }
+
+ @Test
public void testIgnoresSimStateCallback_rebroadcast() {
Intent intent = new Intent(TelephonyIntents.ACTION_SIM_STATE_CHANGED);
@@ -518,10 +535,9 @@
AtomicBoolean mSimStateChanged = new AtomicBoolean(false);
protected TestableKeyguardUpdateMonitor(Context context) {
- super(context, TestableLooper.get(KeyguardUpdateMonitorTest.this)
- .getLooper(), mDumpController);
- context.unregisterReceiver(mBroadcastReceiver);
- context.unregisterReceiver(mBroadcastAllReceiver);
+ super(context,
+ TestableLooper.get(KeyguardUpdateMonitorTest.this).getLooper(),
+ mBroadcastDispatcher, mDumpController);
mStrongAuthTracker = KeyguardUpdateMonitorTest.this.mStrongAuthTracker;
}
diff --git a/packages/SystemUI/tests/src/com/android/systemui/ScreenDecorationsTest.java b/packages/SystemUI/tests/src/com/android/systemui/ScreenDecorationsTest.java
index 7359fdce..1e9000b 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/ScreenDecorationsTest.java
+++ b/packages/SystemUI/tests/src/com/android/systemui/ScreenDecorationsTest.java
@@ -50,6 +50,7 @@
import com.android.systemui.R.dimen;
import com.android.systemui.ScreenDecorations.TunablePaddingTagListener;
+import com.android.systemui.broadcast.BroadcastDispatcher;
import com.android.systemui.fragments.FragmentHostManager;
import com.android.systemui.fragments.FragmentService;
import com.android.systemui.statusbar.phone.StatusBar;
@@ -79,9 +80,13 @@
private WindowManager mWindowManager;
private FragmentService mFragmentService;
private FragmentHostManager mFragmentHostManager;
- private TunerService mTunerService;
private StatusBarWindowView mView;
private TunablePaddingService mTunablePaddingService;
+ private Handler mMainHandler;
+ @Mock
+ private TunerService mTunerService;
+ @Mock
+ private BroadcastDispatcher mBroadcastDispatcher;
@Mock private Lazy<StatusBar> mStatusBarLazy;
@Before
@@ -89,10 +94,8 @@
MockitoAnnotations.initMocks(this);
mTestableLooper = TestableLooper.get(this);
- mDependency.injectTestDependency(Dependency.MAIN_HANDLER,
- new Handler(mTestableLooper.getLooper()));
+ mMainHandler = new Handler(mTestableLooper.getLooper());
mTunablePaddingService = mDependency.injectMockDependency(TunablePaddingService.class);
- mTunerService = mDependency.injectMockDependency(TunerService.class);
mFragmentService = mDependency.injectMockDependency(FragmentService.class);
mWindowManager = mock(WindowManager.class);
@@ -108,7 +111,8 @@
when(mFragmentService.getFragmentHostManager(any())).thenReturn(mFragmentHostManager);
- mScreenDecorations = new ScreenDecorations(mContext, mStatusBarLazy) {
+ mScreenDecorations = new ScreenDecorations(mContext, mStatusBarLazy, mMainHandler,
+ mBroadcastDispatcher, mTunerService) {
@Override
public void start() {
super.start();
diff --git a/packages/SystemUI/tests/src/com/android/systemui/SliceBroadcastRelayHandlerTest.java b/packages/SystemUI/tests/src/com/android/systemui/SliceBroadcastRelayHandlerTest.java
index a766885..7d55623 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/SliceBroadcastRelayHandlerTest.java
+++ b/packages/SystemUI/tests/src/com/android/systemui/SliceBroadcastRelayHandlerTest.java
@@ -17,6 +17,7 @@
import static org.mockito.ArgumentMatchers.any;
import static org.mockito.ArgumentMatchers.eq;
import static org.mockito.Mockito.mock;
+import static org.mockito.Mockito.never;
import static org.mockito.Mockito.spy;
import static org.mockito.Mockito.timeout;
import static org.mockito.Mockito.verify;
@@ -34,11 +35,14 @@
import androidx.test.filters.SmallTest;
import com.android.settingslib.SliceBroadcastRelay;
+import com.android.systemui.broadcast.BroadcastDispatcher;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.mockito.ArgumentCaptor;
+import org.mockito.Mock;
+import org.mockito.MockitoAnnotations;
@RunWith(AndroidTestingRunner.class)
@SmallTest
@@ -47,11 +51,15 @@
private static final String TEST_ACTION = "com.android.systemui.action.TEST_ACTION";
private SliceBroadcastRelayHandler mRelayHandler;
private Context mSpyContext;
+ @Mock
+ private BroadcastDispatcher mBroadcastDispatcher;
+
@Before
public void setup() {
+ MockitoAnnotations.initMocks(this);
mSpyContext = spy(mContext);
- mRelayHandler = new SliceBroadcastRelayHandler(mSpyContext);
+ mRelayHandler = new SliceBroadcastRelayHandler(mSpyContext, mBroadcastDispatcher);
}
@Test
@@ -136,6 +144,16 @@
verify(Receiver.sReceiver, timeout(2000)).onReceive(any(), any());
}
+ @Test
+ public void testRegisteredWithDispatcher() {
+ mRelayHandler.start();
+
+ verify(mBroadcastDispatcher)
+ .registerReceiver(any(BroadcastReceiver.class), any(IntentFilter.class));
+ verify(mSpyContext, never())
+ .registerReceiver(any(BroadcastReceiver.class), any(IntentFilter.class));
+ }
+
public static class Receiver extends BroadcastReceiver {
private static BroadcastReceiver sReceiver;
diff --git a/packages/SystemUI/tests/src/com/android/systemui/doze/DozeScreenBrightnessTest.java b/packages/SystemUI/tests/src/com/android/systemui/doze/DozeScreenBrightnessTest.java
index 316b891..2ed0b4f 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/doze/DozeScreenBrightnessTest.java
+++ b/packages/SystemUI/tests/src/com/android/systemui/doze/DozeScreenBrightnessTest.java
@@ -45,6 +45,7 @@
import androidx.test.runner.AndroidJUnit4;
import com.android.systemui.SysuiTestCase;
+import com.android.systemui.broadcast.BroadcastDispatcher;
import com.android.systemui.util.sensors.FakeSensorManager;
import org.junit.Before;
@@ -66,6 +67,8 @@
FakeSensorManager mSensorManager;
@Mock
DozeHost mDozeHost;
+ @Mock
+ BroadcastDispatcher mBroadcastDispatcher;
DozeScreenBrightness mScreen;
@Before
@@ -82,7 +85,7 @@
mSensorManager = new FakeSensorManager(mContext);
mSensor = mSensorManager.getFakeLightSensor();
mScreen = new DozeScreenBrightness(mContext, mServiceFake, mSensorManager,
- mSensor.getSensor(), mDozeHost, null /* handler */,
+ mSensor.getSensor(), mBroadcastDispatcher, mDozeHost, null /* handler */,
DEFAULT_BRIGHTNESS, SENSOR_TO_BRIGHTNESS, SENSOR_TO_OPACITY,
true /* debuggable */);
}
@@ -185,7 +188,7 @@
@Test
public void testNullSensor() throws Exception {
mScreen = new DozeScreenBrightness(mContext, mServiceFake, mSensorManager,
- null /* sensor */, mDozeHost, null /* handler */,
+ null /* sensor */, mBroadcastDispatcher, mDozeHost, null /* handler */,
DEFAULT_BRIGHTNESS, SENSOR_TO_BRIGHTNESS, SENSOR_TO_OPACITY,
true /* debuggable */);
diff --git a/packages/SystemUI/tests/src/com/android/systemui/doze/DozeTriggersTest.java b/packages/SystemUI/tests/src/com/android/systemui/doze/DozeTriggersTest.java
index 756227e..226bf6b 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/doze/DozeTriggersTest.java
+++ b/packages/SystemUI/tests/src/com/android/systemui/doze/DozeTriggersTest.java
@@ -39,6 +39,7 @@
import androidx.test.filters.SmallTest;
import com.android.systemui.SysuiTestCase;
+import com.android.systemui.broadcast.BroadcastDispatcher;
import com.android.systemui.dock.DockManager;
import com.android.systemui.statusbar.phone.DozeParameters;
import com.android.systemui.util.sensors.AsyncSensorManager;
@@ -66,6 +67,8 @@
private DozeHost mHost;
@Mock
private AlarmManager mAlarmManager;
+ @Mock
+ private BroadcastDispatcher mBroadcastDispatcher;
private DozeTriggers mTriggers;
private FakeSensorManager mSensors;
private Sensor mTapSensor;
@@ -87,7 +90,7 @@
mTriggers = new DozeTriggers(mContext, mMachine, mHost, mAlarmManager, config, parameters,
asyncSensorManager, Handler.createAsync(Looper.myLooper()), wakeLock, true,
- mDockManagerFake, mProximitySensor, mock(DozeLog.class));
+ mDockManagerFake, mProximitySensor, mock(DozeLog.class), mBroadcastDispatcher);
waitForSensorManager();
}
diff --git a/packages/SystemUI/tests/src/com/android/systemui/keyguard/KeyguardViewMediatorTest.java b/packages/SystemUI/tests/src/com/android/systemui/keyguard/KeyguardViewMediatorTest.java
index 9312ed2..c815279 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/keyguard/KeyguardViewMediatorTest.java
+++ b/packages/SystemUI/tests/src/com/android/systemui/keyguard/KeyguardViewMediatorTest.java
@@ -37,6 +37,7 @@
import com.android.keyguard.ViewMediatorCallback;
import com.android.systemui.SystemUIFactory;
import com.android.systemui.SysuiTestCase;
+import com.android.systemui.broadcast.BroadcastDispatcher;
import com.android.systemui.classifier.FalsingManagerFake;
import com.android.systemui.plugins.FalsingManager;
import com.android.systemui.statusbar.phone.StatusBarKeyguardViewManager;
@@ -60,6 +61,7 @@
private @Mock StatusBarKeyguardViewManager mStatusBarKeyguardViewManager;
private @Mock StatusBarWindowController mStatusBarWindowController;
private @Mock SystemUIFactory mSystemUIFactory;
+ private @Mock BroadcastDispatcher mBroadcastDispatcher;
private FalsingManagerFake mFalsingManager;
@@ -81,7 +83,8 @@
TestableLooper.get(this).runWithLooper(() -> {
mViewMediator = new KeyguardViewMediator(
- mContext, mFalsingManager, mLockPatternUtils, mSystemUIFactory);
+ mContext, mFalsingManager, mLockPatternUtils, mBroadcastDispatcher,
+ mSystemUIFactory);
});
}
diff --git a/packages/SystemUI/tests/src/com/android/systemui/keyguard/WorkLockActivityTest.java b/packages/SystemUI/tests/src/com/android/systemui/keyguard/WorkLockActivityTest.java
index 6e726cf..187c72a 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/keyguard/WorkLockActivityTest.java
+++ b/packages/SystemUI/tests/src/com/android/systemui/keyguard/WorkLockActivityTest.java
@@ -35,6 +35,7 @@
import androidx.test.runner.AndroidJUnit4;
import com.android.systemui.SysuiTestCase;
+import com.android.systemui.broadcast.BroadcastDispatcher;
import com.android.systemui.keyguard.WorkLockActivity;
import org.junit.Before;
@@ -55,12 +56,13 @@
private @Mock DevicePolicyManager mDevicePolicyManager;
private @Mock KeyguardManager mKeyguardManager;
private @Mock Context mContext;
+ private @Mock BroadcastDispatcher mBroadcastDispatcher;
private WorkLockActivity mActivity;
private static class WorkLockActivityTestable extends WorkLockActivity {
- WorkLockActivityTestable(Context baseContext) {
- super();
+ WorkLockActivityTestable(Context baseContext, BroadcastDispatcher broadcastDispatcher) {
+ super(broadcastDispatcher);
attachBaseContext(baseContext);
}
}
@@ -77,7 +79,7 @@
if (Looper.myLooper() == null) {
Looper.prepare();
}
- mActivity = new WorkLockActivityTestable(mContext);
+ mActivity = new WorkLockActivityTestable(mContext, mBroadcastDispatcher);
}
@Test
diff --git a/packages/SystemUI/tests/src/com/android/systemui/privacy/PrivacyItemControllerTest.kt b/packages/SystemUI/tests/src/com/android/systemui/privacy/PrivacyItemControllerTest.kt
index 462c82e..098521f 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/privacy/PrivacyItemControllerTest.kt
+++ b/packages/SystemUI/tests/src/com/android/systemui/privacy/PrivacyItemControllerTest.kt
@@ -36,6 +36,7 @@
import com.android.systemui.SysuiTestCase
import com.android.systemui.appops.AppOpItem
import com.android.systemui.appops.AppOpsController
+import com.android.systemui.broadcast.BroadcastDispatcher
import org.hamcrest.Matchers.hasItem
import org.hamcrest.Matchers.not
import org.hamcrest.Matchers.nullValue
@@ -62,7 +63,6 @@
import org.mockito.Mockito.mock
import org.mockito.Mockito.never
import org.mockito.Mockito.reset
-import org.mockito.Mockito.spy
import org.mockito.Mockito.verify
import org.mockito.Mockito.verifyNoMoreInteractions
import org.mockito.MockitoAnnotations
@@ -89,6 +89,8 @@
private lateinit var callback: PrivacyItemController.Callback
@Mock
private lateinit var userManager: UserManager
+ @Mock
+ private lateinit var broadcastDispatcher: BroadcastDispatcher
@Captor
private lateinit var argCaptor: ArgumentCaptor<List<PrivacyItem>>
@Captor
@@ -99,7 +101,7 @@
private lateinit var handler: Handler
fun PrivacyItemController(context: Context) =
- PrivacyItemController(context, appOpsController, handler, handler)
+ PrivacyItemController(context, appOpsController, handler, handler, broadcastDispatcher)
@Before
fun setup() {
@@ -180,14 +182,12 @@
@Test
fun testRegisterReceiver_allUsers() {
- val spiedContext = spy(mContext)
- val itemController = PrivacyItemController(spiedContext)
- itemController.addCallback(callback)
+ privacyItemController.addCallback(callback)
testableLooper.processAllMessages()
- verify(spiedContext, atLeastOnce()).registerReceiverAsUser(
- eq(itemController.userSwitcherReceiver), eq(UserHandle.ALL), any(), eq(null),
- eq(null))
- verify(spiedContext, never()).unregisterReceiver(eq(itemController.userSwitcherReceiver))
+ verify(broadcastDispatcher, atLeastOnce()).registerReceiver(
+ eq(privacyItemController.userSwitcherReceiver), any(), eq(null), eq(UserHandle.ALL))
+ verify(broadcastDispatcher, never())
+ .unregisterReceiver(eq(privacyItemController.userSwitcherReceiver))
}
@Test
diff --git a/packages/SystemUI/tests/src/com/android/systemui/qs/QSFragmentTest.java b/packages/SystemUI/tests/src/com/android/systemui/qs/QSFragmentTest.java
index ca30bed..a31fc3a 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/qs/QSFragmentTest.java
+++ b/packages/SystemUI/tests/src/com/android/systemui/qs/QSFragmentTest.java
@@ -39,6 +39,7 @@
import com.android.systemui.R;
import com.android.systemui.SystemUIFactory;
import com.android.systemui.SysuiBaseFragmentTest;
+import com.android.systemui.broadcast.BroadcastDispatcher;
import com.android.systemui.plugins.statusbar.StatusBarStateController;
import com.android.systemui.qs.tileimpl.QSFactoryImpl;
import com.android.systemui.shared.plugins.PluginManager;
@@ -98,7 +99,8 @@
QSTileHost host = new QSTileHost(mContext, mock(StatusBarIconController.class),
mock(QSFactoryImpl.class), new Handler(), Looper.myLooper(),
mock(PluginManager.class), mock(TunerService.class),
- () -> mock(AutoTileManager.class), mock(DumpController.class));
+ () -> mock(AutoTileManager.class), mock(DumpController.class),
+ mock(BroadcastDispatcher.class));
qs.setHost(host);
qs.setListening(true);
diff --git a/packages/SystemUI/tests/src/com/android/systemui/qs/QSTileHostTest.java b/packages/SystemUI/tests/src/com/android/systemui/qs/QSTileHostTest.java
index 7752014..0247c2f 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/qs/QSTileHostTest.java
+++ b/packages/SystemUI/tests/src/com/android/systemui/qs/QSTileHostTest.java
@@ -41,6 +41,7 @@
import com.android.systemui.DumpController;
import com.android.systemui.R;
import com.android.systemui.SysuiTestCase;
+import com.android.systemui.broadcast.BroadcastDispatcher;
import com.android.systemui.plugins.qs.QSFactory;
import com.android.systemui.plugins.qs.QSTile;
import com.android.systemui.qs.tileimpl.QSFactoryImpl;
@@ -84,6 +85,8 @@
@Mock
private DumpController mDumpController;
@Mock
+ private BroadcastDispatcher mBroadcastDispatcher;
+ @Mock
private QSTile.State mMockState;
private Handler mHandler;
private TestableLooper mLooper;
@@ -96,7 +99,7 @@
mHandler = new Handler(mLooper.getLooper());
mQSTileHost = new TestQSTileHost(mContext, mIconController, mDefaultFactory, mHandler,
mLooper.getLooper(),
- mPluginManager, mTunerService, mAutoTiles, mDumpController);
+ mPluginManager, mTunerService, mAutoTiles, mDumpController, mBroadcastDispatcher);
setUpTileFactory();
Settings.Secure.putStringForUser(mContext.getContentResolver(), QSTileHost.TILES_SETTING,
"", ActivityManager.getCurrentUser());
@@ -168,9 +171,10 @@
TestQSTileHost(Context context, StatusBarIconController iconController,
QSFactoryImpl defaultFactory, Handler mainHandler, Looper bgLooper,
PluginManager pluginManager, TunerService tunerService,
- Provider<AutoTileManager> autoTiles, DumpController dumpController) {
+ Provider<AutoTileManager> autoTiles, DumpController dumpController,
+ BroadcastDispatcher broadcastDispatcher) {
super(context, iconController, defaultFactory, mainHandler, bgLooper, pluginManager,
- tunerService, autoTiles, dumpController);
+ tunerService, autoTiles, dumpController, broadcastDispatcher);
}
@Override
diff --git a/packages/SystemUI/tests/src/com/android/systemui/qs/external/TileLifecycleManagerTest.java b/packages/SystemUI/tests/src/com/android/systemui/qs/external/TileLifecycleManagerTest.java
index 11b0c69..9e5e582 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/qs/external/TileLifecycleManagerTest.java
+++ b/packages/SystemUI/tests/src/com/android/systemui/qs/external/TileLifecycleManagerTest.java
@@ -45,6 +45,7 @@
import androidx.test.runner.AndroidJUnit4;
import com.android.systemui.SysuiTestCase;
+import com.android.systemui.broadcast.BroadcastDispatcher;
import org.junit.After;
import org.junit.Before;
@@ -59,6 +60,8 @@
private final PackageManagerAdapter mMockPackageManagerAdapter =
Mockito.mock(PackageManagerAdapter.class);
+ private final BroadcastDispatcher mMockBroadcastDispatcher =
+ Mockito.mock(BroadcastDispatcher.class);
private final IQSTileService.Stub mMockTileService = Mockito.mock(IQSTileService.Stub.class);
private ComponentName mTileServiceComponentName;
private Intent mTileServiceIntent;
@@ -87,7 +90,8 @@
Mockito.mock(IQSService.class), new Tile(),
mTileServiceIntent,
mUser,
- mMockPackageManagerAdapter);
+ mMockPackageManagerAdapter,
+ mMockBroadcastDispatcher);
}
@After
diff --git a/packages/SystemUI/tests/src/com/android/systemui/qs/external/TileServicesTest.java b/packages/SystemUI/tests/src/com/android/systemui/qs/external/TileServicesTest.java
index d18cebb..824c50d 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/qs/external/TileServicesTest.java
+++ b/packages/SystemUI/tests/src/com/android/systemui/qs/external/TileServicesTest.java
@@ -32,6 +32,7 @@
import com.android.systemui.DumpController;
import com.android.systemui.SysuiTestCase;
+import com.android.systemui.broadcast.BroadcastDispatcher;
import com.android.systemui.qs.QSTileHost;
import com.android.systemui.qs.tileimpl.QSFactoryImpl;
import com.android.systemui.shared.plugins.PluginManager;
@@ -45,7 +46,9 @@
import org.junit.Test;
import org.junit.runner.RunWith;
import org.mockito.ArgumentCaptor;
+import org.mockito.Mock;
import org.mockito.Mockito;
+import org.mockito.MockitoAnnotations;
import java.util.ArrayList;
@@ -57,21 +60,37 @@
private TileServices mTileService;
private ArrayList<TileServiceManager> mManagers;
+ @Mock
+ private BroadcastDispatcher mBroadcastDispatcher;
+ @Mock
+ private StatusBarIconController mStatusBarIconController;
+ @Mock
+ private QSFactoryImpl mQSFactory;
+ @Mock
+ private PluginManager mPluginManager;
+ @Mock
+ private TunerService mTunerService;
+ @Mock
+ private AutoTileManager mAutoTileManager;
+ @Mock
+ private DumpController mDumpController;
@Before
public void setUp() throws Exception {
+ MockitoAnnotations.initMocks(this);
mDependency.injectMockDependency(BluetoothController.class);
mManagers = new ArrayList<>();
QSTileHost host = new QSTileHost(mContext,
- mock(StatusBarIconController.class),
- mock(QSFactoryImpl.class),
+ mStatusBarIconController,
+ mQSFactory,
new Handler(),
Looper.myLooper(),
- mock(PluginManager.class),
- mock(TunerService.class),
- () -> mock(AutoTileManager.class),
- mock(DumpController.class));
- mTileService = new TestTileServices(host, Looper.getMainLooper());
+ mPluginManager,
+ mTunerService,
+ () -> mAutoTileManager,
+ mDumpController,
+ mBroadcastDispatcher);
+ mTileService = new TestTileServices(host, Looper.getMainLooper(), mBroadcastDispatcher);
}
@After
@@ -138,12 +157,14 @@
}
private class TestTileServices extends TileServices {
- public TestTileServices(QSTileHost host, Looper looper) {
- super(host, looper);
+ TestTileServices(QSTileHost host, Looper looper,
+ BroadcastDispatcher broadcastDispatcher) {
+ super(host, looper, broadcastDispatcher);
}
@Override
- protected TileServiceManager onCreateTileService(ComponentName component, Tile qsTile) {
+ protected TileServiceManager onCreateTileService(ComponentName component, Tile qsTile,
+ BroadcastDispatcher broadcastDispatcher) {
TileServiceManager manager = mock(TileServiceManager.class);
mManagers.add(manager);
when(manager.isLifecycleStarted()).thenReturn(true);
diff --git a/packages/SystemUI/tests/src/com/android/systemui/settings/CurrentUserTrackerTest.java b/packages/SystemUI/tests/src/com/android/systemui/settings/CurrentUserTrackerTest.java
index 4162bc1..1b515c6 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/settings/CurrentUserTrackerTest.java
+++ b/packages/SystemUI/tests/src/com/android/systemui/settings/CurrentUserTrackerTest.java
@@ -21,9 +21,12 @@
import androidx.test.filters.SmallTest;
import com.android.systemui.SysuiTestCase;
+import com.android.systemui.broadcast.BroadcastDispatcher;
import org.junit.Before;
import org.junit.Test;
+import org.mockito.Mock;
+import org.mockito.MockitoAnnotations;
/**
* Testing functionality of the current user tracker
@@ -33,10 +36,13 @@
private CurrentUserTracker mTracker;
private CurrentUserTracker.UserReceiver mReceiver;
+ @Mock
+ private BroadcastDispatcher mBroadcastDispatcher;
@Before
public void setUp() {
- mReceiver = new CurrentUserTracker.UserReceiver(getContext());
+ MockitoAnnotations.initMocks(this);
+ mReceiver = new CurrentUserTracker.UserReceiver(mBroadcastDispatcher);
mTracker = new CurrentUserTracker(mReceiver) {
@Override
public void onUserSwitched(int newUserId) {
diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/NotificationLockscreenUserManagerTest.java b/packages/SystemUI/tests/src/com/android/systemui/statusbar/NotificationLockscreenUserManagerTest.java
index 85a0fbd..548f7a8 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/NotificationLockscreenUserManagerTest.java
+++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/NotificationLockscreenUserManagerTest.java
@@ -47,6 +47,7 @@
import com.android.systemui.Dependency;
import com.android.systemui.SysuiTestCase;
+import com.android.systemui.broadcast.BroadcastDispatcher;
import com.android.systemui.statusbar.notification.NotificationEntryManager;
import com.android.systemui.statusbar.notification.collection.NotificationData;
import com.android.systemui.statusbar.notification.collection.NotificationEntry;
@@ -74,6 +75,7 @@
@Mock private NotificationData mNotificationData;
@Mock private DeviceProvisionedController mDeviceProvisionedController;
@Mock private StatusBarKeyguardViewManager mKeyguardViewManager;
+ @Mock private BroadcastDispatcher mBroadcastDispatcher;
private int mCurrentUserId;
private TestNotificationLockscreenUserManager mLockscreenUserManager;
@@ -194,7 +196,7 @@
private class TestNotificationLockscreenUserManager
extends NotificationLockscreenUserManagerImpl {
public TestNotificationLockscreenUserManager(Context context) {
- super(context);
+ super(context, mBroadcastDispatcher);
}
public BroadcastReceiver getBaseBroadcastReceiverForTest() {
diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/NotificationRemoteInputManagerTest.java b/packages/SystemUI/tests/src/com/android/systemui/statusbar/NotificationRemoteInputManagerTest.java
index 2514c93..a754a00d 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/NotificationRemoteInputManagerTest.java
+++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/NotificationRemoteInputManagerTest.java
@@ -31,6 +31,7 @@
import com.android.systemui.statusbar.notification.collection.NotificationEntry;
import com.android.systemui.statusbar.notification.row.ExpandableNotificationRow;
import com.android.systemui.statusbar.phone.ShadeController;
+import com.android.systemui.statusbar.policy.RemoteInputUriController;
import com.google.android.collect.Sets;
@@ -57,6 +58,7 @@
@Mock private NotificationListenerService.RankingMap mRanking;
@Mock private ExpandableNotificationRow mRow;
@Mock private StatusBarStateController mStateController;
+ @Mock private RemoteInputUriController mRemoteInputUriController;
// Dependency mocks:
@Mock private NotificationEntryManager mEntryManager;
@@ -76,7 +78,8 @@
mLockscreenUserManager, mSmartReplyController, mEntryManager,
() -> mock(ShadeController.class),
mStateController,
- Handler.createAsync(Looper.myLooper()));
+ Handler.createAsync(Looper.myLooper()),
+ mRemoteInputUriController);
mEntry = new NotificationEntryBuilder()
.setPkg(TEST_PACKAGE_NAME)
.setOpPkg(TEST_PACKAGE_NAME)
@@ -211,9 +214,11 @@
NotificationEntryManager notificationEntryManager,
Lazy<ShadeController> shadeController,
StatusBarStateController statusBarStateController,
- Handler mainHandler) {
+ Handler mainHandler,
+ RemoteInputUriController remoteInputUriController) {
super(context, lockscreenUserManager, smartReplyController, notificationEntryManager,
- shadeController, statusBarStateController, mainHandler);
+ shadeController, statusBarStateController, mainHandler,
+ remoteInputUriController);
}
public void setUpWithPresenterForTest(Callback callback,
diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/SmartReplyControllerTest.java b/packages/SystemUI/tests/src/com/android/systemui/statusbar/SmartReplyControllerTest.java
index 88fb3e1..95ce53c 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/SmartReplyControllerTest.java
+++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/SmartReplyControllerTest.java
@@ -42,6 +42,7 @@
import com.android.systemui.statusbar.notification.NotificationEntryManager;
import com.android.systemui.statusbar.notification.collection.NotificationEntry;
import com.android.systemui.statusbar.phone.ShadeController;
+import com.android.systemui.statusbar.policy.RemoteInputUriController;
import org.junit.Before;
import org.junit.Test;
@@ -72,6 +73,7 @@
@Mock private NotificationEntryManager mNotificationEntryManager;
@Mock private IStatusBarService mIStatusBarService;
@Mock private StatusBarStateController mStatusBarStateController;
+ @Mock private RemoteInputUriController mRemoteInputUriController;
@Before
public void setUp() {
@@ -88,7 +90,8 @@
mock(NotificationLockscreenUserManager.class), mSmartReplyController,
mNotificationEntryManager, () -> mock(ShadeController.class),
mStatusBarStateController,
- Handler.createAsync(Looper.myLooper()));
+ Handler.createAsync(Looper.myLooper()),
+ mRemoteInputUriController);
mRemoteInputManager.setUpWithCallback(mCallback, mDelegate);
mNotification = new Notification.Builder(mContext, "")
.setSmallIcon(R.drawable.ic_person)
diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/StatusBarTest.java b/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/StatusBarTest.java
index bace30b..c21e3ab 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/StatusBarTest.java
+++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/StatusBarTest.java
@@ -91,6 +91,7 @@
import com.android.systemui.keyguard.WakefulnessLifecycle;
import com.android.systemui.plugins.ActivityStarter.OnDismissAction;
import com.android.systemui.plugins.statusbar.StatusBarStateController;
+import com.android.systemui.shared.plugins.PluginManager;
import com.android.systemui.statusbar.CommandQueue;
import com.android.systemui.statusbar.FeatureFlags;
import com.android.systemui.statusbar.KeyguardIndicationController;
@@ -130,6 +131,7 @@
import com.android.systemui.statusbar.policy.KeyguardStateController;
import com.android.systemui.statusbar.policy.NetworkController;
import com.android.systemui.statusbar.policy.RemoteInputQuickSettingsDisabler;
+import com.android.systemui.statusbar.policy.RemoteInputUriController;
import com.android.systemui.statusbar.policy.UserSwitcherController;
import com.android.systemui.statusbar.policy.ZenModeController;
import com.android.systemui.util.InjectionInflationController;
@@ -180,6 +182,7 @@
@Mock private NotificationLockscreenUserManager mLockscreenUserManager;
@Mock private NotificationRemoteInputManager mRemoteInputManager;
@Mock private RemoteInputController mRemoteInputController;
+ @Mock private RemoteInputUriController mRemoteInputUriController;
@Mock private StatusBarStateControllerImpl mStatusBarStateController;
@Mock private BatteryController mBatteryController;
@Mock private DeviceProvisionedController mDeviceProvisionedController;
@@ -230,6 +233,7 @@
@Mock private ViewMediatorCallback mKeyguardVieMediatorCallback;
@Mock private KeyguardLiftController mKeyguardLiftController;
@Mock private CommandQueue mCommandQueue;
+ @Mock private PluginManager mPluginManager;
@Before
public void setup() throws Exception {
@@ -366,7 +370,9 @@
mDozeServiceHost,
mPowerManager,
mDozeScrimController,
- mCommandQueue);
+ mCommandQueue,
+ mPluginManager,
+ mRemoteInputUriController);
when(mStatusBarWindowView.findViewById(R.id.lock_icon_container)).thenReturn(
mLockIconContainer);
@@ -392,7 +398,6 @@
mStatusBar.mStackScroller = mStackScroller;
mStatusBar.mStatusBarWindowViewController = mStatusBarWindowViewController;
mStatusBar.startKeyguard();
- mStatusBar.putComponent(StatusBar.class, mStatusBar);
Dependency.get(InitController.class).executePostInitTasks();
entryManager.setUpForTest(mock(NotificationPresenter.class), mStackScroller,
mHeadsUpManager);
diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/policy/BatteryControllerTest.java b/packages/SystemUI/tests/src/com/android/systemui/statusbar/policy/BatteryControllerTest.java
index e626d08..48ed4ba 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/policy/BatteryControllerTest.java
+++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/policy/BatteryControllerTest.java
@@ -27,6 +27,7 @@
import android.testing.TestableLooper;
import com.android.systemui.SysuiTestCase;
+import com.android.systemui.broadcast.BroadcastDispatcher;
import com.android.systemui.power.EnhancedEstimates;
import org.junit.Assert;
@@ -44,13 +45,15 @@
@Mock
private PowerManager mPowerManager;
+ @Mock
+ private BroadcastDispatcher mBroadcastDispatcher;
private BatteryControllerImpl mBatteryController;
@Before
public void setUp() {
MockitoAnnotations.initMocks(this);
mBatteryController = new BatteryControllerImpl(getContext(), mock(EnhancedEstimates.class),
- mPowerManager);
+ mPowerManager, mBroadcastDispatcher);
}
@Test
diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/policy/LocationControllerImplTest.java b/packages/SystemUI/tests/src/com/android/systemui/statusbar/policy/LocationControllerImplTest.java
index 3dcb34a..5f772b2 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/policy/LocationControllerImplTest.java
+++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/policy/LocationControllerImplTest.java
@@ -27,6 +27,7 @@
import androidx.test.filters.SmallTest;
import com.android.systemui.SysuiTestCase;
+import com.android.systemui.broadcast.BroadcastDispatcher;
import com.android.systemui.statusbar.policy.LocationController.LocationChangeCallback;
import org.junit.Before;
@@ -44,7 +45,8 @@
@Before
public void setup() {
mLocationController = spy(new LocationControllerImpl(mContext,
- TestableLooper.get(this).getLooper()));
+ TestableLooper.get(this).getLooper(),
+ mock(BroadcastDispatcher.class)));
}
@Test
diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/policy/NetworkControllerBaseTest.java b/packages/SystemUI/tests/src/com/android/systemui/statusbar/policy/NetworkControllerBaseTest.java
index c03f07e..4d86613 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/policy/NetworkControllerBaseTest.java
+++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/policy/NetworkControllerBaseTest.java
@@ -56,6 +56,7 @@
import com.android.settingslib.net.DataUsageController;
import com.android.systemui.R;
import com.android.systemui.SysuiTestCase;
+import com.android.systemui.broadcast.BroadcastDispatcher;
import com.android.systemui.statusbar.policy.DeviceProvisionedController.DeviceProvisionedListener;
import com.android.systemui.statusbar.policy.NetworkController.IconState;
import com.android.systemui.statusbar.policy.NetworkController.SignalCallback;
@@ -93,6 +94,7 @@
protected WifiManager mMockWm;
protected SubscriptionManager mMockSm;
protected TelephonyManager mMockTm;
+ protected BroadcastDispatcher mMockBd;
protected Config mConfig;
protected CallbackHandler mCallbackHandler;
protected SubscriptionDefaults mMockSubDefaults;
@@ -130,6 +132,7 @@
mMockTm = mock(TelephonyManager.class);
mMockSm = mock(SubscriptionManager.class);
mMockCm = mock(ConnectivityManager.class);
+ mMockBd = mock(BroadcastDispatcher.class);
mMockSubDefaults = mock(SubscriptionDefaults.class);
mNetCapabilities = new NetworkCapabilities();
when(mMockCm.isNetworkSupported(ConnectivityManager.TYPE_MOBILE)).thenReturn(true);
@@ -157,7 +160,7 @@
mNetworkController = new NetworkControllerImpl(mContext, mMockCm, mMockTm, mMockWm, mMockSm,
mConfig, TestableLooper.get(this).getLooper(), mCallbackHandler,
mock(AccessPointControllerImpl.class), mock(DataUsageController.class),
- mMockSubDefaults, mMockProvisionController);
+ mMockSubDefaults, mMockProvisionController, mMockBd);
setupNetworkController();
// Trigger blank callbacks to always get the current state (some tests don't trigger
@@ -208,7 +211,7 @@
mConfig, TestableLooper.get(this).getLooper(), mCallbackHandler,
mock(AccessPointControllerImpl.class),
mock(DataUsageController.class), mMockSubDefaults,
- mock(DeviceProvisionedController.class));
+ mock(DeviceProvisionedController.class), mMockBd);
setupNetworkController();
diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/policy/NetworkControllerDataTest.java b/packages/SystemUI/tests/src/com/android/systemui/statusbar/policy/NetworkControllerDataTest.java
index aa4723a..ab74caa 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/policy/NetworkControllerDataTest.java
+++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/policy/NetworkControllerDataTest.java
@@ -108,7 +108,7 @@
mConfig, Looper.getMainLooper(), mCallbackHandler,
mock(AccessPointControllerImpl.class),
mock(DataUsageController.class), mMockSubDefaults,
- mock(DeviceProvisionedController.class));
+ mock(DeviceProvisionedController.class), mMockBd);
setupNetworkController();
setupDefaultSignal();
diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/policy/NetworkControllerSignalTest.java b/packages/SystemUI/tests/src/com/android/systemui/statusbar/policy/NetworkControllerSignalTest.java
index 0b53c48..57dcbf2 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/policy/NetworkControllerSignalTest.java
+++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/policy/NetworkControllerSignalTest.java
@@ -61,7 +61,7 @@
mNetworkController = new NetworkControllerImpl(mContext, mMockCm, mMockTm, mMockWm, mMockSm,
mConfig, Looper.getMainLooper(), mCallbackHandler,
mock(AccessPointControllerImpl.class), mock(DataUsageController.class),
- mMockSubDefaults, mock(DeviceProvisionedController.class));
+ mMockSubDefaults, mock(DeviceProvisionedController.class), mMockBd);
setupNetworkController();
verifyLastMobileDataIndicators(false, -1, 0);
@@ -123,7 +123,7 @@
mNetworkController = new NetworkControllerImpl(mContext, mMockCm, mMockTm, mMockWm, mMockSm,
mConfig, Looper.getMainLooper(), mCallbackHandler,
mock(AccessPointControllerImpl.class), mock(DataUsageController.class),
- mMockSubDefaults, mock(DeviceProvisionedController.class));
+ mMockSubDefaults, mock(DeviceProvisionedController.class), mMockBd);
setupNetworkController();
// No Subscriptions.
diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/policy/SecurityControllerTest.java b/packages/SystemUI/tests/src/com/android/systemui/statusbar/policy/SecurityControllerTest.java
index 97542a9..0c9130d0 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/policy/SecurityControllerTest.java
+++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/policy/SecurityControllerTest.java
@@ -45,6 +45,7 @@
import androidx.test.runner.AndroidJUnit4;
import com.android.systemui.SysuiTestCase;
+import com.android.systemui.broadcast.BroadcastDispatcher;
import com.android.systemui.statusbar.policy.SecurityController.SecurityControllerCallback;
import org.junit.After;
@@ -99,7 +100,7 @@
// TODO: Migrate this test to TestableLooper and use a handler attached
// to that.
mSecurityController = new SecurityControllerImpl(mContext,
- new Handler(Looper.getMainLooper()), this);
+ new Handler(Looper.getMainLooper()), mock(BroadcastDispatcher.class), this);
}
@After
diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/policy/ZenModeControllerImplTest.java b/packages/SystemUI/tests/src/com/android/systemui/statusbar/policy/ZenModeControllerImplTest.java
index 47e4492..dcf0ef7 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/policy/ZenModeControllerImplTest.java
+++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/policy/ZenModeControllerImplTest.java
@@ -33,6 +33,7 @@
import androidx.test.filters.SmallTest;
import com.android.systemui.SysuiTestCase;
+import com.android.systemui.broadcast.BroadcastDispatcher;
import com.android.systemui.statusbar.policy.ZenModeController.Callback;
import org.junit.Before;
@@ -51,6 +52,8 @@
NotificationManager mNm;
@Mock
ZenModeConfig mConfig;
+ @Mock
+ BroadcastDispatcher mBroadcastDispatcher;
private ZenModeControllerImpl mController;
@@ -60,7 +63,8 @@
mContext.addMockSystemService(NotificationManager.class, mNm);
when(mNm.getZenModeConfig()).thenReturn(mConfig);
- mController = new ZenModeControllerImpl(mContext, Handler.createAsync(Looper.myLooper()));
+ mController = new ZenModeControllerImpl(mContext, Handler.createAsync(Looper.myLooper()),
+ mBroadcastDispatcher);
}
@Test
diff --git a/services/Android.bp b/services/Android.bp
index 60dd895..6953e86 100644
--- a/services/Android.bp
+++ b/services/Android.bp
@@ -47,11 +47,6 @@
"compat-changeid-annotation-processor",
],
- required: [
- // Required by services.backup
- "BackupEncryption",
- ],
-
// Uncomment to enable output of certain warnings (deprecated, unchecked)
//javacflags: ["-Xlint"],
diff --git a/services/core/java/com/android/server/media/MediaRoute2ProviderProxy.java b/services/core/java/com/android/server/media/MediaRoute2ProviderProxy.java
index 4816ceb..626bf1c 100644
--- a/services/core/java/com/android/server/media/MediaRoute2ProviderProxy.java
+++ b/services/core/java/com/android/server/media/MediaRoute2ProviderProxy.java
@@ -119,6 +119,11 @@
}
}
+ @NonNull
+ public String getUniqueId() {
+ return mUniqueId;
+ }
+
@Nullable
public MediaRoute2ProviderInfo getProviderInfo() {
return mProviderInfo;
@@ -294,7 +299,7 @@
}
public interface Callback {
- void onProviderStateChanged(MediaRoute2ProviderProxy provider);
+ void onProviderStateChanged(@NonNull MediaRoute2ProviderProxy provider);
}
private final class Connection implements DeathRecipient {
diff --git a/services/core/java/com/android/server/media/MediaRouter2ServiceImpl.java b/services/core/java/com/android/server/media/MediaRouter2ServiceImpl.java
index 361dc36..44642d4 100644
--- a/services/core/java/com/android/server/media/MediaRouter2ServiceImpl.java
+++ b/services/core/java/com/android/server/media/MediaRouter2ServiceImpl.java
@@ -47,9 +47,12 @@
import java.io.PrintWriter;
import java.lang.ref.WeakReference;
import java.util.ArrayList;
+import java.util.Collection;
import java.util.Collections;
+import java.util.HashSet;
import java.util.List;
import java.util.Objects;
+import java.util.Set;
/**
* TODO: Merge this to MediaRouterService once it's finished.
@@ -357,8 +360,7 @@
mAllClientRecords.put(binder, clientRecord);
userRecord.mHandler.sendMessage(
- obtainMessage(UserHandler::notifyProviderInfosUpdatedToClient,
- userRecord.mHandler, client));
+ obtainMessage(UserHandler::notifyRoutesToClient, userRecord.mHandler, client));
}
}
@@ -586,6 +588,7 @@
final class UserRecord {
public final int mUserId;
+ //TODO: make records private for thread-safety
final ArrayList<ClientRecord> mClientRecords = new ArrayList<>();
final ArrayList<ManagerRecord> mManagerRecords = new ArrayList<>();
final UserHandler mHandler;
@@ -705,7 +708,7 @@
//TODO: Make this thread-safe.
private final ArrayList<MediaRoute2ProviderProxy> mMediaProviders =
new ArrayList<>();
- private List<MediaRoute2ProviderInfo> mProviderInfos;
+ private final List<MediaRoute2ProviderInfo> mProviderInfos = new ArrayList<>();
private boolean mRunning;
private boolean mProviderInfosUpdateScheduled;
@@ -745,14 +748,89 @@
}
@Override
- public void onProviderStateChanged(MediaRoute2ProviderProxy provider) {
- updateProvider(provider);
+ public void onProviderStateChanged(@NonNull MediaRoute2ProviderProxy provider) {
+ sendMessage(PooledLambda.obtainMessage(UserHandler::updateProvider, this, provider));
}
private void updateProvider(MediaRoute2ProviderProxy provider) {
+ int providerIndex = getProviderInfoIndex(provider.getUniqueId());
+ MediaRoute2ProviderInfo providerInfo = provider.getProviderInfo();
+ MediaRoute2ProviderInfo prevInfo =
+ (providerIndex < 0) ? null : mProviderInfos.get(providerIndex);
+
+ if (Objects.equals(prevInfo, providerInfo)) return;
+
+ if (prevInfo == null) {
+ mProviderInfos.add(providerInfo);
+ Collection<MediaRoute2Info> addedRoutes = providerInfo.getRoutes();
+ if (addedRoutes.size() > 0) {
+ sendMessage(PooledLambda.obtainMessage(UserHandler::notifyRoutesAddedToClients,
+ this, getClients(), new ArrayList<>(addedRoutes)));
+ }
+ } else if (providerInfo == null) {
+ mProviderInfos.remove(prevInfo);
+ Collection<MediaRoute2Info> removedRoutes = prevInfo.getRoutes();
+ if (removedRoutes.size() > 0) {
+ sendMessage(PooledLambda.obtainMessage(
+ UserHandler::notifyRoutesRemovedToClients,
+ this, getClients(), new ArrayList<>(removedRoutes)));
+ }
+ } else {
+ mProviderInfos.set(providerIndex, providerInfo);
+ List<MediaRoute2Info> addedRoutes = new ArrayList<>();
+ List<MediaRoute2Info> removedRoutes = new ArrayList<>();
+ List<MediaRoute2Info> changedRoutes = new ArrayList<>();
+
+ final Collection<MediaRoute2Info> currentRoutes = providerInfo.getRoutes();
+ final Set<String> updatedRouteIds = new HashSet<>();
+
+ for (MediaRoute2Info route : currentRoutes) {
+ if (!route.isValid()) {
+ Slog.w(TAG, "Ignoring invalid route : " + route);
+ continue;
+ }
+ MediaRoute2Info prevRoute = prevInfo.getRoute(route.getId());
+
+ if (prevRoute != null) {
+ if (!Objects.equals(prevRoute, route)) {
+ changedRoutes.add(route);
+ }
+ updatedRouteIds.add(route.getId());
+ } else {
+ addedRoutes.add(route);
+ }
+ }
+
+ for (MediaRoute2Info prevRoute : prevInfo.getRoutes()) {
+ if (!updatedRouteIds.contains(prevRoute.getId())) {
+ removedRoutes.add(prevRoute);
+ }
+ }
+
+ List<IMediaRouter2Client> clients = getClients();
+ if (addedRoutes.size() > 0) {
+ notifyRoutesAddedToClients(clients, addedRoutes);
+ }
+ if (removedRoutes.size() > 0) {
+ notifyRoutesRemovedToClients(clients, removedRoutes);
+ }
+ if (changedRoutes.size() > 0) {
+ notifyRoutesChangedToClients(clients, changedRoutes);
+ }
+ }
scheduleUpdateProviderInfos();
}
+ private int getProviderInfoIndex(String providerId) {
+ for (int i = 0; i < mProviderInfos.size(); i++) {
+ MediaRoute2ProviderInfo providerInfo = mProviderInfos.get(i);
+ if (TextUtils.equals(providerInfo.getUniqueId(), providerId)) {
+ return i;
+ }
+ }
+ return -1;
+ }
+
private void selectRoute(ClientRecord clientRecord, MediaRoute2Info route) {
if (route != null) {
MediaRoute2ProviderProxy provider = findProvider(route.getProviderId());
@@ -803,6 +881,7 @@
}
}
+ //TODO: should be replaced into notifyRoutes...ToManagers
private void updateProviderInfos() {
mProviderInfosUpdateScheduled = false;
@@ -810,55 +889,83 @@
if (service == null) {
return;
}
- final List<MediaRoute2ProviderInfo> providers = new ArrayList<>();
- for (MediaRoute2ProviderProxy mediaProvider : mMediaProviders) {
- final MediaRoute2ProviderInfo providerInfo =
- mediaProvider.getProviderInfo();
- if (providerInfo == null || !providerInfo.isValid()) {
- Slog.w(TAG, "Ignoring invalid provider info : " + providerInfo);
- } else {
- providers.add(providerInfo);
- }
- }
- mProviderInfos = providers;
final List<IMediaRouter2Manager> managers = new ArrayList<>();
- final List<IMediaRouter2Client> clients = new ArrayList<>();
synchronized (service.mLock) {
for (ManagerRecord managerRecord : mUserRecord.mManagerRecords) {
managers.add(managerRecord.mManager);
}
+ }
+ for (IMediaRouter2Manager manager : managers) {
+ notifyProviderInfosUpdatedToManager(manager);
+ }
+ }
+
+ private List<IMediaRouter2Client> getClients() {
+ final List<IMediaRouter2Client> clients = new ArrayList<>();
+ MediaRouter2ServiceImpl service = mServiceRef.get();
+ if (service == null) {
+ return clients;
+ }
+ synchronized (service.mLock) {
for (ClientRecord clientRecord : mUserRecord.mClientRecords) {
if (clientRecord instanceof Client2Record) {
clients.add(((Client2Record) clientRecord).mClient);
}
}
}
- for (IMediaRouter2Manager manager : managers) {
- notifyProviderInfosUpdatedToManager(manager);
- }
- for (IMediaRouter2Client client : clients) {
- notifyProviderInfosUpdatedToClient(client);
- }
+ return clients;
}
- private void notifyProviderInfosUpdatedToClient(IMediaRouter2Client client) {
- if (mProviderInfos == null) {
- scheduleUpdateProviderInfos();
+ private void notifyRoutesToClient(IMediaRouter2Client client) {
+ List<MediaRoute2Info> routes = new ArrayList<>();
+ for (MediaRoute2ProviderInfo providerInfo : mProviderInfos) {
+ routes.addAll(providerInfo.getRoutes());
+ }
+ if (routes.size() == 0) {
return;
}
try {
- client.notifyProviderInfosUpdated(mProviderInfos);
+ client.notifyRoutesAdded(routes);
} catch (RemoteException ex) {
- Slog.w(TAG, "Failed to notify provider infos updated. Client probably died.");
+ Slog.w(TAG, "Failed to notify all routes. Client probably died.", ex);
+ }
+ }
+
+ private void notifyRoutesAddedToClients(List<IMediaRouter2Client> clients,
+ List<MediaRoute2Info> routes) {
+ for (IMediaRouter2Client client : clients) {
+ try {
+ client.notifyRoutesAdded(routes);
+ } catch (RemoteException ex) {
+ Slog.w(TAG, "Failed to notify routes added. Client probably died.", ex);
+ }
+ }
+ }
+
+ private void notifyRoutesRemovedToClients(List<IMediaRouter2Client> clients,
+ List<MediaRoute2Info> routes) {
+ for (IMediaRouter2Client client : clients) {
+ try {
+ client.notifyRoutesRemoved(routes);
+ } catch (RemoteException ex) {
+ Slog.w(TAG, "Failed to notify routes removed. Client probably died.", ex);
+ }
+ }
+ }
+
+ private void notifyRoutesChangedToClients(List<IMediaRouter2Client> clients,
+ List<MediaRoute2Info> routes) {
+ for (IMediaRouter2Client client : clients) {
+ try {
+ client.notifyRoutesChanged(routes);
+ } catch (RemoteException ex) {
+ Slog.w(TAG, "Failed to notify routes changed. Client probably died.", ex);
+ }
}
}
private void notifyProviderInfosUpdatedToManager(IMediaRouter2Manager manager) {
- if (mProviderInfos == null) {
- scheduleUpdateProviderInfos();
- return;
- }
try {
manager.notifyProviderInfosUpdated(mProviderInfos);
} catch (RemoteException ex) {
@@ -891,9 +998,7 @@
private MediaRoute2ProviderProxy findProvider(String providerId) {
for (MediaRoute2ProviderProxy provider : mMediaProviders) {
- final MediaRoute2ProviderInfo providerInfo = provider.getProviderInfo();
- if (providerInfo != null
- && TextUtils.equals(providerInfo.getUniqueId(), providerId)) {
+ if (TextUtils.equals(provider.getUniqueId(), providerId)) {
return provider;
}
}
diff --git a/services/core/java/com/android/server/notification/InlineReplyUriRecord.java b/services/core/java/com/android/server/notification/InlineReplyUriRecord.java
new file mode 100644
index 0000000..76cfb03
--- /dev/null
+++ b/services/core/java/com/android/server/notification/InlineReplyUriRecord.java
@@ -0,0 +1,97 @@
+/*
+ * Copyright (C) 2019 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.server.notification;
+
+import android.net.Uri;
+import android.os.IBinder;
+import android.os.UserHandle;
+import android.util.ArraySet;
+
+/**
+ * A record of inline reply (ex. RemoteInput) URI grants associated with a Notification.
+ */
+public final class InlineReplyUriRecord {
+ private final IBinder mPermissionOwner;
+ private final ArraySet<Uri> mUris;
+ private final UserHandle mUser;
+ private final String mPackageName;
+ private final String mKey;
+
+ /**
+ * Construct a new InlineReplyUriRecord.
+ * @param owner The PermissionOwner associated with this record.
+ * @param user The user associated with this record.
+ * @param packageName The name of the package which posted the notification.
+ * @param key The key of the original NotificationRecord this notification as created with.
+ */
+ public InlineReplyUriRecord(IBinder owner, UserHandle user, String packageName, String key) {
+ mPermissionOwner = owner;
+ mUris = new ArraySet<>();
+ mUser = user;
+ mPackageName = packageName;
+ mKey = key;
+ }
+
+ /**
+ * Get the permission owner associated with this record.
+ */
+ public IBinder getPermissionOwner() {
+ return mPermissionOwner;
+ }
+
+ /**
+ * Get the content URIs associated with this record.
+ */
+ public ArraySet<Uri> getUris() {
+ return mUris;
+ }
+
+ /**
+ * Associate a new content URI with this record.
+ */
+ public void addUri(Uri uri) {
+ mUris.add(uri);
+ }
+
+ /**
+ * Get the user id associated with this record.
+ * If the UserHandle associated with this record belongs to USER_ALL, return the ID for
+ * USER_SYSTEM instead, to avoid errors around modifying URI permissions for an invalid user ID.
+ */
+ public int getUserId() {
+ int userId = mUser.getIdentifier();
+ if (userId == UserHandle.USER_ALL) {
+ return UserHandle.USER_SYSTEM;
+ } else {
+ return userId;
+ }
+ }
+
+ /**
+ * Get the name of the package associated with this record.
+ */
+ public String getPackageName() {
+ return mPackageName;
+ }
+
+ /**
+ * Get the key associated with this record.
+ */
+ public String getKey() {
+ return mKey;
+ }
+}
diff --git a/services/core/java/com/android/server/notification/NotificationDelegate.java b/services/core/java/com/android/server/notification/NotificationDelegate.java
index 6f0ad33..88fc072 100644
--- a/services/core/java/com/android/server/notification/NotificationDelegate.java
+++ b/services/core/java/com/android/server/notification/NotificationDelegate.java
@@ -18,6 +18,7 @@
import android.app.Notification;
import android.net.Uri;
+import android.os.UserHandle;
import android.service.notification.NotificationStats;
import com.android.internal.statusbar.NotificationVisibility;
@@ -53,7 +54,13 @@
* Grant permission to read the specified URI to the package associated with the
* NotificationRecord associated with the given key.
*/
- void grantInlineReplyUriPermission(String key, Uri uri, int callingUid);
+ void grantInlineReplyUriPermission(String key, Uri uri, UserHandle user, String packageName,
+ int callingUid);
+
+ /**
+ * Clear inline URI grants associated with the given notification.
+ */
+ void clearInlineReplyUriPermissions(String key, int callingUid);
/**
* Notifies that smart replies and actions have been added to the UI.
diff --git a/services/core/java/com/android/server/notification/NotificationManagerService.java b/services/core/java/com/android/server/notification/NotificationManagerService.java
index 0fc1718..5e76401 100755
--- a/services/core/java/com/android/server/notification/NotificationManagerService.java
+++ b/services/core/java/com/android/server/notification/NotificationManagerService.java
@@ -415,6 +415,8 @@
@GuardedBy("mNotificationLock")
final ArrayMap<String, NotificationRecord> mNotificationsByKey = new ArrayMap<>();
@GuardedBy("mNotificationLock")
+ final ArrayMap<String, InlineReplyUriRecord> mInlineReplyRecordsByKey = new ArrayMap<>();
+ @GuardedBy("mNotificationLock")
final ArrayList<NotificationRecord> mEnqueuedNotifications = new ArrayList<>();
@GuardedBy("mNotificationLock")
final ArrayMap<Integer, ArrayMap<String, String>> mAutobundledSummaries = new ArrayMap<>();
@@ -1167,42 +1169,53 @@
* user associated with the NotificationRecord, and this grant will fail when trying
* to grant URI permissions across users.
*/
- public void grantInlineReplyUriPermission(String key, Uri uri, int callingUid) {
+ public void grantInlineReplyUriPermission(String key, Uri uri, UserHandle user,
+ String packageName, int callingUid) {
synchronized (mNotificationLock) {
- NotificationRecord r = mNotificationsByKey.get(key);
- if (r != null) {
- IBinder owner = r.permissionOwner;
- if (owner == null) {
- r.permissionOwner = mUgmInternal.newUriPermissionOwner("NOTIF:" + key);
- owner = r.permissionOwner;
- }
- int uid = callingUid;
- int userId = r.sbn.getUserId();
- if (userId == UserHandle.USER_ALL) {
- userId = USER_SYSTEM;
- }
- if (UserHandle.getUserId(uid) != userId) {
- try {
- final String[] pkgs = mPackageManager.getPackagesForUid(callingUid);
- if (pkgs == null) {
- Log.e(TAG, "Cannot grant uri permission to unknown UID: "
- + callingUid);
- }
- final String pkg = pkgs[0]; // Get the SystemUI package
- // Find the UID for SystemUI for the correct user
- uid = mPackageManager.getPackageUid(pkg, 0, userId);
- } catch (RemoteException re) {
- Log.e(TAG, "Cannot talk to package manager", re);
+ InlineReplyUriRecord r = mInlineReplyRecordsByKey.get(key);
+ if (r == null) {
+ InlineReplyUriRecord newRecord = new InlineReplyUriRecord(
+ mUgmInternal.newUriPermissionOwner("INLINE_REPLY:" + key),
+ user,
+ packageName,
+ key);
+ r = newRecord;
+ mInlineReplyRecordsByKey.put(key, r);
+ }
+ IBinder owner = r.getPermissionOwner();
+ int uid = callingUid;
+ int userId = r.getUserId();
+ if (UserHandle.getUserId(uid) != userId) {
+ try {
+ final String[] pkgs = mPackageManager.getPackagesForUid(callingUid);
+ if (pkgs == null) {
+ Log.e(TAG, "Cannot grant uri permission to unknown UID: "
+ + callingUid);
}
+ final String pkg = pkgs[0]; // Get the SystemUI package
+ // Find the UID for SystemUI for the correct user
+ uid = mPackageManager.getPackageUid(pkg, 0, userId);
+ } catch (RemoteException re) {
+ Log.e(TAG, "Cannot talk to package manager", re);
}
- grantUriPermission(owner, uri, uid, r.sbn.getPackageName(), userId);
- } else {
- Log.w(TAG, "No record found for notification key:" + key);
+ }
+ r.addUri(uri);
+ grantUriPermission(owner, uri, uid, r.getPackageName(), userId);
+ }
+ }
- // TODO: figure out cancel story. I think it's: sysui needs to tell us
- // whenever noitifications held by a lifetimextender go away
- // IBinder owner = mUgmInternal.newUriPermissionOwner("InlineReply:" + key);
- // pass in userId and package as well as key (key for logging purposes)
+ @Override
+ /**
+ * Clears inline URI permission grants by destroying the permission owner for the specified
+ * notification.
+ */
+ public void clearInlineReplyUriPermissions(String key, int callingUid) {
+ synchronized (mNotificationLock) {
+ InlineReplyUriRecord uriRecord = mInlineReplyRecordsByKey.get(key);
+ if (uriRecord != null) {
+ destroyPermissionOwner(uriRecord.getPermissionOwner(), uriRecord.getUserId(),
+ "INLINE_REPLY: " + uriRecord.getKey());
+ mInlineReplyRecordsByKey.remove(key);
}
}
}
@@ -7036,15 +7049,8 @@
// If we have no Uris to grant, but an existing owner, go destroy it
if (newUris == null && permissionOwner != null) {
- final long ident = Binder.clearCallingIdentity();
- try {
- if (DBG) Slog.d(TAG, key + ": destroying owner");
- mUgmInternal.revokeUriPermissionFromOwner(permissionOwner, null, ~0,
- UserHandle.getUserId(oldRecord.getUid()));
- permissionOwner = null;
- } finally {
- Binder.restoreCallingIdentity(ident);
- }
+ destroyPermissionOwner(permissionOwner, UserHandle.getUserId(oldRecord.getUid()), key);
+ permissionOwner = null;
}
// Grant access to new Uris
@@ -7065,7 +7071,9 @@
final Uri uri = oldUris.valueAt(i);
if (newUris == null || !newUris.contains(uri)) {
if (DBG) Slog.d(TAG, key + ": revoking " + uri);
- revokeUriPermission(permissionOwner, uri, oldRecord.getUid());
+ int userId = ContentProvider.getUserIdFromUri(
+ uri, UserHandle.getUserId(oldRecord.getUid()));
+ revokeUriPermission(permissionOwner, uri, userId);
}
}
}
@@ -7092,7 +7100,7 @@
}
}
- private void revokeUriPermission(IBinder owner, Uri uri, int sourceUid) {
+ private void revokeUriPermission(IBinder owner, Uri uri, int userId) {
if (uri == null || !ContentResolver.SCHEME_CONTENT.equals(uri.getScheme())) return;
final long ident = Binder.clearCallingIdentity();
@@ -7101,7 +7109,17 @@
owner,
ContentProvider.getUriWithoutUserId(uri),
Intent.FLAG_GRANT_READ_URI_PERMISSION,
- ContentProvider.getUserIdFromUri(uri, UserHandle.getUserId(sourceUid)));
+ userId);
+ } finally {
+ Binder.restoreCallingIdentity(ident);
+ }
+ }
+
+ private void destroyPermissionOwner(IBinder owner, int userId, String logKey) {
+ final long ident = Binder.clearCallingIdentity();
+ try {
+ if (DBG) Slog.d(TAG, logKey + ": destroying owner");
+ mUgmInternal.revokeUriPermissionFromOwner(owner, null, ~0, userId);
} finally {
Binder.restoreCallingIdentity(ident);
}
diff --git a/services/core/java/com/android/server/pm/PackageManagerService.java b/services/core/java/com/android/server/pm/PackageManagerService.java
index a3e6dd9..340720e 100644
--- a/services/core/java/com/android/server/pm/PackageManagerService.java
+++ b/services/core/java/com/android/server/pm/PackageManagerService.java
@@ -751,17 +751,17 @@
static final List<SystemPartition> SYSTEM_PARTITIONS = Collections.unmodifiableList(
Arrays.asList(
new SystemPartition(Environment.getRootDirectory(), 0 /* scanFlag */,
- true /* hasPriv */, false /* hasOverlays */),
+ false /* hasOverlays */),
new SystemPartition(Environment.getVendorDirectory(), SCAN_AS_VENDOR,
- true /* hasPriv */, true /* hasOverlays */),
+ true /* hasOverlays */),
new SystemPartition(Environment.getOdmDirectory(), SCAN_AS_ODM,
- true /* hasPriv */, true /* hasOverlays */),
+ true /* hasOverlays */),
new SystemPartition(Environment.getOemDirectory(), SCAN_AS_OEM,
- false /* hasPriv */, true /* hasOverlays */),
+ true /* hasOverlays */),
new SystemPartition(Environment.getProductDirectory(), SCAN_AS_PRODUCT,
- true /* hasPriv */, true /* hasOverlays */),
+ true /* hasOverlays */),
new SystemPartition(Environment.getSystemExtDirectory(), SCAN_AS_SYSTEM_EXT,
- true /* hasPriv */, true /* hasOverlays */)));
+ true /* hasOverlays */)));
private final List<SystemPartition> mDirsToScanAsSystem;
@@ -2427,12 +2427,28 @@
@Nullable
public final File overlayFolder;
- private SystemPartition(File folder, int scanFlag, boolean hasPrivApps,
- boolean hasOverlays) {
+
+ private static boolean shouldScanPrivApps(@ScanFlags int scanFlags) {
+ if ((scanFlags & SCAN_AS_OEM) != 0) {
+ return false;
+ }
+ if (scanFlags == 0) { // /system partition
+ return true;
+ }
+ if ((scanFlags
+ & (SCAN_AS_VENDOR | SCAN_AS_ODM | SCAN_AS_PRODUCT | SCAN_AS_SYSTEM_EXT)) != 0) {
+ return true;
+ }
+ return false;
+ }
+
+ private SystemPartition(File folder, int scanFlag, boolean hasOverlays) {
this.folder = folder;
this.scanFlag = scanFlag;
this.appFolder = toCanonical(new File(folder, "app"));
- this.privAppFolder = hasPrivApps ? toCanonical(new File(folder, "priv-app")) : null;
+ this.privAppFolder = shouldScanPrivApps(scanFlag)
+ ? toCanonical(new File(folder, "priv-app"))
+ : null;
this.overlayFolder = hasOverlays ? toCanonical(new File(folder, "overlay")) : null;
}
@@ -17800,17 +17816,6 @@
}
}
- static boolean locationIsPrivileged(String path) {
- // TODO(dariofreni): include APEX partitions when they will support priv apps.
- for (int i = 0, size = SYSTEM_PARTITIONS.size(); i < size; i++) {
- SystemPartition partition = SYSTEM_PARTITIONS.get(i);
- if (partition.containsPrivPath(path)) {
- return true;
- }
- }
- return false;
- }
-
private static @Nullable SystemPartition resolveApexToSystemPartition(
ApexManager.ActiveApexInfo apexInfo) {
for (int i = 0, size = SYSTEM_PARTITIONS.size(); i < size; i++) {
@@ -17818,7 +17823,7 @@
if (apexInfo.preinstalledApexPath.getAbsolutePath().startsWith(
sp.folder.getAbsolutePath())) {
return new SystemPartition(apexInfo.apexDirectory, sp.scanFlag,
- false /* hasPriv */, false /* hasOverlays */);
+ false /* hasOverlays */);
}
}
return null;
diff --git a/services/core/java/com/android/server/pm/Settings.java b/services/core/java/com/android/server/pm/Settings.java
index a11ae8c..66c77f5 100644
--- a/services/core/java/com/android/server/pm/Settings.java
+++ b/services/core/java/com/android/server/pm/Settings.java
@@ -3513,7 +3513,7 @@
int pkgFlags = 0;
int pkgPrivateFlags = 0;
pkgFlags |= ApplicationInfo.FLAG_SYSTEM;
- if (PackageManagerService.locationIsPrivileged(codePathStr)) {
+ if (codePathStr.contains("/priv-app/")) {
pkgPrivateFlags |= ApplicationInfo.PRIVATE_FLAG_PRIVILEGED;
}
PackageSetting ps = new PackageSetting(name, realName, new File(codePathStr),
diff --git a/services/core/java/com/android/server/rollback/RollbackManagerServiceImpl.java b/services/core/java/com/android/server/rollback/RollbackManagerServiceImpl.java
index 1fd15d9..198bb14 100644
--- a/services/core/java/com/android/server/rollback/RollbackManagerServiceImpl.java
+++ b/services/core/java/com/android/server/rollback/RollbackManagerServiceImpl.java
@@ -53,6 +53,7 @@
import android.util.SparseBooleanArray;
import com.android.internal.annotations.GuardedBy;
+import com.android.internal.util.DumpUtils;
import com.android.internal.util.IndentingPrintWriter;
import com.android.server.LocalServices;
import com.android.server.Watchdog;
@@ -1128,6 +1129,8 @@
@Override
protected void dump(FileDescriptor fd, PrintWriter pw, String[] args) {
+ if (!DumpUtils.checkDumpPermission(mContext, TAG, pw)) return;
+
IndentingPrintWriter ipw = new IndentingPrintWriter(pw, " ");
synchronized (mLock) {
for (Rollback rollback : mRollbacks) {
diff --git a/services/core/java/com/android/server/statusbar/StatusBarManagerService.java b/services/core/java/com/android/server/statusbar/StatusBarManagerService.java
index 489c343..effeb80 100644
--- a/services/core/java/com/android/server/statusbar/StatusBarManagerService.java
+++ b/services/core/java/com/android/server/statusbar/StatusBarManagerService.java
@@ -1364,12 +1364,26 @@
}
@Override
- public void grantInlineReplyUriPermission(String key, Uri uri) {
+ public void grantInlineReplyUriPermission(String key, Uri uri, UserHandle user,
+ String packageName) {
enforceStatusBarService();
int callingUid = Binder.getCallingUid();
long identity = Binder.clearCallingIdentity();
try {
- mNotificationDelegate.grantInlineReplyUriPermission(key, uri, callingUid);
+ mNotificationDelegate.grantInlineReplyUriPermission(key, uri, user, packageName,
+ callingUid);
+ } finally {
+ Binder.restoreCallingIdentity(identity);
+ }
+ }
+
+ @Override
+ public void clearInlineReplyUriPermissions(String key) {
+ enforceStatusBarService();
+ int callingUid = Binder.getCallingUid();
+ long identity = Binder.clearCallingIdentity();
+ try {
+ mNotificationDelegate.clearInlineReplyUriPermissions(key, callingUid);
} finally {
Binder.restoreCallingIdentity(identity);
}
diff --git a/services/tests/uiservicestests/src/com/android/server/notification/NotificationManagerServiceTest.java b/services/tests/uiservicestests/src/com/android/server/notification/NotificationManagerServiceTest.java
index cd0f4f1..1ee71fb 100755
--- a/services/tests/uiservicestests/src/com/android/server/notification/NotificationManagerServiceTest.java
+++ b/services/tests/uiservicestests/src/com/android/server/notification/NotificationManagerServiceTest.java
@@ -5478,7 +5478,7 @@
Uri uri = ContentUris.withAppendedId(MediaStore.Images.Media.EXTERNAL_CONTENT_URI, 1);
mService.mNotificationDelegate.grantInlineReplyUriPermission(
- nr.getKey(), uri, nr.sbn.getUid());
+ nr.getKey(), uri, nr.sbn.getUser(), nr.sbn.getPackageName(), nr.sbn.getUid());
// Grant permission called for the UID of SystemUI under the target user ID
verify(mUgm, times(1)).grantUriPermissionFromOwner(any(),
@@ -5487,6 +5487,27 @@
}
@Test
+ public void testGrantInlineReplyUriPermission_noRecordExists() throws Exception {
+ NotificationRecord nr = generateNotificationRecord(mTestNotificationChannel, 0);
+ waitForIdle();
+
+ // No notifications exist for the given record
+ StatusBarNotification[] notifsBefore = mBinderService.getActiveNotifications(PKG);
+ assertEquals(0, notifsBefore.length);
+
+ Uri uri = ContentUris.withAppendedId(MediaStore.Images.Media.EXTERNAL_CONTENT_URI, 1);
+ int uid = 0; // sysui on primary user
+
+ mService.mNotificationDelegate.grantInlineReplyUriPermission(
+ nr.getKey(), uri, nr.sbn.getUser(), nr.sbn.getPackageName(), nr.sbn.getUid());
+
+ // Grant permission still called if no NotificationRecord exists for the given key
+ verify(mUgm, times(1)).grantUriPermissionFromOwner(any(),
+ eq(nr.sbn.getUid()), eq(nr.sbn.getPackageName()), eq(uri), anyInt(), anyInt(),
+ eq(nr.sbn.getUserId()));
+ }
+
+ @Test
public void testGrantInlineReplyUriPermission_userAll() throws Exception {
// generate a NotificationRecord for USER_ALL to make sure it's converted into USER_SYSTEM
NotificationRecord nr =
@@ -5504,7 +5525,7 @@
Uri uri = ContentUris.withAppendedId(MediaStore.Images.Media.EXTERNAL_CONTENT_URI, 1);
mService.mNotificationDelegate.grantInlineReplyUriPermission(
- nr.getKey(), uri, nr.sbn.getUid());
+ nr.getKey(), uri, nr.sbn.getUser(), nr.sbn.getPackageName(), nr.sbn.getUid());
// Target user for the grant is USER_ALL instead of USER_SYSTEM
verify(mUgm, times(1)).grantUriPermissionFromOwner(any(),
@@ -5531,7 +5552,7 @@
Uri uri = ContentUris.withAppendedId(MediaStore.Images.Media.EXTERNAL_CONTENT_URI, 1);
int uid = 0; // sysui on primary user
- int otherUserUid = (otherUserId * 100000) + 1; // SystemUI as a different user
+ int otherUserUid = (otherUserId * 100000) + 1; // sysui as a different user
String sysuiPackage = "sysui";
final String[] sysuiPackages = new String[] { sysuiPackage };
when(mPackageManager.getPackagesForUid(uid)).thenReturn(sysuiPackages);
@@ -5541,7 +5562,8 @@
when(mPackageManager.getPackageUid(sysuiPackage, 0, otherUserId))
.thenReturn(otherUserUid);
- mService.mNotificationDelegate.grantInlineReplyUriPermission(nr.getKey(), uri, uid);
+ mService.mNotificationDelegate.grantInlineReplyUriPermission(
+ nr.getKey(), uri, nr.sbn.getUser(), nr.sbn.getPackageName(), uid);
// Target user for the grant is USER_ALL instead of USER_SYSTEM
verify(mUgm, times(1)).grantUriPermissionFromOwner(any(),
@@ -5550,22 +5572,64 @@
}
@Test
- public void testGrantInlineReplyUriPermission_noRecordExists() throws Exception {
- NotificationRecord nr = generateNotificationRecord(mTestNotificationChannel);
- waitForIdle();
+ public void testClearInlineReplyUriPermission_uriRecordExists() throws Exception {
+ NotificationRecord nr = generateNotificationRecord(mTestNotificationChannel, 0);
+ reset(mPackageManager);
- // No notifications exist for the given record
- StatusBarNotification[] notifsBefore = mBinderService.getActiveNotifications(PKG);
- assertEquals(0, notifsBefore.length);
+ Uri uri1 = ContentUris.withAppendedId(MediaStore.Images.Media.EXTERNAL_CONTENT_URI, 1);
+ Uri uri2 = ContentUris.withAppendedId(MediaStore.Images.Media.EXTERNAL_CONTENT_URI, 2);
- Uri uri = ContentUris.withAppendedId(MediaStore.Images.Media.EXTERNAL_CONTENT_URI, 1);
- int uid = 0; // sysui on primary user
+ // create an inline record with two uris in it
+ mService.mNotificationDelegate.grantInlineReplyUriPermission(
+ nr.getKey(), uri1, nr.sbn.getUser(), nr.sbn.getPackageName(), nr.sbn.getUid());
+ mService.mNotificationDelegate.grantInlineReplyUriPermission(
+ nr.getKey(), uri2, nr.sbn.getUser(), nr.sbn.getPackageName(), nr.sbn.getUid());
- mService.mNotificationDelegate.grantInlineReplyUriPermission(nr.getKey(), uri, uid);
+ InlineReplyUriRecord record = mService.mInlineReplyRecordsByKey.get(nr.getKey());
+ assertNotNull(record); // record exists
+ assertEquals(record.getUris().size(), 2); // record has two uris in it
- // Grant permission not called if no record exists for the given key
- verify(mUgm, times(0)).grantUriPermissionFromOwner(any(), anyInt(), any(),
- eq(uri), anyInt(), anyInt(), anyInt());
+ mService.mNotificationDelegate.clearInlineReplyUriPermissions(nr.getKey(), nr.sbn.getUid());
+
+ // permissionOwner destroyed
+ verify(mUgmInternal, times(1)).revokeUriPermissionFromOwner(
+ eq(record.getPermissionOwner()), eq(null), eq(~0), eq(nr.getUserId()));
+ }
+
+
+ @Test
+ public void testClearInlineReplyUriPermission_noUriRecordExists() throws Exception {
+ NotificationRecord nr = generateNotificationRecord(mTestNotificationChannel, 0);
+ reset(mPackageManager);
+
+ mService.mNotificationDelegate.clearInlineReplyUriPermissions(nr.getKey(), nr.sbn.getUid());
+
+ // no permissionOwner destroyed
+ verify(mUgmInternal, times(0)).revokeUriPermissionFromOwner(
+ any(), eq(null), eq(~0), eq(nr.getUserId()));
+ }
+
+ @Test
+ public void testClearInlineReplyUriPermission_userAll() throws Exception {
+ NotificationRecord nr = generateNotificationRecord(mTestNotificationChannel,
+ UserHandle.USER_ALL);
+ reset(mPackageManager);
+
+ Uri uri1 = ContentUris.withAppendedId(MediaStore.Images.Media.EXTERNAL_CONTENT_URI, 1);
+ Uri uri2 = ContentUris.withAppendedId(MediaStore.Images.Media.EXTERNAL_CONTENT_URI, 2);
+
+ // create an inline record a uri in it
+ mService.mNotificationDelegate.grantInlineReplyUriPermission(
+ nr.getKey(), uri1, nr.sbn.getUser(), nr.sbn.getPackageName(), nr.sbn.getUid());
+
+ InlineReplyUriRecord record = mService.mInlineReplyRecordsByKey.get(nr.getKey());
+ assertNotNull(record); // record exists
+
+ mService.mNotificationDelegate.clearInlineReplyUriPermissions(nr.getKey(), nr.sbn.getUid());
+
+ // permissionOwner destroyed for USER_SYSTEM, not USER_ALL
+ verify(mUgmInternal, times(1)).revokeUriPermissionFromOwner(
+ eq(record.getPermissionOwner()), eq(null), eq(~0), eq(USER_SYSTEM));
}
@Test
diff --git a/telephony/java/android/telephony/CarrierConfigManager.java b/telephony/java/android/telephony/CarrierConfigManager.java
old mode 100644
new mode 100755
index b564502..0104464
--- a/telephony/java/android/telephony/CarrierConfigManager.java
+++ b/telephony/java/android/telephony/CarrierConfigManager.java
@@ -2888,6 +2888,16 @@
"always_show_primary_signal_bar_in_opportunistic_network_boolean";
/**
+ * Upon data switching between subscriptions within a carrier group, if switch depends on
+ * validation result, this value defines customized value of how long we wait for validation
+ * success before we fail and revoke the switch.
+ * Time out is in milliseconds.
+ * @hide
+ */
+ public static final String KEY_DATA_SWITCH_VALIDATION_TIMEOUT_LONG =
+ "data_switch_validation_timeout_long";
+
+ /**
* GPS configs. See android.hardware.gnss@1.0 IGnssConfiguration.
* @hide
*/
@@ -3674,6 +3684,7 @@
sDefaults.putIntArray(KEY_DISCONNECT_CAUSE_PLAY_BUSYTONE_INT_ARRAY,
new int[] {4 /* BUSY */});
sDefaults.putBoolean(KEY_PREVENT_CLIR_ACTIVATION_AND_DEACTIVATION_CODE_BOOL, false);
+ sDefaults.putLong(KEY_DATA_SWITCH_VALIDATION_TIMEOUT_LONG, 2000);
}
/**
diff --git a/telephony/java/android/telephony/ims/ImsSsInfo.java b/telephony/java/android/telephony/ims/ImsSsInfo.java
index be34f9d..0510a00 100644
--- a/telephony/java/android/telephony/ims/ImsSsInfo.java
+++ b/telephony/java/android/telephony/ims/ImsSsInfo.java
@@ -336,4 +336,31 @@
public @ClirInterrogationStatus int getClirInterrogationStatus() {
return mClirInterrogationStatus;
}
+
+ /**
+ * Parts of telephony still use the old {m,n} 3GPP definition, so convert to that format.
+ * @hide
+ */
+ public int[] getCompatArray(@ImsSsData.ServiceType int type) {
+ int[] result = new int[2];
+ // Convert ImsSsInfo into a form that telephony can read (as per 3GPP 27.007)
+ // CLIR (section 7.7)
+ if (type == ImsSsData.SS_CLIR) {
+ // Assume there will only be one ImsSsInfo.
+ // contains {"n","m"} parameters
+ result[0] = getClirOutgoingState();
+ result[1] = getClirInterrogationStatus();
+ return result;
+ }
+ // COLR 7.31
+ if (type == ImsSsData.SS_COLR) {
+ result[0] = getProvisionStatus();
+ }
+ // Facility Lock CLCK 7.4 (for call barring), CLIP 7.6, COLP 7.8, as well as any
+ // other result, just return the status for the "n" parameter and provisioning status for
+ // "m" as the default.
+ result[0] = getStatus();
+ result[1] = getProvisionStatus();
+ return result;
+ }
}
diff --git a/telephony/java/android/telephony/ims/ImsUtListener.java b/telephony/java/android/telephony/ims/ImsUtListener.java
index d50a0f7..1a21d0a 100644
--- a/telephony/java/android/telephony/ims/ImsUtListener.java
+++ b/telephony/java/android/telephony/ims/ImsUtListener.java
@@ -16,22 +16,53 @@
package android.telephony.ims;
+import android.annotation.NonNull;
import android.annotation.SystemApi;
import android.os.Bundle;
import android.os.RemoteException;
+import android.telephony.ims.stub.ImsUtImplBase;
import android.util.Log;
import com.android.ims.internal.IImsUtListener;
/**
- * Base implementation of the IMS UT listener interface, which implements stubs.
- * Override these methods to implement functionality.
+ * Listener interface used to receive network responses back from UT supplementary service queries
+ * made by the framework.
* @hide
*/
// DO NOT remove or change the existing APIs, only add new ones to this Base implementation or you
// will break other implementations of ImsUt maintained by other ImsServices.
@SystemApi
public class ImsUtListener {
+
+ /**
+ * The {@link Bundle} key for a Calling Line Identification Restriction (CLIR) response. The
+ * value will be an int[] with two values:
+ * int[0] contains the 'n' parameter from TS 27.007 7.7, which is the
+ * outgoing CLIR state. See {@link ImsSsInfo#CLIR_OUTGOING_DEFAULT},
+ * {@link ImsSsInfo#CLIR_OUTGOING_INVOCATION}, and {@link ImsSsInfo#CLIR_OUTGOING_SUPPRESSION};
+ * int[1] contains the 'm' parameter from TS 27.007 7.7, which is the CLIR interrogation status.
+ * See {@link ImsSsInfo#CLIR_STATUS_NOT_PROVISIONED},
+ * {@link ImsSsInfo#CLIR_STATUS_PROVISIONED_PERMANENT}, {@link ImsSsInfo#CLIR_STATUS_UNKNOWN},
+ * {@link ImsSsInfo#CLIR_STATUS_TEMPORARILY_RESTRICTED}, and
+ * {@link ImsSsInfo#CLIR_STATUS_TEMPORARILY_ALLOWED}.
+ * @deprecated Use {@link #onLineIdentificationSupplementaryServiceResponse(int, ImsSsInfo)}
+ * instead.
+ */
+ @Deprecated
+ public static final String BUNDLE_KEY_CLIR = "queryClir";
+
+ /**
+ * The {@link Bundle} key for a Calling Line Identification Presentation (CLIP), Connected Line
+ * Identification Presentation (COLP), or Connected Line Identification Restriction (COLR)
+ * response. The value will be an instance of {@link ImsSsInfo}, which contains the response to
+ * the query.
+ * @deprecated Use {@link #onLineIdentificationSupplementaryServiceResponse(int, ImsSsInfo)}
+ * instead.
+ */
+ @Deprecated
+ public static final String BUNDLE_KEY_SSINFO = "imsSsInfo";
+
private IImsUtListener mServiceInterface;
private static final String LOG_TAG = "ImsUtListener";
@@ -51,14 +82,54 @@
}
}
- public void onUtConfigurationQueried(int id, Bundle ssInfo) {
+ /**
+ * Notify the framework of a UT configuration response to a {@link ImsUtImplBase#queryClir()},
+ * {@link ImsUtImplBase#queryClip()}, {@link ImsUtImplBase#queryColp()}, or
+ * {@link ImsUtImplBase#queryColr()} query for the transaction ID specified. If the query fails,
+ * {@link #onUtConfigurationQueryFailed(int, ImsReasonInfo)} should be called.
+ * @param id The ID associated with this UT configuration transaction from the framework.
+ * @param configuration A {@link Bundle} containing the result of querying the UT configuration.
+ * Must contain {@link #BUNDLE_KEY_CLIR} if it is a response to
+ * {@link ImsUtImplBase#queryClir()} or
+ * {@link #BUNDLE_KEY_SSINFO} if it is a response to
+ * {@link ImsUtImplBase#queryClip()}, {@link ImsUtImplBase#queryColp()}, or
+ * {@link ImsUtImplBase#queryColr()}.
+ * @deprecated Use {@link #onLineIdentificationSupplementaryServiceResponse(int, ImsSsInfo)}
+ * instead.
+ */
+ @Deprecated
+ public void onUtConfigurationQueried(int id, Bundle configuration) {
try {
- mServiceInterface.utConfigurationQueried(null, id, ssInfo);
+ mServiceInterface.utConfigurationQueried(null, id, configuration);
} catch (RemoteException e) {
Log.w(LOG_TAG, "utConfigurationQueried: remote exception");
}
}
+ /**
+ * Notify the framework of a UT configuration response to a {@link ImsUtImplBase#queryClir()},
+ * {@link ImsUtImplBase#queryClip()}, {@link ImsUtImplBase#queryColp()}, or
+ * {@link ImsUtImplBase#queryColr()} query for the transaction ID specified. If the query fails,
+ * the framework should be notified via
+ * {@link #onUtConfigurationQueryFailed(int, ImsReasonInfo)}.
+ * @param id The ID associated with this UT configuration transaction from the framework.
+ * @param configuration An {@link ImsSsInfo} instance containing the configuration for the
+ * line identification supplementary service queried.
+ */
+ public void onLineIdentificationSupplementaryServiceResponse(int id,
+ @NonNull ImsSsInfo configuration) {
+ try {
+ mServiceInterface.lineIdentificationSupplementaryServiceResponse(id, configuration);
+ } catch (RemoteException e) {
+ Log.w(LOG_TAG, "onLineIdentificationSupplementaryServicesResponse: remote exception");
+ }
+ }
+
+ /**
+ * Notify the Framework of the line identification query failure.
+ * @param id The ID associated with the UT query transaction.
+ * @param error The query failure reason.
+ */
public void onUtConfigurationQueryFailed(int id, ImsReasonInfo error) {
try {
mServiceInterface.utConfigurationQueryFailed(null, id, error);
diff --git a/telephony/java/android/telephony/ims/compat/stub/ImsUtListenerImplBase.java b/telephony/java/android/telephony/ims/compat/stub/ImsUtListenerImplBase.java
index 976c2be..ae113f2 100644
--- a/telephony/java/android/telephony/ims/compat/stub/ImsUtListenerImplBase.java
+++ b/telephony/java/android/telephony/ims/compat/stub/ImsUtListenerImplBase.java
@@ -18,12 +18,11 @@
import android.os.Bundle;
import android.os.RemoteException;
-
-import android.annotation.UnsupportedAppUsage;
import android.telephony.ims.ImsCallForwardInfo;
import android.telephony.ims.ImsReasonInfo;
import android.telephony.ims.ImsSsData;
import android.telephony.ims.ImsSsInfo;
+
import com.android.ims.internal.IImsUt;
import com.android.ims.internal.IImsUtListener;
@@ -65,6 +64,13 @@
}
/**
+ * Notifies the result of a line identification supplementary service query.
+ */
+ @Override
+ public void lineIdentificationSupplementaryServiceResponse(int id, ImsSsInfo config) {
+ }
+
+ /**
* Notifies the status of the call barring supplementary service.
*/
@Override
diff --git a/telephony/java/com/android/ims/internal/IImsUtListener.aidl b/telephony/java/com/android/ims/internal/IImsUtListener.aidl
index fcb9fb1..9a12cee 100644
--- a/telephony/java/com/android/ims/internal/IImsUtListener.aidl
+++ b/telephony/java/com/android/ims/internal/IImsUtListener.aidl
@@ -44,6 +44,7 @@
@UnsupportedAppUsage
void utConfigurationQueryFailed(in IImsUt ut, int id, in ImsReasonInfo error);
+ void lineIdentificationSupplementaryServiceResponse(int id, in ImsSsInfo config);
/**
* Notifies the status of the call barring supplementary service.
*/
diff --git a/test-mock/Android.bp b/test-mock/Android.bp
index 81b1e49..0b5d446 100644
--- a/test-mock/Android.bp
+++ b/test-mock/Android.bp
@@ -19,8 +19,14 @@
java_sdk_library {
name: "android.test.mock",
- srcs: ["src/**/*.java"],
- api_srcs: [":framework-all-sources"],
+ srcs: [
+ "src/**/*.java",
+ // Note: Below are NOT APIs of this library. We only take APIs under
+ // the android.test.mock package. They however provide private APIs that
+ // android.test.mock APIs references to.
+ ":framework-core-sources-for-test-mock",
+ ":framework_native_aidl",
+ ],
libs: ["framework-all"],
api_packages: [
diff --git a/tests/Codegen/src/com/android/codegentest/HierrarchicalDataClassBase.java b/tests/Codegen/src/com/android/codegentest/HierrarchicalDataClassBase.java
index 56ad217..7d88161 100644
--- a/tests/Codegen/src/com/android/codegentest/HierrarchicalDataClassBase.java
+++ b/tests/Codegen/src/com/android/codegentest/HierrarchicalDataClassBase.java
@@ -32,7 +32,7 @@
- // Code below generated by codegen v1.0.11.
+ // Code below generated by codegen v1.0.12.
//
// DO NOT MODIFY!
// CHECKSTYLE:OFF Generated code
@@ -98,8 +98,8 @@
};
@DataClass.Generated(
- time = 1572630437620L,
- codegenVersion = "1.0.11",
+ time = 1572655992854L,
+ codegenVersion = "1.0.12",
sourceFile = "frameworks/base/tests/Codegen/src/com/android/codegentest/HierrarchicalDataClassBase.java",
inputSignatures = "private int mBaseData\nclass HierrarchicalDataClassBase extends java.lang.Object implements [android.os.Parcelable]\n@com.android.internal.util.DataClass(genConstructor=false, genSetters=true)")
@Deprecated
diff --git a/tests/Codegen/src/com/android/codegentest/HierrarchicalDataClassChild.java b/tests/Codegen/src/com/android/codegentest/HierrarchicalDataClassChild.java
index 59e07c4..c930ce5 100644
--- a/tests/Codegen/src/com/android/codegentest/HierrarchicalDataClassChild.java
+++ b/tests/Codegen/src/com/android/codegentest/HierrarchicalDataClassChild.java
@@ -46,7 +46,7 @@
- // Code below generated by codegen v1.0.11.
+ // Code below generated by codegen v1.0.12.
//
// DO NOT MODIFY!
// CHECKSTYLE:OFF Generated code
@@ -120,8 +120,8 @@
};
@DataClass.Generated(
- time = 1572630438646L,
- codegenVersion = "1.0.11",
+ time = 1572655993858L,
+ codegenVersion = "1.0.12",
sourceFile = "frameworks/base/tests/Codegen/src/com/android/codegentest/HierrarchicalDataClassChild.java",
inputSignatures = "private @android.annotation.NonNull java.lang.String mChildData\nclass HierrarchicalDataClassChild extends com.android.codegentest.HierrarchicalDataClassBase implements []\n@com.android.internal.util.DataClass(genParcelable=true, genConstructor=false, genSetters=true)")
@Deprecated
diff --git a/tests/Codegen/src/com/android/codegentest/ParcelAllTheThingsDataClass.java b/tests/Codegen/src/com/android/codegentest/ParcelAllTheThingsDataClass.java
index 3c00a3a..368a5c3 100644
--- a/tests/Codegen/src/com/android/codegentest/ParcelAllTheThingsDataClass.java
+++ b/tests/Codegen/src/com/android/codegentest/ParcelAllTheThingsDataClass.java
@@ -52,7 +52,7 @@
- // Code below generated by codegen v1.0.11.
+ // Code below generated by codegen v1.0.12.
//
// DO NOT MODIFY!
// CHECKSTYLE:OFF Generated code
@@ -410,8 +410,8 @@
}
@DataClass.Generated(
- time = 1572630436563L,
- codegenVersion = "1.0.11",
+ time = 1572655991821L,
+ codegenVersion = "1.0.12",
sourceFile = "frameworks/base/tests/Codegen/src/com/android/codegentest/ParcelAllTheThingsDataClass.java",
inputSignatures = " @android.annotation.NonNull java.lang.String[] mStringArray\n @android.annotation.NonNull int[] mIntArray\n @android.annotation.NonNull java.util.List<java.lang.String> mStringList\n @android.annotation.NonNull java.util.Map<java.lang.String,com.android.codegentest.SampleWithCustomBuilder> mMap\n @android.annotation.NonNull java.util.Map<java.lang.String,java.lang.String> mStringMap\n @android.annotation.NonNull android.util.SparseArray<com.android.codegentest.SampleWithCustomBuilder> mSparseArray\n @android.annotation.NonNull android.util.SparseIntArray mSparseIntArray\n @java.lang.SuppressWarnings({\"WeakerAccess\"}) @android.annotation.Nullable java.lang.Boolean mNullableBoolean\nclass ParcelAllTheThingsDataClass extends java.lang.Object implements [android.os.Parcelable]\n@com.android.internal.util.DataClass(genBuilder=true, genAidl=false, genToString=true)")
@Deprecated
diff --git a/tests/Codegen/src/com/android/codegentest/SampleDataClass.java b/tests/Codegen/src/com/android/codegentest/SampleDataClass.java
index 9765bdc..9d52287 100644
--- a/tests/Codegen/src/com/android/codegentest/SampleDataClass.java
+++ b/tests/Codegen/src/com/android/codegentest/SampleDataClass.java
@@ -342,7 +342,7 @@
- // Code below generated by codegen v1.0.11.
+ // Code below generated by codegen v1.0.12.
//
// DO NOT MODIFY!
// CHECKSTYLE:OFF Generated code
@@ -1872,8 +1872,8 @@
}
@DataClass.Generated(
- time = 1572630434434L,
- codegenVersion = "1.0.11",
+ time = 1572655989589L,
+ codegenVersion = "1.0.12",
sourceFile = "frameworks/base/tests/Codegen/src/com/android/codegentest/SampleDataClass.java",
inputSignatures = "public static final java.lang.String STATE_NAME_UNDEFINED\npublic static final java.lang.String STATE_NAME_ON\npublic static final java.lang.String STATE_NAME_OFF\npublic static final int STATE_UNDEFINED\npublic static final int STATE_ON\npublic static final int STATE_OFF\npublic static final @com.android.codegentest.SampleDataClass.RequestFlags int FLAG_MANUAL_REQUEST\npublic static final @com.android.codegentest.SampleDataClass.RequestFlags int FLAG_COMPATIBILITY_MODE_REQUEST\npublic static final @com.android.codegentest.SampleDataClass.RequestFlags int FLAG_AUGMENTED_REQUEST\nprivate int mNum\nprivate int mNum2\nprivate int mNum4\nprivate @android.annotation.Nullable java.lang.String mName\nprivate @android.annotation.NonNull java.lang.String mName2\nprivate @android.annotation.NonNull java.lang.String mName4\nprivate @android.annotation.Nullable android.view.accessibility.AccessibilityNodeInfo mOtherParcelable\nprivate @com.android.internal.util.DataClass.ParcelWith(com.android.codegentest.MyDateParcelling.class) @android.annotation.NonNull java.util.Date mDate\nprivate @com.android.internal.util.DataClass.ParcelWith(com.android.internal.util.Parcelling.BuiltIn.ForPattern.class) @android.annotation.NonNull java.util.regex.Pattern mPattern\nprivate @android.annotation.NonNull java.util.List<android.net.LinkAddress> mLinkAddresses2\nprivate @com.android.internal.util.DataClass.PluralOf(\"linkAddress\") @android.annotation.NonNull java.util.ArrayList<android.net.LinkAddress> mLinkAddresses\nprivate @android.annotation.Nullable android.net.LinkAddress[] mLinkAddresses4\nprivate @com.android.codegentest.SampleDataClass.StateName @android.annotation.NonNull java.lang.String mStateName\nprivate @com.android.codegentest.SampleDataClass.RequestFlags int mFlags\nprivate @com.android.codegentest.SampleDataClass.State int mState\npublic @android.annotation.NonNull java.lang.CharSequence charSeq\nprivate final @android.annotation.Nullable android.net.LinkAddress[] mLinkAddresses5\nprivate transient android.net.LinkAddress[] mLinkAddresses6\ntransient int[] mTmpStorage\nprivate @android.annotation.StringRes int mStringRes\nprivate @android.annotation.IntRange(from=0L, to=6L) int mDayOfWeek\nprivate @android.annotation.Size(2L) @android.annotation.NonNull @com.android.internal.util.DataClass.Each @android.annotation.FloatRange(from=0.0) float[] mCoords\nprivate static java.lang.String defaultName4()\nprivate int[] lazyInitTmpStorage()\npublic android.net.LinkAddress[] getLinkAddresses4()\nprivate boolean patternEquals(java.util.regex.Pattern)\nprivate int patternHashCode()\nprivate void onConstructed()\npublic void dump(java.io.PrintWriter)\nclass SampleDataClass extends java.lang.Object implements [android.os.Parcelable]\n@com.android.internal.util.DataClass(genBuilder=true, genConstructor=true, genEqualsHashCode=true, genToString=true, genForEachField=true, genSetters=true)")
@Deprecated
diff --git a/tests/Codegen/src/com/android/codegentest/SampleWithCustomBuilder.java b/tests/Codegen/src/com/android/codegentest/SampleWithCustomBuilder.java
index c62f2b8..cef32d1 100644
--- a/tests/Codegen/src/com/android/codegentest/SampleWithCustomBuilder.java
+++ b/tests/Codegen/src/com/android/codegentest/SampleWithCustomBuilder.java
@@ -85,7 +85,7 @@
- // Code below generated by codegen v1.0.11.
+ // Code below generated by codegen v1.0.12.
//
// DO NOT MODIFY!
// CHECKSTYLE:OFF Generated code
@@ -253,8 +253,8 @@
}
@DataClass.Generated(
- time = 1572630435484L,
- codegenVersion = "1.0.11",
+ time = 1572655990725L,
+ codegenVersion = "1.0.12",
sourceFile = "frameworks/base/tests/Codegen/src/com/android/codegentest/SampleWithCustomBuilder.java",
inputSignatures = " long delayAmount\n @android.annotation.NonNull java.util.concurrent.TimeUnit delayUnit\n long creationTimestamp\nprivate static java.util.concurrent.TimeUnit unparcelDelayUnit(android.os.Parcel)\nprivate void parcelDelayUnit(android.os.Parcel,int)\nclass SampleWithCustomBuilder extends java.lang.Object implements [android.os.Parcelable]\n@com.android.internal.util.DataClass(genBuilder=true, genAidl=false, genToString=true)\nabstract com.android.codegentest.SampleWithCustomBuilder.Builder setDelayAmount(long)\npublic abstract com.android.codegentest.SampleWithCustomBuilder.Builder setDelayUnit(java.util.concurrent.TimeUnit)\npublic com.android.codegentest.SampleWithCustomBuilder.Builder setDelay(long,java.util.concurrent.TimeUnit)\nclass BaseBuilder extends java.lang.Object implements []")
@Deprecated
diff --git a/tests/Codegen/src/com/android/codegentest/SampleWithNestedDataClasses.java b/tests/Codegen/src/com/android/codegentest/SampleWithNestedDataClasses.java
index 5b93b38..27055f6 100644
--- a/tests/Codegen/src/com/android/codegentest/SampleWithNestedDataClasses.java
+++ b/tests/Codegen/src/com/android/codegentest/SampleWithNestedDataClasses.java
@@ -36,7 +36,7 @@
- // Code below generated by codegen v1.0.11.
+ // Code below generated by codegen v1.0.12.
//
// DO NOT MODIFY!
// CHECKSTYLE:OFF Generated code
@@ -135,8 +135,8 @@
};
@DataClass.Generated(
- time = 1572630440713L,
- codegenVersion = "1.0.11",
+ time = 1572655995915L,
+ codegenVersion = "1.0.12",
sourceFile = "frameworks/base/tests/Codegen/src/com/android/codegentest/SampleWithNestedDataClasses.java",
inputSignatures = " @android.annotation.NonNull java.lang.String mBar\nclass NestedDataClass extends java.lang.Object implements [android.os.Parcelable]\n@com.android.internal.util.DataClass(genEqualsHashCode=true)")
@Deprecated
@@ -160,7 +160,7 @@
- // Code below generated by codegen v1.0.11.
+ // Code below generated by codegen v1.0.12.
//
// DO NOT MODIFY!
// CHECKSTYLE:OFF Generated code
@@ -259,8 +259,8 @@
};
@DataClass.Generated(
- time = 1572630440724L,
- codegenVersion = "1.0.11",
+ time = 1572655995924L,
+ codegenVersion = "1.0.12",
sourceFile = "frameworks/base/tests/Codegen/src/com/android/codegentest/SampleWithNestedDataClasses.java",
inputSignatures = " @android.annotation.NonNull long mBaz2\nclass NestedDataClass3 extends java.lang.Object implements [android.os.Parcelable]\n@com.android.internal.util.DataClass(genEqualsHashCode=true)")
@Deprecated
@@ -274,7 +274,7 @@
- // Code below generated by codegen v1.0.11.
+ // Code below generated by codegen v1.0.12.
//
// DO NOT MODIFY!
// CHECKSTYLE:OFF Generated code
@@ -373,8 +373,8 @@
};
@DataClass.Generated(
- time = 1572630440729L,
- codegenVersion = "1.0.11",
+ time = 1572655995930L,
+ codegenVersion = "1.0.12",
sourceFile = "frameworks/base/tests/Codegen/src/com/android/codegentest/SampleWithNestedDataClasses.java",
inputSignatures = " @android.annotation.NonNull java.lang.String mBaz\nclass NestedDataClass2 extends java.lang.Object implements [android.os.Parcelable]\n@com.android.internal.util.DataClass(genEqualsHashCode=true)")
@Deprecated
diff --git a/tests/Codegen/src/com/android/codegentest/StaleDataclassDetectorFalsePositivesTest.java b/tests/Codegen/src/com/android/codegentest/StaleDataclassDetectorFalsePositivesTest.java
index 2964451..4bfec89 100644
--- a/tests/Codegen/src/com/android/codegentest/StaleDataclassDetectorFalsePositivesTest.java
+++ b/tests/Codegen/src/com/android/codegentest/StaleDataclassDetectorFalsePositivesTest.java
@@ -51,7 +51,7 @@
- // Code below generated by codegen v1.0.11.
+ // Code below generated by codegen v1.0.12.
//
// DO NOT MODIFY!
// CHECKSTYLE:OFF Generated code
@@ -65,8 +65,8 @@
@DataClass.Generated(
- time = 1572630439617L,
- codegenVersion = "1.0.11",
+ time = 1572655994865L,
+ codegenVersion = "1.0.12",
sourceFile = "frameworks/base/tests/Codegen/src/com/android/codegentest/StaleDataclassDetectorFalsePositivesTest.java",
inputSignatures = "public @android.annotation.NonNull java.lang.String someMethod(int)\nclass StaleDataclassDetectorFalsePositivesTest extends java.lang.Object implements []\n@com.android.internal.util.DataClass(genConstructor=false, genBuilder=false)")
@Deprecated
diff --git a/tests/RollbackTest/RollbackTest/src/com/android/tests/rollback/StagedRollbackTest.java b/tests/RollbackTest/RollbackTest/src/com/android/tests/rollback/StagedRollbackTest.java
index bfb4968..8b01930 100644
--- a/tests/RollbackTest/RollbackTest/src/com/android/tests/rollback/StagedRollbackTest.java
+++ b/tests/RollbackTest/RollbackTest/src/com/android/tests/rollback/StagedRollbackTest.java
@@ -30,6 +30,7 @@
import android.content.Intent;
import android.content.pm.PackageInfo;
import android.content.pm.PackageInstaller;
+import android.content.pm.PackageManager;
import android.content.rollback.RollbackInfo;
import android.content.rollback.RollbackManager;
import android.os.ParcelFileDescriptor;
@@ -55,6 +56,7 @@
import org.junit.runner.RunWith;
import org.junit.runners.JUnit4;
+import java.io.File;
import java.util.concurrent.TimeUnit;
/**
@@ -72,8 +74,13 @@
"android.net.INetworkStackConnector";
private static final String PROPERTY_WATCHDOG_TRIGGER_FAILURE_COUNT =
"watchdog_trigger_failure_count";
+ private static final String PROPERTY_WATCHDOG_REQUEST_TIMEOUT_MILLIS =
+ "watchdog_request_timeout_millis";
private static final String MODULE_META_DATA_PACKAGE = getModuleMetadataPackageName();
+ private static final TestApp NETWORK_STACK = new TestApp("NetworkStack",
+ getNetworkStackPackageName(), -1, false,
+ new File("/system/priv-app/NetworkStack/NetworkStack.apk"));
/**
* Adopts common shell permissions needed for rollback tests.
@@ -214,6 +221,7 @@
@Test
public void testNetworkFailedRollback_Phase1() throws Exception {
+ // Remove available rollbacks and uninstall NetworkStack on /data/
RollbackManager rm = RollbackUtils.getRollbackManager();
String networkStack = getNetworkStackPackageName();
@@ -222,6 +230,13 @@
assertThat(getUniqueRollbackInfoForPackage(rm.getAvailableRollbacks(),
networkStack)).isNull();
+
+ // Reduce health check deadline
+ DeviceConfig.setProperty(DeviceConfig.NAMESPACE_ROLLBACK,
+ PROPERTY_WATCHDOG_REQUEST_TIMEOUT_MILLIS,
+ Integer.toString(120000), false);
+ // Simulate re-installation of new NetworkStack with rollbacks enabled
+ installNetworkStackPackage();
}
@Test
@@ -253,16 +268,20 @@
getNetworkStackPackageName())).isNotNull();
}
- private String getNetworkStackPackageName() {
+ private static String getNetworkStackPackageName() {
Intent intent = new Intent(NETWORK_STACK_CONNECTOR_CLASS);
ComponentName comp = intent.resolveSystemService(
InstrumentationRegistry.getContext().getPackageManager(), 0);
return comp.getPackageName();
}
- private void uninstallNetworkStackPackage() {
- // Since the host side use shell command to install the network stack package, uninstall
- // must be done by shell command as well. Otherwise uninstall by a different user will fail.
+ private static void installNetworkStackPackage() throws Exception {
+ Install.single(NETWORK_STACK).setStaged().setEnableRollback()
+ .addInstallFlags(PackageManager.INSTALL_REPLACE_EXISTING).commit();
+ }
+
+ private static void uninstallNetworkStackPackage() {
+ // Uninstall the package as a privileged user so we won't fail due to permission.
runShellCommand("pm uninstall " + getNetworkStackPackageName());
}
@@ -348,7 +367,7 @@
MODULE_META_DATA_PACKAGE)).isNull();
}
- private void runShellCommand(String cmd) {
+ private static void runShellCommand(String cmd) {
ParcelFileDescriptor pfd = InstrumentationRegistry.getInstrumentation().getUiAutomation()
.executeShellCommand(cmd);
IoUtils.closeQuietly(pfd);
diff --git a/tests/RollbackTest/StagedRollbackTest/src/com/android/tests/rollback/host/StagedRollbackTest.java b/tests/RollbackTest/StagedRollbackTest/src/com/android/tests/rollback/host/StagedRollbackTest.java
index e3d9c35..18a813d 100644
--- a/tests/RollbackTest/StagedRollbackTest/src/com/android/tests/rollback/host/StagedRollbackTest.java
+++ b/tests/RollbackTest/StagedRollbackTest/src/com/android/tests/rollback/host/StagedRollbackTest.java
@@ -106,31 +106,27 @@
*/
@Test
public void testNetworkFailedRollback() throws Exception {
- // Disconnect internet so we can test network health triggered rollbacks
- getDevice().executeShellCommand("svc wifi disable");
- getDevice().executeShellCommand("svc data disable");
+ try {
+ // Disconnect internet so we can test network health triggered rollbacks
+ getDevice().executeShellCommand("svc wifi disable");
+ getDevice().executeShellCommand("svc data disable");
- // Remove available rollbacks and uninstall NetworkStack on /data/
- runPhase("testNetworkFailedRollback_Phase1");
- // Reduce health check deadline
- getDevice().executeShellCommand("device_config put rollback "
- + "watchdog_request_timeout_millis 120000");
- // Simulate re-installation of new NetworkStack with rollbacks enabled
- getDevice().executeShellCommand("pm install -r --staged --enable-rollback "
- + "/system/priv-app/NetworkStack/NetworkStack.apk");
+ runPhase("testNetworkFailedRollback_Phase1");
+ // Reboot device to activate staged package
+ getDevice().reboot();
- // Sleep to allow writes to disk before reboot
- Thread.sleep(5000);
- // Reboot device to activate staged package
- getDevice().reboot();
+ // Verify rollback was enabled
+ runPhase("testNetworkFailedRollback_Phase2");
+ assertThrows(AssertionError.class, () -> runPhase("testNetworkFailedRollback_Phase3"));
- // Verify rollback was enabled
- runPhase("testNetworkFailedRollback_Phase2");
- assertThrows(AssertionError.class, () -> runPhase("testNetworkFailedRollback_Phase3"));
-
- getDevice().waitForDeviceAvailable();
- // Verify rollback was executed after health check deadline
- runPhase("testNetworkFailedRollback_Phase4");
+ getDevice().waitForDeviceAvailable();
+ // Verify rollback was executed after health check deadline
+ runPhase("testNetworkFailedRollback_Phase4");
+ } finally {
+ // Reconnect internet again so we won't break tests which assume internet available
+ getDevice().executeShellCommand("svc wifi enable");
+ getDevice().executeShellCommand("svc data enable");
+ }
}
/**
diff --git a/tools/codegen/src/com/android/codegen/FileInfo.kt b/tools/codegen/src/com/android/codegen/FileInfo.kt
index 9c15fbf..9094726 100644
--- a/tools/codegen/src/com/android/codegen/FileInfo.kt
+++ b/tools/codegen/src/com/android/codegen/FileInfo.kt
@@ -164,7 +164,7 @@
}
if (endInclusive == -1) {
// Legacy generated code doesn't have end markers
- endInclusive = fileInfo.sourceLines.size - 2
+ endInclusive = sourceNoPrefix.size - 2
}
IntRange(
range.start + start - fileInfo.generatedWarningNumPrecedingEmptyLines,
diff --git a/tools/codegen/src/com/android/codegen/SharedConstants.kt b/tools/codegen/src/com/android/codegen/SharedConstants.kt
index 270d34a..339057f 100644
--- a/tools/codegen/src/com/android/codegen/SharedConstants.kt
+++ b/tools/codegen/src/com/android/codegen/SharedConstants.kt
@@ -1,7 +1,7 @@
package com.android.codegen
const val CODEGEN_NAME = "codegen"
-const val CODEGEN_VERSION = "1.0.11"
+const val CODEGEN_VERSION = "1.0.12"
const val CANONICAL_BUILDER_CLASS = "Builder"
const val BASE_BUILDER_CLASS = "BaseBuilder"
diff --git a/wifi/java/android/net/wifi/ScanResult.java b/wifi/java/android/net/wifi/ScanResult.java
index ac86778..aa895a6 100644
--- a/wifi/java/android/net/wifi/ScanResult.java
+++ b/wifi/java/android/net/wifi/ScanResult.java
@@ -16,11 +16,15 @@
package android.net.wifi;
+import android.annotation.IntDef;
+import android.annotation.Nullable;
import android.annotation.SystemApi;
import android.annotation.UnsupportedAppUsage;
import android.os.Parcel;
import android.os.Parcelable;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
@@ -223,11 +227,86 @@
*/
public static final int CHANNEL_WIDTH_80MHZ_PLUS_MHZ = 4;
- /**
- * AP Channel bandwidth; one of {@link #CHANNEL_WIDTH_20MHZ}, {@link #CHANNEL_WIDTH_40MHZ},
- * {@link #CHANNEL_WIDTH_80MHZ}, {@link #CHANNEL_WIDTH_160MHZ}
- * or {@link #CHANNEL_WIDTH_80MHZ_PLUS_MHZ}.
- */
+ /**
+ * Wi-Fi unknown standard
+ */
+ public static final int WIFI_STANDARD_UNKNOWN = 0;
+
+ /**
+ * Wi-Fi 802.11a/b/g
+ */
+ public static final int WIFI_STANDARD_LEGACY = 1;
+
+ /**
+ * Wi-Fi 802.11n
+ */
+ public static final int WIFI_STANDARD_11N = 4;
+
+ /**
+ * Wi-Fi 802.11ac
+ */
+ public static final int WIFI_STANDARD_11AC = 5;
+
+ /**
+ * Wi-Fi 802.11ax
+ */
+ public static final int WIFI_STANDARD_11AX = 6;
+
+ /** @hide */
+ @IntDef(prefix = { "WIFI_STANDARD_" }, value = {
+ WIFI_STANDARD_UNKNOWN,
+ WIFI_STANDARD_LEGACY,
+ WIFI_STANDARD_11N,
+ WIFI_STANDARD_11AC,
+ WIFI_STANDARD_11AX
+ })
+ @Retention(RetentionPolicy.SOURCE)
+ public @interface WifiStandard{}
+
+ /**
+ * AP wifi standard.
+ */
+ private @WifiStandard int mWifiStandard;
+
+ /**
+ * return the AP wifi standard.
+ */
+ public @WifiStandard int getWifiStandard() {
+ return mWifiStandard;
+ }
+
+ /**
+ * sets the AP wifi standard.
+ * @hide
+ */
+ public void setWifiStandard(@WifiStandard int standard) {
+ mWifiStandard = standard;
+ }
+
+ /**
+ * Convert Wi-Fi standard to string
+ */
+ private static @Nullable String wifiStandardToString(@WifiStandard int standard) {
+ switch(standard) {
+ case WIFI_STANDARD_LEGACY:
+ return "legacy";
+ case WIFI_STANDARD_11N:
+ return "11n";
+ case WIFI_STANDARD_11AC:
+ return "11ac";
+ case WIFI_STANDARD_11AX:
+ return "11ax";
+ case WIFI_STANDARD_UNKNOWN:
+ return "unknown";
+ }
+ return null;
+ }
+
+ /**
+ * AP Channel bandwidth; one of {@link #CHANNEL_WIDTH_20MHZ}, {@link #CHANNEL_WIDTH_40MHZ},
+ * {@link #CHANNEL_WIDTH_80MHZ}, {@link #CHANNEL_WIDTH_160MHZ}
+ * or {@link #CHANNEL_WIDTH_80MHZ_PLUS_MHZ}.
+ */
public int channelWidth;
/**
@@ -549,6 +628,7 @@
this.carrierApEapType = UNSPECIFIED;
this.carrierName = null;
this.radioChainInfos = null;
+ this.mWifiStandard = WIFI_STANDARD_UNKNOWN;
}
/** {@hide} */
@@ -571,6 +651,7 @@
this.carrierApEapType = UNSPECIFIED;
this.carrierName = null;
this.radioChainInfos = null;
+ this.mWifiStandard = WIFI_STANDARD_UNKNOWN;
}
/** {@hide} */
@@ -600,6 +681,7 @@
this.carrierApEapType = UNSPECIFIED;
this.carrierName = null;
this.radioChainInfos = null;
+ this.mWifiStandard = WIFI_STANDARD_UNKNOWN;
}
/** {@hide} */
@@ -641,6 +723,7 @@
carrierApEapType = source.carrierApEapType;
carrierName = source.carrierName;
radioChainInfos = source.radioChainInfos;
+ this.mWifiStandard = source.mWifiStandard;
}
}
@@ -679,6 +762,7 @@
sb.append(", ChannelBandwidth: ").append(channelWidth);
sb.append(", centerFreq0: ").append(centerFreq0);
sb.append(", centerFreq1: ").append(centerFreq1);
+ sb.append(", standard: ").append(wifiStandardToString(mWifiStandard));
sb.append(", 80211mcResponder: ");
sb.append(((flags & FLAG_80211mc_RESPONDER) != 0) ? "is supported" : "is not supported");
sb.append(", Carrier AP: ").append(isCarrierAp ? "yes" : "no");
@@ -714,6 +798,7 @@
dest.writeInt(channelWidth);
dest.writeInt(centerFreq0);
dest.writeInt(centerFreq1);
+ dest.writeInt(mWifiStandard);
dest.writeLong(seen);
dest.writeInt(untrusted ? 1 : 0);
dest.writeInt(numUsage);
@@ -796,6 +881,7 @@
fixed with flags below */
);
+ sr.mWifiStandard = in.readInt();
sr.seen = in.readLong();
sr.untrusted = in.readInt() != 0;
sr.numUsage = in.readInt();
diff --git a/wifi/java/android/net/wifi/WifiInfo.java b/wifi/java/android/net/wifi/WifiInfo.java
index 62ba95d..86e5122 100644
--- a/wifi/java/android/net/wifi/WifiInfo.java
+++ b/wifi/java/android/net/wifi/WifiInfo.java
@@ -16,7 +16,6 @@
package android.net.wifi;
-import android.annotation.IntDef;
import android.annotation.IntRange;
import android.annotation.Nullable;
import android.annotation.SystemApi;
@@ -28,8 +27,6 @@
import android.os.Parcelable;
import android.text.TextUtils;
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
import java.net.Inet4Address;
import java.net.InetAddress;
import java.net.UnknownHostException;
@@ -99,45 +96,9 @@
private int mRssi;
/**
- * Wi-Fi unknown technology
+ * Wi-Fi standard for the connection
*/
- public static final int WIFI_TECHNOLOGY_UNKNOWN = 0;
-
- /**
- * Wi-Fi 802.11a/b/g
- */
- public static final int WIFI_TECHNOLOGY_LEGACY = 1;
-
- /**
- * Wi-Fi 802.11n
- */
- public static final int WIFI_TECHNOLOGY_11N = 4;
-
- /**
- * Wi-Fi 802.11ac
- */
- public static final int WIFI_TECHNOLOGY_11AC = 5;
-
- /**
- * Wi-Fi 802.11ax
- */
- public static final int WIFI_TECHNOLOGY_11AX = 6;
-
- /** @hide */
- @IntDef(prefix = { "WIFI_TECHNOLOGY_" }, value = {
- WIFI_TECHNOLOGY_UNKNOWN,
- WIFI_TECHNOLOGY_LEGACY,
- WIFI_TECHNOLOGY_11N,
- WIFI_TECHNOLOGY_11AC,
- WIFI_TECHNOLOGY_11AX
- })
- @Retention(RetentionPolicy.SOURCE)
- public @interface WifiTechnology{}
-
- /**
- * Wi-Fi technology for the connection
- */
- private @WifiTechnology int mWifiTechnology;
+ private @ScanResult.WifiStandard int mWifiStandard;
/**
* The unit in which links speeds are expressed.
@@ -330,7 +291,7 @@
txSuccessRate = source.txSuccessRate;
rxSuccessRate = source.rxSuccessRate;
score = source.score;
- mWifiTechnology = source.mWifiTechnology;
+ mWifiStandard = source.mWifiStandard;
}
}
@@ -419,19 +380,19 @@
}
/**
- * Sets the Wi-Fi technology
+ * Sets the Wi-Fi standard
* @hide
*/
- public void setWifiTechnology(@WifiTechnology int wifiTechnology) {
- mWifiTechnology = wifiTechnology;
+ public void setWifiStandard(@ScanResult.WifiStandard int wifiStandard) {
+ mWifiStandard = wifiStandard;
}
/**
- * Get connection Wi-Fi technology
- * @return the connection Wi-Fi technology
+ * Get connection Wi-Fi standard
+ * @return the connection Wi-Fi standard
*/
- public @WifiTechnology int getWifiTechnology() {
- return mWifiTechnology;
+ public @ScanResult.WifiStandard int getWifiStandard() {
+ return mWifiStandard;
}
/**
@@ -740,7 +701,7 @@
.append(", MAC: ").append(mMacAddress == null ? none : mMacAddress)
.append(", Supplicant state: ")
.append(mSupplicantState == null ? none : mSupplicantState)
- .append(", Wi-Fi technology: ").append(mWifiTechnology)
+ .append(", Wi-Fi standard: ").append(mWifiStandard)
.append(", RSSI: ").append(mRssi)
.append(", Link speed: ").append(mLinkSpeed).append(LINK_SPEED_UNITS)
.append(", Tx Link speed: ").append(mTxLinkSpeed).append(LINK_SPEED_UNITS)
@@ -796,7 +757,7 @@
dest.writeString(mNetworkSuggestionOrSpecifierPackageName);
dest.writeString(mFqdn);
dest.writeString(mProviderFriendlyName);
- dest.writeInt(mWifiTechnology);
+ dest.writeInt(mWifiStandard);
}
/** Implement the Parcelable interface {@hide} */
@@ -838,7 +799,7 @@
info.mNetworkSuggestionOrSpecifierPackageName = in.readString();
info.mFqdn = in.readString();
info.mProviderFriendlyName = in.readString();
- info.mWifiTechnology = in.readInt();
+ info.mWifiStandard = in.readInt();
return info;
}
diff --git a/wifi/tests/src/android/net/wifi/ScanResultTest.java b/wifi/tests/src/android/net/wifi/ScanResultTest.java
index 4973c4c..b5c74d1 100644
--- a/wifi/tests/src/android/net/wifi/ScanResultTest.java
+++ b/wifi/tests/src/android/net/wifi/ScanResultTest.java
@@ -42,6 +42,8 @@
public static final int TEST_LEVEL = -56;
public static final int TEST_FREQUENCY = 2412;
public static final long TEST_TSF = 04660l;
+ public static final @ScanResult.WifiStandard int TEST_WIFI_STANDARD =
+ ScanResult.WIFI_STANDARD_11AC;
/**
* Setup before tests.
@@ -149,12 +151,14 @@
@Test
public void verifyScanResultToStringWithoutRadioChainInfo() throws Exception {
ScanResult scanResult = createScanResult();
- assertEquals("SSID: \"test_ssid\", BSSID: 04:ac:fe:45:34:10, capabilities: CCMP, " +
- "level: -56, frequency: 2412, timestamp: 2480, distance: 0(cm), distanceSd: 0(cm), " +
- "passpoint: no, ChannelBandwidth: 0, centerFreq0: 0, centerFreq1: 0, " +
- "80211mcResponder: is not supported, Carrier AP: no, " +
- "Carrier AP EAP Type: 0, Carrier name: null, " +
- "Radio Chain Infos: null", scanResult.toString());
+ assertEquals("SSID: \"test_ssid\", BSSID: 04:ac:fe:45:34:10, capabilities: CCMP, "
+ + "level: -56, frequency: 2412, timestamp: 2480, "
+ + "distance: 0(cm), distanceSd: 0(cm), "
+ + "passpoint: no, ChannelBandwidth: 0, centerFreq0: 0, centerFreq1: 0, "
+ + "standard: 11ac, "
+ + "80211mcResponder: is not supported, Carrier AP: no, "
+ + "Carrier AP EAP Type: 0, Carrier name: null, "
+ + "Radio Chain Infos: null", scanResult.toString());
}
/**
@@ -170,13 +174,15 @@
scanResult.radioChainInfos[1] = new ScanResult.RadioChainInfo();
scanResult.radioChainInfos[1].id = 1;
scanResult.radioChainInfos[1].level = -54;
- assertEquals("SSID: \"test_ssid\", BSSID: 04:ac:fe:45:34:10, capabilities: CCMP, " +
- "level: -56, frequency: 2412, timestamp: 2480, distance: 0(cm), distanceSd: 0(cm), " +
- "passpoint: no, ChannelBandwidth: 0, centerFreq0: 0, centerFreq1: 0, " +
- "80211mcResponder: is not supported, Carrier AP: no, " +
- "Carrier AP EAP Type: 0, Carrier name: null, " +
- "Radio Chain Infos: [RadioChainInfo: id=0, level=-45, " +
- "RadioChainInfo: id=1, level=-54]", scanResult.toString());
+ assertEquals("SSID: \"test_ssid\", BSSID: 04:ac:fe:45:34:10, capabilities: CCMP, "
+ + "level: -56, frequency: 2412, timestamp: 2480, distance: 0(cm), "
+ + "distanceSd: 0(cm), "
+ + "passpoint: no, ChannelBandwidth: 0, centerFreq0: 0, centerFreq1: 0, "
+ + "standard: 11ac, "
+ + "80211mcResponder: is not supported, Carrier AP: no, "
+ + "Carrier AP EAP Type: 0, Carrier name: null, "
+ + "Radio Chain Infos: [RadioChainInfo: id=0, level=-45, "
+ + "RadioChainInfo: id=1, level=-54]", scanResult.toString());
}
/**
@@ -197,6 +203,7 @@
result.level = TEST_LEVEL;
result.frequency = TEST_FREQUENCY;
result.timestamp = TEST_TSF;
+ result.setWifiStandard(TEST_WIFI_STANDARD);
return result;
}
@@ -207,6 +214,7 @@
assertEquals(expected.level, actual.level);
assertEquals(expected.frequency, actual.frequency);
assertEquals(expected.timestamp, actual.timestamp);
+ assertEquals(expected.getWifiStandard(), actual.getWifiStandard());
assertArrayEquals(expected.radioChainInfos, actual.radioChainInfos);
assertArrayEquals(expected.informationElements, actual.informationElements);
}
diff --git a/wifi/tests/src/android/net/wifi/WifiInfoTest.java b/wifi/tests/src/android/net/wifi/WifiInfoTest.java
index ea08ea8..22a5faa 100644
--- a/wifi/tests/src/android/net/wifi/WifiInfoTest.java
+++ b/wifi/tests/src/android/net/wifi/WifiInfoTest.java
@@ -38,7 +38,7 @@
private static final String TEST_PACKAGE_NAME = "com.test.example";
private static final String TEST_FQDN = "test.com";
private static final String TEST_PROVIDER_NAME = "test";
- private static final int TEST_WIFI_TECHNOLOGY = WifiInfo.WIFI_TECHNOLOGY_11AC;
+ private static final int TEST_WIFI_STANDARD = ScanResult.WIFI_STANDARD_11AC;
/**
* Verify parcel write/read with WifiInfo.
@@ -55,7 +55,7 @@
writeWifiInfo.setFQDN(TEST_FQDN);
writeWifiInfo.setProviderFriendlyName(TEST_PROVIDER_NAME);
writeWifiInfo.setNetworkSuggestionOrSpecifierPackageName(TEST_PACKAGE_NAME);
- writeWifiInfo.setWifiTechnology(TEST_WIFI_TECHNOLOGY);
+ writeWifiInfo.setWifiStandard(TEST_WIFI_STANDARD);
Parcel parcel = Parcel.obtain();
writeWifiInfo.writeToParcel(parcel, 0);
@@ -74,6 +74,6 @@
assertEquals(TEST_PACKAGE_NAME, readWifiInfo.getNetworkSuggestionOrSpecifierPackageName());
assertEquals(TEST_FQDN, readWifiInfo.getPasspointFqdn());
assertEquals(TEST_PROVIDER_NAME, readWifiInfo.getPasspointProviderFriendlyName());
- assertEquals(TEST_WIFI_TECHNOLOGY, readWifiInfo.getWifiTechnology());
+ assertEquals(TEST_WIFI_STANDARD, readWifiInfo.getWifiStandard());
}
}