Merge "Fixing another crash when creating/updating BLASTBufferQueue"
diff --git a/apct-tests/perftests/core/src/android/app/ResourcesPerfTest.java b/apct-tests/perftests/core/src/android/app/ResourcesPerfTest.java
index 7216244..b1f609e 100644
--- a/apct-tests/perftests/core/src/android/app/ResourcesPerfTest.java
+++ b/apct-tests/perftests/core/src/android/app/ResourcesPerfTest.java
@@ -96,7 +96,7 @@
final BenchmarkState state = mPerfStatusReporter.getBenchmarkState();
TypedValue value = new TypedValue();
while (state.keepRunning()) {
- mRes.getValue(com.android.internal.R.string.mmcc_illegal_me, value,
+ mRes.getValue(com.android.internal.R.string.android_upgrading_apk, value,
false /* resolve_refs */);
}
}
diff --git a/apex/jobscheduler/framework/java/android/app/job/JobInfo.java b/apex/jobscheduler/framework/java/android/app/job/JobInfo.java
index 8a9c774..b905273 100644
--- a/apex/jobscheduler/framework/java/android/app/job/JobInfo.java
+++ b/apex/jobscheduler/framework/java/android/app/job/JobInfo.java
@@ -606,10 +606,6 @@
return hasLateConstraint;
}
- private static boolean kindofEqualsBundle(BaseBundle a, BaseBundle b) {
- return (a == b) || (a != null && a.kindofEquals(b));
- }
-
@Override
public boolean equals(Object o) {
if (!(o instanceof JobInfo)) {
@@ -620,11 +616,11 @@
return false;
}
// XXX won't be correct if one is parcelled and the other not.
- if (!kindofEqualsBundle(extras, j.extras)) {
+ if (!BaseBundle.kindofEquals(extras, j.extras)) {
return false;
}
// XXX won't be correct if one is parcelled and the other not.
- if (!kindofEqualsBundle(transientExtras, j.transientExtras)) {
+ if (!BaseBundle.kindofEquals(transientExtras, j.transientExtras)) {
return false;
}
// XXX for now we consider two different clip data objects to be different,
diff --git a/apex/jobscheduler/service/java/com/android/server/job/controllers/JobStatus.java b/apex/jobscheduler/service/java/com/android/server/job/controllers/JobStatus.java
index cf7f380..789f20b 100644
--- a/apex/jobscheduler/service/java/com/android/server/job/controllers/JobStatus.java
+++ b/apex/jobscheduler/service/java/com/android/server/job/controllers/JobStatus.java
@@ -1648,11 +1648,11 @@
pw.println();
}
}
- if (job.getExtras() != null && !job.getExtras().maybeIsEmpty()) {
+ if (job.getExtras() != null && !job.getExtras().isDefinitelyEmpty()) {
pw.print(prefix); pw.print(" Extras: ");
pw.println(job.getExtras().toShortString());
}
- if (job.getTransientExtras() != null && !job.getTransientExtras().maybeIsEmpty()) {
+ if (job.getTransientExtras() != null && !job.getTransientExtras().isDefinitelyEmpty()) {
pw.print(prefix); pw.print(" Transient extras: ");
pw.println(job.getTransientExtras().toShortString());
}
@@ -1869,10 +1869,10 @@
job.getTriggerContentMaxDelay());
}
}
- if (job.getExtras() != null && !job.getExtras().maybeIsEmpty()) {
+ if (job.getExtras() != null && !job.getExtras().isDefinitelyEmpty()) {
job.getExtras().dumpDebug(proto, JobStatusDumpProto.JobInfo.EXTRAS);
}
- if (job.getTransientExtras() != null && !job.getTransientExtras().maybeIsEmpty()) {
+ if (job.getTransientExtras() != null && !job.getTransientExtras().isDefinitelyEmpty()) {
job.getTransientExtras().dumpDebug(proto, JobStatusDumpProto.JobInfo.TRANSIENT_EXTRAS);
}
if (job.getClipData() != null) {
diff --git a/apex/statsd/Android.bp b/apex/statsd/Android.bp
index baa1c25..1f9f18c 100644
--- a/apex/statsd/Android.bp
+++ b/apex/statsd/Android.bp
@@ -20,8 +20,6 @@
apex_defaults {
native_shared_libs: [
- "libstatssocket",
- "libstatspull",
"libstats_jni",
],
// binaries: ["vold"],
@@ -30,7 +28,6 @@
"service-statsd",
],
// prebuilts: ["my_prebuilt"],
- compile_multilib: "both",
name: "com.android.os.statsd-defaults",
key: "com.android.os.statsd.key",
certificate: ":com.android.os.statsd.certificate",
@@ -77,4 +74,4 @@
//TODO (b/148620413): remove platform.
"//apex_available:platform",
],
-}
+}
\ No newline at end of file
diff --git a/apex/statsd/aidl/Android.bp b/apex/statsd/aidl/Android.bp
index 4ccdd7e..7c93bc7 100644
--- a/apex/statsd/aidl/Android.bp
+++ b/apex/statsd/aidl/Android.bp
@@ -38,10 +38,6 @@
},
ndk: {
enabled: true,
- apex_available: [
- "com.android.os.statsd",
- ],
}
-
- },
+ }
}
diff --git a/api/current.txt b/api/current.txt
index 6a918d9..6863fd7 100644
--- a/api/current.txt
+++ b/api/current.txt
@@ -1082,6 +1082,7 @@
field public static final int preferenceScreenStyle = 16842891; // 0x101008b
field public static final int preferenceStyle = 16842894; // 0x101008e
field public static final int presentationTheme = 16843712; // 0x10103c0
+ field public static final int preserveLegacyExternalStorage = 16844312; // 0x1010618
field public static final int previewImage = 16843482; // 0x10102da
field public static final int primaryContentAlpha = 16844114; // 0x1010552
field public static final int priority = 16842780; // 0x101001c
@@ -6426,9 +6427,13 @@
public class StatusBarManager {
}
- public final class SyncNotedAppOp {
+ public final class SyncNotedAppOp implements android.os.Parcelable {
+ ctor public SyncNotedAppOp(@IntRange(from=0L) int, @Nullable String);
+ method public int describeContents();
method @Nullable public String getFeatureId();
method @NonNull public String getOp();
+ method public void writeToParcel(@NonNull android.os.Parcel, int);
+ field @NonNull public static final android.os.Parcelable.Creator<android.app.SyncNotedAppOp> CREATOR;
}
@Deprecated public class TabActivity extends android.app.ActivityGroup {
@@ -30816,7 +30821,7 @@
public class AudioGroup {
ctor @Deprecated public AudioGroup();
- ctor public AudioGroup(@Nullable android.content.Context);
+ ctor public AudioGroup(@NonNull android.content.Context);
method public void clear();
method public int getMode();
method public android.net.rtp.AudioStream[] getStreams();
@@ -43048,6 +43053,7 @@
method @NonNull public android.service.autofill.FillResponse build();
method @NonNull public android.service.autofill.FillResponse.Builder disableAutofill(long);
method @NonNull public android.service.autofill.FillResponse.Builder setAuthentication(@NonNull android.view.autofill.AutofillId[], @Nullable android.content.IntentSender, @Nullable android.widget.RemoteViews);
+ method @NonNull public android.service.autofill.FillResponse.Builder setAuthentication(@NonNull android.view.autofill.AutofillId[], @Nullable android.content.IntentSender, @Nullable android.widget.RemoteViews, @Nullable android.service.autofill.InlinePresentation);
method @NonNull public android.service.autofill.FillResponse.Builder setClientState(@Nullable android.os.Bundle);
method @NonNull public android.service.autofill.FillResponse.Builder setFieldClassificationIds(@NonNull android.view.autofill.AutofillId...);
method @NonNull public android.service.autofill.FillResponse.Builder setFlags(int);
@@ -46894,7 +46900,7 @@
}
public final class CellIdentityGsm extends android.telephony.CellIdentity {
- method @NonNull public java.util.List<java.lang.String> getAdditionalPlmns();
+ method @NonNull public java.util.Set<java.lang.String> getAdditionalPlmns();
method public int getArfcn();
method public int getBsic();
method public int getCid();
@@ -46910,7 +46916,7 @@
}
public final class CellIdentityLte extends android.telephony.CellIdentity {
- method @NonNull public java.util.List<java.lang.String> getAdditionalPlmns();
+ method @NonNull public java.util.Set<java.lang.String> getAdditionalPlmns();
method @NonNull public java.util.List<java.lang.Integer> getBands();
method public int getBandwidth();
method public int getCi();
@@ -46928,7 +46934,7 @@
}
public final class CellIdentityNr extends android.telephony.CellIdentity {
- method @NonNull public java.util.List<java.lang.String> getAdditionalPlmns();
+ method @NonNull public java.util.Set<java.lang.String> getAdditionalPlmns();
method @NonNull public java.util.List<java.lang.Integer> getBands();
method @Nullable public String getMccString();
method @Nullable public String getMncString();
@@ -46941,7 +46947,7 @@
}
public final class CellIdentityTdscdma extends android.telephony.CellIdentity {
- method @NonNull public java.util.List<java.lang.String> getAdditionalPlmns();
+ method @NonNull public java.util.Set<java.lang.String> getAdditionalPlmns();
method public int getCid();
method @Nullable public android.telephony.ClosedSubscriberGroupInfo getClosedSubscriberGroupInfo();
method public int getCpid();
@@ -46955,7 +46961,7 @@
}
public final class CellIdentityWcdma extends android.telephony.CellIdentity {
- method @NonNull public java.util.List<java.lang.String> getAdditionalPlmns();
+ method @NonNull public java.util.Set<java.lang.String> getAdditionalPlmns();
method public int getCid();
method @Nullable public android.telephony.ClosedSubscriberGroupInfo getClosedSubscriberGroupInfo();
method public int getLac();
@@ -47245,7 +47251,7 @@
method @Nullable public android.telephony.CellIdentity getCellIdentity();
method public int getDomain();
method public int getNrState();
- method @NonNull public String getRegisteredPlmn();
+ method @Nullable public String getRegisteredPlmn();
method public int getTransportType();
method public boolean isRegistered();
method public boolean isRoaming();
diff --git a/api/system-current.txt b/api/system-current.txt
index 92d1bf4..c6d4eb3 100755
--- a/api/system-current.txt
+++ b/api/system-current.txt
@@ -365,6 +365,7 @@
}
public class AppOpsManager {
+ method @Nullable @RequiresPermission(android.Manifest.permission.GET_APP_OPS_STATS) public android.app.RuntimeAppOpAccessMessage collectRuntimeAppOpAccessMessage();
method @RequiresPermission(android.Manifest.permission.GET_APP_OPS_STATS) public void getHistoricalOps(@NonNull android.app.AppOpsManager.HistoricalOpsRequest, @NonNull java.util.concurrent.Executor, @NonNull java.util.function.Consumer<android.app.AppOpsManager.HistoricalOps>);
method public static String[] getOpStrs();
method @NonNull @RequiresPermission(android.Manifest.permission.GET_APP_OPS_STATS) public java.util.List<android.app.AppOpsManager.PackageOps> getOpsForPackage(int, @NonNull String, @Nullable java.lang.String...);
@@ -681,6 +682,19 @@
method public void setNotificationAssistantAccessGranted(@Nullable android.content.ComponentName, boolean);
}
+ public final class RuntimeAppOpAccessMessage implements android.os.Parcelable {
+ ctor public RuntimeAppOpAccessMessage(@IntRange(from=0L) int, @IntRange(from=0L) int, @NonNull String, @Nullable String, @NonNull String, int);
+ method public int describeContents();
+ method @Nullable public String getFeatureId();
+ method @NonNull public String getMessage();
+ method @NonNull public String getOp();
+ method @NonNull public String getPackageName();
+ method public int getSamplingStrategy();
+ method @IntRange(from=0L) public int getUid();
+ method public void writeToParcel(@NonNull android.os.Parcel, int);
+ field @NonNull public static final android.os.Parcelable.Creator<android.app.RuntimeAppOpAccessMessage> CREATOR;
+ }
+
public class SearchManager implements android.content.DialogInterface.OnCancelListener android.content.DialogInterface.OnDismissListener {
method public void launchAssist(@Nullable android.os.Bundle);
}
diff --git a/api/test-current.txt b/api/test-current.txt
index 4c8bb02..7284fe6 100644
--- a/api/test-current.txt
+++ b/api/test-current.txt
@@ -164,6 +164,7 @@
public class AppOpsManager {
method @RequiresPermission("android.permission.MANAGE_APPOPS") public void addHistoricalOps(@NonNull android.app.AppOpsManager.HistoricalOps);
method @RequiresPermission("android.permission.MANAGE_APPOPS") public void clearHistory();
+ method @Nullable @RequiresPermission("android.permission.GET_APP_OPS_STATS") public android.app.RuntimeAppOpAccessMessage collectRuntimeAppOpAccessMessage();
method @RequiresPermission("android.permission.GET_APP_OPS_STATS") public void getHistoricalOps(@NonNull android.app.AppOpsManager.HistoricalOpsRequest, @NonNull java.util.concurrent.Executor, @NonNull java.util.function.Consumer<android.app.AppOpsManager.HistoricalOps>);
method @RequiresPermission("android.permission.MANAGE_APPOPS") public void getHistoricalOpsFromDiskRaw(@NonNull android.app.AppOpsManager.HistoricalOpsRequest, @Nullable java.util.concurrent.Executor, @NonNull java.util.function.Consumer<android.app.AppOpsManager.HistoricalOps>);
method public static int getNumOps();
@@ -447,6 +448,19 @@
method public android.graphics.Rect getSourceRectHint();
}
+ public final class RuntimeAppOpAccessMessage implements android.os.Parcelable {
+ ctor public RuntimeAppOpAccessMessage(@IntRange(from=0L) int, @IntRange(from=0L) int, @NonNull String, @Nullable String, @NonNull String, int);
+ method public int describeContents();
+ method @Nullable public String getFeatureId();
+ method @NonNull public String getMessage();
+ method @NonNull public String getOp();
+ method @NonNull public String getPackageName();
+ method public int getSamplingStrategy();
+ method @IntRange(from=0L) public int getUid();
+ method public void writeToParcel(@NonNull android.os.Parcel, int);
+ field @NonNull public static final android.os.Parcelable.Creator<android.app.RuntimeAppOpAccessMessage> CREATOR;
+ }
+
public class StatusBarManager {
method public void collapsePanels();
method public void expandNotificationsPanel();
diff --git a/cmds/statsd/Android.bp b/cmds/statsd/Android.bp
index 1bcf44e..956fd29 100644
--- a/cmds/statsd/Android.bp
+++ b/cmds/statsd/Android.bp
@@ -120,14 +120,13 @@
"libstatslog",
"libstatsmetadata",
"libsysutils",
- // TODO(b/145923087): move to shared when statsd is moved to the apex
- "libstatssocket",
"libutils",
],
shared_libs: [
"libbinder",
"libincident",
"liblog",
+ "libstatssocket",
"statsd-aidl-cpp",
],
}
diff --git a/cmds/statsd/src/logd/LogEvent.cpp b/cmds/statsd/src/logd/LogEvent.cpp
index 103eb0c..1ef1ab2 100644
--- a/cmds/statsd/src/logd/LogEvent.cpp
+++ b/cmds/statsd/src/logd/LogEvent.cpp
@@ -290,9 +290,9 @@
}
bool LogEvent::writeBytes(const string& value) {
- if (mContext) {
+ /* if (mContext) {
return android_log_write_char_array(mContext, value.c_str(), value.length()) >= 0;
- }
+ }*/
return false;
}
diff --git a/cmds/statsd/src/logd/LogEvent.h b/cmds/statsd/src/logd/LogEvent.h
index a67bef4..ea449b0 100644
--- a/cmds/statsd/src/logd/LogEvent.h
+++ b/cmds/statsd/src/logd/LogEvent.h
@@ -20,7 +20,6 @@
#include <android/util/ProtoOutputStream.h>
#include <private/android_logger.h>
-#include <stats_event_list.h>
#include <stats_event.h>
#include <string>
diff --git a/core/java/android/app/Activity.java b/core/java/android/app/Activity.java
index 395a196..5df67bc 100644
--- a/core/java/android/app/Activity.java
+++ b/core/java/android/app/Activity.java
@@ -1907,6 +1907,7 @@
if (!mAutoFillIgnoreFirstResumePause) {
View focus = getCurrentFocus();
if (focus != null && focus.canNotifyAutofillEnterExitEvent()) {
+ // TODO(b/148815880): Bring up keyboard if resumed from inline authentication.
// TODO: in Activity killed/recreated case, i.e. SessionLifecycleTest#
// testDatasetVisibleWhileAutofilledAppIsLifecycled: the View's initial
// window visibility after recreation is INVISIBLE in onResume() and next frame
@@ -8467,7 +8468,7 @@
/** @hide */
@Override
public final void autofillClientAuthenticate(int authenticationId, IntentSender intent,
- Intent fillInIntent) {
+ Intent fillInIntent, boolean authenticateInline) {
try {
startIntentSenderForResultInner(intent, AUTO_FILL_AUTH_WHO_PREFIX,
authenticationId, fillInIntent, 0, 0, null);
diff --git a/core/java/android/app/AppOpsManager.java b/core/java/android/app/AppOpsManager.java
index 1de68ba..f6bbc68 100644
--- a/core/java/android/app/AppOpsManager.java
+++ b/core/java/android/app/AppOpsManager.java
@@ -16,6 +16,10 @@
package android.app;
+import static android.util.StatsLogInternal.RUNTIME_APP_OP_ACCESS__SAMPLING_STRATEGY__DEFAULT;
+import static android.util.StatsLogInternal.RUNTIME_APP_OP_ACCESS__SAMPLING_STRATEGY__RARELY_USED;
+import static android.util.StatsLogInternal.RUNTIME_APP_OP_ACCESS__SAMPLING_STRATEGY__UNIFORM;
+
import android.Manifest;
import android.annotation.CallbackExecutor;
import android.annotation.IntDef;
@@ -48,6 +52,8 @@
import android.os.Process;
import android.os.RemoteCallback;
import android.os.RemoteException;
+import android.os.ServiceManager;
+import android.os.SystemClock;
import android.os.UserManager;
import android.util.ArrayMap;
import android.util.ArraySet;
@@ -63,6 +69,7 @@
import com.android.internal.app.IAppOpsCallback;
import com.android.internal.app.IAppOpsNotedCallback;
import com.android.internal.app.IAppOpsService;
+import com.android.internal.app.MessageSamplingConfig;
import com.android.internal.os.RuntimeInit;
import com.android.internal.os.ZygoteInit;
import com.android.internal.util.ArrayUtils;
@@ -141,6 +148,13 @@
@UnsupportedAppUsage
final IAppOpsService mService;
+ /**
+ * Service for the application context, to be used by static methods via
+ * {@link #getService()}
+ */
+ @GuardedBy("sLock")
+ static IAppOpsService sService;
+
@GuardedBy("mModeWatchers")
private final ArrayMap<OnOpChangedListener, IAppOpsCallback> mModeWatchers =
new ArrayMap<>();
@@ -159,6 +173,50 @@
@GuardedBy("sLock")
private static @Nullable AppOpsCollector sNotedAppOpsCollector;
+ /**
+ * Additional collector that collect accesses and forwards a few of them them via
+ * {@link IAppOpsService#reportRuntimeAppOpAccessMessageAndGetConfig}.
+ */
+ private static AppOpsCollector sMessageCollector =
+ new AppOpsCollector() {
+ @Override
+ public void onNoted(@NonNull SyncNotedAppOp op) {
+ reportStackTraceIfNeeded(op);
+ }
+
+ @Override
+ public void onAsyncNoted(@NonNull AsyncNotedAppOp asyncOp) {
+ // collected directly in AppOpsService
+ }
+
+ @Override
+ public void onSelfNoted(@NonNull SyncNotedAppOp op) {
+ reportStackTraceIfNeeded(op);
+ }
+
+ private void reportStackTraceIfNeeded(@NonNull SyncNotedAppOp op) {
+ if (sConfig.getSampledOpCode() == OP_NONE
+ && sConfig.getExpirationTimeSinceBootMillis()
+ >= SystemClock.elapsedRealtime()) {
+ return;
+ }
+
+ MessageSamplingConfig config = sConfig;
+ if (leftCircularDistance(strOpToOp(op.getOp()), config.getSampledOpCode(),
+ _NUM_OP) <= config.getAcceptableLeftDistance()
+ || config.getExpirationTimeSinceBootMillis()
+ < SystemClock.elapsedRealtime()) {
+ String stackTrace = getFormattedStackTrace();
+ try {
+ sConfig = getService().reportRuntimeAppOpAccessMessageAndGetConfig(
+ ActivityThread.currentOpPackageName(), op, stackTrace);
+ } catch (RemoteException e) {
+ e.rethrowFromSystemServer();
+ }
+ }
+ }
+ };
+
static IBinder sClientId;
/**
@@ -550,7 +608,6 @@
})
public @interface OpFlags {}
-
/** @hide */
public static final String getFlagName(@OpFlags int flag) {
switch (flag) {
@@ -569,6 +626,18 @@
}
}
+ /**
+ * Strategies used for message sampling
+ * @hide
+ */
+ @Retention(RetentionPolicy.SOURCE)
+ @IntDef(prefix = {"RUNTIME_APP_OPS_ACCESS__SAMPLING_STRATEGY__"}, value = {
+ RUNTIME_APP_OP_ACCESS__SAMPLING_STRATEGY__DEFAULT,
+ RUNTIME_APP_OP_ACCESS__SAMPLING_STRATEGY__UNIFORM,
+ RUNTIME_APP_OP_ACCESS__SAMPLING_STRATEGY__RARELY_USED
+ })
+ public @interface SamplingStrategy {}
+
private static final int UID_STATE_OFFSET = 31;
private static final int FLAGS_MASK = 0xFFFFFFFF;
@@ -2225,6 +2294,10 @@
}
}
+ /** Config used to control app ops access messages sampling */
+ private static MessageSamplingConfig sConfig =
+ new MessageSamplingConfig(OP_NONE, 0, 0);
+
/** @hide */
public static final String KEY_HISTORICAL_OPS = "historical_ops";
@@ -7268,6 +7341,17 @@
}
}
+ /** @hide */
+ private static IAppOpsService getService() {
+ synchronized (sLock) {
+ if (sService == null) {
+ sService = IAppOpsService.Stub.asInterface(
+ ServiceManager.getService(Context.APP_OPS_SERVICE));
+ }
+ return sService;
+ }
+ }
+
/**
* @deprecated use {@link #startOp(String, int, String, String, String)} instead
*/
@@ -7614,6 +7698,7 @@
sNotedAppOpsCollector.onSelfNoted(new SyncNotedAppOp(op, featureId));
}
}
+ sMessageCollector.onSelfNoted(new SyncNotedAppOp(op, featureId));
}
/**
@@ -7764,6 +7849,10 @@
}
}
}
+ for (int code = notedAppOps.nextSetBit(0); code != -1;
+ code = notedAppOps.nextSetBit(code + 1)) {
+ sMessageCollector.onNoted(new SyncNotedAppOp(code, featureId));
+ }
}
}
}
@@ -7958,10 +8047,13 @@
StringBuilder sb = new StringBuilder();
for (int i = firstInteresting; i <= lastInteresting; i++) {
- sb.append(trace[i]);
- if (i != lastInteresting) {
+ if (i != firstInteresting) {
sb.append('\n');
}
+ if (sb.length() + trace[i].toString().length() > 600) {
+ break;
+ }
+ sb.append(trace[i]);
}
return sb.toString();
@@ -8089,6 +8181,22 @@
}
/**
+ * Pulls current AppOps access report and picks package and op to watch for next access report
+ *
+ * @hide
+ */
+ @SystemApi
+ @TestApi
+ @RequiresPermission(Manifest.permission.GET_APP_OPS_STATS)
+ public @Nullable RuntimeAppOpAccessMessage collectRuntimeAppOpAccessMessage() {
+ try {
+ return mService.collectRuntimeAppOpAccessMessage();
+ } catch (RemoteException e) {
+ throw e.rethrowFromSystemServer();
+ }
+ }
+
+ /**
* Returns all supported operation names.
* @hide
*/
@@ -8297,4 +8405,12 @@
return AppOpsManager.MODE_DEFAULT;
}
+
+ /**
+ * Calculate left circular distance for two numbers modulo size.
+ * @hide
+ */
+ public static int leftCircularDistance(int from, int to, int size) {
+ return (to + size - from) % size;
+ }
}
diff --git a/core/java/android/app/NotificationHistory.java b/core/java/android/app/NotificationHistory.java
index f26e628..d16120d 100644
--- a/core/java/android/app/NotificationHistory.java
+++ b/core/java/android/app/NotificationHistory.java
@@ -21,6 +21,7 @@
import android.graphics.drawable.Icon;
import android.os.Parcel;
import android.os.Parcelable;
+import android.text.TextUtils;
import java.util.ArrayList;
import java.util.Arrays;
@@ -51,6 +52,7 @@
private String mTitle;
private String mText;
private Icon mIcon;
+ private String mConversationId;
private HistoricalNotification() {}
@@ -94,6 +96,10 @@
return mPackage + "|" + mUid + "|" + mPostedTimeMs;
}
+ public String getConversationId() {
+ return mConversationId;
+ }
+
@Override
public String toString() {
return "HistoricalNotification{" +
@@ -104,6 +110,7 @@
", mTitle='" + mTitle + '\'' +
", mText='" + mText + '\'' +
", mIcon=" + mIcon +
+ ", mConversationId=" + mConversationId +
'}';
}
@@ -123,6 +130,7 @@
Objects.equals(getChannelId(), that.getChannelId()) &&
Objects.equals(getTitle(), that.getTitle()) &&
Objects.equals(getText(), that.getText()) &&
+ Objects.equals(getConversationId(), that.getConversationId()) &&
iconsAreSame;
}
@@ -130,7 +138,7 @@
public int hashCode() {
return Objects.hash(getPackage(), getChannelName(), getChannelId(), getUid(),
getUserId(),
- getPostedTimeMs(), getTitle(), getText(), getIcon());
+ getPostedTimeMs(), getTitle(), getText(), getIcon(), getConversationId());
}
public static final class Builder {
@@ -143,6 +151,7 @@
private String mTitle;
private String mText;
private Icon mIcon;
+ private String mConversationId;
public Builder() {}
@@ -191,6 +200,11 @@
return this;
}
+ public Builder setConversationId(String conversationId) {
+ mConversationId = conversationId;
+ return this;
+ }
+
public HistoricalNotification build() {
HistoricalNotification n = new HistoricalNotification();
n.mPackage = mPackage;
@@ -202,6 +216,7 @@
n.mTitle = mTitle;
n.mText = mText;
n.mIcon = mIcon;
+ n.mConversationId = mConversationId;
return n;
}
}
@@ -299,6 +314,9 @@
mStringsToWrite.add(notification.getPackage());
mStringsToWrite.add(notification.getChannelName());
mStringsToWrite.add(notification.getChannelId());
+ if (!TextUtils.isEmpty(notification.getConversationId())) {
+ mStringsToWrite.add(notification.getConversationId());
+ }
}
}
@@ -423,9 +441,17 @@
channelIdIndex = -1;
}
+ final int conversationIdIndex;
+ if (!TextUtils.isEmpty(notification.getConversationId())) {
+ conversationIdIndex = findStringIndex(notification.getConversationId());
+ } else {
+ conversationIdIndex = -1;
+ }
+
p.writeInt(packageIndex);
p.writeInt(channelNameIndex);
p.writeInt(channelIdIndex);
+ p.writeInt(conversationIdIndex);
p.writeInt(notification.getUid());
p.writeInt(notification.getUserId());
p.writeLong(notification.getPostedTimeMs());
@@ -461,6 +487,13 @@
notificationOut.setChannelId(null);
}
+ final int conversationIdIndex = p.readInt();
+ if (conversationIdIndex >= 0) {
+ notificationOut.setConversationId(mStringPool[conversationIdIndex]);
+ } else {
+ notificationOut.setConversationId(null);
+ }
+
notificationOut.setUid(p.readInt());
notificationOut.setUserId(p.readInt());
notificationOut.setPostedTimeMs(p.readLong());
diff --git a/core/java/android/app/RuntimeAppOpAccessMessage.aidl b/core/java/android/app/RuntimeAppOpAccessMessage.aidl
new file mode 100644
index 0000000..68e8819
--- /dev/null
+++ b/core/java/android/app/RuntimeAppOpAccessMessage.aidl
@@ -0,0 +1,19 @@
+/*
+ * Copyright (C) 2019 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.app;
+
+parcelable RuntimeAppOpAccessMessage;
diff --git a/core/java/android/app/RuntimeAppOpAccessMessage.java b/core/java/android/app/RuntimeAppOpAccessMessage.java
new file mode 100644
index 0000000..a81b8e7
--- /dev/null
+++ b/core/java/android/app/RuntimeAppOpAccessMessage.java
@@ -0,0 +1,245 @@
+/*
+ * Copyright (C) 2019 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.app;
+
+import android.annotation.IntRange;
+import android.annotation.NonNull;
+import android.annotation.Nullable;
+import android.annotation.SystemApi;
+import android.annotation.TestApi;
+import android.os.Parcel;
+import android.os.Parcelable;
+
+import com.android.internal.annotations.Immutable;
+import com.android.internal.util.DataClass;
+
+/**
+ * Message for noted runtime permission access.
+ * @hide
+ */
+@Immutable
+@TestApi
+@SystemApi
+/*@DataClass(genConstructor = false)
+@DataClass.Suppress("getOpCode")*/
+public final class RuntimeAppOpAccessMessage implements Parcelable {
+ /** Uid of package for which runtime app op access message was collected */
+ private final @IntRange(from = 0L) int mUid;
+ /** Op code of operation access which was collected */
+ private final @IntRange(from = 0L, to = AppOpsManager._NUM_OP - 1) int mOpCode;
+ /** Name of package for which runtime app op access message was collected */
+ private final @NonNull String mPackageName;
+ /** Feature of package for which runtime app op access message was collected */
+ private final @Nullable String mFeatureId;
+ /** Message collected (including stacktrace for synchronous ops) */
+ private final @NonNull String mMessage;
+ /** Sampling strategy used to collect this message. */
+ private final @AppOpsManager.SamplingStrategy int mSamplingStrategy;
+
+ public @NonNull String getOp() {
+ return AppOpsManager.opToPublicName(mOpCode);
+ }
+
+ /**
+ * Creates a new RuntimeAppOpAccessMessage.
+ *
+ * @param uid
+ * Uid of package for which runtime app op access message was collected
+ * @param opCode
+ * Op code of operation access which was collected
+ * @param packageName
+ * Name of package for which runtime app op access message was collected
+ * @param featureId
+ * Feature of package for which runtime app op access message was collected
+ * @param message
+ * Message collected (including stacktrace for synchronous ops)
+ * @param samplingStrategy
+ * Sampling strategy used to collect this message.
+ */
+ @DataClass.Generated.Member
+ public RuntimeAppOpAccessMessage(
+ @IntRange(from = 0L) int uid,
+ @IntRange(from = 0L) int opCode,
+ @NonNull String packageName,
+ @Nullable String featureId,
+ @NonNull String message,
+ @AppOpsManager.SamplingStrategy int samplingStrategy) {
+ this.mUid = uid;
+ com.android.internal.util.AnnotationValidations.validate(
+ IntRange.class, null, mUid,
+ "from", 0L);
+ this.mOpCode = opCode;
+ com.android.internal.util.AnnotationValidations.validate(
+ IntRange.class, null, mOpCode,
+ "from", 0L,
+ "to", AppOpsManager._NUM_OP - 1);
+ this.mPackageName = packageName;
+ com.android.internal.util.AnnotationValidations.validate(
+ NonNull.class, null, mPackageName);
+ this.mFeatureId = featureId;
+ this.mMessage = message;
+ com.android.internal.util.AnnotationValidations.validate(
+ NonNull.class, null, mMessage);
+ this.mSamplingStrategy = samplingStrategy;
+ com.android.internal.util.AnnotationValidations.validate(
+ AppOpsManager.SamplingStrategy.class, null, mSamplingStrategy);
+
+ // onConstructed(); // You can define this method to get a callback
+ }
+
+
+
+
+ // Code below generated by codegen v1.0.14.
+ //
+ // DO NOT MODIFY!
+ // CHECKSTYLE:OFF Generated code
+ //
+ // To regenerate run:
+ // $ codegen $ANDROID_BUILD_TOP/frameworks/base/core/java/android/app/RuntimeAppOpAccessMessage.java
+ //
+ // To exclude the generated code from IntelliJ auto-formatting enable (one-time):
+ // Settings > Editor > Code Style > Formatter Control
+ //@formatter:off
+
+
+ /**
+ * Uid of package for which runtime app op access message was collected
+ */
+ @DataClass.Generated.Member
+ public @IntRange(from = 0L) int getUid() {
+ return mUid;
+ }
+
+ /**
+ * Name of package for which runtime app op access message was collected
+ */
+ @DataClass.Generated.Member
+ public @NonNull String getPackageName() {
+ return mPackageName;
+ }
+
+ /**
+ * Feature of package for which runtime app op access message was collected
+ */
+ @DataClass.Generated.Member
+ public @Nullable String getFeatureId() {
+ return mFeatureId;
+ }
+
+ /**
+ * Message collected (including stacktrace for synchronous ops)
+ */
+ @DataClass.Generated.Member
+ public @NonNull String getMessage() {
+ return mMessage;
+ }
+
+ /**
+ * Sampling strategy used to collect this message.
+ */
+ @DataClass.Generated.Member
+ public @AppOpsManager.SamplingStrategy int getSamplingStrategy() {
+ return mSamplingStrategy;
+ }
+
+ @Override
+ @DataClass.Generated.Member
+ public void writeToParcel(@NonNull Parcel dest, int flags) {
+ // You can override field parcelling by defining methods like:
+ // void parcelFieldName(Parcel dest, int flags) { ... }
+
+ byte flg = 0;
+ if (mFeatureId != null) flg |= 0x8;
+ dest.writeByte(flg);
+ dest.writeInt(mUid);
+ dest.writeInt(mOpCode);
+ dest.writeString(mPackageName);
+ if (mFeatureId != null) dest.writeString(mFeatureId);
+ dest.writeString(mMessage);
+ dest.writeInt(mSamplingStrategy);
+ }
+
+ @Override
+ @DataClass.Generated.Member
+ public int describeContents() { return 0; }
+
+ /** @hide */
+ @SuppressWarnings({"unchecked", "RedundantCast"})
+ @DataClass.Generated.Member
+ /* package-private */ RuntimeAppOpAccessMessage(@NonNull Parcel in) {
+ // You can override field unparcelling by defining methods like:
+ // static FieldType unparcelFieldName(Parcel in) { ... }
+
+ byte flg = in.readByte();
+ int uid = in.readInt();
+ int opCode = in.readInt();
+ String packageName = in.readString();
+ String featureId = (flg & 0x8) == 0 ? null : in.readString();
+ String message = in.readString();
+ int samplingStrategy = in.readInt();
+
+ this.mUid = uid;
+ com.android.internal.util.AnnotationValidations.validate(
+ IntRange.class, null, mUid,
+ "from", 0L);
+ this.mOpCode = opCode;
+ com.android.internal.util.AnnotationValidations.validate(
+ IntRange.class, null, mOpCode,
+ "from", 0L,
+ "to", AppOpsManager._NUM_OP - 1);
+ this.mPackageName = packageName;
+ com.android.internal.util.AnnotationValidations.validate(
+ NonNull.class, null, mPackageName);
+ this.mFeatureId = featureId;
+ this.mMessage = message;
+ com.android.internal.util.AnnotationValidations.validate(
+ NonNull.class, null, mMessage);
+ this.mSamplingStrategy = samplingStrategy;
+ com.android.internal.util.AnnotationValidations.validate(
+ AppOpsManager.SamplingStrategy.class, null, mSamplingStrategy);
+
+ // onConstructed(); // You can define this method to get a callback
+ }
+
+ @DataClass.Generated.Member
+ public static final @NonNull Parcelable.Creator<RuntimeAppOpAccessMessage> CREATOR
+ = new Parcelable.Creator<RuntimeAppOpAccessMessage>() {
+ @Override
+ public RuntimeAppOpAccessMessage[] newArray(int size) {
+ return new RuntimeAppOpAccessMessage[size];
+ }
+
+ @Override
+ public RuntimeAppOpAccessMessage createFromParcel(@NonNull Parcel in) {
+ return new RuntimeAppOpAccessMessage(in);
+ }
+ };
+
+ /*@DataClass.Generated(
+ time = 1581517099127L,
+ codegenVersion = "1.0.14",
+ sourceFile = "frameworks/base/core/java/android/app/RuntimeAppOpAccessMessage.java",
+ inputSignatures = "private final @android.annotation.IntRange(from=0L) int mUid\nprivate final @android.annotation.IntRange(from=0L, to=AppOpsManager._NUM_OP - 1) int mOpCode\nprivate final @android.annotation.NonNull java.lang.String mPackageName\nprivate final @android.annotation.Nullable java.lang.String mFeatureId\nprivate final @android.annotation.NonNull java.lang.String mMessage\nprivate final @android.app.AppOpsManager.SamplingStrategy int mSamplingStrategy\npublic @android.annotation.NonNull java.lang.String getOp()\nclass RuntimeAppOpAccessMessage extends java.lang.Object implements [android.os.Parcelable]\n@com.android.internal.util.DataClass(genConstructor=false)")*/
+ @Deprecated
+ private void __metadata() {}
+
+
+ //@formatter:on
+ // End of generated code
+
+}
diff --git a/core/java/android/app/SyncNotedAppOp.aidl b/core/java/android/app/SyncNotedAppOp.aidl
new file mode 100644
index 0000000..ab062d2
--- /dev/null
+++ b/core/java/android/app/SyncNotedAppOp.aidl
@@ -0,0 +1,19 @@
+/*
+ * Copyright (C) 2019 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.app;
+
+parcelable SyncNotedAppOp;
diff --git a/core/java/android/app/SyncNotedAppOp.java b/core/java/android/app/SyncNotedAppOp.java
index 065d5de..aa11b95 100644
--- a/core/java/android/app/SyncNotedAppOp.java
+++ b/core/java/android/app/SyncNotedAppOp.java
@@ -19,8 +19,10 @@
import android.annotation.IntRange;
import android.annotation.NonNull;
import android.annotation.Nullable;
+import android.os.Parcelable;
import com.android.internal.annotations.Immutable;
+import com.android.internal.util.DataClass;
/**
* Description of an app-op that was noted for the current process.
@@ -32,48 +34,154 @@
* itself}.
*/
@Immutable
-public final class SyncNotedAppOp {
- private final int mOpCode;
+/*@DataClass(
+ genEqualsHashCode = true,
+ genConstructor = false
+)
+@DataClass.Suppress("getOpCode")*/
+public final class SyncNotedAppOp implements Parcelable {
+
+ /** op code of synchronous appop noted */
+ private final @IntRange(from = 0L, to = AppOpsManager._NUM_OP - 1) int mOpCode;
+ /** featureId of synchronous appop noted */
private final @Nullable String mFeatureId;
/**
+ * Creates a new SyncNotedAppOp.
+ *
+ * @param opCode
+ * op code of synchronous appop noted
+ * @param featureId
+ * featureId of synchronous appop noted
+ */
+ public SyncNotedAppOp(@IntRange(from = 0L) int opCode, @Nullable String featureId) {
+ this.mOpCode = opCode;
+ com.android.internal.util.AnnotationValidations.validate(
+ IntRange.class, null, mOpCode,
+ "from", 0,
+ "to", AppOpsManager._NUM_OP - 1);
+ this.mFeatureId = featureId;
+ }
+
+ /**
* @return The op that was noted.
*/
public @NonNull String getOp() {
return AppOpsManager.opToPublicName(mOpCode);
}
+ // Code below generated by codegen v1.0.14.
+ //
+ // DO NOT MODIFY!
+ // CHECKSTYLE:OFF Generated code
+ //
+ // To regenerate run:
+ // $ codegen $ANDROID_BUILD_TOP/frameworks/base/core/java/android/app/SyncNotedAppOp.java
+ //
+ // To exclude the generated code from IntelliJ auto-formatting enable (one-time):
+ // Settings > Editor > Code Style > Formatter Control
+ //@formatter:off
+
+
/**
- * @return The {@link android.content.Context#createFeatureContext Feature} in the app
+ * featureId of synchronous appop noted
*/
+ @DataClass.Generated.Member
public @Nullable String getFeatureId() {
return mFeatureId;
}
- /**
- * Create a new sync op description
- *
- * @param opCode The op that was noted
- *
- * @hide
- */
- public SyncNotedAppOp(@IntRange(from = 0, to = AppOpsManager._NUM_OP - 1) int opCode,
- @Nullable String featureId) {
- mOpCode = opCode;
- mFeatureId = featureId;
+ @Override
+ @DataClass.Generated.Member
+ public boolean equals(@Nullable Object o) {
+ // You can override field equality logic by defining either of the methods like:
+ // boolean fieldNameEquals(SyncNotedAppOp other) { ... }
+ // boolean fieldNameEquals(FieldType otherValue) { ... }
+
+ if (this == o) return true;
+ if (o == null || getClass() != o.getClass()) return false;
+ @SuppressWarnings("unchecked")
+ SyncNotedAppOp that = (SyncNotedAppOp) o;
+ //noinspection PointlessBooleanExpression
+ return true
+ && mOpCode == that.mOpCode
+ && java.util.Objects.equals(mFeatureId, that.mFeatureId);
}
@Override
- public boolean equals(Object other) {
- if (!(other instanceof SyncNotedAppOp)) {
- return false;
+ @DataClass.Generated.Member
+ public int hashCode() {
+ // You can override field hashCode logic by defining methods like:
+ // int fieldNameHashCode() { ... }
+
+ int _hash = 1;
+ _hash = 31 * _hash + mOpCode;
+ _hash = 31 * _hash + java.util.Objects.hashCode(mFeatureId);
+ return _hash;
+ }
+
+ @Override
+ @DataClass.Generated.Member
+ public void writeToParcel(@NonNull android.os.Parcel dest, int flags) {
+ // You can override field parcelling by defining methods like:
+ // void parcelFieldName(Parcel dest, int flags) { ... }
+
+ byte flg = 0;
+ if (mFeatureId != null) flg |= 0x2;
+ dest.writeByte(flg);
+ dest.writeInt(mOpCode);
+ if (mFeatureId != null) dest.writeString(mFeatureId);
+ }
+
+ @Override
+ @DataClass.Generated.Member
+ public int describeContents() { return 0; }
+
+ /** @hide */
+ @SuppressWarnings({"unchecked", "RedundantCast"})
+ @DataClass.Generated.Member
+ /* package-private */ SyncNotedAppOp(@NonNull android.os.Parcel in) {
+ // You can override field unparcelling by defining methods like:
+ // static FieldType unparcelFieldName(Parcel in) { ... }
+
+ byte flg = in.readByte();
+ int opCode = in.readInt();
+ String featureId = (flg & 0x2) == 0 ? null : in.readString();
+
+ this.mOpCode = opCode;
+ com.android.internal.util.AnnotationValidations.validate(
+ IntRange.class, null, mOpCode,
+ "from", 0,
+ "to", AppOpsManager._NUM_OP - 1);
+ this.mFeatureId = featureId;
+
+ // onConstructed(); // You can define this method to get a callback
+ }
+
+ @DataClass.Generated.Member
+ public static final @NonNull Parcelable.Creator<SyncNotedAppOp> CREATOR
+ = new Parcelable.Creator<SyncNotedAppOp>() {
+ @Override
+ public SyncNotedAppOp[] newArray(int size) {
+ return new SyncNotedAppOp[size];
}
- return mOpCode == ((SyncNotedAppOp) other).mOpCode;
- }
+ @Override
+ public SyncNotedAppOp createFromParcel(@NonNull android.os.Parcel in) {
+ return new SyncNotedAppOp(in);
+ }
+ };
- @Override
- public int hashCode() {
- return mOpCode;
- }
+ /*@DataClass.Generated(
+ time = 1579188889960L,
+ codegenVersion = "1.0.14",
+ sourceFile = "frameworks/base/core/java/android/app/SyncNotedAppOp.java",
+ inputSignatures = "private final @android.annotation.IntRange(from=0L, to=AppOpsManager._NUM_OP - 1) int mOpCode\nprivate final @android.annotation.Nullable java.lang.String mFeatureId\npublic @android.annotation.NonNull java.lang.String getOp()\npublic @android.annotation.SystemApi int getOpCode()\nclass SyncNotedAppOp extends java.lang.Object implements [android.os.Parcelable]\n@com.android.internal.util.DataClass(genEqualsHashCode=true, genConstructor=false)")*/
+ @Deprecated
+ private void __metadata() {}
+
+
+ //@formatter:on
+ // End of generated code
+
}
diff --git a/core/java/android/app/admin/DevicePolicyManager.java b/core/java/android/app/admin/DevicePolicyManager.java
index 4a5a23a..40b81dd 100644
--- a/core/java/android/app/admin/DevicePolicyManager.java
+++ b/core/java/android/app/admin/DevicePolicyManager.java
@@ -11580,13 +11580,16 @@
}
/**
- * Sets the set of package names that are allowed to request user consent for cross-profile
- * communication.
+ * Sets the set of admin-whitelisted package names that are allowed to request user consent for
+ * cross-profile communication.
*
* <p>Assumes that the caller is a profile owner and is the given {@code admin}.
*
* <p>Previous calls are overridden by each subsequent call to this method.
*
+ * <p>Note that other apps may be able to request user consent for cross-profile communication
+ * if they have been explicitly whitelisted by the OEM.
+ *
* <p>When previously-set cross-profile packages are missing from {@code packageNames}, the
* app-op for {@code INTERACT_ACROSS_PROFILES} will be reset for those packages. This will not
* occur for packages that are whitelisted by the OEM.
@@ -11608,15 +11611,18 @@
/**
* Returns the set of package names that the admin has previously set as allowed to request user
- * consent for cross-profile communication, via {@link
- * #setCrossProfilePackages(ComponentName, Set)}.
+ * consent for cross-profile communication, via {@link #setCrossProfilePackages(ComponentName,
+ * Set)}.
*
* <p>Assumes that the caller is a profile owner and is the given {@code admin}.
*
+ * <p>Note that other apps not included in the returned set may be able to request user consent
+ * for cross-profile communication if they have been explicitly whitelisted by the OEM.
+ *
* @param admin the {@link DeviceAdminReceiver} this request is associated with
* @return the set of package names the admin has previously set as allowed to request user
- * consent for cross-profile communication, via {@link
- * #setCrossProfilePackages(ComponentName, Set)}
+ * consent for cross-profile communication, via {@link #setCrossProfilePackages(ComponentName,
+ * Set)}
*/
public @NonNull Set<String> getCrossProfilePackages(@NonNull ComponentName admin) {
throwIfParentInstance("getCrossProfilePackages");
@@ -11634,18 +11640,17 @@
* Returns the combined set of the following:
* <ul>
* <li>The package names that the admin has previously set as allowed to request user consent
- * for cross-profile communication, via {@link
- * #setCrossProfilePackages(ComponentName, Set)}.</li>
+ * for cross-profile communication, via {@link #setCrossProfilePackages(ComponentName,
+ * Set)}.</li>
* <li>The default package names set by the OEM that are allowed to request user consent for
- * cross-profile communication without being explicitly enabled by the admin, via
- * {@link com.android.internal.R.array#cross_profile_apps} and
- * {@link com.android.internal.R.array#vendor_cross_profile_apps}.</li>
+ * cross-profile communication without being explicitly enabled by the admin, via {@link
+ * com.android.internal.R.array#cross_profile_apps} and {@link com.android.internal.R.array
+ * #vendor_cross_profile_apps}.</li>
* </ul>
*
* @return the combined set of whitelisted package names set via
- * {@link #setCrossProfilePackages(ComponentName, Set)},
- * {@link com.android.internal.R.array#cross_profile_apps},
- * and {@link com.android.internal.R.array#vendor_cross_profile_apps}.
+ * {@link #setCrossProfilePackages(ComponentName, Set)}, {@link com.android.internal.R.array
+ * #cross_profile_apps}, and {@link com.android.internal.R.array#vendor_cross_profile_apps}.
*
* @hide
*/
@@ -11668,9 +11673,9 @@
/**
* Returns the default package names set by the OEM that are allowed to request user consent for
- * cross-profile communication without being explicitly enabled by the admin, via
- * {@link com.android.internal.R.array#cross_profile_apps} and
- * {@link com.android.internal.R.array#vendor_cross_profile_apps}.
+ * cross-profile communication without being explicitly enabled by the admin, via {@link
+ * com.android.internal.R.array#cross_profile_apps} and {@link com.android.internal.R.array
+ * #vendor_cross_profile_apps}.
*
* @hide
*/
diff --git a/core/java/android/content/Intent.java b/core/java/android/content/Intent.java
index 0f88c90..2e591ca 100644
--- a/core/java/android/content/Intent.java
+++ b/core/java/android/content/Intent.java
@@ -6767,7 +6767,7 @@
this.mClipData = new ClipData(o.mClipData);
}
} else {
- if (o.mExtras != null && !o.mExtras.maybeIsEmpty()) {
+ if (o.mExtras != null && !o.mExtras.isDefinitelyEmpty()) {
this.mExtras = Bundle.STRIPPED;
}
diff --git a/core/java/android/content/pm/CrossProfileApps.java b/core/java/android/content/pm/CrossProfileApps.java
index 50841c3..eb1da67 100644
--- a/core/java/android/content/pm/CrossProfileApps.java
+++ b/core/java/android/content/pm/CrossProfileApps.java
@@ -47,8 +47,15 @@
public class CrossProfileApps {
/**
- * Broadcast signalling that the receiving app's ability to interact across profiles has
- * changed, as defined by the return value of {@link #canInteractAcrossProfiles()}.
+ * Broadcast signalling that the receiving app's permission to interact across profiles has
+ * changed. This includes the user, admin, or OEM changing their consent such that the
+ * permission for the app to interact across profiles has changed.
+ *
+ * <p>This broadcast is not sent when other circumstances result in a change to being able to
+ * interact across profiles in practice, such as the profile being turned off or removed, apps
+ * being uninstalled, etc. The methods {@link #canInteractAcrossProfiles()} and {@link
+ * #canRequestInteractAcrossProfiles()} can be used by apps prior to attempting to interact
+ * across profiles or attempting to request user consent to interact across profiles.
*
* <p>Apps that have set the {@code android:crossProfile} manifest attribute to {@code true}
* can receive this broadcast in manifest broadcast receivers. Otherwise, it can only be
@@ -99,8 +106,11 @@
/**
* Starts the specified activity of the caller package in the specified profile.
*
- * <p>The caller must have the {@link android.Manifest.permission#INTERACT_ACROSS_PROFILES}
- * permission and both the caller and target user profiles must be in the same profile group.
+ * <p>The caller must have the {@link android.Manifest.permission#INTERACT_ACROSS_PROFILES},
+ * {@code android.Manifest.permission#INTERACT_ACROSS_USERS}, or {@code
+ * android.Manifest.permission#INTERACT_ACROSS_USERS_FULL} permission. Both the caller and
+ * target user profiles must be in the same profile group. The target user must be a valid user
+ * returned from {@link #getTargetUserProfiles()}.
*
* @param intent The intent to launch. A component in the caller package must be specified.
* @param targetUser The {@link UserHandle} of the profile; must be one of the users returned by
@@ -219,10 +229,11 @@
}
/**
- * Returns whether the calling package can request to interact across profiles.
+ * Returns whether the calling package can request user consent to interact across profiles.
*
- * <p>The package's current ability to interact across profiles can be checked with
- * {@link #canInteractAcrossProfiles()}.
+ * <p>If {@code true}, user consent can be obtained via {@link
+ * #createRequestInteractAcrossProfilesIntent()}. The package can then listen to {@link
+ * #ACTION_CAN_INTERACT_ACROSS_PROFILES_CHANGED} broadcasts.
*
* <p>Specifically, returns whether the following are all true:
* <ul>
@@ -235,6 +246,10 @@
* </li>
* </ul>
*
+ * <p>Note that user consent could already be granted if given a return value of {@code true}.
+ * The package's current ability to interact across profiles can be checked with {@link
+ * #canInteractAcrossProfiles()}.
+ *
* @return true if the calling package can request to interact across profiles.
*/
public boolean canRequestInteractAcrossProfiles() {
@@ -247,10 +262,7 @@
/**
* Returns whether the calling package can interact across profiles.
- *
- * <p>The package's current ability to request to interact across profiles can be checked with
- * {@link #canRequestInteractAcrossProfiles()}.
- *
+
* <p>Specifically, returns whether the following are all true:
* <ul>
* <li>{@link #getTargetUserProfiles()} returns a non-empty list for the calling user.</li>
@@ -262,6 +274,11 @@
* </li>
* </ul>
*
+ * <p>If {@code false}, the package's current ability to request user consent to interact across
+ * profiles can be checked with {@link #canRequestInteractAcrossProfiles()}. If {@code true},
+ * user consent can be obtained via {@link #createRequestInteractAcrossProfilesIntent()}. The
+ * package can then listen to {@link #ACTION_CAN_INTERACT_ACROSS_PROFILES_CHANGED} broadcasts.
+ *
* @return true if the calling package can interact across profiles.
* @throws SecurityException if {@code mContext.getPackageName()} does not belong to the
* calling UID.
@@ -276,11 +293,15 @@
/**
* Returns an {@link Intent} to open the settings page that allows the user to decide whether
- * the calling app can interact across profiles. The current state is given by
- * {@link #canInteractAcrossProfiles()}.
+ * the calling app can interact across profiles.
*
* <p>Returns {@code null} if {@link #canRequestInteractAcrossProfiles()} is {@code false}.
*
+ * <p>Note that the user may already have given consent and the app may already be able to
+ * interact across profiles, even if {@link #canRequestInteractAcrossProfiles()} is {@code
+ * true}. The current ability to interact across profiles is given by {@link
+ * #canInteractAcrossProfiles()}.
+ *
* @return an {@link Intent} to open the settings page that allows the user to decide whether
* the app can interact across profiles
*
diff --git a/core/java/android/content/pm/parsing/AndroidPackage.java b/core/java/android/content/pm/parsing/AndroidPackage.java
index da17ff3..b93c3a2 100644
--- a/core/java/android/content/pm/parsing/AndroidPackage.java
+++ b/core/java/android/content/pm/parsing/AndroidPackage.java
@@ -397,6 +397,8 @@
boolean hasComponentClassName(String className);
+ boolean hasPreserveLegacyExternalStorage();
+
// App Info
boolean hasRequestedLegacyExternalStorage();
diff --git a/core/java/android/content/pm/parsing/ApkParseUtils.java b/core/java/android/content/pm/parsing/ApkParseUtils.java
index a267113..905794b 100644
--- a/core/java/android/content/pm/parsing/ApkParseUtils.java
+++ b/core/java/android/content/pm/parsing/ApkParseUtils.java
@@ -2101,6 +2101,10 @@
parsingPackage.setAllowNativeHeapPointerTagging(sa.getBoolean(
R.styleable.AndroidManifestApplication_allowNativeHeapPointerTagging, true));
+ parsingPackage.setPreserveLegacyExternalStorage(sa.getBoolean(
+ R.styleable.AndroidManifestApplication_preserveLegacyExternalStorage,
+ false));
+
parsingPackage
.setMaxAspectRatio(
sa.getFloat(R.styleable.AndroidManifestApplication_maxAspectRatio, 0))
diff --git a/core/java/android/content/pm/parsing/PackageImpl.java b/core/java/android/content/pm/parsing/PackageImpl.java
index 778d7b8..180714a 100644
--- a/core/java/android/content/pm/parsing/PackageImpl.java
+++ b/core/java/android/content/pm/parsing/PackageImpl.java
@@ -289,6 +289,7 @@
private String[] usesLibraryFiles;
private List<SharedLibraryInfo> usesLibraryInfos;
private String zygotePreloadName;
+ private boolean preserveLegacyExternalStorage;
@VisibleForTesting
public PackageImpl(
@@ -1519,6 +1520,12 @@
}
@Override
+ public PackageImpl setPreserveLegacyExternalStorage(boolean preserveLegacyExternalStorage) {
+ this.preserveLegacyExternalStorage = preserveLegacyExternalStorage;
+ return this;
+ }
+
+ @Override
public PackageImpl setUsesNonSdkApi(boolean usesNonSdkApi) {
this.privateFlags = usesNonSdkApi
? this.privateFlags | ApplicationInfo.PRIVATE_FLAG_USES_NON_SDK_API
@@ -2999,6 +3006,11 @@
return queriesProviders;
}
+ @Override
+ public boolean hasPreserveLegacyExternalStorage() {
+ return preserveLegacyExternalStorage;
+ }
+
private static void internStringArrayList(List<String> list) {
if (list != null) {
final int N = list.size();
diff --git a/core/java/android/content/pm/parsing/ParsingPackage.java b/core/java/android/content/pm/parsing/ParsingPackage.java
index 954d65c..74a2640 100644
--- a/core/java/android/content/pm/parsing/ParsingPackage.java
+++ b/core/java/android/content/pm/parsing/ParsingPackage.java
@@ -192,6 +192,8 @@
ParsingPackage setRequestLegacyExternalStorage(boolean requestLegacyExternalStorage);
ParsingPackage setAllowNativeHeapPointerTagging(boolean allowNativeHeapPointerTagging);
+
+ ParsingPackage setPreserveLegacyExternalStorage(boolean preserveLegacyExternalStorage);
ParsingPackage setRestoreAnyVersion(boolean restoreAnyVersion);
diff --git a/core/java/android/hardware/display/DisplayManager.java b/core/java/android/hardware/display/DisplayManager.java
index 25b84c5..65f45d8 100644
--- a/core/java/android/hardware/display/DisplayManager.java
+++ b/core/java/android/hardware/display/DisplayManager.java
@@ -80,7 +80,7 @@
* Display category: Presentation displays.
* <p>
* This category can be used to identify secondary displays that are suitable for
- * use as presentation displays such as HDMI or Wireless displays. Applications
+ * use as presentation displays such as external or wireless displays. Applications
* may automatically project their content to presentation displays to provide
* richer second screen experiences.
* </p>
@@ -100,7 +100,7 @@
* When this flag is set, the virtual display is public.
* </p><p>
* A public virtual display behaves just like most any other display that is connected
- * to the system such as an HDMI or Wireless display. Applications can open
+ * to the system such as an external or wireless display. Applications can open
* windows on the display and the system may mirror the contents of other displays
* onto it.
* </p><p>
@@ -364,7 +364,7 @@
addAllDisplaysLocked(mTempDisplays, displayIds);
} else if (category.equals(DISPLAY_CATEGORY_PRESENTATION)) {
addPresentationDisplaysLocked(mTempDisplays, displayIds, Display.TYPE_WIFI);
- addPresentationDisplaysLocked(mTempDisplays, displayIds, Display.TYPE_HDMI);
+ addPresentationDisplaysLocked(mTempDisplays, displayIds, Display.TYPE_EXTERNAL);
addPresentationDisplaysLocked(mTempDisplays, displayIds, Display.TYPE_OVERLAY);
addPresentationDisplaysLocked(mTempDisplays, displayIds, Display.TYPE_VIRTUAL);
}
diff --git a/core/java/android/inputmethodservice/InlineSuggestionSession.java b/core/java/android/inputmethodservice/InlineSuggestionSession.java
new file mode 100644
index 0000000..edae06a
--- /dev/null
+++ b/core/java/android/inputmethodservice/InlineSuggestionSession.java
@@ -0,0 +1,158 @@
+/*
+ * Copyright (C) 2020 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.inputmethodservice;
+
+import static android.inputmethodservice.InputMethodService.DEBUG;
+
+import static com.android.internal.util.function.pooled.PooledLambda.obtainMessage;
+
+import android.annotation.NonNull;
+import android.content.ComponentName;
+import android.os.Handler;
+import android.os.IBinder;
+import android.os.Looper;
+import android.os.RemoteException;
+import android.util.Log;
+import android.view.inputmethod.InlineSuggestionsRequest;
+import android.view.inputmethod.InlineSuggestionsResponse;
+
+import com.android.internal.view.IInlineSuggestionsRequestCallback;
+import com.android.internal.view.IInlineSuggestionsResponseCallback;
+
+import java.lang.ref.WeakReference;
+import java.util.function.Consumer;
+import java.util.function.Supplier;
+
+/**
+ * Maintains an active inline suggestion session.
+ *
+ * <p>
+ * Each session corresponds to one inline suggestion request, but there may be multiple callbacks
+ * with the inline suggestions response.
+ */
+class InlineSuggestionSession {
+
+ private static final String TAG = InlineSuggestionSession.class.getSimpleName();
+
+ private final Handler mHandler = new Handler(Looper.getMainLooper(), null, true);
+
+ @NonNull
+ private final ComponentName mComponentName;
+ @NonNull
+ private final IInlineSuggestionsRequestCallback mCallback;
+ @NonNull
+ private final InlineSuggestionsResponseCallbackImpl mResponseCallback;
+ @NonNull
+ private final Supplier<String> mClientPackageNameSupplier;
+ @NonNull
+ private final Supplier<InlineSuggestionsRequest> mRequestSupplier;
+ @NonNull
+ private final Supplier<IBinder> mHostInputTokenSupplier;
+ @NonNull
+ private final Consumer<InlineSuggestionsResponse> mResponseConsumer;
+
+ private volatile boolean mInvalidated = false;
+
+ InlineSuggestionSession(@NonNull ComponentName componentName,
+ @NonNull IInlineSuggestionsRequestCallback callback,
+ @NonNull Supplier<String> clientPackageNameSupplier,
+ @NonNull Supplier<InlineSuggestionsRequest> requestSupplier,
+ @NonNull Supplier<IBinder> hostInputTokenSupplier,
+ @NonNull Consumer<InlineSuggestionsResponse> responseConsumer) {
+ mComponentName = componentName;
+ mCallback = callback;
+ mResponseCallback = new InlineSuggestionsResponseCallbackImpl(this);
+ mClientPackageNameSupplier = clientPackageNameSupplier;
+ mRequestSupplier = requestSupplier;
+ mHostInputTokenSupplier = hostInputTokenSupplier;
+ mResponseConsumer = responseConsumer;
+
+ makeInlineSuggestionsRequest();
+ }
+
+ /**
+ * This needs to be called before creating a new session, such that the later response callbacks
+ * will be discarded.
+ */
+ void invalidateSession() {
+ mInvalidated = true;
+ }
+
+ /**
+ * Sends an {@link InlineSuggestionsRequest} obtained from {@cocde supplier} to the current
+ * Autofill Session through
+ * {@link IInlineSuggestionsRequestCallback#onInlineSuggestionsRequest}.
+ */
+ private void makeInlineSuggestionsRequest() {
+ try {
+ final InlineSuggestionsRequest request = mRequestSupplier.get();
+ if (request == null) {
+ if (DEBUG) {
+ Log.d(TAG, "onCreateInlineSuggestionsRequest() returned null request");
+ }
+ mCallback.onInlineSuggestionsUnsupported();
+ } else {
+ request.setHostInputToken(mHostInputTokenSupplier.get());
+ mCallback.onInlineSuggestionsRequest(request, mResponseCallback);
+ }
+ } catch (RemoteException e) {
+ Log.w(TAG, "makeInlinedSuggestionsRequest() remote exception:" + e);
+ }
+ }
+
+ private void handleOnInlineSuggestionsResponse(@NonNull InlineSuggestionsResponse response) {
+ if (mInvalidated) {
+ if (DEBUG) {
+ Log.d(TAG, "handleOnInlineSuggestionsResponse() called on invalid session");
+ }
+ return;
+ }
+ // TODO(b/149522488): checking the current focused input field to make sure we don't send
+ // inline responses for previous input field
+ if (!mComponentName.getPackageName().equals(mClientPackageNameSupplier.get())) {
+ if (DEBUG) {
+ Log.d(TAG, "handleOnInlineSuggestionsResponse() called on the wrong package name");
+ }
+ return;
+ }
+ mResponseConsumer.accept(response);
+ }
+
+ /**
+ * Internal implementation of {@link IInlineSuggestionsResponseCallback}.
+ */
+ static final class InlineSuggestionsResponseCallbackImpl
+ extends IInlineSuggestionsResponseCallback.Stub {
+ private final WeakReference<InlineSuggestionSession> mInlineSuggestionSession;
+
+ private InlineSuggestionsResponseCallbackImpl(
+ InlineSuggestionSession inlineSuggestionSession) {
+ mInlineSuggestionSession = new WeakReference<>(inlineSuggestionSession);
+ }
+
+ @Override
+ public void onInlineSuggestionsResponse(InlineSuggestionsResponse response)
+ throws RemoteException {
+ final InlineSuggestionSession session = mInlineSuggestionSession.get();
+ if (session != null) {
+ session.mHandler.sendMessage(obtainMessage(
+ InlineSuggestionSession::handleOnInlineSuggestionsResponse, session,
+ response));
+ }
+ }
+ }
+}
diff --git a/core/java/android/inputmethodservice/InputMethodService.java b/core/java/android/inputmethodservice/InputMethodService.java
index a95938b..b1aa67e 100644
--- a/core/java/android/inputmethodservice/InputMethodService.java
+++ b/core/java/android/inputmethodservice/InputMethodService.java
@@ -22,8 +22,6 @@
import static android.view.WindowInsets.Type.navigationBars;
import static android.view.WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS;
-import static com.android.internal.util.function.pooled.PooledLambda.obtainMessage;
-
import static java.lang.annotation.RetentionPolicy.SOURCE;
import android.annotation.AnyThread;
@@ -51,7 +49,6 @@
import android.os.Bundle;
import android.os.Handler;
import android.os.IBinder;
-import android.os.Looper;
import android.os.RemoteException;
import android.os.ResultReceiver;
import android.os.SystemClock;
@@ -102,13 +99,11 @@
import com.android.internal.inputmethod.InputMethodPrivilegedOperations;
import com.android.internal.inputmethod.InputMethodPrivilegedOperationsRegistry;
import com.android.internal.view.IInlineSuggestionsRequestCallback;
-import com.android.internal.view.IInlineSuggestionsResponseCallback;
import java.io.FileDescriptor;
import java.io.PrintWriter;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
-import java.lang.ref.WeakReference;
import java.util.Collections;
/**
@@ -450,7 +445,7 @@
final int[] mTmpLocation = new int[2];
@Nullable
- private InlineSuggestionsRequestInfo mInlineSuggestionsRequestInfo = null;
+ private InlineSuggestionSession mInlineSuggestionSession;
private boolean mAutomotiveHideNavBarForKeyboard;
private boolean mIsAutomotive;
@@ -465,8 +460,6 @@
*/
private IBinder mCurShowInputToken;
- private final Handler mHandler = new Handler(Looper.getMainLooper(), null, true);
-
final ViewTreeObserver.OnComputeInternalInsetsListener mInsetsComputer = info -> {
onComputeInsets(mTmpInsets);
if (isExtractViewShown()) {
@@ -538,7 +531,7 @@
if (DEBUG) {
Log.d(TAG, "InputMethodService received onCreateInlineSuggestionsRequest()");
}
- handleOnCreateInlineSuggestionsRequest(componentName, autofillId, cb);
+ handleOnCreateInlineSuggestionsRequest(componentName, cb);
}
/**
@@ -770,40 +763,9 @@
return false;
}
- /**
- * Sends an {@link InlineSuggestionsRequest} obtained from
- * {@link #onCreateInlineSuggestionsRequest()} to the current Autofill Session through
- * {@link IInlineSuggestionsRequestCallback#onInlineSuggestionsRequest}.
- */
- private void makeInlineSuggestionsRequest() {
- if (mInlineSuggestionsRequestInfo == null) {
- Log.w(TAG, "makeInlineSuggestionsRequest() called with null requestInfo cache");
- return;
- }
-
- final IInlineSuggestionsRequestCallback requestCallback =
- mInlineSuggestionsRequestInfo.mCallback;
- try {
- final InlineSuggestionsRequest request = onCreateInlineSuggestionsRequest();
- if (request == null) {
- Log.w(TAG, "onCreateInlineSuggestionsRequest() returned null request");
- requestCallback.onInlineSuggestionsUnsupported();
- } else {
- request.setHostInputToken(getHostInputToken());
- final IInlineSuggestionsResponseCallback inlineSuggestionsResponseCallback =
- new InlineSuggestionsResponseCallbackImpl(this,
- mInlineSuggestionsRequestInfo.mComponentName,
- mInlineSuggestionsRequestInfo.mFocusedId);
- requestCallback.onInlineSuggestionsRequest(request,
- inlineSuggestionsResponseCallback);
- }
- } catch (RemoteException e) {
- Log.w(TAG, "makeInlinedSuggestionsRequest() remote exception:" + e);
- }
- }
-
+ @MainThread
private void handleOnCreateInlineSuggestionsRequest(@NonNull ComponentName componentName,
- @NonNull AutofillId autofillId, @NonNull IInlineSuggestionsRequestCallback callback) {
+ @NonNull IInlineSuggestionsRequestCallback callback) {
if (!mInputStarted) {
try {
Log.w(TAG, "onStartInput() not called yet");
@@ -814,24 +776,20 @@
return;
}
- mInlineSuggestionsRequestInfo = new InlineSuggestionsRequestInfo(componentName, autofillId,
- callback);
-
- makeInlineSuggestionsRequest();
+ if (mInlineSuggestionSession != null) {
+ mInlineSuggestionSession.invalidateSession();
+ }
+ mInlineSuggestionSession = new InlineSuggestionSession(componentName, callback,
+ this::getEditorInfoPackageName, this::onCreateInlineSuggestionsRequest,
+ this::getHostInputToken, this::onInlineSuggestionsResponse);
}
- private void handleOnInlineSuggestionsResponse(@NonNull ComponentName componentName,
- @NonNull AutofillId autofillId, @NonNull InlineSuggestionsResponse response) {
- if (!mInlineSuggestionsRequestInfo.validate(componentName)) {
- if (DEBUG) {
- Log.d(TAG,
- "Response component=" + componentName + " differs from request component="
- + mInlineSuggestionsRequestInfo.mComponentName
- + ", ignoring response");
- }
- return;
+ @Nullable
+ private String getEditorInfoPackageName() {
+ if (mInputEditorInfo != null) {
+ return mInputEditorInfo.packageName;
}
- onInlineSuggestionsResponse(response);
+ return null;
}
/**
@@ -864,63 +822,6 @@
}
/**
- * Internal implementation of {@link IInlineSuggestionsResponseCallback}.
- */
- private static final class InlineSuggestionsResponseCallbackImpl
- extends IInlineSuggestionsResponseCallback.Stub {
- private final WeakReference<InputMethodService> mInputMethodService;
-
- private final ComponentName mRequestComponentName;
- private final AutofillId mRequestAutofillId;
-
- private InlineSuggestionsResponseCallbackImpl(InputMethodService inputMethodService,
- ComponentName componentName, AutofillId autofillId) {
- mInputMethodService = new WeakReference<>(inputMethodService);
- mRequestComponentName = componentName;
- mRequestAutofillId = autofillId;
- }
-
- @Override
- public void onInlineSuggestionsResponse(InlineSuggestionsResponse response)
- throws RemoteException {
- final InputMethodService service = mInputMethodService.get();
- if (service != null) {
- service.mHandler.sendMessage(obtainMessage(
- InputMethodService::handleOnInlineSuggestionsResponse, service,
- mRequestComponentName, mRequestAutofillId, response));
- }
- }
- }
-
- /**
- * Information about incoming requests from Autofill Frameworks for inline suggestions.
- */
- private static final class InlineSuggestionsRequestInfo {
- final ComponentName mComponentName;
- final AutofillId mFocusedId;
- final IInlineSuggestionsRequestCallback mCallback;
-
- InlineSuggestionsRequestInfo(ComponentName componentName, AutofillId focusedId,
- IInlineSuggestionsRequestCallback callback) {
- this.mComponentName = componentName;
- this.mFocusedId = focusedId;
- this.mCallback = callback;
- }
-
- /**
- * Returns whether the cached {@link ComponentName} matches the passed in activity.
- */
- public boolean validate(ComponentName componentName) {
- final boolean result = componentName.equals(mComponentName);
- if (DEBUG && !result) {
- Log.d(TAG, "Cached request info ComponentName=" + mComponentName
- + " differs from received ComponentName=" + componentName);
- }
- return result;
- }
- }
-
- /**
* Concrete implementation of
* {@link AbstractInputMethodService.AbstractInputMethodSessionImpl} that provides
* all of the standard behavior for an input method session.
diff --git a/core/java/android/os/BaseBundle.java b/core/java/android/os/BaseBundle.java
index 6453af8..81deba4 100644
--- a/core/java/android/os/BaseBundle.java
+++ b/core/java/android/os/BaseBundle.java
@@ -365,12 +365,16 @@
}
/**
+ * This method returns true when the parcel is 'definitely' empty.
+ * That is, it may return false for an empty parcel. But will never return true for a non-empty
+ * one.
+ *
* @hide this should probably be the implementation of isEmpty(). To do that we
* need to ensure we always use the special empty parcel form when the bundle is
* empty. (This may already be the case, but to be safe we'll do this later when
* we aren't trying to stabilize.)
*/
- public boolean maybeIsEmpty() {
+ public boolean isDefinitelyEmpty() {
if (isParcelled()) {
return isEmptyParcel();
} else {
@@ -402,6 +406,9 @@
if (other == null) {
return false;
}
+ if (isDefinitelyEmpty() && other.isDefinitelyEmpty()) {
+ return true;
+ }
if (isParcelled() != other.isParcelled()) {
// Big kind-of here!
return false;
diff --git a/core/java/android/os/storage/StorageManagerInternal.java b/core/java/android/os/storage/StorageManagerInternal.java
index 5cac5f5..e78aef5 100644
--- a/core/java/android/os/storage/StorageManagerInternal.java
+++ b/core/java/android/os/storage/StorageManagerInternal.java
@@ -118,4 +118,10 @@
* @param userId the userId for which to reset storage
*/
public abstract void resetUser(int userId);
+
+ /**
+ * Returns {@code true} if the immediate last installed version of an app with {@code uid} had
+ * legacy storage, {@code false} otherwise.
+ */
+ public abstract boolean hasLegacyExternalStorage(int uid);
}
diff --git a/core/java/android/service/autofill/FillResponse.java b/core/java/android/service/autofill/FillResponse.java
index 7032825..e8e1223 100644
--- a/core/java/android/service/autofill/FillResponse.java
+++ b/core/java/android/service/autofill/FillResponse.java
@@ -75,6 +75,7 @@
private final @Nullable SaveInfo mSaveInfo;
private final @Nullable Bundle mClientState;
private final @Nullable RemoteViews mPresentation;
+ private final @Nullable InlinePresentation mInlinePresentation;
private final @Nullable RemoteViews mHeader;
private final @Nullable RemoteViews mFooter;
private final @Nullable IntentSender mAuthentication;
@@ -95,6 +96,7 @@
mSaveInfo = builder.mSaveInfo;
mClientState = builder.mClientState;
mPresentation = builder.mPresentation;
+ mInlinePresentation = builder.mInlinePresentation;
mHeader = builder.mHeader;
mFooter = builder.mFooter;
mAuthentication = builder.mAuthentication;
@@ -131,6 +133,11 @@
}
/** @hide */
+ public @Nullable InlinePresentation getInlinePresentation() {
+ return mInlinePresentation;
+ }
+
+ /** @hide */
public @Nullable RemoteViews getHeader() {
return mHeader;
}
@@ -219,6 +226,7 @@
private SaveInfo mSaveInfo;
private Bundle mClientState;
private RemoteViews mPresentation;
+ private InlinePresentation mInlinePresentation;
private RemoteViews mHeader;
private RemoteViews mFooter;
private IntentSender mAuthentication;
@@ -318,6 +326,67 @@
}
/**
+ * Triggers a custom UI before before autofilling the screen with any data set in this
+ * response.
+ *
+ * <p><b>Note:</b> Although the name of this method suggests that it should be used just for
+ * authentication flow, it can be used for other advanced flows; see {@link AutofillService}
+ * for examples.
+ *
+ * <p>This method is similar to
+ * {@link #setAuthentication(AutofillId[], IntentSender, RemoteViews)}, but also accepts
+ * an {@link InlinePresentation} presentation which is required for authenticating through
+ * the inline autofill flow.
+ *
+ * <p><b>Note:</b> {@link #setHeader(RemoteViews)} or {@link #setFooter(RemoteViews)} does
+ * not work with {@link InlinePresentation}.</p>
+ *
+ * @param authentication Intent to an activity with your authentication flow.
+ * @param presentation The presentation to visualize the response.
+ * @param inlinePresentation The inlinePresentation to visualize the response inline.
+ * @param ids id of Views that when focused will display the authentication UI.
+ *
+ * @return This builder.
+ *
+ * @throws IllegalArgumentException if any of the following occurs:
+ * <ul>
+ * <li>{@code ids} is {@code null}</li>
+ * <li>{@code ids} is empty</li>
+ * <li>{@code ids} contains a {@code null} element</li>
+ * <li>both {@code authentication} and {@code presentation} are {@code null}</li>
+ * <li>both {@code authentication} and {@code presentation} are non-{@code null}</li>
+ * <li>both {@code authentication} and {@code inlinePresentation} are {@code null}</li>
+ * <li>both {@code authentication} and {@code inlinePresentation} are
+ * non-{@code null}</li>
+ * </ul>
+ *
+ * @throws IllegalStateException if a {@link #setHeader(RemoteViews) header} or a
+ * {@link #setFooter(RemoteViews) footer} are already set for this builder.
+ *
+ * @see android.app.PendingIntent#getIntentSender()
+ */
+ @NonNull
+ public Builder setAuthentication(@NonNull AutofillId[] ids,
+ @Nullable IntentSender authentication, @Nullable RemoteViews presentation,
+ @Nullable InlinePresentation inlinePresentation) {
+ throwIfDestroyed();
+ throwIfDisableAutofillCalled();
+ if (mHeader != null || mFooter != null) {
+ throw new IllegalStateException("Already called #setHeader() or #setFooter()");
+ }
+
+ if (authentication == null ^ (presentation == null && inlinePresentation == null)) {
+ throw new IllegalArgumentException("authentication and presentation "
+ + "(dropdown or inline), must be both non-null or null");
+ }
+ mAuthentication = authentication;
+ mPresentation = presentation;
+ mInlinePresentation = inlinePresentation;
+ mAuthenticationIds = assertValid(ids);
+ return this;
+ }
+
+ /**
* Specifies views that should not trigger new
* {@link AutofillService#onFillRequest(FillRequest, android.os.CancellationSignal,
* FillCallback)} requests.
@@ -644,6 +713,8 @@
break;
}
}
+ } else if (mInlinePresentation != null) {
+ mSupportsInlineSuggestions = true;
}
mDestroyed = true;
@@ -691,6 +762,9 @@
if (mPresentation != null) {
builder.append(", hasPresentation");
}
+ if (mInlinePresentation != null) {
+ builder.append(", hasInlinePresentation");
+ }
if (mHeader != null) {
builder.append(", hasHeader");
}
@@ -740,6 +814,7 @@
parcel.writeParcelableArray(mAuthenticationIds, flags);
parcel.writeParcelable(mAuthentication, flags);
parcel.writeParcelable(mPresentation, flags);
+ parcel.writeParcelable(mInlinePresentation, flags);
parcel.writeParcelable(mHeader, flags);
parcel.writeParcelable(mFooter, flags);
parcel.writeParcelable(mUserData, flags);
@@ -774,8 +849,10 @@
AutofillId.class);
final IntentSender authentication = parcel.readParcelable(null);
final RemoteViews presentation = parcel.readParcelable(null);
+ final InlinePresentation inlinePresentation = parcel.readParcelable(null);
if (authenticationIds != null) {
- builder.setAuthentication(authenticationIds, authentication, presentation);
+ builder.setAuthentication(authenticationIds, authentication, presentation,
+ inlinePresentation);
}
final RemoteViews header = parcel.readParcelable(null);
if (header != null) {
diff --git a/core/java/android/view/Display.java b/core/java/android/view/Display.java
index f61217d..d1edf58 100644
--- a/core/java/android/view/Display.java
+++ b/core/java/android/view/Display.java
@@ -67,7 +67,7 @@
* </ul>
* </p><p>
* A logical display does not necessarily represent a particular physical display device
- * such as the built-in screen or an external monitor. The contents of a logical
+ * such as the internal display or an external display. The contents of a logical
* display may be presented on one or more physical displays according to the devices
* that are currently attached and whether mirroring has been enabled.
* </p>
@@ -104,8 +104,7 @@
private int mCachedAppHeightCompat;
/**
- * The default Display id, which is the id of the built-in primary display
- * assuming there is one.
+ * The default Display id, which is the id of the primary display assuming there is one.
*/
public static final int DEFAULT_DISPLAY = 0;
@@ -188,7 +187,7 @@
* Display flag: Indicates that the display is a presentation display.
* <p>
* This flag identifies secondary displays that are suitable for
- * use as presentation displays such as HDMI or Wireless displays. Applications
+ * use as presentation displays such as external or wireless displays. Applications
* may automatically project their content to presentation displays to provide
* richer second screen experiences.
* </p>
@@ -257,17 +256,17 @@
public static final int TYPE_UNKNOWN = 0;
/**
- * Display type: Built-in display.
+ * Display type: Physical display connected through an internal port.
* @hide
*/
- public static final int TYPE_BUILT_IN = 1;
+ public static final int TYPE_INTERNAL = 1;
/**
- * Display type: HDMI display.
+ * Display type: Physical display connected through an external port.
* @hide
*/
@UnsupportedAppUsage
- public static final int TYPE_HDMI = 2;
+ public static final int TYPE_EXTERNAL = 2;
/**
* Display type: WiFi display.
@@ -562,8 +561,8 @@
* @return The display type.
*
* @see #TYPE_UNKNOWN
- * @see #TYPE_BUILT_IN
- * @see #TYPE_HDMI
+ * @see #TYPE_INTERNAL
+ * @see #TYPE_EXTERNAL
* @see #TYPE_WIFI
* @see #TYPE_OVERLAY
* @see #TYPE_VIRTUAL
@@ -1251,10 +1250,10 @@
switch (type) {
case TYPE_UNKNOWN:
return "UNKNOWN";
- case TYPE_BUILT_IN:
- return "BUILT_IN";
- case TYPE_HDMI:
- return "HDMI";
+ case TYPE_INTERNAL:
+ return "INTERNAL";
+ case TYPE_EXTERNAL:
+ return "EXTERNAL";
case TYPE_WIFI:
return "WIFI";
case TYPE_OVERLAY:
diff --git a/core/java/android/view/SurfaceControl.java b/core/java/android/view/SurfaceControl.java
index fe9e36e..cf48c52 100644
--- a/core/java/android/view/SurfaceControl.java
+++ b/core/java/android/view/SurfaceControl.java
@@ -321,14 +321,12 @@
public static final int FX_SURFACE_NORMAL = 0x00000000;
/**
- * Surface creation flag: Creates a Dim surface.
- * Everything behind this surface is dimmed by the amount specified
- * in {@link Transaction#setAlpha(SurfaceControl, float)}. It is an error to lock a Dim
- * surface, since it doesn't have a backing store.
+ * Surface creation flag: Creates a effect surface which
+ * represents a solid color and or shadows.
*
* @hide
*/
- public static final int FX_SURFACE_DIM = 0x00020000;
+ public static final int FX_SURFACE_EFFECT = 0x00020000;
/**
* Surface creation flag: Creates a container surface.
@@ -739,11 +737,11 @@
*/
public Builder setColorLayer() {
unsetBufferSize();
- return setFlags(FX_SURFACE_DIM, FX_SURFACE_MASK);
+ return setFlags(FX_SURFACE_EFFECT, FX_SURFACE_MASK);
}
private boolean isColorLayerSet() {
- return (mFlags & FX_SURFACE_DIM) == FX_SURFACE_DIM;
+ return (mFlags & FX_SURFACE_EFFECT) == FX_SURFACE_EFFECT;
}
/**
@@ -1285,12 +1283,15 @@
* @hide
*/
public static final class DisplayInfo {
+ public boolean isInternal;
public float density;
public boolean secure;
@Override
public String toString() {
- return "DisplayInfo{density=" + density + ", secure=" + secure + "}";
+ return "DisplayInfo{isInternal=" + isInternal
+ + ", density=" + density
+ + ", secure=" + secure + "}";
}
}
@@ -2075,6 +2076,7 @@
private final ArrayMap<SurfaceControl, Point> mResizedSurfaces = new ArrayMap<>();
Runnable mFreeNativeResources;
+ private static final float[] INVALID_COLOR = {-1, -1, -1};
/**
* @hide
@@ -2530,8 +2532,9 @@
}
/**
- * Sets a color for the Surface.
- * @param color A float array with three values to represent r, g, b in range [0..1]
+ * Fills the surface with the specified color.
+ * @param color A float array with three values to represent r, g, b in range [0..1]. An
+ * invalid color will remove the color fill.
* @hide
*/
@UnsupportedAppUsage
@@ -2542,6 +2545,16 @@
}
/**
+ * Removes color fill.
+ * @hide
+ */
+ public Transaction unsetColor(SurfaceControl sc) {
+ checkPreconditions(sc);
+ nativeSetColor(mNativeObject, sc.mNativeObject, INVALID_COLOR);
+ return this;
+ }
+
+ /**
* Sets the security of the surface. Setting the flag is equivalent to creating the
* Surface with the {@link #SECURE} flag.
* @hide
diff --git a/core/java/android/view/autofill/AutofillManager.java b/core/java/android/view/autofill/AutofillManager.java
index c159f89..e9a8a73 100644
--- a/core/java/android/view/autofill/AutofillManager.java
+++ b/core/java/android/view/autofill/AutofillManager.java
@@ -86,9 +86,10 @@
import java.util.Objects;
import java.util.Set;
-//TODO: use java.lang.ref.Cleaner once Android supports Java 9
import sun.misc.Cleaner;
+//TODO: use java.lang.ref.Cleaner once Android supports Java 9
+
/**
* <p>The {@link AutofillManager} class provides ways for apps and custom views to
* integrate with the Autofill Framework lifecycle.
@@ -547,7 +548,7 @@
* @param fillInIntent The authentication fill-in intent.
*/
void autofillClientAuthenticate(int authenticationId, IntentSender intent,
- Intent fillInIntent);
+ Intent fillInIntent, boolean authenticateInline);
/**
* Tells the client this manager has state to be reset.
@@ -2070,7 +2071,7 @@
}
private void authenticate(int sessionId, int authenticationId, IntentSender intent,
- Intent fillInIntent) {
+ Intent fillInIntent, boolean authenticateInline) {
synchronized (mLock) {
if (sessionId == mSessionId) {
final AutofillClient client = getClient();
@@ -2078,7 +2079,8 @@
// clear mOnInvisibleCalled and we will see if receive onInvisibleForAutofill()
// before onAuthenticationResult()
mOnInvisibleCalled = false;
- client.autofillClientAuthenticate(authenticationId, intent, fillInIntent);
+ client.autofillClientAuthenticate(authenticationId, intent, fillInIntent,
+ authenticateInline);
}
}
}
@@ -3250,10 +3252,11 @@
@Override
public void authenticate(int sessionId, int authenticationId, IntentSender intent,
- Intent fillInIntent) {
+ Intent fillInIntent, boolean authenticateInline) {
final AutofillManager afm = mAfm.get();
if (afm != null) {
- afm.post(() -> afm.authenticate(sessionId, authenticationId, intent, fillInIntent));
+ afm.post(() -> afm.authenticate(sessionId, authenticationId, intent, fillInIntent,
+ authenticateInline));
}
}
diff --git a/core/java/android/view/autofill/IAutoFillManagerClient.aidl b/core/java/android/view/autofill/IAutoFillManagerClient.aidl
index 84949c8..3903665 100644
--- a/core/java/android/view/autofill/IAutoFillManagerClient.aidl
+++ b/core/java/android/view/autofill/IAutoFillManagerClient.aidl
@@ -50,7 +50,7 @@
* Authenticates a fill response or a data set.
*/
void authenticate(int sessionId, int authenticationId, in IntentSender intent,
- in Intent fillInIntent);
+ in Intent fillInIntent, boolean authenticateInline);
/**
* Sets the views to track. If saveOnAllViewsInvisible is set and all these view are invisible
diff --git a/core/java/android/widget/TextView.java b/core/java/android/widget/TextView.java
index 469ab2e..0182975 100644
--- a/core/java/android/widget/TextView.java
+++ b/core/java/android/widget/TextView.java
@@ -8282,9 +8282,9 @@
if (getKeyListener() != null && !mSingleLine && mEditor != null
&& (mEditor.mInputType & EditorInfo.TYPE_MASK_CLASS)
== EditorInfo.TYPE_CLASS_TEXT) {
- int variation = mEditor.mInputType & EditorInfo.TYPE_MASK_VARIATION;
- if (variation == EditorInfo.TYPE_TEXT_FLAG_IME_MULTI_LINE
- || variation == EditorInfo.TYPE_TEXT_FLAG_MULTI_LINE) {
+ int multilineFlags = EditorInfo.TYPE_TEXT_FLAG_IME_MULTI_LINE
+ | EditorInfo.TYPE_TEXT_FLAG_MULTI_LINE;
+ if ((mEditor.mInputType & multilineFlags) != 0) {
return false;
}
}
diff --git a/core/java/com/android/internal/app/IAppOpsService.aidl b/core/java/com/android/internal/app/IAppOpsService.aidl
index dabaf5a..1c1c254 100644
--- a/core/java/com/android/internal/app/IAppOpsService.aidl
+++ b/core/java/com/android/internal/app/IAppOpsService.aidl
@@ -18,6 +18,8 @@
import android.app.AppOpsManager;
import android.app.AsyncNotedAppOp;
+import android.app.SyncNotedAppOp;
+import android.app.RuntimeAppOpAccessMessage;
import android.content.pm.ParceledListSlice;
import android.os.Bundle;
import android.os.RemoteCallback;
@@ -25,6 +27,7 @@
import com.android.internal.app.IAppOpsActiveCallback;
import com.android.internal.app.IAppOpsAsyncNotedCallback;
import com.android.internal.app.IAppOpsNotedCallback;
+import com.android.internal.app.MessageSamplingConfig;
interface IAppOpsService {
// These methods are also called by native code, so must
@@ -54,6 +57,9 @@
// Remaining methods are only used in Java.
int checkPackage(int uid, String packageName);
+ RuntimeAppOpAccessMessage collectRuntimeAppOpAccessMessage();
+ MessageSamplingConfig reportRuntimeAppOpAccessMessageAndGetConfig(String packageName,
+ in SyncNotedAppOp appOp, String message);
@UnsupportedAppUsage
List<AppOpsManager.PackageOps> getPackagesForOps(in int[] ops);
@UnsupportedAppUsage
diff --git a/core/java/com/android/internal/app/MessageSamplingConfig.aidl b/core/java/com/android/internal/app/MessageSamplingConfig.aidl
new file mode 100644
index 0000000..ab89ca2
--- /dev/null
+++ b/core/java/com/android/internal/app/MessageSamplingConfig.aidl
@@ -0,0 +1,19 @@
+/*
+ * 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.internal.app;
+
+parcelable MessageSamplingConfig;
diff --git a/core/java/com/android/internal/app/MessageSamplingConfig.java b/core/java/com/android/internal/app/MessageSamplingConfig.java
new file mode 100644
index 0000000..5300c1c
--- /dev/null
+++ b/core/java/com/android/internal/app/MessageSamplingConfig.java
@@ -0,0 +1,187 @@
+/*
+ * 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.internal.app;
+
+import android.annotation.IntRange;
+import android.annotation.NonNull;
+import android.app.AppOpsManager;
+import android.os.Parcel;
+import android.os.Parcelable;
+
+import com.android.internal.annotations.Immutable;
+import com.android.internal.util.DataClass;
+
+/**
+ * Configuration for AppOps access messages sampling.
+ */
+@Immutable
+/*@DataClass*/
+public final class MessageSamplingConfig implements Parcelable {
+ /** Op code targeted during current sampling session */
+ private final @IntRange(from = -1L, to = AppOpsManager._NUM_OP - 1) int mSampledOpCode;
+ /** Range of ops which should be reported during current sampling session */
+ private final @IntRange(from = 0L, to = AppOpsManager._NUM_OP - 1) int mAcceptableLeftDistance;
+ /** Expiration time for this sampling config */
+ private final @IntRange(from = 0L) long mExpirationTimeSinceBootMillis;
+
+
+
+
+
+
+
+ // Code below generated by codegen v1.0.14.
+ //
+ // DO NOT MODIFY!
+ // CHECKSTYLE:OFF Generated code
+ //
+ // To regenerate run:
+ // $ codegen $ANDROID_BUILD_TOP/frameworks/base/core/java/com/android/internal/app/MessageSamplingConfig.java
+ //
+ // To exclude the generated code from IntelliJ auto-formatting enable (one-time):
+ // Settings > Editor > Code Style > Formatter Control
+ //@formatter:off
+
+
+ /**
+ * Creates a new MessageSamplingConfig.
+ *
+ * @param sampledOpCode
+ * Op code targeted during current sampling session
+ * @param acceptableLeftDistance
+ * Range of ops which should be reported during current sampling session
+ * @param expirationTimeSinceBootMillis
+ * Expiration time for this sampling config
+ */
+ @DataClass.Generated.Member
+ public MessageSamplingConfig(
+ @IntRange(from = -1L, to = AppOpsManager._NUM_OP - 1) int sampledOpCode,
+ @IntRange(from = 0L, to = AppOpsManager._NUM_OP - 1) int acceptableLeftDistance,
+ @IntRange(from = 0L) long expirationTimeSinceBootMillis) {
+ this.mSampledOpCode = sampledOpCode;
+ com.android.internal.util.AnnotationValidations.validate(
+ IntRange.class, null, mSampledOpCode,
+ "from", -1L,
+ "to", AppOpsManager._NUM_OP - 1);
+ this.mAcceptableLeftDistance = acceptableLeftDistance;
+ com.android.internal.util.AnnotationValidations.validate(
+ IntRange.class, null, mAcceptableLeftDistance,
+ "from", 0L,
+ "to", AppOpsManager._NUM_OP - 1);
+ this.mExpirationTimeSinceBootMillis = expirationTimeSinceBootMillis;
+ com.android.internal.util.AnnotationValidations.validate(
+ IntRange.class, null, mExpirationTimeSinceBootMillis,
+ "from", 0L);
+
+ // onConstructed(); // You can define this method to get a callback
+ }
+
+ /**
+ * Op code targeted during current sampling session
+ */
+ @DataClass.Generated.Member
+ public @IntRange(from = -1L, to = AppOpsManager._NUM_OP - 1) int getSampledOpCode() {
+ return mSampledOpCode;
+ }
+
+ /**
+ * Range of ops which should be reported during current sampling session
+ */
+ @DataClass.Generated.Member
+ public @IntRange(from = 0L, to = AppOpsManager._NUM_OP - 1) int getAcceptableLeftDistance() {
+ return mAcceptableLeftDistance;
+ }
+
+ /**
+ * Expiration time for this sampling config
+ */
+ @DataClass.Generated.Member
+ public @IntRange(from = 0L) long getExpirationTimeSinceBootMillis() {
+ return mExpirationTimeSinceBootMillis;
+ }
+
+ @Override
+ @DataClass.Generated.Member
+ public void writeToParcel(@NonNull Parcel dest, int flags) {
+ // You can override field parcelling by defining methods like:
+ // void parcelFieldName(Parcel dest, int flags) { ... }
+
+ dest.writeInt(mSampledOpCode);
+ dest.writeInt(mAcceptableLeftDistance);
+ dest.writeLong(mExpirationTimeSinceBootMillis);
+ }
+
+ @Override
+ @DataClass.Generated.Member
+ public int describeContents() { return 0; }
+
+ /** @hide */
+ @SuppressWarnings({"unchecked", "RedundantCast"})
+ @DataClass.Generated.Member
+ /* package-private */ MessageSamplingConfig(@NonNull Parcel in) {
+ // You can override field unparcelling by defining methods like:
+ // static FieldType unparcelFieldName(Parcel in) { ... }
+
+ int sampledOpCode = in.readInt();
+ int acceptableLeftDistance = in.readInt();
+ long expirationTimeSinceBootMillis = in.readLong();
+
+ this.mSampledOpCode = sampledOpCode;
+ com.android.internal.util.AnnotationValidations.validate(
+ IntRange.class, null, mSampledOpCode,
+ "from", -1L,
+ "to", AppOpsManager._NUM_OP - 1);
+ this.mAcceptableLeftDistance = acceptableLeftDistance;
+ com.android.internal.util.AnnotationValidations.validate(
+ IntRange.class, null, mAcceptableLeftDistance,
+ "from", 0L,
+ "to", AppOpsManager._NUM_OP - 1);
+ this.mExpirationTimeSinceBootMillis = expirationTimeSinceBootMillis;
+ com.android.internal.util.AnnotationValidations.validate(
+ IntRange.class, null, mExpirationTimeSinceBootMillis,
+ "from", 0L);
+
+ // onConstructed(); // You can define this method to get a callback
+ }
+
+ @DataClass.Generated.Member
+ public static final @NonNull Parcelable.Creator<MessageSamplingConfig> CREATOR
+ = new Parcelable.Creator<MessageSamplingConfig>() {
+ @Override
+ public MessageSamplingConfig[] newArray(int size) {
+ return new MessageSamplingConfig[size];
+ }
+
+ @Override
+ public MessageSamplingConfig createFromParcel(@NonNull Parcel in) {
+ return new MessageSamplingConfig(in);
+ }
+ };
+
+ /*@DataClass.Generated(
+ time = 1580691255495L,
+ codegenVersion = "1.0.14",
+ sourceFile = "frameworks/base/core/java/com/android/internal/app/MessageSamplingConfig.java",
+ inputSignatures = "private final @android.annotation.IntRange(from=-1L, to=AppOpsManager._NUM_OP - 1) int mSampledOpCode\nprivate final @android.annotation.IntRange(from=0L, to=AppOpsManager._NUM_OP - 1) int mAcceptableLeftDistance\nprivate final @android.annotation.IntRange(from=0L) long mExpirationTimeSinceBootMillis\nclass MessageSamplingConfig extends java.lang.Object implements [android.os.Parcelable]\n@com.android.internal.util.DataClass")*/
+ @Deprecated
+ private void __metadata() {}
+
+
+ //@formatter:on
+ // End of generated code
+
+}
diff --git a/core/java/com/android/internal/policy/DecorView.java b/core/java/com/android/internal/policy/DecorView.java
index adb4036..36025e3 100644
--- a/core/java/com/android/internal/policy/DecorView.java
+++ b/core/java/com/android/internal/policy/DecorView.java
@@ -1627,9 +1627,12 @@
int opacity = PixelFormat.OPAQUE;
final WindowConfiguration winConfig = getResources().getConfiguration().windowConfiguration;
+ // TODO(b/149585281) remove when root task has the correct bounds for freeform
+ final boolean renderShadowsInCompositor = mWindow.mRenderShadowsInCompositor
+ && winConfig.getWindowingMode() != WINDOWING_MODE_FREEFORM;
// If we draw shadows in the compositor we don't need to force the surface to be
// translucent.
- if (winConfig.hasWindowShadow() && !mWindow.mRenderShadowsInCompositor) {
+ if (winConfig.hasWindowShadow() && !renderShadowsInCompositor) {
// If the window has a shadow, it must be translucent.
opacity = PixelFormat.TRANSLUCENT;
} else{
@@ -2414,16 +2417,18 @@
}
private void updateElevation() {
+ final int windowingMode =
+ getResources().getConfiguration().windowConfiguration.getWindowingMode();
+ final boolean renderShadowsInCompositor = mWindow.mRenderShadowsInCompositor
+ && windowingMode != WINDOWING_MODE_FREEFORM;
// If rendering shadows in the compositor, don't set an elevation on the view
- if (mWindow.mRenderShadowsInCompositor) {
+ if (renderShadowsInCompositor) {
return;
}
float elevation = 0;
final boolean wasAdjustedForStack = mElevationAdjustedForStack;
// Do not use a shadow when we are in resizing mode (mBackdropFrameRenderer not null)
// since the shadow is bound to the content size and not the target size.
- final int windowingMode =
- getResources().getConfiguration().windowConfiguration.getWindowingMode();
if ((windowingMode == WINDOWING_MODE_FREEFORM) && !isResizing()) {
elevation = hasWindowFocus() ?
DECOR_SHADOW_FOCUSED_HEIGHT_IN_DIP : DECOR_SHADOW_UNFOCUSED_HEIGHT_IN_DIP;
diff --git a/core/jni/Android.bp b/core/jni/Android.bp
index d1a7d24..653cbc9 100644
--- a/core/jni/Android.bp
+++ b/core/jni/Android.bp
@@ -234,6 +234,7 @@
"libui",
"libgraphicsenv",
"libgui",
+ "libmediandk",
"libsensor",
"libinput",
"libcamera_client",
@@ -449,9 +450,10 @@
],
shared_libs: [
"libandroidfw",
+ "libEGL",
+ "libmediandk",
"libnativedisplay",
"libnativewindow",
- "libgui",
"libpdfium",
],
static_libs: [
diff --git a/core/jni/android_view_SurfaceControl.cpp b/core/jni/android_view_SurfaceControl.cpp
index f564d75..ce9a048 100644
--- a/core/jni/android_view_SurfaceControl.cpp
+++ b/core/jni/android_view_SurfaceControl.cpp
@@ -65,6 +65,7 @@
static struct {
jclass clazz;
jmethodID ctor;
+ jfieldID isInternal;
jfieldID density;
jfieldID secure;
} gDisplayInfoClassInfo;
@@ -781,6 +782,8 @@
}
jobject object = env->NewObject(gDisplayInfoClassInfo.clazz, gDisplayInfoClassInfo.ctor);
+ env->SetBooleanField(object, gDisplayInfoClassInfo.isInternal,
+ info.connectionType == DisplayConnectionType::Internal);
env->SetFloatField(object, gDisplayInfoClassInfo.density, info.density);
env->SetBooleanField(object, gDisplayInfoClassInfo.secure, info.secure);
return object;
@@ -1528,6 +1531,7 @@
jclass infoClazz = FindClassOrDie(env, "android/view/SurfaceControl$DisplayInfo");
gDisplayInfoClassInfo.clazz = MakeGlobalRefOrDie(env, infoClazz);
gDisplayInfoClassInfo.ctor = GetMethodIDOrDie(env, infoClazz, "<init>", "()V");
+ gDisplayInfoClassInfo.isInternal = GetFieldIDOrDie(env, infoClazz, "isInternal", "Z");
gDisplayInfoClassInfo.density = GetFieldIDOrDie(env, infoClazz, "density", "F");
gDisplayInfoClassInfo.secure = GetFieldIDOrDie(env, infoClazz, "secure", "Z");
diff --git a/core/jni/android_view_ThreadedRenderer.cpp b/core/jni/android_view_ThreadedRenderer.cpp
index 5a8225c..27c5a73 100644
--- a/core/jni/android_view_ThreadedRenderer.cpp
+++ b/core/jni/android_view_ThreadedRenderer.cpp
@@ -17,40 +17,34 @@
#define LOG_TAG "ThreadedRenderer"
#define ATRACE_TAG ATRACE_TAG_VIEW
-#include <algorithm>
-#include <atomic>
-#include <inttypes.h>
-
-#include "jni.h"
-#include <nativehelper/JNIHelp.h>
-#include "core_jni_helpers.h"
-#include <GraphicsJNI.h>
-
-#include <gui/BufferItemConsumer.h>
-#include <gui/BufferQueue.h>
-#include <gui/Surface.h>
-
-#include "android_graphics_HardwareRendererObserver.h"
-
-#include <private/EGL/cache.h>
-
-#include <utils/RefBase.h>
-#include <utils/StrongPointer.h>
-#include <utils/Timers.h>
-#include <utils/TraceUtils.h>
-#include <android_runtime/android_view_Surface.h>
-#include <system/window.h>
-
#include <FrameInfo.h>
+#include <GraphicsJNI.h>
#include <Picture.h>
#include <Properties.h>
#include <RootRenderNode.h>
+#include <dlfcn.h>
+#include <inttypes.h>
+#include <media/NdkImage.h>
+#include <media/NdkImageReader.h>
+#include <nativehelper/JNIHelp.h>
+#include <pipeline/skia/ShaderCache.h>
+#include <private/EGL/cache.h>
#include <renderthread/CanvasContext.h>
#include <renderthread/RenderProxy.h>
#include <renderthread/RenderTask.h>
#include <renderthread/RenderThread.h>
-#include <pipeline/skia/ShaderCache.h>
#include <utils/Color.h>
+#include <utils/RefBase.h>
+#include <utils/StrongPointer.h>
+#include <utils/Timers.h>
+#include <utils/TraceUtils.h>
+
+#include <algorithm>
+#include <atomic>
+
+#include "android_graphics_HardwareRendererObserver.h"
+#include "core_jni_helpers.h"
+#include "jni.h"
namespace android {
@@ -78,6 +72,9 @@
return env;
}
+typedef ANativeWindow* (*ANW_fromSurface)(JNIEnv* env, jobject surface);
+ANW_fromSurface fromSurface;
+
class JvmErrorReporter : public ErrorHandler {
public:
JvmErrorReporter(JNIEnv* env) {
@@ -178,9 +175,9 @@
static void android_view_ThreadedRenderer_setSurface(JNIEnv* env, jobject clazz,
jlong proxyPtr, jobject jsurface, jboolean discardBuffer) {
RenderProxy* proxy = reinterpret_cast<RenderProxy*>(proxyPtr);
- sp<Surface> surface;
+ ANativeWindow* window = nullptr;
if (jsurface) {
- surface = android_view_Surface_getSurface(env, jsurface);
+ window = fromSurface(env, jsurface);
}
bool enableTimeout = true;
if (discardBuffer) {
@@ -188,7 +185,7 @@
enableTimeout = false;
proxy->setSwapBehavior(SwapBehavior::kSwap_discardBuffer);
}
- proxy->setSurface(surface, enableTimeout);
+ proxy->setSurface(window, enableTimeout);
}
static jboolean android_view_ThreadedRenderer_pause(JNIEnv* env, jobject clazz,
@@ -458,8 +455,10 @@
jint right, jint bottom, jlong bitmapPtr) {
SkBitmap bitmap;
bitmap::toBitmap(bitmapPtr).getSkBitmap(&bitmap);
- sp<Surface> surface = android_view_Surface_getSurface(env, jsurface);
- return RenderProxy::copySurfaceInto(surface, left, top, right, bottom, &bitmap);
+ ANativeWindow* window = fromSurface(env, jsurface);
+ jint result = RenderProxy::copySurfaceInto(window, left, top, right, bottom, &bitmap);
+ ANativeWindow_release(window);
+ return result;
}
class ContextFactory : public IContextFactory {
@@ -480,23 +479,35 @@
uint32_t width = jwidth;
uint32_t height = jheight;
- // Create a Surface wired up to a BufferItemConsumer
- sp<IGraphicBufferProducer> producer;
- sp<IGraphicBufferConsumer> rawConsumer;
- BufferQueue::createBufferQueue(&producer, &rawConsumer);
- // We only need 1 buffer but some drivers have bugs so workaround it by setting max count to 2
- rawConsumer->setMaxBufferCount(2);
- sp<BufferItemConsumer> consumer = new BufferItemConsumer(rawConsumer,
- GRALLOC_USAGE_HW_TEXTURE | GRALLOC_USAGE_SW_READ_NEVER | GRALLOC_USAGE_SW_WRITE_NEVER);
- consumer->setDefaultBufferSize(width, height);
- sp<Surface> surface = new Surface(producer);
+ // Create an ImageReader wired up to a BufferItemConsumer
+ AImageReader* rawReader;
+ media_status_t result =
+ AImageReader_newWithUsage(width, height, AIMAGE_FORMAT_RGBA_8888,
+ AHARDWAREBUFFER_USAGE_GPU_SAMPLED_IMAGE, 2, &rawReader);
+ std::unique_ptr<AImageReader, decltype(&AImageReader_delete)> reader(rawReader,
+ AImageReader_delete);
+
+ if (result != AMEDIA_OK) {
+ ALOGW("Error creating image reader!");
+ return nullptr;
+ }
+
+ // Note that ownership of this window is maintained by AImageReader, so we
+ // shouldn't need to wrap around a smart pointer.
+ ANativeWindow* window;
+ result = AImageReader_getWindow(rawReader, &window);
+
+ if (result != AMEDIA_OK) {
+ ALOGW("Error retrieving the native window!");
+ return nullptr;
+ }
// Render into the surface
{
ContextFactory factory;
RenderProxy proxy{true, renderNode, &factory};
proxy.setSwapBehavior(SwapBehavior::kSwap_discardBuffer);
- proxy.setSurface(surface);
+ proxy.setSurface(window);
// Shadows can't be used via this interface, so just set the light source
// to all 0s.
proxy.setLightAlpha(0, 0);
@@ -508,33 +519,34 @@
proxy.syncAndDrawFrame();
}
- // Yank out the GraphicBuffer
- BufferItem bufferItem;
- status_t err;
- if ((err = consumer->acquireBuffer(&bufferItem, 0, true)) != OK) {
- ALOGW("Failed to acquireBuffer, error %d (%s)", err, strerror(-err));
+ AImage* rawImage;
+ result = AImageReader_acquireNextImage(rawReader, &rawImage);
+ std::unique_ptr<AImage, decltype(&AImage_delete)> image(rawImage, AImage_delete);
+ if (result != AMEDIA_OK) {
+ ALOGW("Error reading image: %d!", result);
return nullptr;
}
- sp<GraphicBuffer> buffer = bufferItem.mGraphicBuffer;
- // We don't really care if this fails or not since we're just going to destroy this anyway
- consumer->releaseBuffer(bufferItem);
- if (!buffer.get()) {
- ALOGW("GraphicBuffer is null?");
- return nullptr;
- }
- if (buffer->getWidth() != width || buffer->getHeight() != height) {
- ALOGW("GraphicBuffer size mismatch, got %dx%d expected %dx%d",
- buffer->getWidth(), buffer->getHeight(), width, height);
+
+ AHardwareBuffer* buffer;
+ result = AImage_getHardwareBuffer(rawImage, &buffer);
+
+ AHardwareBuffer_Desc desc;
+ AHardwareBuffer_describe(buffer, &desc);
+
+ if (desc.width != width || desc.height != height) {
+ ALOGW("AHardwareBuffer size mismatch, got %dx%d expected %dx%d", desc.width, desc.height,
+ width, height);
// Continue I guess?
}
- sk_sp<SkColorSpace> cs = uirenderer::DataSpaceToColorSpace(bufferItem.mDataSpace);
+ sk_sp<SkColorSpace> cs = uirenderer::DataSpaceToColorSpace(
+ static_cast<android_dataspace>(ANativeWindow_getBuffersDataSpace(window)));
if (cs == nullptr) {
// nullptr is treated as SRGB in Skia, thus explicitly use SRGB in order to make sure
// the returned bitmap has a color space.
cs = SkColorSpace::MakeSRGB();
}
- sk_sp<Bitmap> bitmap = Bitmap::createFrom(buffer->toAHardwareBuffer(), cs);
+ sk_sp<Bitmap> bitmap = Bitmap::createFrom(buffer, cs);
return bitmap::createBitmap(env, bitmap.release(),
android::bitmap::kBitmapCreateFlag_Premultiplied);
}
@@ -722,6 +734,11 @@
gFrameCompleteCallback.onFrameComplete = GetMethodIDOrDie(env, frameCompleteClass,
"onFrameComplete", "(J)V");
+ void* handle_ = dlopen("libandroid.so", RTLD_NOW | RTLD_NODELETE);
+ fromSurface = (ANW_fromSurface)dlsym(handle_, "ANativeWindow_fromSurface");
+ LOG_ALWAYS_FATAL_IF(fromSurface == nullptr,
+ "Failed to find required symbol ANativeWindow_fromSurface!");
+
return RegisterMethodsOrDie(env, kClassPathName, gMethods, NELEM(gMethods));
}
diff --git a/core/proto/android/os/incident.proto b/core/proto/android/os/incident.proto
index 03676dd..829c252 100644
--- a/core/proto/android/os/incident.proto
+++ b/core/proto/android/os/incident.proto
@@ -34,6 +34,7 @@
import "frameworks/base/core/proto/android/providers/settings.proto";
import "frameworks/base/core/proto/android/server/activitymanagerservice.proto";
import "frameworks/base/core/proto/android/server/alarmmanagerservice.proto";
+import "frameworks/base/core/proto/android/server/bluetooth_manager_service.proto";
import "frameworks/base/core/proto/android/server/fingerprint.proto";
import "frameworks/base/core/proto/android/server/jobscheduler.proto";
import "frameworks/base/core/proto/android/server/location/context_hub.proto";
@@ -488,6 +489,11 @@
(section).args = "connmetrics --proto"
];
+ optional com.android.server.BluetoothManagerServiceDumpProto bluetooth_manager = 3050 [
+ (section).type = SECTION_DUMPSYS,
+ (section).args = "bluetooth_manager --proto"
+ ];
+
optional com.android.server.location.ContextHubServiceProto context_hub = 3051 [
(section).type = SECTION_DUMPSYS,
(section).args = "contexthub --proto"
diff --git a/core/proto/android/server/bluetooth_manager_service.proto b/core/proto/android/server/bluetooth_manager_service.proto
new file mode 100644
index 0000000..998413f
--- /dev/null
+++ b/core/proto/android/server/bluetooth_manager_service.proto
@@ -0,0 +1,49 @@
+/*
+ * Copyright (C) 2020 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+syntax = "proto2";
+package com.android.server;
+
+import "frameworks/base/core/proto/android/bluetooth/enums.proto";
+import "frameworks/base/core/proto/android/privacy.proto";
+
+option java_multiple_files = true;
+
+message BluetoothManagerServiceDumpProto {
+ option (.android.msg_privacy).dest = DEST_AUTOMATIC;
+
+ message ActiveLog {
+ option (.android.msg_privacy).dest = DEST_AUTOMATIC;
+ optional int64 timestamp_ms = 1;
+ optional bool enable = 2;
+ optional string package_name = 3;
+ optional .android.bluetooth.EnableDisableReasonEnum reason = 4;
+ }
+
+ optional bool enabled = 1;
+ optional int32 state = 2;
+ optional string state_name = 3;
+ optional string address = 4 [(.android.privacy).dest = DEST_EXPLICIT];
+ optional string name = 5 [(.android.privacy).dest = DEST_EXPLICIT];
+ optional int64 last_enabled_time_ms = 6;
+ optional int64 curr_timestamp_ms = 7;
+ repeated ActiveLog active_logs = 8;
+ optional int32 num_crashes = 9;
+ optional bool crash_log_maxed = 10;
+ repeated int64 crash_timestamps_ms = 11;
+ optional int32 num_ble_apps = 12;
+ repeated string ble_app_package_names = 13;
+}
\ No newline at end of file
diff --git a/core/proto/android/server/notificationhistory.proto b/core/proto/android/server/notificationhistory.proto
index 6749719..15f4abb 100644
--- a/core/proto/android/server/notificationhistory.proto
+++ b/core/proto/android/server/notificationhistory.proto
@@ -55,6 +55,11 @@
// The small icon of the notification
optional Icon icon = 12;
+ // The conversation id, if any, that this notification belongs to
+ optional string conversation_id = 13;
+ // conversation_id_index contains the index + 1 of the conversation id in the string pool
+ optional int32 conversation_id_index = 14;
+
// Matches the constants of android.graphics.drawable.Icon
enum ImageTypeEnum {
TYPE_UNKNOWN = 0;
diff --git a/core/res/Android.bp b/core/res/Android.bp
index 3dc74f8..b365de4 100644
--- a/core/res/Android.bp
+++ b/core/res/Android.bp
@@ -54,3 +54,22 @@
"res/**/*",
],
}
+
+// Generate a text file containing a list of permissions that non-system apps
+// are allowed to obtain.
+genrule {
+ name: "permission-list-normal",
+ out: ["permission-list-normal.txt"],
+ srcs: ["AndroidManifest.xml"],
+ cmd: "cat $(in) " +
+ // xmllint has trouble accessing attributes under the android namespace.
+ // Strip these prefixes prior to processing with xmllint.
+ " | sed -r 's/android:(name|protectionLevel)/\\1/g' " +
+ " | $(location xmllint) /dev/stdin --xpath " +
+ " '//permission[not(contains(@protectionLevel, \"signature\"))]/@name'" +
+ // The result of xmllint is name="value" pairs. Format these to just the
+ // permission name, one per-line.
+ " | sed -r 's/\\s*name=\\s*//g' | tr -d '\"'" +
+ " > $(out)",
+ tools: ["xmllint"]
+}
diff --git a/core/res/res/layout/sms_short_code_confirmation_dialog.xml b/core/res/res/layout/sms_short_code_confirmation_dialog.xml
deleted file mode 100644
index d82f560..0000000
--- a/core/res/res/layout/sms_short_code_confirmation_dialog.xml
+++ /dev/null
@@ -1,92 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-/*
-** Copyright 2012 The Android Open Source Project
-**
-** Licensed under the Apache License, Version 2.0 (the "License");
-** you may not use this file except in compliance with the License.
-** You may obtain a copy of the License at
-**
-** http://www.apache.org/licenses/LICENSE-2.0
-**
-** Unless required by applicable law or agreed to in writing, software
-** distributed under the License is distributed on an "AS IS" BASIS,
-** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-** See the License for the specific language governing permissions and
-** limitations under the License.
-*/
--->
-
-<LinearLayout
- xmlns:android="http://schemas.android.com/apk/res/android"
- android:id="@+id/parentPanel"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:layout_marginLeft="8dip"
- android:layout_marginRight="8dip"
- android:orientation="vertical">
-
- <TextView android:id="@+id/sms_short_code_confirm_message"
- style="?android:attr/textAppearanceMedium"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:paddingLeft="20dip"
- android:paddingRight="20dip"
- android:paddingTop="16dip"
- android:paddingBottom="16dip" />
-
- <TableLayout android:id="@+id/sms_short_code_detail_layout"
- android:shrinkColumns="1"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:paddingLeft="16dip"
- android:paddingRight="16dip">
-
- <TableRow
- android:layout_width="wrap_content"
- android:layout_height="wrap_content" >
-
- <ImageView android:id="@+id/sms_short_code_coins_icon"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:paddingLeft="8dip"
- android:paddingRight="8dip"
- android:src="@drawable/ic_coins_l" />
- <TextView android:id="@+id/sms_short_code_detail_message"
- android:layout_width="match_parent"
- android:layout_height="wrap_content" />
- </TableRow>
-
- <TableRow
- android:layout_width="wrap_content"
- android:layout_height="wrap_content" >
- <RelativeLayout android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:paddingTop="12dip"
- android:paddingLeft="8dip" >
- <CheckBox android:id="@+id/sms_short_code_remember_choice_checkbox"
- android:paddingTop="11dip"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content" />
- </RelativeLayout>
- <TextView android:id="@+id/sms_short_code_remember_choice_text"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:paddingTop="18dip"
- android:text="@string/sms_short_code_remember_choice" />
- </TableRow>
-
- <TableRow
- android:layout_width="wrap_content"
- android:layout_height="wrap_content" >
-
- <Space android:layout_gravity="fill" />
- <TextView android:id="@+id/sms_short_code_remember_undo_instruction"
- android:paddingTop="10dip"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content" />
- </TableRow>
-
- </TableLayout>
-
-</LinearLayout>
diff --git a/core/res/res/values-mcc001-mnc01/strings.xml b/core/res/res/values-mcc001-mnc01/strings.xml
deleted file mode 100644
index 96af975..0000000
--- a/core/res/res/values-mcc001-mnc01/strings.xml
+++ /dev/null
@@ -1,22 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-/* //device/apps/common/assets/res/any/strings.xml
-**
-** Copyright 2006, The Android Open Source Project
-**
-** Licensed under the Apache License, Version 2.0 (the "License");
-** you may not use this file except in compliance with the License.
-** You may obtain a copy of the License at
-**
-** http://www.apache.org/licenses/LICENSE-2.0
-**
-** Unless required by applicable law or agreed to in writing, software
-** distributed under the License is distributed on an "AS IS" BASIS,
-** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-** See the License for the specific language governing permissions and
-** limitations under the License.
-*/
--->
-<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="mmcc_illegal_me">Phone not allowed MM#6</string>
-</resources>
diff --git a/core/res/res/values-mcc001/config.xml b/core/res/res/values-mcc001/config.xml
deleted file mode 100644
index 93cde03..0000000
--- a/core/res/res/values-mcc001/config.xml
+++ /dev/null
@@ -1,21 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-/*
-** Copyright 2016, The Android Open Source Project
-**
-** Licensed under the Apache License, Version 2.0 (the "License");
-** you may not use this file except in compliance with the License.
-** You may obtain a copy of the License at
-**
-** http://www.apache.org/licenses/LICENSE-2.0
-**
-** Unless required by applicable law or agreed to in writing, software
-** distributed under the License is distributed on an "AS IS" BASIS,
-** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-** See the License for the specific language governing permissions and
-** limitations under the License.
-*/
--->
-<resources>
- <bool name="config_use_sim_language_file">true</bool>
-</resources>
diff --git a/core/res/res/values-mcc204-mnc04/config.xml b/core/res/res/values-mcc204-mnc04/config.xml
deleted file mode 100755
index 4a3bf22..0000000
--- a/core/res/res/values-mcc204-mnc04/config.xml
+++ /dev/null
@@ -1,29 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-/*
-** Copyright 2013, The Android Open Source Project
-**
-** Licensed under the Apache License, Version 2.0 (the "License");
-** you may not use this file except in compliance with the License.
-** You my obtain a copy of the License at
-**
-** http://www.apache.org/licenses/LICENSE-2.0
-**
-** Unless required by applicable law or agreed to in writing, software
-** distributed under the License is distributed on an "AS IS" BASIS,
-** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-** See the License for the specific language governing permissions and
-** limitations under the License.
-*/
--->
-
-<!-- These resources are around just to allow their values to be customized
- for different hardware and product builds. -->
-<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-
- <!-- Configure mobile network MTU. Carrier specific value is set here.
- -->
- <integer name="config_mobile_mtu">1358</integer>
-
- <string translatable="false" name="prohibit_manual_network_selection_in_gobal_mode">true;BAE0000000000000</string>
-</resources>
diff --git a/core/res/res/values-mcc204/config.xml b/core/res/res/values-mcc204/config.xml
deleted file mode 100644
index 790f768..0000000
--- a/core/res/res/values-mcc204/config.xml
+++ /dev/null
@@ -1,24 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-/*
-** Copyright 2017, The Android Open Source Project
-**
-** Licensed under the Apache License, Version 2.0 (the "License");
-** you may not use this file except in compliance with the License.
-** You may obtain a copy of the License at
-**
-** http://www.apache.org/licenses/LICENSE-2.0
-**
-** Unless required by applicable law or agreed to in writing, software
-** distributed under the License is distributed on an "AS IS" BASIS,
-** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-** See the License for the specific language governing permissions and
-** limitations under the License.
-*/
--->
-
-<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-
- <bool name="config_use_sim_language_file">true</bool>
-
-</resources>
diff --git a/core/res/res/values-mcc219/config.xml b/core/res/res/values-mcc219/config.xml
deleted file mode 100644
index 7ae82fa..0000000
--- a/core/res/res/values-mcc219/config.xml
+++ /dev/null
@@ -1,32 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-/*
-** Copyright 2009, The Android Open Source Project
-**
-** Licensed under the Apache License, Version 2.0 (the "License");
-** you may not use this file except in compliance with the License.
-** You may obtain a copy of the License at
-**
-** http://www.apache.org/licenses/LICENSE-2.0
-**
-** Unless required by applicable law or agreed to in writing, software
-** distributed under the License is distributed on an "AS IS" BASIS,
-** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-** See the License for the specific language governing permissions and
-** limitations under the License.
-*/
--->
-
-<!-- These resources are around just to allow their values to be customized
- for different hardware and product builds. -->
-<resources>
- <!-- Do not translate. Defines the slots is Two Digit Number for dialing normally not USSD -->
- <string-array name="config_twoDigitNumberPattern">
- <item>"92"</item>
- <item>"93"</item>
- <item>"94"</item>
- <item>"95"</item>
- <item>"96"</item>
- </string-array>
-
-</resources>
diff --git a/core/res/res/values-mcc220/config.xml b/core/res/res/values-mcc220/config.xml
deleted file mode 100644
index 7ae82fa..0000000
--- a/core/res/res/values-mcc220/config.xml
+++ /dev/null
@@ -1,32 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-/*
-** Copyright 2009, The Android Open Source Project
-**
-** Licensed under the Apache License, Version 2.0 (the "License");
-** you may not use this file except in compliance with the License.
-** You may obtain a copy of the License at
-**
-** http://www.apache.org/licenses/LICENSE-2.0
-**
-** Unless required by applicable law or agreed to in writing, software
-** distributed under the License is distributed on an "AS IS" BASIS,
-** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-** See the License for the specific language governing permissions and
-** limitations under the License.
-*/
--->
-
-<!-- These resources are around just to allow their values to be customized
- for different hardware and product builds. -->
-<resources>
- <!-- Do not translate. Defines the slots is Two Digit Number for dialing normally not USSD -->
- <string-array name="config_twoDigitNumberPattern">
- <item>"92"</item>
- <item>"93"</item>
- <item>"94"</item>
- <item>"95"</item>
- <item>"96"</item>
- </string-array>
-
-</resources>
diff --git a/core/res/res/values-mcc234-mnc20/config.xml b/core/res/res/values-mcc234-mnc20/config.xml
deleted file mode 100644
index 224dc31..0000000
--- a/core/res/res/values-mcc234-mnc20/config.xml
+++ /dev/null
@@ -1,26 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-/*
-** Copyright 2013, The Android Open Source Project
-**
-** Licensed under the Apache License, Version 2.0 (the "License");
-** you may not use this file except in compliance with the License.
-** You my obtain a copy of the License at
-**
-** http://www.apache.org/licenses/LICENSE-2.0
-**
-** Unless required by applicable law or agreed to in writing, software
-** distributed under the License is distributed on an "AS IS" BASIS,
-** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-** See the License for the specific language governing permissions and
-** limitations under the License.
-*/
--->
-
-<!-- These resources are around just to allow their values to be customized
- for different hardware and product builds. -->
-<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <!-- Configure mobile network MTU. Carrier specific value is set here.
- -->
- <integer name="config_mobile_mtu">1440</integer>
-</resources>
diff --git a/core/res/res/values-mcc235-mnc94/config.xml b/core/res/res/values-mcc235-mnc94/config.xml
index 38ae2a0..6a6b0e5 100644
--- a/core/res/res/values-mcc235-mnc94/config.xml
+++ b/core/res/res/values-mcc235-mnc94/config.xml
@@ -31,8 +31,4 @@
<item>9</item>
</integer-array>
- <!-- Configure mobile network MTU. Carrier specific value is set here.
- -->
- <integer name="config_mobile_mtu">1440</integer>
-
</resources>
diff --git a/core/res/res/values-mcc240-mnc01/config.xml b/core/res/res/values-mcc240-mnc01/config.xml
deleted file mode 100644
index 7fb5c46..0000000
--- a/core/res/res/values-mcc240-mnc01/config.xml
+++ /dev/null
@@ -1,27 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-/*
-** Copyright 2013, The Android Open Source Project
-**
-** Licensed under the Apache License, Version 2.0 (the "License");
-** you may not use this file except in compliance with the License.
-** You my obtain a copy of the License at
-**
-** http://www.apache.org/licenses/LICENSE-2.0
-**
-** Unless required by applicable law or agreed to in writing, software
-** distributed under the License is distributed on an "AS IS" BASIS,
-** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-** See the License for the specific language governing permissions and
-** limitations under the License.
-*/
--->
-
-<!-- These resources are around just to allow their values to be customized
- for different hardware and product builds. -->
-<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-
- <!-- Do not set the system language as value of EF LI/EF PL -->
- <bool name="config_use_sim_language_file">false</bool>
-
-</resources>
diff --git a/core/res/res/values-mcc240-mnc05/config.xml b/core/res/res/values-mcc240-mnc05/config.xml
deleted file mode 100644
index 7fb5c46..0000000
--- a/core/res/res/values-mcc240-mnc05/config.xml
+++ /dev/null
@@ -1,27 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-/*
-** Copyright 2013, The Android Open Source Project
-**
-** Licensed under the Apache License, Version 2.0 (the "License");
-** you may not use this file except in compliance with the License.
-** You my obtain a copy of the License at
-**
-** http://www.apache.org/licenses/LICENSE-2.0
-**
-** Unless required by applicable law or agreed to in writing, software
-** distributed under the License is distributed on an "AS IS" BASIS,
-** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-** See the License for the specific language governing permissions and
-** limitations under the License.
-*/
--->
-
-<!-- These resources are around just to allow their values to be customized
- for different hardware and product builds. -->
-<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-
- <!-- Do not set the system language as value of EF LI/EF PL -->
- <bool name="config_use_sim_language_file">false</bool>
-
-</resources>
diff --git a/core/res/res/values-mcc302-mnc220/config.xml b/core/res/res/values-mcc302-mnc220/config.xml
deleted file mode 100644
index 0ae2b4d..0000000
--- a/core/res/res/values-mcc302-mnc220/config.xml
+++ /dev/null
@@ -1,26 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-/*
-** Copyright 2013, The Android Open Source Project
-**
-** Licensed under the Apache License, Version 2.0 (the "License");
-** you may not use this file except in compliance with the License.
-** You may obtain a copy of the License at
-**
-** http://www.apache.org/licenses/LICENSE-2.0
-**
-** Unless required by applicable law or agreed to in writing, software
-** distributed under the License is distributed on an "AS IS" BASIS,
-** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-** See the License for the specific language governing permissions and
-** limitations under the License.
-*/
--->
-
-<!-- These resources are around just to allow their values to be customized
- for different hardware and product builds. -->
-<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-
- <integer name="config_mobile_mtu">1410</integer>
-
-</resources>
diff --git a/core/res/res/values-mcc302-mnc370/config.xml b/core/res/res/values-mcc302-mnc370/config.xml
deleted file mode 100644
index ef32acd..0000000
--- a/core/res/res/values-mcc302-mnc370/config.xml
+++ /dev/null
@@ -1,27 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-/*
-** Copyright 2009, The Android Open Source Project
-**
-** Licensed under the Apache License, Version 2.0 (the "License");
-** you may not use this file except in compliance with the License.
-** You may obtain a copy of the License at
-**
-** http://www.apache.org/licenses/LICENSE-2.0
-**
-** Unless required by applicable law or agreed to in writing, software
-** distributed under the License is distributed on an "AS IS" BASIS,
-** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-** See the License for the specific language governing permissions and
-** limitations under the License.
-*/
--->
-
-<!-- These resources are around just to allow their values to be customized
- for different hardware and product builds. Do not translate. -->
-<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <!-- Configure mobile network MTU. Carrier specific value is set here.
- -->
- <integer name="config_mobile_mtu">1410</integer>
-
-</resources>
diff --git a/core/res/res/values-mcc302-mnc610/config.xml b/core/res/res/values-mcc302-mnc610/config.xml
deleted file mode 100644
index 2b78f55..0000000
--- a/core/res/res/values-mcc302-mnc610/config.xml
+++ /dev/null
@@ -1,25 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-/*
-** Copyright 2013, The Android Open Source Project
-**
-** Licensed under the Apache License, Version 2.0 (the "License");
-** you may not use this file except in compliance with the License.
-** You may obtain a copy of the License at
-**
-** http://www.apache.org/licenses/LICENSE-2.0
-**
-** Unless required by applicable law or agreed to in writing, software
-** distributed under the License is distributed on an "AS IS" BASIS,
-** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-** See the License for the specific language governing permissions and
-** limitations under the License.
-*/
--->
-
-<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <!-- Configure mobile network MTU. Carrier specific value is set here.
- -->
- <integer name="config_mobile_mtu">1428</integer>
-
-</resources>
diff --git a/core/res/res/values-mcc302-mnc660/config.xml b/core/res/res/values-mcc302-mnc660/config.xml
index beb2336..6b5c1cf 100644
--- a/core/res/res/values-mcc302-mnc660/config.xml
+++ b/core/res/res/values-mcc302-mnc660/config.xml
@@ -29,8 +29,5 @@
<item>7</item>
<item>9</item>
</integer-array>
- <!-- Configure mobile network MTU. Carrier specific value is set here.
- -->
- <integer name="config_mobile_mtu">1430</integer>
</resources>
diff --git a/core/res/res/values-mcc302-mnc720/config.xml b/core/res/res/values-mcc302-mnc720/config.xml
deleted file mode 100644
index 7be9a1c..0000000
--- a/core/res/res/values-mcc302-mnc720/config.xml
+++ /dev/null
@@ -1,27 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-/*
-** Copyright 2009, The Android Open Source Project
-**
-** Licensed under the Apache License, Version 2.0 (the "License");
-** you may not use this file except in compliance with the License.
-** You may obtain a copy of the License at
-**
-** http://www.apache.org/licenses/LICENSE-2.0
-**
-** Unless required by applicable law or agreed to in writing, software
-** distributed under the License is distributed on an "AS IS" BASIS,
-** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-** See the License for the specific language governing permissions and
-** limitations under the License.
-*/
--->
-
-<!-- These resources are around just to allow their values to be customized
- for different hardware and product builds. Do not translate. -->
-<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <!-- Configure mobile network MTU. Carrier specific value is set here.
- -->
- <integer name="config_mobile_mtu">1430</integer>
-
-</resources>
diff --git a/core/res/res/values-mcc302-mnc780/config.xml b/core/res/res/values-mcc302-mnc780/config.xml
deleted file mode 100644
index d300dab..0000000
--- a/core/res/res/values-mcc302-mnc780/config.xml
+++ /dev/null
@@ -1,27 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-/*
-** Copyright 2013, The Android Open Source Project
-**
-** Licensed under the Apache License, Version 2.0 (the "License");
-** you may not use this file except in compliance with the License.
-** You my obtain a copy of the License at
-**
-** http://www.apache.org/licenses/LICENSE-2.0
-**
-** Unless required by applicable law or agreed to in writing, software
-** distributed under the License is distributed on an "AS IS" BASIS,
-** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-** See the License for the specific language governing permissions and
-** limitations under the License.
-*/
--->
-
-<!-- These resources are around just to allow their values to be customized
- for different hardware and product builds. -->
-<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <!-- Configure mobile network MTU. Carrier specific value is set here.
- -->
- <integer name="config_mobile_mtu">1358</integer>
-
-</resources>
diff --git a/core/res/res/values-mcc310-mnc004/config.xml b/core/res/res/values-mcc310-mnc004/config.xml
index a328c49..df1aed4 100755
--- a/core/res/res/values-mcc310-mnc004/config.xml
+++ b/core/res/res/values-mcc310-mnc004/config.xml
@@ -34,10 +34,4 @@
<item>83</item>
</string-array>
- <bool name="config_auto_attach_data_on_creation">false</bool>
-
- <string translatable="false" name="prohibit_manual_network_selection_in_gobal_mode">true</string>
-
- <bool name="config_use_sim_language_file">true</bool>
-
</resources>
diff --git a/core/res/res/values-mcc310-mnc030/strings.xml b/core/res/res/values-mcc310-mnc030/strings.xml
deleted file mode 100644
index 6a404d5..0000000
--- a/core/res/res/values-mcc310-mnc030/strings.xml
+++ /dev/null
@@ -1,24 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-/* //device/apps/common/assets/res/any/strings.xml
-**
-** Copyright 2006, The Android Open Source Project
-**
-** Licensed under the Apache License, Version 2.0 (the "License");
-** you may not use this file except in compliance with the License.
-** You may obtain a copy of the License at
-**
-** http://www.apache.org/licenses/LICENSE-2.0
-**
-** Unless required by applicable law or agreed to in writing, software
-** distributed under the License is distributed on an "AS IS" BASIS,
-** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-** See the License for the specific language governing permissions and
-** limitations under the License.
-*/
--->
-<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="mmcc_imsi_unknown_in_hlr">SIM not provisioned MM#2</string>
- <string name="mmcc_illegal_ms">SIM not allowed MM#3</string>
- <string name="mmcc_illegal_me">Phone not allowed MM#6</string>
-</resources>
diff --git a/core/res/res/values-mcc310-mnc120/config.xml b/core/res/res/values-mcc310-mnc120/config.xml
index 413c698..c92cb57 100644
--- a/core/res/res/values-mcc310-mnc120/config.xml
+++ b/core/res/res/values-mcc310-mnc120/config.xml
@@ -21,38 +21,8 @@
for different hardware and product builds. -->
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <!-- Configure mobile network MTU. Carrier specific value is set here.
- -->
- <integer name="config_mobile_mtu">1422</integer>
-
<!-- If this value is true, The mms content-disposition field is supported correctly.
If false, Content-disposition fragments are ignored -->
<bool name="config_mms_content_disposition_support">false</bool>
- <!-- An array of CDMA roaming indicators which means international roaming -->
- <integer-array translatable="false" name="config_cdma_international_roaming_indicators" >
- <item>2</item>
- <item>74</item>
- <item>124</item>
- <item>125</item>
- <item>126</item>
- <item>157</item>
- <item>158</item>
- <item>159</item>
- <item>193</item>
- <item>194</item>
- <item>195</item>
- <item>196</item>
- <item>197</item>
- <item>198</item>
- <item>228</item>
- <item>229</item>
- <item>230</item>
- <item>231</item>
- <item>232</item>
- <item>233</item>
- <item>234</item>
- <item>235</item>
- </integer-array>
-
</resources>
diff --git a/core/res/res/values-mcc310-mnc150/config.xml b/core/res/res/values-mcc310-mnc150/config.xml
deleted file mode 100644
index e7d1325..0000000
--- a/core/res/res/values-mcc310-mnc150/config.xml
+++ /dev/null
@@ -1,45 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-/*
-** Copyright 2013, The Android Open Source Project
-**
-** Licensed under the Apache License, Version 2.0 (the "License");
-** you may not use this file except in compliance with the License.
-** You may obtain a copy of the License at
-**
-** http://www.apache.org/licenses/LICENSE-2.0
-**
-** Unless required by applicable law or agreed to in writing, software
-** distributed under the License is distributed on an "AS IS" BASIS,
-** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-** See the License for the specific language governing permissions and
-** limitations under the License.
-*/
--->
-
-<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string-array translatable="false" name="config_twoDigitNumberPattern">
- <item>"0"</item>
- <item>"00"</item>
- <item>"*0"</item>
- <item>"*1"</item>
- <item>"*2"</item>
- <item>"*3"</item>
- <item>"*4"</item>
- <item>"*5"</item>
- <item>"*6"</item>
- <item>"*7"</item>
- <item>"*8"</item>
- <item>"*9"</item>
- <item>"#0"</item>
- <item>"#1"</item>
- <item>"#2"</item>
- <item>"#3"</item>
- <item>"#4"</item>
- <item>"#5"</item>
- <item>"#6"</item>
- <item>"#7"</item>
- <item>"#8"</item>
- <item>"#9"</item>
- </string-array>
-</resources>
diff --git a/core/res/res/values-mcc310-mnc150/strings.xml b/core/res/res/values-mcc310-mnc150/strings.xml
deleted file mode 100644
index 96af975..0000000
--- a/core/res/res/values-mcc310-mnc150/strings.xml
+++ /dev/null
@@ -1,22 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-/* //device/apps/common/assets/res/any/strings.xml
-**
-** Copyright 2006, The Android Open Source Project
-**
-** Licensed under the Apache License, Version 2.0 (the "License");
-** you may not use this file except in compliance with the License.
-** You may obtain a copy of the License at
-**
-** http://www.apache.org/licenses/LICENSE-2.0
-**
-** Unless required by applicable law or agreed to in writing, software
-** distributed under the License is distributed on an "AS IS" BASIS,
-** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-** See the License for the specific language governing permissions and
-** limitations under the License.
-*/
--->
-<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="mmcc_illegal_me">Phone not allowed MM#6</string>
-</resources>
diff --git a/core/res/res/values-mcc310-mnc160/config.xml b/core/res/res/values-mcc310-mnc160/config.xml
index 5a6a84b..39fd2e5 100644
--- a/core/res/res/values-mcc310-mnc160/config.xml
+++ b/core/res/res/values-mcc310-mnc160/config.xml
@@ -21,10 +21,6 @@
for different hardware and product builds. -->
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <!-- Configure mobile network MTU. Carrier specific value is set here.
- -->
- <integer name="config_mobile_mtu">1440</integer>
-
<!-- Flag specifying whether VoLTE should be available for carrier: independent of
carrier provisioning. If false: hard disabled. If true: then depends on carrier
provisioning, availability etc -->
diff --git a/core/res/res/values-mcc310-mnc170/strings.xml b/core/res/res/values-mcc310-mnc170/strings.xml
deleted file mode 100644
index 6a404d5..0000000
--- a/core/res/res/values-mcc310-mnc170/strings.xml
+++ /dev/null
@@ -1,24 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-/* //device/apps/common/assets/res/any/strings.xml
-**
-** Copyright 2006, The Android Open Source Project
-**
-** Licensed under the Apache License, Version 2.0 (the "License");
-** you may not use this file except in compliance with the License.
-** You may obtain a copy of the License at
-**
-** http://www.apache.org/licenses/LICENSE-2.0
-**
-** Unless required by applicable law or agreed to in writing, software
-** distributed under the License is distributed on an "AS IS" BASIS,
-** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-** See the License for the specific language governing permissions and
-** limitations under the License.
-*/
--->
-<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="mmcc_imsi_unknown_in_hlr">SIM not provisioned MM#2</string>
- <string name="mmcc_illegal_ms">SIM not allowed MM#3</string>
- <string name="mmcc_illegal_me">Phone not allowed MM#6</string>
-</resources>
diff --git a/core/res/res/values-mcc310-mnc200/config.xml b/core/res/res/values-mcc310-mnc200/config.xml
index 5a6a84b..39fd2e5 100644
--- a/core/res/res/values-mcc310-mnc200/config.xml
+++ b/core/res/res/values-mcc310-mnc200/config.xml
@@ -21,10 +21,6 @@
for different hardware and product builds. -->
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <!-- Configure mobile network MTU. Carrier specific value is set here.
- -->
- <integer name="config_mobile_mtu">1440</integer>
-
<!-- Flag specifying whether VoLTE should be available for carrier: independent of
carrier provisioning. If false: hard disabled. If true: then depends on carrier
provisioning, availability etc -->
diff --git a/core/res/res/values-mcc310-mnc210/config.xml b/core/res/res/values-mcc310-mnc210/config.xml
index 5a6a84b..39fd2e5 100644
--- a/core/res/res/values-mcc310-mnc210/config.xml
+++ b/core/res/res/values-mcc310-mnc210/config.xml
@@ -21,10 +21,6 @@
for different hardware and product builds. -->
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <!-- Configure mobile network MTU. Carrier specific value is set here.
- -->
- <integer name="config_mobile_mtu">1440</integer>
-
<!-- Flag specifying whether VoLTE should be available for carrier: independent of
carrier provisioning. If false: hard disabled. If true: then depends on carrier
provisioning, availability etc -->
diff --git a/core/res/res/values-mcc310-mnc220/config.xml b/core/res/res/values-mcc310-mnc220/config.xml
index 5a6a84b..39fd2e5 100644
--- a/core/res/res/values-mcc310-mnc220/config.xml
+++ b/core/res/res/values-mcc310-mnc220/config.xml
@@ -21,10 +21,6 @@
for different hardware and product builds. -->
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <!-- Configure mobile network MTU. Carrier specific value is set here.
- -->
- <integer name="config_mobile_mtu">1440</integer>
-
<!-- Flag specifying whether VoLTE should be available for carrier: independent of
carrier provisioning. If false: hard disabled. If true: then depends on carrier
provisioning, availability etc -->
diff --git a/core/res/res/values-mcc310-mnc230/config.xml b/core/res/res/values-mcc310-mnc230/config.xml
index 5a6a84b..39fd2e5 100644
--- a/core/res/res/values-mcc310-mnc230/config.xml
+++ b/core/res/res/values-mcc310-mnc230/config.xml
@@ -21,10 +21,6 @@
for different hardware and product builds. -->
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <!-- Configure mobile network MTU. Carrier specific value is set here.
- -->
- <integer name="config_mobile_mtu">1440</integer>
-
<!-- Flag specifying whether VoLTE should be available for carrier: independent of
carrier provisioning. If false: hard disabled. If true: then depends on carrier
provisioning, availability etc -->
diff --git a/core/res/res/values-mcc310-mnc240/config.xml b/core/res/res/values-mcc310-mnc240/config.xml
index 5a6a84b..39fd2e5 100644
--- a/core/res/res/values-mcc310-mnc240/config.xml
+++ b/core/res/res/values-mcc310-mnc240/config.xml
@@ -21,10 +21,6 @@
for different hardware and product builds. -->
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <!-- Configure mobile network MTU. Carrier specific value is set here.
- -->
- <integer name="config_mobile_mtu">1440</integer>
-
<!-- Flag specifying whether VoLTE should be available for carrier: independent of
carrier provisioning. If false: hard disabled. If true: then depends on carrier
provisioning, availability etc -->
diff --git a/core/res/res/values-mcc310-mnc250/config.xml b/core/res/res/values-mcc310-mnc250/config.xml
index 5a6a84b..39fd2e5 100644
--- a/core/res/res/values-mcc310-mnc250/config.xml
+++ b/core/res/res/values-mcc310-mnc250/config.xml
@@ -21,10 +21,6 @@
for different hardware and product builds. -->
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <!-- Configure mobile network MTU. Carrier specific value is set here.
- -->
- <integer name="config_mobile_mtu">1440</integer>
-
<!-- Flag specifying whether VoLTE should be available for carrier: independent of
carrier provisioning. If false: hard disabled. If true: then depends on carrier
provisioning, availability etc -->
diff --git a/core/res/res/values-mcc310-mnc260/config.xml b/core/res/res/values-mcc310-mnc260/config.xml
index 5a6a84b..39fd2e5 100644
--- a/core/res/res/values-mcc310-mnc260/config.xml
+++ b/core/res/res/values-mcc310-mnc260/config.xml
@@ -21,10 +21,6 @@
for different hardware and product builds. -->
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <!-- Configure mobile network MTU. Carrier specific value is set here.
- -->
- <integer name="config_mobile_mtu">1440</integer>
-
<!-- Flag specifying whether VoLTE should be available for carrier: independent of
carrier provisioning. If false: hard disabled. If true: then depends on carrier
provisioning, availability etc -->
diff --git a/core/res/res/values-mcc310-mnc270/config.xml b/core/res/res/values-mcc310-mnc270/config.xml
index 5a6a84b..39fd2e5 100644
--- a/core/res/res/values-mcc310-mnc270/config.xml
+++ b/core/res/res/values-mcc310-mnc270/config.xml
@@ -21,10 +21,6 @@
for different hardware and product builds. -->
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <!-- Configure mobile network MTU. Carrier specific value is set here.
- -->
- <integer name="config_mobile_mtu">1440</integer>
-
<!-- Flag specifying whether VoLTE should be available for carrier: independent of
carrier provisioning. If false: hard disabled. If true: then depends on carrier
provisioning, availability etc -->
diff --git a/core/res/res/values-mcc310-mnc280/strings.xml b/core/res/res/values-mcc310-mnc280/strings.xml
deleted file mode 100644
index 6a404d5..0000000
--- a/core/res/res/values-mcc310-mnc280/strings.xml
+++ /dev/null
@@ -1,24 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-/* //device/apps/common/assets/res/any/strings.xml
-**
-** Copyright 2006, The Android Open Source Project
-**
-** Licensed under the Apache License, Version 2.0 (the "License");
-** you may not use this file except in compliance with the License.
-** You may obtain a copy of the License at
-**
-** http://www.apache.org/licenses/LICENSE-2.0
-**
-** Unless required by applicable law or agreed to in writing, software
-** distributed under the License is distributed on an "AS IS" BASIS,
-** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-** See the License for the specific language governing permissions and
-** limitations under the License.
-*/
--->
-<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="mmcc_imsi_unknown_in_hlr">SIM not provisioned MM#2</string>
- <string name="mmcc_illegal_ms">SIM not allowed MM#3</string>
- <string name="mmcc_illegal_me">Phone not allowed MM#6</string>
-</resources>
diff --git a/core/res/res/values-mcc310-mnc300/config.xml b/core/res/res/values-mcc310-mnc300/config.xml
index 5a6a84b..39fd2e5 100644
--- a/core/res/res/values-mcc310-mnc300/config.xml
+++ b/core/res/res/values-mcc310-mnc300/config.xml
@@ -21,10 +21,6 @@
for different hardware and product builds. -->
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <!-- Configure mobile network MTU. Carrier specific value is set here.
- -->
- <integer name="config_mobile_mtu">1440</integer>
-
<!-- Flag specifying whether VoLTE should be available for carrier: independent of
carrier provisioning. If false: hard disabled. If true: then depends on carrier
provisioning, availability etc -->
diff --git a/core/res/res/values-mcc310-mnc310/config.xml b/core/res/res/values-mcc310-mnc310/config.xml
index 5a6a84b..39fd2e5 100644
--- a/core/res/res/values-mcc310-mnc310/config.xml
+++ b/core/res/res/values-mcc310-mnc310/config.xml
@@ -21,10 +21,6 @@
for different hardware and product builds. -->
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <!-- Configure mobile network MTU. Carrier specific value is set here.
- -->
- <integer name="config_mobile_mtu">1440</integer>
-
<!-- Flag specifying whether VoLTE should be available for carrier: independent of
carrier provisioning. If false: hard disabled. If true: then depends on carrier
provisioning, availability etc -->
diff --git a/core/res/res/values-mcc310-mnc380/strings.xml b/core/res/res/values-mcc310-mnc380/strings.xml
deleted file mode 100644
index a3fea29..0000000
--- a/core/res/res/values-mcc310-mnc380/strings.xml
+++ /dev/null
@@ -1,23 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-/* //device/apps/common/assets/res/any/strings.xml
-**
-** Copyright 2006, The Android Open Source Project
-**
-** Licensed under the Apache License, Version 2.0 (the "License");
-** you may not use this file except in compliance with the License.
-** You may obtain a copy of the License at
-**
-** http://www.apache.org/licenses/LICENSE-2.0
-**
-** Unless required by applicable law or agreed to in writing, software
-** distributed under the License is distributed on an "AS IS" BASIS,
-** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-** See the License for the specific language governing permissions and
-** limitations under the License.
-*/
--->
-<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="mmcc_imsi_unknown_in_hlr">SIM not provisioned MM#2</string>
- <string name="mmcc_illegal_ms">SIM not allowed MM#3</string>
-</resources>
diff --git a/core/res/res/values-mcc310-mnc410/config.xml b/core/res/res/values-mcc310-mnc410/config.xml
index 3fb3f0f..626c6d1 100644
--- a/core/res/res/values-mcc310-mnc410/config.xml
+++ b/core/res/res/values-mcc310-mnc410/config.xml
@@ -20,34 +20,6 @@
<!-- These resources are around just to allow their values to be customized
for different hardware and product builds. -->
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <!-- Configure mobile network MTU. Carrier specific value is set here.
- -->
- <integer name="config_mobile_mtu">1410</integer>
- <!-- Do not translate. Defines the slots is Two Digit Number for dialing normally not USSD -->
- <string-array name="config_twoDigitNumberPattern">
- <item>"0"</item>
- <item>"00"</item>
- <item>"*0"</item>
- <item>"*1"</item>
- <item>"*2"</item>
- <item>"*3"</item>
- <item>"*4"</item>
- <item>"*5"</item>
- <item>"*6"</item>
- <item>"*7"</item>
- <item>"*8"</item>
- <item>"*9"</item>
- <item>"#0"</item>
- <item>"#1"</item>
- <item>"#2"</item>
- <item>"#3"</item>
- <item>"#4"</item>
- <item>"#5"</item>
- <item>"#6"</item>
- <item>"#7"</item>
- <item>"#8"</item>
- <item>"#9"</item>
- </string-array>
<!-- Enable 5 bar signal strength icon -->
<bool name="config_inflateSignalStrength">true</bool>
diff --git a/core/res/res/values-mcc310-mnc410/strings.xml b/core/res/res/values-mcc310-mnc410/strings.xml
deleted file mode 100644
index 6a404d5..0000000
--- a/core/res/res/values-mcc310-mnc410/strings.xml
+++ /dev/null
@@ -1,24 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-/* //device/apps/common/assets/res/any/strings.xml
-**
-** Copyright 2006, The Android Open Source Project
-**
-** Licensed under the Apache License, Version 2.0 (the "License");
-** you may not use this file except in compliance with the License.
-** You may obtain a copy of the License at
-**
-** http://www.apache.org/licenses/LICENSE-2.0
-**
-** Unless required by applicable law or agreed to in writing, software
-** distributed under the License is distributed on an "AS IS" BASIS,
-** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-** See the License for the specific language governing permissions and
-** limitations under the License.
-*/
--->
-<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="mmcc_imsi_unknown_in_hlr">SIM not provisioned MM#2</string>
- <string name="mmcc_illegal_ms">SIM not allowed MM#3</string>
- <string name="mmcc_illegal_me">Phone not allowed MM#6</string>
-</resources>
diff --git a/core/res/res/values-mcc310-mnc490/config.xml b/core/res/res/values-mcc310-mnc490/config.xml
index 5a6a84b..39fd2e5 100644
--- a/core/res/res/values-mcc310-mnc490/config.xml
+++ b/core/res/res/values-mcc310-mnc490/config.xml
@@ -21,10 +21,6 @@
for different hardware and product builds. -->
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <!-- Configure mobile network MTU. Carrier specific value is set here.
- -->
- <integer name="config_mobile_mtu">1440</integer>
-
<!-- Flag specifying whether VoLTE should be available for carrier: independent of
carrier provisioning. If false: hard disabled. If true: then depends on carrier
provisioning, availability etc -->
diff --git a/core/res/res/values-mcc310-mnc530/config.xml b/core/res/res/values-mcc310-mnc530/config.xml
index 5a6a84b..39fd2e5 100644
--- a/core/res/res/values-mcc310-mnc530/config.xml
+++ b/core/res/res/values-mcc310-mnc530/config.xml
@@ -21,10 +21,6 @@
for different hardware and product builds. -->
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <!-- Configure mobile network MTU. Carrier specific value is set here.
- -->
- <integer name="config_mobile_mtu">1440</integer>
-
<!-- Flag specifying whether VoLTE should be available for carrier: independent of
carrier provisioning. If false: hard disabled. If true: then depends on carrier
provisioning, availability etc -->
diff --git a/core/res/res/values-mcc310-mnc560/strings.xml b/core/res/res/values-mcc310-mnc560/strings.xml
deleted file mode 100644
index 6a404d5..0000000
--- a/core/res/res/values-mcc310-mnc560/strings.xml
+++ /dev/null
@@ -1,24 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-/* //device/apps/common/assets/res/any/strings.xml
-**
-** Copyright 2006, The Android Open Source Project
-**
-** Licensed under the Apache License, Version 2.0 (the "License");
-** you may not use this file except in compliance with the License.
-** You may obtain a copy of the License at
-**
-** http://www.apache.org/licenses/LICENSE-2.0
-**
-** Unless required by applicable law or agreed to in writing, software
-** distributed under the License is distributed on an "AS IS" BASIS,
-** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-** See the License for the specific language governing permissions and
-** limitations under the License.
-*/
--->
-<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="mmcc_imsi_unknown_in_hlr">SIM not provisioned MM#2</string>
- <string name="mmcc_illegal_ms">SIM not allowed MM#3</string>
- <string name="mmcc_illegal_me">Phone not allowed MM#6</string>
-</resources>
diff --git a/core/res/res/values-mcc310-mnc580/config.xml b/core/res/res/values-mcc310-mnc580/config.xml
index 5a6a84b..39fd2e5 100644
--- a/core/res/res/values-mcc310-mnc580/config.xml
+++ b/core/res/res/values-mcc310-mnc580/config.xml
@@ -21,10 +21,6 @@
for different hardware and product builds. -->
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <!-- Configure mobile network MTU. Carrier specific value is set here.
- -->
- <integer name="config_mobile_mtu">1440</integer>
-
<!-- Flag specifying whether VoLTE should be available for carrier: independent of
carrier provisioning. If false: hard disabled. If true: then depends on carrier
provisioning, availability etc -->
diff --git a/core/res/res/values-mcc310-mnc590/config.xml b/core/res/res/values-mcc310-mnc590/config.xml
index 5a6a84b..39fd2e5 100644
--- a/core/res/res/values-mcc310-mnc590/config.xml
+++ b/core/res/res/values-mcc310-mnc590/config.xml
@@ -21,10 +21,6 @@
for different hardware and product builds. -->
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <!-- Configure mobile network MTU. Carrier specific value is set here.
- -->
- <integer name="config_mobile_mtu">1440</integer>
-
<!-- Flag specifying whether VoLTE should be available for carrier: independent of
carrier provisioning. If false: hard disabled. If true: then depends on carrier
provisioning, availability etc -->
diff --git a/core/res/res/values-mcc310-mnc640/config.xml b/core/res/res/values-mcc310-mnc640/config.xml
index 5a6a84b..39fd2e5 100644
--- a/core/res/res/values-mcc310-mnc640/config.xml
+++ b/core/res/res/values-mcc310-mnc640/config.xml
@@ -21,10 +21,6 @@
for different hardware and product builds. -->
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <!-- Configure mobile network MTU. Carrier specific value is set here.
- -->
- <integer name="config_mobile_mtu">1440</integer>
-
<!-- Flag specifying whether VoLTE should be available for carrier: independent of
carrier provisioning. If false: hard disabled. If true: then depends on carrier
provisioning, availability etc -->
diff --git a/core/res/res/values-mcc310-mnc660/config.xml b/core/res/res/values-mcc310-mnc660/config.xml
index 5a6a84b..39fd2e5 100644
--- a/core/res/res/values-mcc310-mnc660/config.xml
+++ b/core/res/res/values-mcc310-mnc660/config.xml
@@ -21,10 +21,6 @@
for different hardware and product builds. -->
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <!-- Configure mobile network MTU. Carrier specific value is set here.
- -->
- <integer name="config_mobile_mtu">1440</integer>
-
<!-- Flag specifying whether VoLTE should be available for carrier: independent of
carrier provisioning. If false: hard disabled. If true: then depends on carrier
provisioning, availability etc -->
diff --git a/core/res/res/values-mcc310-mnc800/config.xml b/core/res/res/values-mcc310-mnc800/config.xml
index 5a6a84b..39fd2e5 100644
--- a/core/res/res/values-mcc310-mnc800/config.xml
+++ b/core/res/res/values-mcc310-mnc800/config.xml
@@ -21,10 +21,6 @@
for different hardware and product builds. -->
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <!-- Configure mobile network MTU. Carrier specific value is set here.
- -->
- <integer name="config_mobile_mtu">1440</integer>
-
<!-- Flag specifying whether VoLTE should be available for carrier: independent of
carrier provisioning. If false: hard disabled. If true: then depends on carrier
provisioning, availability etc -->
diff --git a/core/res/res/values-mcc310-mnc950/strings.xml b/core/res/res/values-mcc310-mnc950/strings.xml
deleted file mode 100644
index 6a404d5..0000000
--- a/core/res/res/values-mcc310-mnc950/strings.xml
+++ /dev/null
@@ -1,24 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-/* //device/apps/common/assets/res/any/strings.xml
-**
-** Copyright 2006, The Android Open Source Project
-**
-** Licensed under the Apache License, Version 2.0 (the "License");
-** you may not use this file except in compliance with the License.
-** You may obtain a copy of the License at
-**
-** http://www.apache.org/licenses/LICENSE-2.0
-**
-** Unless required by applicable law or agreed to in writing, software
-** distributed under the License is distributed on an "AS IS" BASIS,
-** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-** See the License for the specific language governing permissions and
-** limitations under the License.
-*/
--->
-<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="mmcc_imsi_unknown_in_hlr">SIM not provisioned MM#2</string>
- <string name="mmcc_illegal_ms">SIM not allowed MM#3</string>
- <string name="mmcc_illegal_me">Phone not allowed MM#6</string>
-</resources>
diff --git a/core/res/res/values-mcc311-mnc180/strings.xml b/core/res/res/values-mcc311-mnc180/strings.xml
deleted file mode 100644
index 6a404d5..0000000
--- a/core/res/res/values-mcc311-mnc180/strings.xml
+++ /dev/null
@@ -1,24 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-/* //device/apps/common/assets/res/any/strings.xml
-**
-** Copyright 2006, The Android Open Source Project
-**
-** Licensed under the Apache License, Version 2.0 (the "License");
-** you may not use this file except in compliance with the License.
-** You may obtain a copy of the License at
-**
-** http://www.apache.org/licenses/LICENSE-2.0
-**
-** Unless required by applicable law or agreed to in writing, software
-** distributed under the License is distributed on an "AS IS" BASIS,
-** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-** See the License for the specific language governing permissions and
-** limitations under the License.
-*/
--->
-<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="mmcc_imsi_unknown_in_hlr">SIM not provisioned MM#2</string>
- <string name="mmcc_illegal_ms">SIM not allowed MM#3</string>
- <string name="mmcc_illegal_me">Phone not allowed MM#6</string>
-</resources>
diff --git a/core/res/res/values-mcc311-mnc480/config.xml b/core/res/res/values-mcc311-mnc480/config.xml
index 336e30e..eda9141 100755
--- a/core/res/res/values-mcc311-mnc480/config.xml
+++ b/core/res/res/values-mcc311-mnc480/config.xml
@@ -34,12 +34,6 @@
provisioning, availability etc -->
<bool name="config_carrier_vt_available">true</bool>
- <bool name="config_auto_attach_data_on_creation">false</bool>
-
- <string translatable="false" name="prohibit_manual_network_selection_in_gobal_mode">true</string>
-
- <bool name="config_use_sim_language_file">true</bool>
-
<!-- Enable 5 bar signal strength icon -->
<bool name="config_inflateSignalStrength">true</bool>
diff --git a/core/res/res/values-mcc311-mnc490/config.xml b/core/res/res/values-mcc311-mnc490/config.xml
deleted file mode 100644
index 836abdf..0000000
--- a/core/res/res/values-mcc311-mnc490/config.xml
+++ /dev/null
@@ -1,50 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-/*
-** Copyright 2014, The Android Open Source Project
-**
-** Licensed under the Apache License, Version 2.0 (the "License");
-** you may not use this file except in compliance with the License.
-** You my obtain a copy of the License at
-**
-** http://www.apache.org/licenses/LICENSE-2.0
-**
-** Unless required by applicable law or agreed to in writing, software
-** distributed under the License is distributed on an "AS IS" BASIS,
-** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-** See the License for the specific language governing permissions and
-** limitations under the License.
-*/
--->
-
-<!-- These resources are around just to allow their values to be customized
- for different hardware and product builds. -->
-<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-
- <!-- An array of CDMA roaming indicators which means international roaming -->
- <integer-array translatable="false" name="config_cdma_international_roaming_indicators" >
- <item>2</item>
- <item>74</item>
- <item>124</item>
- <item>125</item>
- <item>126</item>
- <item>157</item>
- <item>158</item>
- <item>159</item>
- <item>193</item>
- <item>194</item>
- <item>195</item>
- <item>196</item>
- <item>197</item>
- <item>198</item>
- <item>228</item>
- <item>229</item>
- <item>230</item>
- <item>231</item>
- <item>232</item>
- <item>233</item>
- <item>234</item>
- <item>235</item>
- </integer-array>
-
-</resources>
diff --git a/core/res/res/values-mcc311-mnc870/config.xml b/core/res/res/values-mcc311-mnc870/config.xml
deleted file mode 100644
index f6aed13..0000000
--- a/core/res/res/values-mcc311-mnc870/config.xml
+++ /dev/null
@@ -1,54 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-/*
-** Copyright 2013, The Android Open Source Project
-**
-** Licensed under the Apache License, Version 2.0 (the "License");
-** you may not use this file except in compliance with the License.
-** You my obtain a copy of the License at
-**
-** http://www.apache.org/licenses/LICENSE-2.0
-**
-** Unless required by applicable law or agreed to in writing, software
-** distributed under the License is distributed on an "AS IS" BASIS,
-** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-** See the License for the specific language governing permissions and
-** limitations under the License.
-*/
--->
-
-<!-- These resources are around just to allow their values to be customized
- for different hardware and product builds. -->
-<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-
- <!-- Configure mobile network MTU. Carrier specific value is set here.
- -->
- <integer name="config_mobile_mtu">1422</integer>
-
- <!-- An array of CDMA roaming indicators which means international roaming -->
- <integer-array translatable="false" name="config_cdma_international_roaming_indicators" >
- <item>2</item>
- <item>74</item>
- <item>124</item>
- <item>125</item>
- <item>126</item>
- <item>157</item>
- <item>158</item>
- <item>159</item>
- <item>193</item>
- <item>194</item>
- <item>195</item>
- <item>196</item>
- <item>197</item>
- <item>198</item>
- <item>228</item>
- <item>229</item>
- <item>230</item>
- <item>231</item>
- <item>232</item>
- <item>233</item>
- <item>234</item>
- <item>235</item>
- </integer-array>
-
-</resources>
diff --git a/core/res/res/values-mcc312-mnc530/config.xml b/core/res/res/values-mcc312-mnc530/config.xml
index 413c698..c92cb57 100644
--- a/core/res/res/values-mcc312-mnc530/config.xml
+++ b/core/res/res/values-mcc312-mnc530/config.xml
@@ -21,38 +21,8 @@
for different hardware and product builds. -->
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <!-- Configure mobile network MTU. Carrier specific value is set here.
- -->
- <integer name="config_mobile_mtu">1422</integer>
-
<!-- If this value is true, The mms content-disposition field is supported correctly.
If false, Content-disposition fragments are ignored -->
<bool name="config_mms_content_disposition_support">false</bool>
- <!-- An array of CDMA roaming indicators which means international roaming -->
- <integer-array translatable="false" name="config_cdma_international_roaming_indicators" >
- <item>2</item>
- <item>74</item>
- <item>124</item>
- <item>125</item>
- <item>126</item>
- <item>157</item>
- <item>158</item>
- <item>159</item>
- <item>193</item>
- <item>194</item>
- <item>195</item>
- <item>196</item>
- <item>197</item>
- <item>198</item>
- <item>228</item>
- <item>229</item>
- <item>230</item>
- <item>231</item>
- <item>232</item>
- <item>233</item>
- <item>234</item>
- <item>235</item>
- </integer-array>
-
</resources>
diff --git a/core/res/res/values-mcc312-mnc670/strings.xml b/core/res/res/values-mcc312-mnc670/strings.xml
deleted file mode 100644
index 96af975..0000000
--- a/core/res/res/values-mcc312-mnc670/strings.xml
+++ /dev/null
@@ -1,22 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-/* //device/apps/common/assets/res/any/strings.xml
-**
-** Copyright 2006, The Android Open Source Project
-**
-** Licensed under the Apache License, Version 2.0 (the "License");
-** you may not use this file except in compliance with the License.
-** You may obtain a copy of the License at
-**
-** http://www.apache.org/licenses/LICENSE-2.0
-**
-** Unless required by applicable law or agreed to in writing, software
-** distributed under the License is distributed on an "AS IS" BASIS,
-** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-** See the License for the specific language governing permissions and
-** limitations under the License.
-*/
--->
-<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="mmcc_illegal_me">Phone not allowed MM#6</string>
-</resources>
diff --git a/core/res/res/values-mcc313-mnc100/config.xml b/core/res/res/values-mcc313-mnc100/config.xml
deleted file mode 100644
index ccd03f1..0000000
--- a/core/res/res/values-mcc313-mnc100/config.xml
+++ /dev/null
@@ -1,45 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-/*
-** Copyright 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.
-*/
--->
-
-<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string-array translatable="false" name="config_twoDigitNumberPattern">
- <item>"0"</item>
- <item>"00"</item>
- <item>"*0"</item>
- <item>"*1"</item>
- <item>"*2"</item>
- <item>"*3"</item>
- <item>"*4"</item>
- <item>"*5"</item>
- <item>"*6"</item>
- <item>"*7"</item>
- <item>"*8"</item>
- <item>"*9"</item>
- <item>"#0"</item>
- <item>"#1"</item>
- <item>"#2"</item>
- <item>"#3"</item>
- <item>"#4"</item>
- <item>"#5"</item>
- <item>"#6"</item>
- <item>"#7"</item>
- <item>"#8"</item>
- <item>"#9"</item>
- </string-array>
-</resources>
diff --git a/core/res/res/values-mcc313-mnc100/strings.xml b/core/res/res/values-mcc313-mnc100/strings.xml
deleted file mode 100644
index 96af975..0000000
--- a/core/res/res/values-mcc313-mnc100/strings.xml
+++ /dev/null
@@ -1,22 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-/* //device/apps/common/assets/res/any/strings.xml
-**
-** Copyright 2006, The Android Open Source Project
-**
-** Licensed under the Apache License, Version 2.0 (the "License");
-** you may not use this file except in compliance with the License.
-** You may obtain a copy of the License at
-**
-** http://www.apache.org/licenses/LICENSE-2.0
-**
-** Unless required by applicable law or agreed to in writing, software
-** distributed under the License is distributed on an "AS IS" BASIS,
-** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-** See the License for the specific language governing permissions and
-** limitations under the License.
-*/
--->
-<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="mmcc_illegal_me">Phone not allowed MM#6</string>
-</resources>
diff --git a/core/res/res/values-mcc334-mnc020/config.xml b/core/res/res/values-mcc334-mnc020/config.xml
deleted file mode 100644
index 0970517..0000000
--- a/core/res/res/values-mcc334-mnc020/config.xml
+++ /dev/null
@@ -1,21 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-/*
-** Copyright 2014, The Android Open Source Project
-**
-** Licensed under the Apache License, Version 2.0 (the "License");
-** you may not use this file except in compliance with the License.
-** You may obtain a copy of the License at
-**
-** http://www.apache.org/licenses/LICENSE-2.0
-**
-** Unless required by applicable law or agreed to in writing, software
-** distributed under the License is distributed on an "AS IS" BASIS,
-** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-** See the License for the specific language governing permissions and
-** limitations under the License.
-*/
--->
-<resources>
- <bool name="config_use_sim_language_file">false</bool>
-</resources>
\ No newline at end of file
diff --git a/core/res/res/values-mcc334-mnc050/config.xml b/core/res/res/values-mcc334-mnc050/config.xml
index 23678f1..876c26e 100644
--- a/core/res/res/values-mcc334-mnc050/config.xml
+++ b/core/res/res/values-mcc334-mnc050/config.xml
@@ -30,9 +30,4 @@
<item>7</item>
<item>9</item>
</integer-array>
-
- <!-- Do not translate. Defines the slots is Two Digit Number for dialing normally not USSD -->
- <string-array translatable="false" name="config_twoDigitNumberPattern">
- <item>"#9"</item>
- </string-array>
</resources>
diff --git a/core/res/res/values-mcc334-mnc090/config.xml b/core/res/res/values-mcc334-mnc090/config.xml
deleted file mode 100644
index 1632a42..0000000
--- a/core/res/res/values-mcc334-mnc090/config.xml
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-/*
-** Copyright 2017, The Android Open Source Project
-**
-** Licensed under the Apache License, Version 2.0 (the "License");
-** you may not use this file except in compliance with the License.
-** You my obtain a copy of the License at
-**
-** http://www.apache.org/licenses/LICENSE-2.0
-**
-** Unless required by applicable law or agreed to in writing, software
-** distributed under the License is distributed on an "AS IS" BASIS,
-** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-** See the License for the specific language governing permissions and
-** limitations under the License.
-*/
--->
-
-<!-- These resources are around just to allow their values to be customized
- for different hardware and product builds. -->
-<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <!-- Do not translate. Defines the slots is Two Digit Number for dialing normally not USSD -->
-
- <string-array translatable="false" name="config_twoDigitNumberPattern">
- <item>"#9"</item>
- </string-array>
-</resources>
diff --git a/core/res/res/values-mcc415-mnc01/config.xml b/core/res/res/values-mcc415-mnc01/config.xml
deleted file mode 100644
index 95d30a4..0000000
--- a/core/res/res/values-mcc415-mnc01/config.xml
+++ /dev/null
@@ -1,21 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-/*
-** Copyright 2014, The Android Open Source Project
-**
-** Licensed under the Apache License, Version 2.0 (the "License");
-** you may not use this file except in compliance with the License.
-** You may obtain a copy of the License at
-**
-** http://www.apache.org/licenses/LICENSE-2.0
-**
-** Unless required by applicable law or agreed to in writing, software
-** distributed under the License is distributed on an "AS IS" BASIS,
-** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-** See the License for the specific language governing permissions and
-** limitations under the License.
-*/
--->
-<resources>
- <bool name="config_use_sim_language_file">false</bool>
-</resources>
diff --git a/core/res/res/values-mcc416-mnc77/config.xml b/core/res/res/values-mcc416-mnc77/config.xml
deleted file mode 100644
index 95d30a4..0000000
--- a/core/res/res/values-mcc416-mnc77/config.xml
+++ /dev/null
@@ -1,21 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-/*
-** Copyright 2014, The Android Open Source Project
-**
-** Licensed under the Apache License, Version 2.0 (the "License");
-** you may not use this file except in compliance with the License.
-** You may obtain a copy of the License at
-**
-** http://www.apache.org/licenses/LICENSE-2.0
-**
-** Unless required by applicable law or agreed to in writing, software
-** distributed under the License is distributed on an "AS IS" BASIS,
-** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-** See the License for the specific language governing permissions and
-** limitations under the License.
-*/
--->
-<resources>
- <bool name="config_use_sim_language_file">false</bool>
-</resources>
diff --git a/core/res/res/values-mcc425/config.xml b/core/res/res/values-mcc425/config.xml
deleted file mode 100644
index 95d30a4..0000000
--- a/core/res/res/values-mcc425/config.xml
+++ /dev/null
@@ -1,21 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-/*
-** Copyright 2014, The Android Open Source Project
-**
-** Licensed under the Apache License, Version 2.0 (the "License");
-** you may not use this file except in compliance with the License.
-** You may obtain a copy of the License at
-**
-** http://www.apache.org/licenses/LICENSE-2.0
-**
-** Unless required by applicable law or agreed to in writing, software
-** distributed under the License is distributed on an "AS IS" BASIS,
-** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-** See the License for the specific language governing permissions and
-** limitations under the License.
-*/
--->
-<resources>
- <bool name="config_use_sim_language_file">false</bool>
-</resources>
diff --git a/core/res/res/values-mcc432-mnc20/config.xml b/core/res/res/values-mcc432-mnc20/config.xml
deleted file mode 100644
index 95d30a4..0000000
--- a/core/res/res/values-mcc432-mnc20/config.xml
+++ /dev/null
@@ -1,21 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-/*
-** Copyright 2014, The Android Open Source Project
-**
-** Licensed under the Apache License, Version 2.0 (the "License");
-** you may not use this file except in compliance with the License.
-** You may obtain a copy of the License at
-**
-** http://www.apache.org/licenses/LICENSE-2.0
-**
-** Unless required by applicable law or agreed to in writing, software
-** distributed under the License is distributed on an "AS IS" BASIS,
-** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-** See the License for the specific language governing permissions and
-** limitations under the License.
-*/
--->
-<resources>
- <bool name="config_use_sim_language_file">false</bool>
-</resources>
diff --git a/core/res/res/values-mcc432/config.xml b/core/res/res/values-mcc432/config.xml
deleted file mode 100644
index 95d30a4..0000000
--- a/core/res/res/values-mcc432/config.xml
+++ /dev/null
@@ -1,21 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-/*
-** Copyright 2014, The Android Open Source Project
-**
-** Licensed under the Apache License, Version 2.0 (the "License");
-** you may not use this file except in compliance with the License.
-** You may obtain a copy of the License at
-**
-** http://www.apache.org/licenses/LICENSE-2.0
-**
-** Unless required by applicable law or agreed to in writing, software
-** distributed under the License is distributed on an "AS IS" BASIS,
-** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-** See the License for the specific language governing permissions and
-** limitations under the License.
-*/
--->
-<resources>
- <bool name="config_use_sim_language_file">false</bool>
-</resources>
diff --git a/core/res/res/values-mcc440-mnc20/config.xml b/core/res/res/values-mcc440-mnc20/config.xml
deleted file mode 100644
index 62001d9..0000000
--- a/core/res/res/values-mcc440-mnc20/config.xml
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-/*
-** Copyright 2013, The Android Open Source Project
-**
-** Licensed under the Apache License, Version 2.0 (the "License");
-** you may not use this file except in compliance with the License.
-** You my obtain a copy of the License at
-**
-** http://www.apache.org/licenses/LICENSE-2.0
-**
-** Unless required by applicable law or agreed to in writing, software
-** distributed under the License is distributed on an "AS IS" BASIS,
-** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-** See the License for the specific language governing permissions and
-** limitations under the License.
-*/
--->
-
-<!-- These resources are around just to allow their values to be customized
- for different hardware and product builds. -->
-<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-
- <!-- Configure mobile network MTU. Carrier specific value is set here.
- -->
- <integer name="config_mobile_mtu">1422</integer>
-
-</resources>
diff --git a/core/res/res/values-mcc440-mnc50/config.xml b/core/res/res/values-mcc440-mnc50/config.xml
deleted file mode 100644
index fa5cba4..0000000
--- a/core/res/res/values-mcc440-mnc50/config.xml
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-/*
-** Copyright 2013, The Android Open Source Project
-**
-** Licensed under the Apache License, Version 2.0 (the "License");
-** you may not use this file except in compliance with the License.
-** You my obtain a copy of the License at
-**
-** http://www.apache.org/licenses/LICENSE-2.0
-**
-** Unless required by applicable law or agreed to in writing, software
-** distributed under the License is distributed on an "AS IS" BASIS,
-** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-** See the License for the specific language governing permissions and
-** limitations under the License.
-*/
--->
-
-<!-- These resources are around just to allow their values to be customized
- for different hardware and product builds. -->
-<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-
- <!-- Configure mobile network MTU. Carrier specific value is set here.
- -->
- <integer name="config_mobile_mtu">1420</integer>
-
-</resources>
diff --git a/core/res/res/values-mcc440-mnc54/config.xml b/core/res/res/values-mcc440-mnc54/config.xml
deleted file mode 100644
index fa5cba4..0000000
--- a/core/res/res/values-mcc440-mnc54/config.xml
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-/*
-** Copyright 2013, The Android Open Source Project
-**
-** Licensed under the Apache License, Version 2.0 (the "License");
-** you may not use this file except in compliance with the License.
-** You my obtain a copy of the License at
-**
-** http://www.apache.org/licenses/LICENSE-2.0
-**
-** Unless required by applicable law or agreed to in writing, software
-** distributed under the License is distributed on an "AS IS" BASIS,
-** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-** See the License for the specific language governing permissions and
-** limitations under the License.
-*/
--->
-
-<!-- These resources are around just to allow their values to be customized
- for different hardware and product builds. -->
-<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-
- <!-- Configure mobile network MTU. Carrier specific value is set here.
- -->
- <integer name="config_mobile_mtu">1420</integer>
-
-</resources>
diff --git a/core/res/res/values-mcc450-mnc05/config.xml b/core/res/res/values-mcc450-mnc05/config.xml
deleted file mode 100644
index d602c9f..0000000
--- a/core/res/res/values-mcc450-mnc05/config.xml
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-/*
-** Copyright 2013, The Android Open Source Project
-**
-** Licensed under the Apache License, Version 2.0 (the "License");
-** you may not use this file except in compliance with the License.
-** You my obtain a copy of the License at
-**
-** http://www.apache.org/licenses/LICENSE-2.0
-**
-** Unless required by applicable law or agreed to in writing, software
-** distributed under the License is distributed on an "AS IS" BASIS,
-** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-** See the License for the specific language governing permissions and
-** limitations under the License.
-*/
--->
-
-<!-- These resources are around just to allow their values to be customized
- for different hardware and product builds. -->
-<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-
- <!-- Configure mobile network MTU. Carrier specific value is set here.
- -->
- <integer name="config_mobile_mtu">1440</integer>
-
-</resources>
diff --git a/core/res/res/values-mcc450-mnc06/config.xml b/core/res/res/values-mcc450-mnc06/config.xml
deleted file mode 100644
index 819c2a5..0000000
--- a/core/res/res/values-mcc450-mnc06/config.xml
+++ /dev/null
@@ -1,31 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-/*
-** Copyright 2013, The Android Open Source Project
-**
-** Licensed under the Apache License, Version 2.0 (the "License");
-** you may not use this file except in compliance with the License.
-** You my obtain a copy of the License at
-**
-** http://www.apache.org/licenses/LICENSE-2.0
-**
-** Unless required by applicable law or agreed to in writing, software
-** distributed under the License is distributed on an "AS IS" BASIS,
-** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-** See the License for the specific language governing permissions and
-** limitations under the License.
-*/
--->
-
-<!-- These resources are around just to allow their values to be customized
- for different hardware and product builds. -->
-<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
-
- <!-- Configure mobile network MTU. Carrier specific value is set here.
- -->
- <integer name="config_mobile_mtu">1428</integer>
-
- <!-- Do not set the system language as value of EF LI/EF PL -->
- <bool name="config_use_sim_language_file">false</bool>
-
-</resources>
diff --git a/core/res/res/values-mcc450-mnc08/config.xml b/core/res/res/values-mcc450-mnc08/config.xml
index 5edbaed..52dd79a 100644
--- a/core/res/res/values-mcc450-mnc08/config.xml
+++ b/core/res/res/values-mcc450-mnc08/config.xml
@@ -21,13 +21,6 @@
for different hardware and product builds. -->
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <!-- Configure mobile network MTU. Carrier specific value is set here.
- -->
- <integer name="config_mobile_mtu">1450</integer>
-
- <!-- Do not set the system language as value of EF LI/EF PL -->
- <bool name="config_use_sim_language_file">false</bool>
-
<!-- Configures encoding type to parse the User Data of an SMS for reserved TP-DCS value.
Refer to SmsConstants.java
ENCODING_UNKNOWN = 0;
diff --git a/core/res/res/values-mcc466-mnc01/config.xml b/core/res/res/values-mcc466-mnc01/config.xml
deleted file mode 100644
index 3c379d14..0000000
--- a/core/res/res/values-mcc466-mnc01/config.xml
+++ /dev/null
@@ -1,21 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-/*
-** Copyright 2016, The Android Open Source Project
-**
-** Licensed under the Apache License, Version 2.0 (the "License");
-** you may not use this file except in compliance with the License.
-** You may obtain a copy of the License at
-**
-** http://www.apache.org/licenses/LICENSE-2.0
-**
-** Unless required by applicable law or agreed to in writing, software
-** distributed under the License is distributed on an "AS IS" BASIS,
-** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-** See the License for the specific language governing permissions and
-** limitations under the License.
-*/
--->
-<resources>
- <bool name="config_use_sim_language_file">false</bool>
-</resources>
diff --git a/core/res/res/values-mcc466-mnc02/config.xml b/core/res/res/values-mcc466-mnc02/config.xml
deleted file mode 100644
index 3c379d14..0000000
--- a/core/res/res/values-mcc466-mnc02/config.xml
+++ /dev/null
@@ -1,21 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-/*
-** Copyright 2016, The Android Open Source Project
-**
-** Licensed under the Apache License, Version 2.0 (the "License");
-** you may not use this file except in compliance with the License.
-** You may obtain a copy of the License at
-**
-** http://www.apache.org/licenses/LICENSE-2.0
-**
-** Unless required by applicable law or agreed to in writing, software
-** distributed under the License is distributed on an "AS IS" BASIS,
-** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-** See the License for the specific language governing permissions and
-** limitations under the License.
-*/
--->
-<resources>
- <bool name="config_use_sim_language_file">false</bool>
-</resources>
diff --git a/core/res/res/values-mcc466-mnc03/config.xml b/core/res/res/values-mcc466-mnc03/config.xml
deleted file mode 100644
index 3c379d14..0000000
--- a/core/res/res/values-mcc466-mnc03/config.xml
+++ /dev/null
@@ -1,21 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-/*
-** Copyright 2016, The Android Open Source Project
-**
-** Licensed under the Apache License, Version 2.0 (the "License");
-** you may not use this file except in compliance with the License.
-** You may obtain a copy of the License at
-**
-** http://www.apache.org/licenses/LICENSE-2.0
-**
-** Unless required by applicable law or agreed to in writing, software
-** distributed under the License is distributed on an "AS IS" BASIS,
-** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-** See the License for the specific language governing permissions and
-** limitations under the License.
-*/
--->
-<resources>
- <bool name="config_use_sim_language_file">false</bool>
-</resources>
diff --git a/core/res/res/values-mcc466-mnc06/config.xml b/core/res/res/values-mcc466-mnc06/config.xml
deleted file mode 100644
index 3c379d14..0000000
--- a/core/res/res/values-mcc466-mnc06/config.xml
+++ /dev/null
@@ -1,21 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-/*
-** Copyright 2016, The Android Open Source Project
-**
-** Licensed under the Apache License, Version 2.0 (the "License");
-** you may not use this file except in compliance with the License.
-** You may obtain a copy of the License at
-**
-** http://www.apache.org/licenses/LICENSE-2.0
-**
-** Unless required by applicable law or agreed to in writing, software
-** distributed under the License is distributed on an "AS IS" BASIS,
-** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-** See the License for the specific language governing permissions and
-** limitations under the License.
-*/
--->
-<resources>
- <bool name="config_use_sim_language_file">false</bool>
-</resources>
diff --git a/core/res/res/values-mcc466-mnc07/config.xml b/core/res/res/values-mcc466-mnc07/config.xml
deleted file mode 100644
index 3c379d14..0000000
--- a/core/res/res/values-mcc466-mnc07/config.xml
+++ /dev/null
@@ -1,21 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-/*
-** Copyright 2016, The Android Open Source Project
-**
-** Licensed under the Apache License, Version 2.0 (the "License");
-** you may not use this file except in compliance with the License.
-** You may obtain a copy of the License at
-**
-** http://www.apache.org/licenses/LICENSE-2.0
-**
-** Unless required by applicable law or agreed to in writing, software
-** distributed under the License is distributed on an "AS IS" BASIS,
-** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-** See the License for the specific language governing permissions and
-** limitations under the License.
-*/
--->
-<resources>
- <bool name="config_use_sim_language_file">false</bool>
-</resources>
diff --git a/core/res/res/values-mcc466-mnc11/config.xml b/core/res/res/values-mcc466-mnc11/config.xml
deleted file mode 100644
index 3c379d14..0000000
--- a/core/res/res/values-mcc466-mnc11/config.xml
+++ /dev/null
@@ -1,21 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-/*
-** Copyright 2016, The Android Open Source Project
-**
-** Licensed under the Apache License, Version 2.0 (the "License");
-** you may not use this file except in compliance with the License.
-** You may obtain a copy of the License at
-**
-** http://www.apache.org/licenses/LICENSE-2.0
-**
-** Unless required by applicable law or agreed to in writing, software
-** distributed under the License is distributed on an "AS IS" BASIS,
-** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-** See the License for the specific language governing permissions and
-** limitations under the License.
-*/
--->
-<resources>
- <bool name="config_use_sim_language_file">false</bool>
-</resources>
diff --git a/core/res/res/values-mcc466-mnc92/config.xml b/core/res/res/values-mcc466-mnc92/config.xml
deleted file mode 100644
index 3c379d14..0000000
--- a/core/res/res/values-mcc466-mnc92/config.xml
+++ /dev/null
@@ -1,21 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-/*
-** Copyright 2016, The Android Open Source Project
-**
-** Licensed under the Apache License, Version 2.0 (the "License");
-** you may not use this file except in compliance with the License.
-** You may obtain a copy of the License at
-**
-** http://www.apache.org/licenses/LICENSE-2.0
-**
-** Unless required by applicable law or agreed to in writing, software
-** distributed under the License is distributed on an "AS IS" BASIS,
-** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-** See the License for the specific language governing permissions and
-** limitations under the License.
-*/
--->
-<resources>
- <bool name="config_use_sim_language_file">false</bool>
-</resources>
diff --git a/core/res/res/values-mcc505-mnc01/config.xml b/core/res/res/values-mcc505-mnc01/config.xml
index bc088d1..2e8c504 100644
--- a/core/res/res/values-mcc505-mnc01/config.xml
+++ b/core/res/res/values-mcc505-mnc01/config.xml
@@ -31,8 +31,4 @@
<item>9</item>
</integer-array>
- <!-- Configure mobile network MTU. Carrier specific value is set here.
- -->
- <integer name="config_mobile_mtu">1400</integer>
-
</resources>
diff --git a/core/res/res/values-mcc510-mnc08/config.xml b/core/res/res/values-mcc510-mnc08/config.xml
deleted file mode 100644
index 58fbb9e..0000000
--- a/core/res/res/values-mcc510-mnc08/config.xml
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-/*
-** Copyright 2013, The Android Open Source Project
-**
-** Licensed under the Apache License, Version 2.0 (the "License");
-** you may not use this file except in compliance with the License.
-** You may obtain a copy of the License at
-**
-** http://www.apache.org/licenses/LICENSE-2.0
-**
-** Unless required by applicable law or agreed to in writing, software
-** distributed under the License is distributed on an "AS IS" BASIS,
-** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-** See the License for the specific language governing permissions and
-** limitations under the License.
-*/
--->
-
-<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <!-- call barring MMI code from TS 22.030 Annex B
- Indonesia AXIS does not support Call Barring service
- and "333" is used for other purpose -->
- <string-array translatable="false" name="config_callBarringMMI">
- </string-array>
- <string-array translatable="false" name="config_callBarringMMI_for_ims">
- </string-array>
-</resources>
diff --git a/core/res/res/values-mcc510-mnc89/config.xml b/core/res/res/values-mcc510-mnc89/config.xml
deleted file mode 100644
index c262247..0000000
--- a/core/res/res/values-mcc510-mnc89/config.xml
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-/*
-** Copyright 2013, The Android Open Source Project
-**
-** Licensed under the Apache License, Version 2.0 (the "License");
-** you may not use this file except in compliance with the License.
-** You may obtain a copy of the License at
-**
-** http://www.apache.org/licenses/LICENSE-2.0
-**
-** Unless required by applicable law or agreed to in writing, software
-** distributed under the License is distributed on an "AS IS" BASIS,
-** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-** See the License for the specific language governing permissions and
-** limitations under the License.
-*/
--->
-
-<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <!-- call barring MMI code from TS 22.030 Annex B
- Indonesia Hutchison does not support Call Barring service
- and "333" is used for other purpose -->
- <string-array translatable="false" name="config_callBarringMMI">
- </string-array>
- <string-array translatable="false" name="config_callBarringMMI_for_ims">
- </string-array>
-</resources>
diff --git a/core/res/res/values-mcc704-mnc01/config.xml b/core/res/res/values-mcc704-mnc01/config.xml
deleted file mode 100644
index 10b6470..0000000
--- a/core/res/res/values-mcc704-mnc01/config.xml
+++ /dev/null
@@ -1,27 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-/*
-** Copyright 2016, The Android Open Source Project
-**
-** Licensed under the Apache License, Version 2.0 (the "License");
-** you may not use this file except in compliance with the License.
-** You my obtain a copy of the License at
-**
-** http://www.apache.org/licenses/LICENSE-2.0
-**
-** Unless required by applicable law or agreed to in writing, software
-** distributed under the License is distributed on an "AS IS" BASIS,
-** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-** See the License for the specific language governing permissions and
-** limitations under the License.
-*/
--->
-
-<resources>
- <!-- Do not translate. Defines the slots is Two Digit Number for dialing normally not USSD -->
- <string-array name="config_twoDigitNumberPattern">
- <item>"*1"</item>
- <item>"*5"</item>
- <item>"*9"</item>
- </string-array>
-</resources>
diff --git a/core/res/res/values-mcc708-mnc001/config.xml b/core/res/res/values-mcc708-mnc001/config.xml
deleted file mode 100755
index 7b7c48d..0000000
--- a/core/res/res/values-mcc708-mnc001/config.xml
+++ /dev/null
@@ -1,27 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-/*
-** Copyright 2016, The Android Open Source Project
-**
-** Licensed under the Apache License, Version 2.0 (the "License");
-** you may not use this file except in compliance with the License.
-** You my obtain a copy of the License at
-**
-** http://www.apache.org/licenses/LICENSE-2.0
-**
-** Unless required by applicable law or agreed to in writing, software
-** distributed under the License is distributed on an "AS IS" BASIS,
-** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-** See the License for the specific language governing permissions and
-** limitations under the License.
-*/
--->
-
-<!-- These resources are around just to allow their values to be customized
- for different hardware and product builds. -->
-<resources>
- <string-array translatable="false" name="config_twoDigitNumberPattern">
- <item>"*1"</item>
- <item>"*5"</item>
- </string-array>
-</resources>
diff --git a/core/res/res/values/arrays.xml b/core/res/res/values/arrays.xml
index deb6afc..448cf2f 100644
--- a/core/res/res/values/arrays.xml
+++ b/core/res/res/values/arrays.xml
@@ -185,20 +185,4 @@
<item>@string/app_info</item>
</string-array>
- <!-- Device-specific array of SIM slot indexes which are are embedded eUICCs.
- e.g. If a device has two physical slots with indexes 0, 1, and slot 1 is an
- eUICC, then the value of this array should be:
- <integer-array name="non_removable_euicc_slots">
- <item>1</item>
- </integer-array>
- If a device has three physical slots and slot 1 and 2 are eUICCs, then the value of
- this array should be:
- <integer-array name="non_removable_euicc_slots">
- <item>1</item>
- <item>2</item>
- </integer-array>
- This is used to differentiate between removable eUICCs and built in eUICCs, and should
- be set by OEMs for devices which use eUICCs. -->
- <integer-array name="non_removable_euicc_slots"></integer-array>
-
</resources>
diff --git a/core/res/res/values/attrs_manifest.xml b/core/res/res/values/attrs_manifest.xml
index e231c3a..16bed503 100644
--- a/core/res/res/values/attrs_manifest.xml
+++ b/core/res/res/values/attrs_manifest.xml
@@ -1770,6 +1770,21 @@
-->
<attr name="requestLegacyExternalStorage" format="boolean" />
+ <!-- If {@code true} this app would like to preserve the legacy storage
+ model from a previously installed version. Note that this may not always be
+ respected due to policy or backwards compatibility reasons.
+
+ <p>This has no effect on the first install of an app on a device.
+ For an updating app, setting this to {@code true} will preserve the legacy behaviour
+ configured by the {@code requestLegacyExternalStorage} flag. If on an update, this
+ flag is set to {@code false} then the legacy access is not preserved, such an app can
+ only have legacy access with the {@code requestLegacyExternalStorage} flag.
+ <p>
+
+ The default value is {@code false}.
+ -->
+ <attr name="preserveLegacyExternalStorage" format="boolean" />
+
<!-- If {@code true} this app declares that it should be visible to all other apps on
device, regardless of what they declare via the {@code queries} tags in their
manifest.
diff --git a/core/res/res/values/config.xml b/core/res/res/values/config.xml
index bbe9a6d..e2c9127 100644
--- a/core/res/res/values/config.xml
+++ b/core/res/res/values/config.xml
@@ -108,12 +108,6 @@
any other apn from connecting until ims apn is connected-->
<bool name="ImsConnectedDefaultValue">false</bool>
- <!-- Flag indicating whether the surface flinger is inefficient
- at performing a blur. Used by parts of the UI to turn off
- the blur effect where it isn't worth the performance hit.
- As of Honeycomb, blurring is not supported anymore. -->
- <bool name="config_sf_slowBlur">true</bool>
-
<!-- Flag indicating that the media framework should support playing of sounds on volume
key usage. This adds noticeable additional overhead to volume key processing, so
is disableable for products for which it is irrelevant. -->
@@ -476,10 +470,6 @@
-->
</string-array>
- <!-- Package name for the default CellBroadcastService module [DO NOT TRANSLATE] -->
- <string name="cellbroadcast_default_package" translatable="false">com.android.cellbroadcastservice
- </string>
-
<!-- If the mobile hotspot feature requires provisioning, a package name and class name
can be provided to launch a supported application that provisions the devices.
@@ -1225,12 +1215,6 @@
<!-- Disable lockscreen rotation by default -->
<bool name="config_enableLockScreenRotation">false</bool>
- <!-- Is the device capable of hot swapping an UICC Card -->
- <bool name="config_hotswapCapable">false</bool>
-
- <!-- Component name of the ICC hotswap prompt for restart dialog -->
- <string name="config_iccHotswapPromptForRestartDialogComponent" translatable="false">@null</string>
-
<!-- Enable puk unlockscreen by default.
If unlock screen is disabled, the puk should be unlocked through Emergency Dialer -->
<bool name="config_enable_puk_unlock_screen">true</bool>
@@ -1847,9 +1831,6 @@
that has declared it can process the call's handle. -->
<bool name="config_requireCallCapableAccountForHandle">false</bool>
- <!-- Flag indicating if the user is notified when the mobile network access is restricted -->
- <bool name="config_user_notification_of_restrictied_mobile_access">true</bool>
-
<!-- Flag indicating whether the current device allows sms service.
If true, this means that the device supports both sending and
receiving sms via the telephony network.
@@ -1916,10 +1897,6 @@
<!-- IP address of the dns server to use if nobody else suggests one -->
<string name="config_default_dns_server" translatable="false">8.8.8.8</string>
- <!-- The default mobile provisioning apn. Empty by default, maybe overridden by
- an mcc/mnc specific config.xml -->
- <string name="mobile_provisioning_apn" translatable="false"></string>
-
<!-- The default mobile provisioning url. Empty by default, maybe overridden by
an mcc/mnc specific config.xml -->
<string name="mobile_provisioning_url" translatable="false"></string>
@@ -1931,13 +1908,6 @@
<!-- Enables SIP on WIFI only -->
<bool name="config_sip_wifi_only">false</bool>
- <!-- Enables built-in SIP phone capability -->
- <bool name="config_built_in_sip_phone">true</bool>
-
- <!-- Boolean indicating if restoring network selection should be skipped -->
- <!-- The restoring is handled by modem if it is true-->
- <bool translatable="false" name="skip_restoring_network_selection">false</bool>
-
<!-- Maximum number of database connections opened and managed by framework layer
to handle queries on each database when using Write-Ahead Logging. -->
<integer name="db_connection_pool_size">4</integer>
@@ -2023,10 +1993,6 @@
a keyboard is present. -->
<bool name="config_showMenuShortcutsWhenKeyboardPresent">false</bool>
- <!-- Do not translate. Defines the slots is Two Digit Number for dialing normally not USSD -->
- <string-array name="config_twoDigitNumberPattern" translatable="false">
- </string-array>
-
<!-- If this value is true, Sms encoded as octet is decoded by utf8 decoder.
If false, decoded by Latin decoder. -->
<bool name="config_sms_utf8_support">false</bool>
@@ -2035,12 +2001,6 @@
If false, Content-disposition fragments are ignored -->
<bool name="config_mms_content_disposition_support">true</bool>
- <!-- MMS user agent string -->
- <string name="config_mms_user_agent" translatable="false"></string>
-
- <!-- MMS user agent prolfile url -->
- <string name="config_mms_user_agent_profile_url" translatable="false"></string>
-
<!-- National Language Identifier codes for the following two config items.
(from 3GPP TS 23.038 V9.1.1 Table 6.2.1.2.4.1):
0 - reserved
@@ -2084,14 +2044,6 @@
<!-- Set to true if the RSSI should always display CDMA signal strength even on EVDO -->
<bool name="config_alwaysUseCdmaRssi">false</bool>
-
- <!-- If this value is true, duplicate Source/Destination port fields
- in WDP header of some carriers OMADM wap push are supported.
- ex: MSGTYPE-TotalSegments-CurrentSegment
- -SourcePortDestPort-SourcePortDestPort-OMADM PDU
- If false, not supported. -->
- <bool name="config_duplicate_port_omadm_wappush">false</bool>
-
<!-- Maximum numerical value that will be shown in a status bar
notification icon or in the notification itself. Will be replaced
with @string/status_bar_notification_info_overflow when shown in the
@@ -2445,17 +2397,6 @@
headset output is compliant to EN 60950 requirements for portable music players. -->
<integer name="config_safe_media_volume_usb_mB">-3700</integer>
- <!-- Configure mobile network MTU. The standard default is set here but each carrier
- may have a specific value set in an overlay config.xml file. -->
- <integer name="config_mobile_mtu">1500</integer>
-
- <!-- Configure mobile tcp buffer sizes in the form:
- rat-name:rmem_min,rmem_def,rmem_max,wmem_min,wmem_def,wmem_max
- If no value is found for the rat-name in use, the system default will be applied.
- -->
- <string-array name="config_mobile_tcp_buffers">
- </string-array>
-
<!-- Configure ethernet tcp buffersizes in the form:
rmem_min,rmem_def,rmem_max,wmem_min,wmem_def,wmem_max -->
<string name="config_ethernet_tcp_buffers" translatable="false">524288,1048576,3145728,524288,1048576,2097152</string>
@@ -2516,19 +2457,6 @@
<!-- Whether camera shutter sound is forced or not (country specific). -->
<bool name="config_camera_sound_forced">false</bool>
- <!-- Set to true if we need to not prefer an APN.
- This is being added to enable a simple scenario of pre-paid
- provisioning on some carriers, working around a bug (7305641)
- where if the preferred is used we don't try the others. -->
- <bool name="config_dontPreferApn">false</bool>
-
- <!-- Set to true if after a provisioning apn the radio should be restarted -->
- <bool name="config_restartRadioAfterProvisioning">false</bool>
-
- <!-- Boolean indicating if RADIO POWER OFF is required on receiving SIM REFRESH with RESET.
- This will be handled by modem if it is false. -->
- <bool name="config_requireRadioPowerOffOnSimRefreshReset">false</bool>
-
<!-- Vibrator pattern to be used as the default for notifications
that specify DEFAULT_VIBRATE.
-->
@@ -2616,10 +2544,6 @@
<string name="config_customVpnAlwaysOnDisconnectedDialogComponent" translatable="false"
>com.android.vpndialogs/com.android.vpndialogs.AlwaysOnDisconnectedDialog</string>
- <!-- Name of the dialog that is used to install the carrier app when the SIM is inserted -->
- <string name="config_carrierAppInstallDialogComponent" translatable="false"
- >com.android.simappdialog/com.android.simappdialog.InstallCarrierAppActivity</string>
-
<!-- Apps that are authorized to access shared accounts, overridden by product overlays -->
<string name="config_appsAuthorizedForSharedAccounts" translatable="false">;com.android.settings;</string>
@@ -2671,41 +2595,10 @@
<!-- Default Gravity setting for the system Toast view. Equivalent to: Gravity.CENTER_HORIZONTAL | Gravity.BOTTOM -->
<integer name="config_toastDefaultGravity">0x00000051</integer>
- <!-- set to false if we need to show user confirmation
- when alpha identifier is not provided by the UICC -->
- <bool name="config_stkNoAlphaUsrCnf">true</bool>
-
<!-- Threshold (in ms) under which a screen off / screen on will be considered a reset of the
immersive mode confirmation prompt.-->
<integer name="config_immersive_mode_confirmation_panic">5000</integer>
- <!-- For some operators, PDU has garbages. To fix it, need to use valid index -->
- <integer name="config_valid_wappush_index">-1</integer>
-
- <!-- call barring MMI code from TS 22.030 Annex B -->
- <string-array translatable="false" name="config_callBarringMMI">
- <item>33</item>
- <item>331</item>
- <item>332</item>
- <item>35</item>
- <item>351</item>
- <item>330</item>
- <item>333</item>
- <item>353</item>
- </string-array>
-
- <!-- Ims supported call barring MMI code -->
- <string-array translatable="false" name="config_callBarringMMI_for_ims">
- <item>33</item>
- <item>331</item>
- <item>332</item>
- <item>35</item>
- <item>351</item>
- <item>330</item>
- <item>333</item>
- <item>353</item>
- </string-array>
-
<!-- Override the default detection behavior for the framework method
android.view.ViewConfiguration#hasPermanentMenuKey().
Valid settings are:
@@ -2847,55 +2740,6 @@
in the display pipeline plus some slack just to be sure. -->
<integer name="config_drawLockTimeoutMillis">120</integer>
- <!-- An array of device capabilities defined by GSMA SGP.22 v2.0.
- The first item is the capability name that the device supports. The second item is the
- major version. The minor and revision versions are default to 0s.
- The device capabilities and their definition in the spec are:
- gsm : gsmSupportedRelease
- utran : utranSupportedRelease
- cdma1x : cdma2000onexSupportedRelease
- hrpd : cdma2000hrpdSupportedRelease
- ehrpd : cdma2000ehrpdSupportedRelease
- eutran : eutranSupportedRelease
- nfc : contactlessSupportedRelease
- crl : rspCrlSupportedVersion
- -->
- <string-array translatable="false" name="config_telephonyEuiccDeviceCapabilities">
- <!-- Example:
- <item>"gsm,11"</item>
- <item>"utran,11"</item>
- <item>"cdma1x,1"</item>
- <item>"hrpd,3"</item>
- <item>"ehrpd,12"</item>
- <item>"eutran,11"</item>
- <item>"nfc,1"</item>
- <item>"crl,1"</item>
- -->
- </string-array>
-
- <!-- default telephony hardware configuration for this platform.
- -->
- <!-- this string array should be overridden by the device to present a list
- telephony hardware resource. this is used by the telephony device controller
- (TDC) to offer the basic capabilities of the hardware to the telephony
- framework
- -->
- <!-- an array of "[hardware type],[hardware-uuid],[state],[[hardware-type specific]]"
- with, [[hardware-type specific]] in:
- - "[[ril-model],[rat],[max-active-voice],[max-active-data],[max-active-standby]]"
- for 'modem' hardware
- - "[[associated-modem-uuid]]"
- for 'sim' hardware.
- refer to HardwareConfig in com.android.internal.telephony for specific details/values
- those elements can carry.
- -->
- <string-array translatable="false" name="config_telephonyHardware">
- <!-- modem -->
- <item>0,modem,0,0,0,1,1,1</item>
- <!-- sim -->
- <item>1,sim,0,modem</item>
- </string-array>
-
<!-- This string array can be overriden to add an additional DRM support for WebView EME. -->
<!-- Array of "[keySystemName],[UuidOfMediaDrm]" -->
<string-array name="config_keySystemUuidMapping" translatable="false">
@@ -2910,18 +2754,11 @@
<!-- Flag indicating which package name can access DeviceConfig table -->
<string name="config_deviceConfiguratorPackageName" translatable="false"></string>
- <!-- Flag indicating apps will skip sending hold request before merge. In this case
- IMS service implementation will do both.i.e.hold followed by merge. -->
- <bool name="skipHoldBeforeMerge">true</bool>
-
<!-- Flag indicating whether the IMS service can be turned off. If false then
the service will not be turned-off completely (the ImsManager.turnOffIms() will
be disabled) but individual Features can be disabled using ImsConfig.setFeatureValue() -->
<bool name="imsServiceAllowTurnOff">true</bool>
- <!-- Flag specifying whether VoLTE is available on device -->
- <bool name="config_device_volte_available">false</bool>
-
<!-- Flag specifying whether VoLTE should be available for carrier: independent of
carrier provisioning. If false: hard disabled. If true: then depends on carrier
provisioning, availability etc -->
@@ -2930,49 +2767,19 @@
<!-- Flag specifying whether VoLTE TTY is supported -->
<bool name="config_carrier_volte_tty_supported">true</bool>
- <!-- Flag specifying whether VT is available on device -->
- <bool name="config_device_vt_available">false</bool>
-
- <!-- Flag specifying whether the device will use the "allow_hold_in_ims_call" carrier config
- option. When false, the device will support holding of IMS calls, regardless of the
- carrier config setting. -->
- <bool name="config_device_respects_hold_carrier_config">true</bool>
-
<!-- Flag specifying whether VT should be available for carrier: independent of
carrier provisioning. If false: hard disabled. If true: then depends on carrier
provisioning, availability etc -->
<bool name="config_carrier_vt_available">false</bool>
- <!-- Flag specifying whether WFC over IMS is available on device -->
- <bool name="config_device_wfc_ims_available">false</bool>
-
<!-- Flag specifying whether WFC over IMS should be available for carrier: independent of
carrier provisioning. If false: hard disabled. If true: then depends on carrier
provisioning, availability etc -->
<bool name="config_carrier_wfc_ims_available">false</bool>
- <!-- Whether to use voip audio mode for ims call -->
- <bool name="config_use_voip_mode_for_ims">false</bool>
-
<!-- String array containing numbers that shouldn't be logged. Country-specific. -->
<string-array name="unloggable_phone_numbers" />
- <!-- Cellular data service package name to bind to by default. If none is specified in an overlay, an
- empty string is passed in -->
- <string name="config_wwan_data_service_package" translatable="false">com.android.phone</string>
-
- <!-- IWLAN data service package name to bind to by default. If none is specified in an overlay, an
- empty string is passed in -->
- <string name="config_wlan_data_service_package" translatable="false"></string>
-
- <!-- Cellular data service class name to bind to by default. If none is specified in an overlay, an
- empty string is passed in -->
- <string name="config_wwan_data_service_class" translatable="false"></string>
-
- <!-- IWLAN data service class name to bind to by default. If none is specified in an overlay, an
- empty string is passed in -->
- <string name="config_wlan_data_service_class" translatable="false"></string>
-
<bool name="config_networkSamplingWakesDevice">true</bool>
<!--From SmsMessage-->
@@ -3002,8 +2809,6 @@
<item>20404;suffix;BAE0000000000000</item>
</string-array>
- <bool name="config_auto_attach_data_on_creation">true</bool>
-
<!-- Sprint need a 70 ms delay for 3way call -->
<integer name="config_cdma_3waycall_flash_delay">0</integer>
@@ -3044,20 +2849,8 @@
<item>732101</item>
</string-array>
- <!-- Config determines whether to update phone object when voice registration
- state changes. Voice radio tech change will always trigger an update of
- phone object irrespective of this config -->
- <bool name="config_switch_phone_on_voice_reg_state_change">true</bool>
-
<bool name="config_sms_force_7bit_encoding">false</bool>
- <!-- Number of physical SIM slots on the device. This includes both eSIM and pSIM slots, and
- is not necessarily the same as the number of phones/logical modems supported by the device.
- For example, a multi-sim device can have 2 phones/logical modems, but 3 physical slots,
- or a single SIM device can have 1 phones/logical modems, but 2 physical slots (one eSIM
- and one pSIM) -->
- <integer name="config_num_physical_slots">1</integer>
-
<!--Thresholds for LTE dbm in status bar-->
<integer-array translatable="false" name="config_lteDbmThresholds">
<item>-140</item> <!-- SIGNAL_STRENGTH_NONE_OR_UNKNOWN -->
@@ -3090,17 +2883,6 @@
is the max width/height allowed in dips.-->
<dimen name="config_mediaMetadataBitmapMaxSize">320dp</dimen>
- <string translatable="false" name="prohibit_manual_network_selection_in_gobal_mode">false</string>
-
- <!-- An array of CDMA roaming indicators which means international roaming -->
- <integer-array translatable="false" name="config_cdma_international_roaming_indicators" />
-
- <!-- flag to indicate if EF LI/EF PL should be used for system language -->
- <bool name="config_use_sim_language_file">false</bool>
-
- <!-- Use ERI text for network name on CDMA LTE -->
- <bool name="config_LTE_eri_for_network_name">true</bool>
-
<!-- Whether to start in touch mode -->
<bool name="config_defaultInTouchMode">true</bool>
@@ -3150,12 +2932,6 @@
<!-- Whether device supports double tap to wake -->
<bool name="config_supportDoubleTapWake">false</bool>
- <!-- The RadioAccessFamilies supported by the device.
- Empty is viewed as "all". Only used on devices which
- don't support RIL_REQUEST_GET_RADIO_CAPABILITY
- format is UMTS|LTE|... -->
- <string translatable="false" name="config_radio_access_family"></string>
-
<!-- Whether the main built-in display is round. This will affect
Configuration.screenLayout's SCREENLAYOUT_ROUND_MASK flags for Configurations on the
main built-in display. Change this in device-specific overlays.
@@ -3227,13 +3003,6 @@
(e.g. accessibility, alarms). This is mainly for Wear devices that don't have speakers. -->
<bool name="config_allowPriorityVibrationsInLowPowerMode">false</bool>
- <!-- Number of retries Cell Data should attempt for a given error code before
- restarting the modem.
- Error codes not listed will not lead to modem restarts.
- Array of "code#,retry#" -->
- <string-array name="config_cell_retries_per_error_code">
- </string-array>
-
<!-- Set initial MaxRetry value for operators -->
<integer name="config_mdc_initial_max_retry">1</integer>
@@ -3501,15 +3270,6 @@
UI is handled by ActivityManagerService -->
<bool name="config_customUserSwitchUi">false</bool>
- <!-- A array of regex to treat a SMS as VVM SMS if the message body matches.
- Each item represents an entry, which consists of two parts:
- a comma (,) separated list of MCCMNC the regex applies to, followed by a semicolon (;), and
- then the regex itself. -->
- <string-array translatable="false" name="config_vvmSmsFilterRegexes">
- <!-- Verizon requires any SMS that starts with //VZWVVM to be treated as a VVM SMS-->
- <item>310004,310010,310012,310013,310590,310890,310910,311110,311270,311271,311272,311273,311274,311275,311276,311277,311278,311279,311280,311281,311282,311283,311284,311285,311286,311287,311288,311289,311390,311480,311481,311482,311483,311484,311485,311486,311487,311488,311489;^//VZWVVM.*</item>
- </string-array>
-
<!-- This config is holding calling number conversion map - expected to convert to emergency
number. Formats for this config as below:
<item>[dialstring1],[dialstring2],[dialstring3]:[replacement]</item>
@@ -3715,11 +3475,6 @@
<!-- Default data warning level in mb -->
<integer name="default_data_warning_level_mb">2048</integer>
- <!-- When true, indicates that the vendor's IMS implementation requires a workaround when
- sending a request to enable or disable the camera while the video session is also
- paused. -->
- <bool name="config_useVideoPauseWorkaround">false</bool>
-
<!-- Whether to send a custom package name with the PSD.-->
<bool name="config_sendPackageName">false</bool>
@@ -3811,14 +3566,6 @@
<integer name="config_stableDeviceDisplayWidth">-1</integer>
<integer name="config_stableDeviceDisplayHeight">-1</integer>
- <!-- List of countries in which we display 'No service' on status bar
- instead of 'Emergency calls only' when SIM is unready. -->
- <string-array translatable="false" name="config_display_no_service_when_sim_unready">
- <item>"DE"</item>
- <item>"GB"</item>
- <item>"JP"</item>
- </string-array>
-
<!-- Class names of device specific services inheriting com.android.server.SystemService. The
classes are instantiated in the order of the array. -->
<string-array translatable="false" name="config_deviceSpecificSystemServices"></string-array>
@@ -3866,25 +3613,6 @@
<bool name="config_supportBluetoothPersistedState">true</bool>
<bool name="config_keepRestrictedProfilesInBackground">true</bool>
-
- <!-- Cellular network service package name to bind to by default. -->
- <string name="config_wwan_network_service_package" translatable="false">com.android.phone</string>
-
- <!-- Cellular network service class name to bind to by default.-->
- <string name="config_wwan_network_service_class" translatable="false"></string>
-
- <!-- IWLAN network service package name to bind to by default. If none is specified in an overlay, an
- empty string is passed in -->
- <string name="config_wlan_network_service_package" translatable="false"></string>
-
- <!-- IWLAN network service class name to bind to by default. If none is specified in an overlay, an
- empty string is passed in -->
- <string name="config_wlan_network_service_class" translatable="false"></string>
- <!-- Telephony qualified networks service package name to bind to by default. -->
- <string name="config_qualified_networks_service_package" translatable="false"></string>
-
- <!-- Telephony qualified networks service class name to bind to by default. -->
- <string name="config_qualified_networks_service_class" translatable="false"></string>
<!-- Wear devices: Controls the radios affected by Activity Mode. -->
<string-array name="config_wearActivityModeRadios">
<item>"wifi"</item>
@@ -3963,9 +3691,6 @@
<!-- Enable Zram writeback feature to allow unused pages in zram be written to flash. -->
<bool name="config_zramWriteback">false</bool>
- <!-- Whether cbrs is supported on the device or not -->
- <bool translatable="false" name="config_cbrs_supported">false</bool>
-
<!-- Whether or not aware is enabled by default -->
<bool name="config_awareSettingAvailable">false</bool>
diff --git a/core/res/res/values/public.xml b/core/res/res/values/public.xml
index 0edad3b..567a4c7 100644
--- a/core/res/res/values/public.xml
+++ b/core/res/res/values/public.xml
@@ -3018,6 +3018,7 @@
<!-- @hide @SystemApi -->
<public name="isAutofillInlineSuggestionTheme" />
<public name="allowNativeHeapPointerTagging" />
+ <public name="preserveLegacyExternalStorage" />
</public-group>
<public-group type="drawable" first-id="0x010800b5">
diff --git a/core/res/res/values/strings.xml b/core/res/res/values/strings.xml
index e6a93e5..1fd2b3a 100644
--- a/core/res/res/values/strings.xml
+++ b/core/res/res/values/strings.xml
@@ -54,235 +54,6 @@
<!-- What the UI should display for "Msisdn" unless overridden by the SIM-->
<string name="defaultMsisdnAlphaTag">MSISDN1</string>
- <!-- For GsmMmiCode.java --> <skip />
- <!-- Displayed when the user dialed an MMI code whose function
- could not be performed. This will be displayed in a toast. -->
- <string name="mmiError">Connection problem or invalid MMI code.</string>
- <!-- Displayed when the user dialed an MMI code whose function
- could not be performed because FDN is enabled. This will be displayed in a toast. -->
- <string name="mmiFdnError">Operation is restricted to fixed dialing numbers only.</string>
- <!-- Displayed when a carrier does not support call forwarding queries when roaming. -->
- <string name="mmiErrorWhileRoaming">Can not change call forwarding settings from your phone while you are roaming.</string>
-
- <!-- Displayed when a phone feature such as call barring was activated. -->
- <string name="serviceEnabled">Service was enabled.</string>
- <!-- Displayed in front of the list of a set of service classes
- (voice, data, fax, etc.) that were enabled. -->
- <string name="serviceEnabledFor">Service was enabled for:</string>
- <!-- Displayed when a phone feature such as call forwarding was deactivated. -->
- <string name="serviceDisabled">Service has been disabled.</string>
- <!-- Displayed when a phone property such as a SIM password was registered. -->
- <string name="serviceRegistered">Registration was successful.</string>
- <!-- Displayed when a phone property such as a SIM password was erased. -->
- <string name="serviceErased">Erasure was successful.</string>
- <!-- Displayed when a SIM password was entered incorrectly. -->
- <string name="passwordIncorrect">Incorrect password.</string>
- <!-- Displayed when a phone feature triggered by an MMI code is complete. -->
- <string name="mmiComplete">MMI complete.</string>
- <!-- Displayed when a SIM PIN password is entered incorrectly. -->
- <string name="badPin">The old PIN you typed isn\'t correct.</string>
- <!-- Displayed when a SIM PUK password is entered incorrectly. -->
- <string name="badPuk">The PUK you typed isn\'t correct.</string>
- <!-- Displayed when SIM PIN passwords are entered inconsistently. -->
- <string name="mismatchPin">The PINs you typed don\'t match.</string>
- <!-- Displayed when a SIM PIN password is too long or too short. -->
- <string name="invalidPin">Type a PIN that is 4 to 8 numbers.</string>
- <!-- Displayed when a SIM PUK password is too short. -->
- <string name="invalidPuk">Type a PUK that is 8 numbers or longer.</string>
- <!-- Displayed to prompt the user to type the PUK password to unlock
- the SIM card. -->
- <string name="needPuk">Your SIM card is PUK-locked. Type the PUK code to unlock it.</string>
- <string name="needPuk2">Type PUK2 to unblock SIM card.</string>
- <!-- Displayed when user attempts to change SIM PIN1 without enabling PIN1. -->
- <string name="enablePin">Unsuccessful, enable SIM/RUIM Lock.</string>
- <!-- Displayed when a SIM PIN/PUK is entered incorrectly. -->
- <plurals name="pinpuk_attempts">
- <item quantity="one">You have <xliff:g id="number">%d</xliff:g> remaining attempt before SIM is locked.</item>
- <item quantity="other">You have <xliff:g id="number">%d</xliff:g> remaining attempts before SIM is locked.</item>
- </plurals>
- <!-- Title for the dialog used to display the user's IMEI number [CHAR LIMIT=10] -->
- <string name="imei">IMEI</string>
-
- <!-- Title for the dialog used to display the user's MEID number on CDMA network
- [CHAR LIMIT=10] -->
- <string name="meid">MEID</string>
-
- <!-- Displayed as the title for a success/failure report enabling/disabling caller ID. -->
- <string name="ClipMmi">Incoming Caller ID</string>
- <!-- Displayed as the title for a success/failure report enabling/disabling caller ID. -->
- <string name="ClirMmi">Outgoing Caller ID</string>
- <!-- Displayed as the title for a success/failure report enabling/disabling connected line ID. -->
- <string name="ColpMmi">Connected Line ID</string>
- <!-- Displayed as the title for a success/failure report enabling/disabling connected line ID restriction. -->
- <string name="ColrMmi">Connected Line ID Restriction</string>
- <!-- Displayed as the title for a success/failure report enabling/disabling call forwarding. -->
- <string name="CfMmi">Call forwarding</string>
- <!-- Displayed as the title for a success/failure report enabling/disabling call waiting. -->
- <string name="CwMmi">Call waiting</string>
- <!-- Displayed as the title for a success/failure report enabling/disabling call barring. -->
- <string name="BaMmi">Call barring</string>
- <!-- Displayed as the title for a success/failure report changing the SIM password. -->
- <string name="PwdMmi">Password change</string>
- <!-- Displayed as the title for a success/failure report changing the SIM PIN. -->
- <string name="PinMmi">PIN change</string>
- <string name="CnipMmi">Calling number present</string>
- <string name="CnirMmi">Calling number restricted</string>
- <string name="ThreeWCMmi">Three way calling</string>
- <string name="RuacMmi">Rejection of undesired annoying calls</string>
- <string name="CndMmi">Calling number delivery</string>
- <string name="DndMmi">Do not disturb</string>
-
- <!-- Displayed to confirm to the user that caller ID will be restricted on the next call as usual. -->
- <string name="CLIRDefaultOnNextCallOn">Caller ID defaults to restricted. Next call: Restricted</string>
- <!-- Displayed to confirm to the user that caller ID will be not restricted on the next call even though it usually is. -->
- <string name="CLIRDefaultOnNextCallOff">Caller ID defaults to restricted. Next call: Not restricted</string>
- <!-- Displayed to confirm to the user that caller ID will not be restricted on the next call but usually is. -->
- <string name="CLIRDefaultOffNextCallOn">Caller ID defaults to not restricted. Next call: Restricted</string>
- <!-- Displayed to confirm to the user that caller ID will not be restricted on the next call or in general. -->
- <string name="CLIRDefaultOffNextCallOff">Caller ID defaults to not restricted. Next call: Not restricted</string>
-
-
- <!-- Displayed to tell the user that caller ID is not provisioned for their SIM. -->
- <string name="serviceNotProvisioned">Service not provisioned.</string>
- <!-- Displayed to tell the user that they cannot change the caller ID setting. -->
- <string name="CLIRPermanent">You can\'t change the caller ID setting.</string>
-
- <!-- Notification title to tell the user that data service is blocked by access control. [CHAR LIMIT=NOTIF_TITLE] -->
- <string name="RestrictedOnDataTitle">No mobile data service</string>
- <!-- Notification title to tell the user that emergency calling is blocked by access control. [CHAR LIMIT=NOTIF_TITLE] -->
- <string name="RestrictedOnEmergencyTitle">Emergency calling unavailable</string>
- <!-- Notification title to tell the user that normal service is blocked by access control. [CHAR LIMIT=NOTIF_TITLE] -->
- <string name="RestrictedOnNormalTitle">No voice service</string>
- <!-- Notification title to tell the user that all emergency and normal voice services are blocked by access control. [CHAR LIMIT=NOTIF_TITLE] -->
- <string name="RestrictedOnAllVoiceTitle">No voice service or emergency calling</string>
-
- <!-- Notification content to tell the user that voice/data/emergency service is blocked by access control. [CHAR LIMIT=NOTIF_BODY] -->
- <string name="RestrictedStateContent">Temporarily turned off by your carrier</string>
-
- <!-- Notification content to tell the user that voice/data/emergency service is blocked by access control when multiple SIMs are active. [CHAR LIMIT=NOTIF_BODY] -->
- <string name="RestrictedStateContentMsimTemplate">Temporarily turned off by your carrier for SIM <xliff:g id="simNumber" example="1">%d</xliff:g></string>
-
- <!-- Displayed to tell the user that they should switch their network preference. -->
- <string name="NetworkPreferenceSwitchTitle">Can\u2019t reach mobile network</string>
- <!-- Displayed to tell the user that they should switch their network preference. -->
- <string name="NetworkPreferenceSwitchSummary">Try changing preferred network. Tap to change.</string>
- <!-- Displayed to tell the user that emergency calls might not be available. -->
- <string name="EmergencyCallWarningTitle">Emergency calling unavailable</string>
- <!-- Displayed to tell the user that emergency calls might not be available. -->
- <string name="EmergencyCallWarningSummary">Can\u2019t make emergency calls over Wi\u2011Fi</string>
-
- <!-- Telephony notification channel name for a channel containing network alert notifications. -->
- <string name="notification_channel_network_alert">Alerts</string>
- <!-- Telephony notification channel name for a channel containing call forwarding notifications. -->
- <string name="notification_channel_call_forward">Call forwarding</string>
- <!-- Telephony notification channel name for a channel containing emergency callback mode notifications. -->
- <string name="notification_channel_emergency_callback">Emergency callback mode</string>
- <!-- Telephony notification channel name for a channel containing mobile data status notifications. -->
- <string name="notification_channel_mobile_data_status">Mobile data status</string>
- <!-- Telephony notification channel name for a channel containing sms notifications. -->
- <string name="notification_channel_sms">SMS messages</string>
- <!-- Telephony notification channel name for a channel containing voice mail notifications. -->
- <string name="notification_channel_voice_mail">Voicemail messages</string>
- <!-- Telephony notification channel name for a channel containing wifi calling status notifications. -->
- <string name="notification_channel_wfc">Wi-Fi calling</string>
- <!-- Telephony notification channel name for a channel containing SIM notifications -->
- <string name="notification_channel_sim">SIM status</string>
- <!-- Telephony notification channel name for a channel containing high priority SIM notifications -->
- <string name="notification_channel_sim_high_prio">High priority SIM status</string>
-
-
- <!-- Displayed to tell the user that peer changed TTY mode -->
- <string name="peerTtyModeFull">Peer requested TTY Mode FULL</string>
- <string name="peerTtyModeHco">Peer requested TTY Mode HCO</string>
- <string name="peerTtyModeVco">Peer requested TTY Mode VCO</string>
- <string name="peerTtyModeOff">Peer requested TTY Mode OFF</string>
-
- <!-- Mappings between TS 27.007 +CFCC/+CLCK "service classes" and human-readable strings--> <skip />
- <!-- Example: Service was enabled for: Voice, Data -->
- <string name="serviceClassVoice">Voice</string>
- <!-- Example: Service was enabled for: Voice, Data -->
- <string name="serviceClassData">Data</string>
- <!-- Example: Service was enabled for: Voice, FAX -->
- <string name="serviceClassFAX">FAX</string>
- <!-- Example: Service was enabled for: Voice, SMS -->
- <string name="serviceClassSMS">SMS</string>
- <!-- Meaning: asynchronous data. Example: Service was enabled for: Voice, Async -->
- <string name="serviceClassDataAsync">Async</string>
- <!-- Meaning: synchronous data. Example: Service was enabled for: Voice, Async -->
- <string name="serviceClassDataSync">Sync</string>
- <!-- Meaning: packet data. Example: Service was enabled for: Voice, Packet -->
- <string name="serviceClassPacket">Packet</string>
- <!-- Meaning: unknown. Example: Service was enabled for: Voice, PAD -->
- <string name="serviceClassPAD">PAD</string>
-
- <!-- CDMA Roaming Indicator Strings (non ERI)--> <skip />
- <!-- Default roaming indicator text -->
- <string name="roamingText0">Roaming Indicator On</string>
- <string name="roamingText1">Roaming Indicator Off</string>
- <string name="roamingText2">Roaming Indicator Flashing</string>
- <string name="roamingText3">Out of Neighborhood</string>
- <string name="roamingText4">Out of Building</string>
- <string name="roamingText5">Roaming - Preferred System</string>
- <string name="roamingText6">Roaming - Available System</string>
- <string name="roamingText7">Roaming - Alliance Partner</string>
- <string name="roamingText8">Roaming - Premium Partner</string>
- <string name="roamingText9">Roaming - Full Service Functionality</string>
- <string name="roamingText10">Roaming - Partial Service Functionality</string>
- <string name="roamingText11">Roaming Banner On</string>
- <string name="roamingText12">Roaming Banner Off</string>
- <string name="roamingTextSearching">Searching for Service</string>
-
- <!-- Displayed when WFC registration fails -->
- <string name="wfcRegErrorTitle">Couldn\u2019t set up Wi\u2011Fi calling</string>
- <!-- WFC Operator Error Messages showed as alerts -->
- <string-array name="wfcOperatorErrorAlertMessages">
- <item>To make calls and send messages over Wi-Fi, first ask your carrier to set up this service. Then turn on Wi-Fi calling again from Settings. (Error code: <xliff:g id="code" example="REG09 - No 911 Address">%1$s</xliff:g>)</item>
- </string-array>
- <!-- WFC Operator Error Messages showed as notifications -->
- <string-array name="wfcOperatorErrorNotificationMessages">
- <item>Issue registering Wi\u2011Fi calling with your carrier: <xliff:g id="code" example="REG09 - No 911 Address">%1$s</xliff:g></item>
- </string-array>
- <!-- Template for showing mobile network operator name while WFC is active -->
- <string-array name="wfcSpnFormats" translatable="false">
- <item>@string/wfcSpnFormat_spn</item>
- <item>@string/wfcSpnFormat_spn_wifi_calling</item>
- <item>@string/wfcSpnFormat_wlan_call</item>
- <item>@string/wfcSpnFormat_spn_wlan_call</item>
- <item>@string/wfcSpnFormat_spn_wifi</item>
- <item>@string/wfcSpnFormat_wifi_calling_bar_spn</item>
- <item>@string/wfcSpnFormat_spn_vowifi</item>
- <item>@string/wfcSpnFormat_wifi_calling</item>
- <item>@string/wfcSpnFormat_wifi</item>
- <item>@string/wfcSpnFormat_wifi_calling_wo_hyphen</item>
- <item>@string/wfcSpnFormat_vowifi</item>
- <item>@string/wfcSpnFormat_spn_wifi_calling_vo_hyphen</item>
- </string-array>
-
- <!-- Spn during Wi-Fi Calling: "<operator>" -->
- <string name="wfcSpnFormat_spn"><xliff:g id="spn" example="Operator">%s</xliff:g></string>
- <!-- Spn during Wi-Fi Calling: "<operator> Wi-Fi Calling" -->
- <string name="wfcSpnFormat_spn_wifi_calling"><xliff:g id="spn" example="Operator">%s</xliff:g> Wi-Fi Calling</string>
- <!-- Spn during Wi-Fi Calling: "<operator> WiFi Calling" -->
- <string name="wfcSpnFormat_spn_wifi_calling_vo_hyphen"><xliff:g id="spn" example="Operator">%s</xliff:g> WiFi Calling</string>
- <!-- Spn during Wi-Fi Calling: "WLAN Call" -->
- <string name="wfcSpnFormat_wlan_call">WLAN Call</string>
- <!-- Spn during Wi-Fi Calling: "<operator> WLAN Call" -->
- <string name="wfcSpnFormat_spn_wlan_call"><xliff:g id="spn" example="Operator">%s</xliff:g> WLAN Call</string>
- <!-- Spn during Wi-Fi Calling: "<operator> Wi-Fi" -->
- <string name="wfcSpnFormat_spn_wifi"><xliff:g id="spn" example="Operator">%s</xliff:g> Wi-Fi</string>
- <!-- Spn during Wi-Fi Calling: "WiFi Calling | <operator>" -->
- <string name="wfcSpnFormat_wifi_calling_bar_spn">WiFi Calling | <xliff:g id="spn" example="Operator">%s</xliff:g></string>
- <!-- Spn during Wi-Fi Calling: "<operator> VoWifi" -->
- <string name="wfcSpnFormat_spn_vowifi"><xliff:g id="spn" example="Operator">%s</xliff:g> VoWifi</string>
- <!-- Spn during Wi-Fi Calling: "Wi-Fi Calling" -->
- <string name="wfcSpnFormat_wifi_calling">Wi-Fi Calling</string>
- <!-- Spn during Wi-Fi Calling: "Wi-Fi" -->
- <string name="wfcSpnFormat_wifi">Wi-Fi</string>
- <!-- Spn during Wi-Fi Calling: "WiFi Calling" (without hyphen) -->
- <string name="wfcSpnFormat_wifi_calling_wo_hyphen">WiFi Calling</string>
- <!-- Spn during Wi-Fi Calling: "VoWifi" -->
- <string name="wfcSpnFormat_vowifi">VoWifi</string>
-
<!-- WFC, summary for Disabled -->
<string name="wifi_calling_off_summary">Off</string>
<!-- WFC, summary for Wi-Fi Preferred -->
@@ -292,25 +63,6 @@
<!-- WFC, summary for Wi-Fi Only -->
<string name="wfc_mode_wifi_only_summary">Wi-Fi only</string>
- <!--
- {0} is one of "bearerServiceCode*"
- {1} is dialing number
- {2} is time in seconds
-
- cfTemplateRegistered and cfTemplateRegisteredTime mean that a phone number
- has been set but forwarding is not on.
- --> <skip />
- <!-- Displayed when the call forwarding query was not able to be forwarded. -->
- <string name="cfTemplateNotForwarded"><xliff:g id="bearer_service_code">{0}</xliff:g>: Not forwarded</string>
- <!-- Displayed when the call forwarding query was forwarded. -->
- <string name="cfTemplateForwarded"><xliff:g id="bearer_service_code">{0}</xliff:g>: <xliff:g id="dialing_number">{1}</xliff:g></string>
- <!-- Displayed when the call forwarding query will be forwarded after some time. -->
- <string name="cfTemplateForwardedTime"><xliff:g id="bearer_service_code">{0}</xliff:g>: <xliff:g id="dialing_number">{1}</xliff:g> after <xliff:g id="time_delay">{2}</xliff:g> seconds</string>
- <!-- Displayed when the call forwarding query was set but forwarding is not enabled. -->
- <string name="cfTemplateRegistered"><xliff:g id="bearer_service_code">{0}</xliff:g>: Not forwarded</string>
- <!-- Displayed when the call forwarding query was set but forwarding is not enabled. -->
- <string name="cfTemplateRegisteredTime"><xliff:g id="bearer_service_code">{0}</xliff:g>: Not forwarded</string>
-
<!-- android.net.http Error strings --> <skip />
<!-- Displayed when a feature code (non-phone number) is dialed and completes successfully. -->
<string name="fcComplete">Feature code complete.</string>
@@ -3418,62 +3170,8 @@
<!-- Name of the dialog that lets the user choose an accented character to insert -->
<string name="select_character">Insert character</string>
-
- <!-- SMS per-application rate control Dialog --> <skip />
- <!-- SMS_DIALOG: An SMS dialog is shown if an application tries to send too many SMSes. This is the title of that dialog. -->
- <string name="sms_control_title">Sending SMS messages</string>
- <!-- See SMS_DIALOG. This is the message shown in that dialog. [CHAR LIMIT=NONE] -->
- <string name="sms_control_message"><b><xliff:g id="app_name">%1$s</xliff:g></b> is sending a large number of SMS messages. Do you want to allow this app to continue sending messages?</string>
- <!-- See SMS_DIALOG. This is a button choice to allow sending the SMSes. [CHAR LIMIT=30] -->
- <string name="sms_control_yes">Allow</string>
- <!-- See SMS_DIALOG. This is a button choice to disallow sending the SMSes. [CHAR LIMIT=30] -->
- <string name="sms_control_no">Deny</string>
-
- <!-- SMS short code verification dialog. --> <skip />
- <!-- The message text for the SMS short code confirmation dialog. [CHAR LIMIT=NONE] -->
- <string name="sms_short_code_confirm_message"><b><xliff:g id="app_name">%1$s</xliff:g></b> would like to send a message to <b><xliff:g id="dest_address">%2$s</xliff:g></b>.</string>
- <!-- Message details for the SMS short code confirmation dialog (possible premium short code). [CHAR LIMIT=NONE] -->
- <string name="sms_short_code_details">This <b>may cause charges</b> on your mobile account.</string>
- <!-- Message details for the SMS short code confirmation dialog (premium short code). [CHAR LIMIT=NONE] -->
- <string name="sms_premium_short_code_details"><b>This will cause charges on your mobile account.</b></string>
- <!-- Text of the approval button for the SMS short code confirmation dialog. [CHAR LIMIT=30] -->
- <string name="sms_short_code_confirm_allow">Send</string>
- <!-- Text of the cancel button for the SMS short code confirmation dialog. [CHAR LIMIT=30] -->
- <string name="sms_short_code_confirm_deny">Cancel</string>
- <!-- Text of the checkbox for the SMS short code confirmation dialog to remember the user's choice. [CHAR LIMIT=40] -->
- <string name="sms_short_code_remember_choice">Remember my choice</string>
- <!-- Text shown when remember checkbox is checked to inform the user how they may undo the setting. [CHAR LIMIT=40] -->
- <string name="sms_short_code_remember_undo_instruction">You can change this later in Settings\u00A0>\u00A0Apps"</string>
-
- <!-- Text of the approval button for the SMS short code confirmation dialog when checkbox is checked. [CHAR LIMIT=30] -->
- <string name="sms_short_code_confirm_always_allow">Always Allow</string>
- <!-- Text of the cancel button for the SMS short code confirmation dialog when checkbox is checked. [CHAR LIMIT=30] -->
- <string name="sms_short_code_confirm_never_allow">Never Allow</string>
-
- <!-- SIM swap and device reboot Dialog --> <skip />
- <!-- See SIM_REMOVED_DIALOG. This is the title of that dialog. -->
- <string name="sim_removed_title">SIM card removed</string>
- <!-- See SIM_REMOVED_DIALOG. This is the message of that dialog. -->
- <string name="sim_removed_message">The mobile network will be unavailable until you restart with a valid SIM card inserted.</string>
- <!-- See SIM_REMOVED_DIALOG. This is the button of that dialog. -->
- <string name="sim_done_button">Done</string>
- <!-- See SIM_ADDED_DIALOG. This is the title of that dialog. -->
- <string name="sim_added_title">SIM card added</string>
- <!-- See SIM_ADDED_DIALOG. This is the message of that dialog. -->
- <string name="sim_added_message">Restart your device to access the mobile network.</string>
<!-- See SIM_ADDED_DIALOG. This is the button of that dialog. -->
<string name="sim_restart_button">Restart</string>
- <!-- See Carrier_App_Dialog. This is the message of that dialog. -->
- <string name="install_carrier_app_notification_title">Activate mobile service</string>
- <!-- Notification message that shows when the user inserts a SIM card that requires a carrier app download, but the app name is unknown -->
- <string name="install_carrier_app_notification_text">Download the carrier app to activate your new SIM</string>
- <!-- Notification message that shows when the user inserts a SIM card that requires a carrier app download. App name is known -->
- <string name="install_carrier_app_notification_text_app_name">Download the <xliff:g id="app_name">%1$s</xliff:g> app to activate your new SIM</string>
- <!-- See Carrier_App_Notification. This is the button of that dialog. -->
- <string name="install_carrier_app_notification_button">Download app</string>
- <!-- See carrier_app_notification. This is the headline. -->
- <string name="carrier_app_notification_title">New SIM inserted</string>
- <string name="carrier_app_notification_text">Tap to set it up</string>
<!-- Date/Time picker dialogs strings -->
@@ -3768,12 +3466,6 @@
<!-- This string appears (on two lines) when you type a number into contacts search, to let you create a contact whose phone number is the number you typed. The first line will be in bigger type than the second. -->
<string name="create_contact_using">Create contact\nusing <xliff:g id="number" example="555">%s</xliff:g></string>
- <!-- This string array should be overridden by the manufacture to present a list of carrier-id,locale. The wifi regulatory domain is extracted from the locale information. This is used at startup to set system defaults by checking the system property ro.carrier for the carrier-id and searching through this array -->
- <!-- An Array of [[Carrier-ID] -->
- <!-- [default-locale]] -->
- <string-array translatable="false" name="carrier_properties">
- </string-array>
-
<string name="grant_credentials_permission_message_header">The following one or more apps request permission to access your account, now and in the future.</string>
<string name="grant_credentials_permission_message_footer">Do you want to allow this request?</string>
<string name="grant_permissions_header_text">Access request</string>
@@ -3808,9 +3500,6 @@
importance of the user's notifications. -->
<string name="notification_ranker_binding_label">Notification ranker service</string>
- <!-- Do Not Translate: Alternate eri.xml -->
- <string name="alternate_eri_file">/data/eri.xml</string>
-
<!-- The title of the notification when VPN is active. -->
<string name="vpn_title">VPN activated</string>
<!-- The title of the notification when VPN is active with an application name. -->
@@ -4112,15 +3801,6 @@
<!-- Title for a dialog showing possible activities for sharing in ShareActionProvider [CHAR LIMIT=25] -->
<string name="share_action_provider_share_with">Share with</string>
- <!-- STK sending DTMF, SMS, USSD, SS -->
- <string name="sending">Sending\u2026</string>
-
- <!-- STK launch Browser -->
- <string name="launchBrowserDefault">Launch Browser?</string>
-
- <!-- STK setup Call -->
- <string name="SetupCallDefault">Accept call?</string>
-
<!-- Title for a button to choose the currently selected activity
as the default in the activity resolver. [CHAR LIMIT=25] -->
<string name="activity_resolver_use_always">Always</string>
@@ -4839,17 +4519,6 @@
<!-- Error message shown when there is a system error which can be solved by the manufacturer. [CHAR LIMIT=NONE] -->
<string name="system_error_manufacturer">There\'s an internal problem with your device. Contact your manufacturer for details.</string>
- <!-- Displayed when the USSD/SS request is modified by STK CC to a
- different request. This will be displayed in a toast. -->
- <string name="stk_cc_ussd_to_dial">USSD request changed to regular call</string>
- <string name="stk_cc_ussd_to_ss">USSD request changed to SS request</string>
- <string name="stk_cc_ussd_to_ussd">Changed to new USSD request</string>
- <string name="stk_cc_ussd_to_dial_video">USSD request changed to video call</string>
- <string name="stk_cc_ss_to_dial">SS request changed to regular call</string>
- <string name="stk_cc_ss_to_dial_video">SS request changed to video call</string>
- <string name="stk_cc_ss_to_ussd">SS request changed to USSD request</string>
- <string name="stk_cc_ss_to_ss">Changed to new SS request</string>
-
<!-- Content description of the work profile icon in the notification. -->
<string name="notification_work_profile_content_description">Work profile</string>
@@ -4959,11 +4628,6 @@
<!-- Title for button to see application detail in app store which it came from - it may allow user to update to newer version. [CHAR LIMIT=50] -->
<string name="deprecated_target_sdk_app_store">Check for update</string>
- <!-- Notification title shown when new SMS/MMS is received while the device is locked [CHAR LIMIT=NONE] -->
- <string name="new_sms_notification_title">You have new messages</string>
- <!-- Notification content shown when new SMS/MMS is received while the device is locked [CHAR LIMIT=NONE] -->
- <string name="new_sms_notification_content">Open SMS app to view</string>
-
<!-- Notification title shown when user profile is credential encrypted and requires the user to unlock before some features are usable [CHAR LIMIT=36] -->
<string name="profile_encrypted_title">Some functionality may be limited</string>
<!-- Notification detail shown when work profile is credential encrypted and requires the user to unlock before some features are usable [CHAR LIMIT=30] -->
@@ -4999,9 +4663,6 @@
<!-- Accessibilty string added to a widget that has been suspended [CHAR LIMIT=20] -->
<string name="suspended_widget_accessibility">Disabled <xliff:g id="label" example="Calendar">%1$s</xliff:g></string>
- <!-- Label used by Telephony code, assigned as the display name for conference calls [CHAR LIMIT=60] -->
- <string name="conference_call">Conference Call</string>
-
<!-- Window title for a tooltip [CHAR LIMIT=NONE] -->
<string name="tooltip_popup_title">Tooltip</string>
@@ -5138,18 +4799,6 @@
<!-- Primary ETWS (Earthquake and Tsunami Warning System) default message for others -->
<string name="etws_primary_default_message_others"></string>
- <!-- Title of notification when UE fails CS registration with MM reject cause code from network. -->
- <string name="mmcc_authentication_reject">SIM not allowed for voice</string>
- <string name="mmcc_imsi_unknown_in_hlr">SIM not provisioned for voice</string>
- <string name="mmcc_illegal_ms">SIM not allowed for voice</string>
- <string name="mmcc_illegal_me">Phone not allowed for voice</string>
-
- <!-- Title of notification when UE fails to register network with MM reject cause code when multiple SIMs are active. -->
- <string name="mmcc_authentication_reject_msim_template">SIM <xliff:g id="simNumber" example="1">%d</xliff:g> not allowed</string>
- <string name="mmcc_imsi_unknown_in_hlr_msim_template">SIM <xliff:g id="simNumber" example="1">%d</xliff:g> not provisioned</string>
- <string name="mmcc_illegal_ms_msim_template">SIM <xliff:g id="simNumber" example="1">%d</xliff:g> not allowed</string>
- <string name="mmcc_illegal_me_msim_template">SIM <xliff:g id="simNumber" example="1">%d</xliff:g> not allowed</string>
-
<!-- Popup window default title to be read by a screen reader-->
<string name="popup_window_default_title">Popup Window</string>
diff --git a/core/res/res/values/symbols.xml b/core/res/res/values/symbols.xml
index 500bfe9..b627a46 100644
--- a/core/res/res/values/symbols.xml
+++ b/core/res/res/values/symbols.xml
@@ -18,7 +18,6 @@
<!-- Private symbols that we need to reference from framework code. See
frameworks/base/core/res/MakeJavaSymbols.sed for how to easily generate
this.
-
Can be referenced in java code as: com.android.internal.R.<type>.<name>
and in layout xml as: "@*android:<type>/<name>"
-->
@@ -221,11 +220,6 @@
<java-symbol type="id" name="inbox_text6" />
<java-symbol type="id" name="status_bar_latest_event_content" />
<java-symbol type="id" name="notification_main_column" />
- <java-symbol type="id" name="sms_short_code_confirm_message" />
- <java-symbol type="id" name="sms_short_code_detail_layout" />
- <java-symbol type="id" name="sms_short_code_detail_message" />
- <java-symbol type="id" name="sms_short_code_remember_choice_checkbox" />
- <java-symbol type="id" name="sms_short_code_remember_undo_instruction" />
<java-symbol type="id" name="breadcrumb_section" />
<java-symbol type="id" name="action_bar_spinner" />
<java-symbol type="id" name="pin_cancel_button" />
@@ -251,7 +245,6 @@
<java-symbol type="id" name="profile_tabhost" />
<java-symbol type="id" name="tabs" />
<java-symbol type="id" name="tabcontent" />
-
<java-symbol type="attr" name="actionModeShareDrawable" />
<java-symbol type="attr" name="alertDialogCenterButtons" />
<java-symbol type="attr" name="fragmentBreadCrumbsStyle" />
@@ -283,7 +276,6 @@
<java-symbol type="bool" name="config_bluetooth_le_peripheral_mode_supported" />
<java-symbol type="bool" name="config_bluetooth_hfp_inband_ringing_support" />
<java-symbol type="bool" name="config_cellBroadcastAppLinks" />
- <java-symbol type="bool" name="config_duplicate_port_omadm_wappush" />
<java-symbol type="bool" name="config_disableTransitionAnimation" />
<java-symbol type="bool" name="config_enableAutoPowerModes" />
<java-symbol type="bool" name="config_useWebViewPacProcessor" />
@@ -296,18 +288,7 @@
<java-symbol type="bool" name="config_enable_puk_unlock_screen" />
<java-symbol type="bool" name="config_disableLockscreenByDefault" />
<java-symbol type="bool" name="config_enableBurnInProtection" />
- <java-symbol type="bool" name="config_hotswapCapable" />
<java-symbol type="bool" name="config_mms_content_disposition_support" />
- <java-symbol type="string" name="config_wwan_network_service_package" />
- <java-symbol type="string" name="config_wlan_network_service_package" />
- <java-symbol type="string" name="config_wwan_network_service_class" />
- <java-symbol type="string" name="config_wlan_network_service_class" />
- <java-symbol type="string" name="config_wwan_data_service_package" />
- <java-symbol type="string" name="config_wlan_data_service_package" />
- <java-symbol type="string" name="config_wwan_data_service_class" />
- <java-symbol type="string" name="config_wlan_data_service_class" />
- <java-symbol type="string" name="config_qualified_networks_service_package" />
- <java-symbol type="string" name="config_qualified_networks_service_class" />
<java-symbol type="bool" name="config_networkSamplingWakesDevice" />
<java-symbol type="bool" name="config_showMenuShortcutsWhenKeyboardPresent" />
<java-symbol type="bool" name="config_sip_wifi_only" />
@@ -326,10 +307,8 @@
<java-symbol type="bool" name="config_single_volume" />
<java-symbol type="bool" name="config_voice_capable" />
<java-symbol type="bool" name="config_requireCallCapableAccountForHandle" />
- <java-symbol type="bool" name="config_user_notification_of_restrictied_mobile_access" />
<java-symbol type="bool" name="config_wifiDisplaySupportsProtectedBuffers" />
<java-symbol type="bool" name="preferences_prefer_dual_pane" />
- <java-symbol type="bool" name="skip_restoring_network_selection" />
<java-symbol type="bool" name="split_action_bar_is_narrow" />
<java-symbol type="bool" name="config_useVolumeKeySounds" />
<java-symbol type="bool" name="config_enableWallpaperService" />
@@ -351,9 +330,6 @@
<java-symbol type="bool" name="config_safe_media_volume_enabled" />
<java-symbol type="bool" name="config_safe_media_disable_on_volume_up" />
<java-symbol type="bool" name="config_camera_sound_forced" />
- <java-symbol type="bool" name="config_dontPreferApn" />
- <java-symbol type="bool" name="config_restartRadioAfterProvisioning" />
- <java-symbol type="bool" name="config_requireRadioPowerOffOnSimRefreshReset" />
<java-symbol type="bool" name="config_speed_up_audio_on_mt_calls" />
<java-symbol type="bool" name="config_useFixedVolume" />
<java-symbol type="bool" name="config_enableMultiUserUI"/>
@@ -458,10 +434,7 @@
<java-symbol type="xml" name="config_user_types" />
<java-symbol type="integer" name="config_safe_media_volume_index" />
<java-symbol type="integer" name="config_safe_media_volume_usb_mB" />
- <java-symbol type="integer" name="config_mobile_mtu" />
- <java-symbol type="array" name="config_mobile_tcp_buffers" />
<java-symbol type="integer" name="config_volte_replacement_rat"/>
- <java-symbol type="integer" name="config_valid_wappush_index" />
<java-symbol type="integer" name="config_overrideHasPermanentMenuKey" />
<java-symbol type="integer" name="config_mdc_initial_max_retry" />
<java-symbol type="integer" name="config_keepPreloadsMinDays" />
@@ -470,12 +443,9 @@
<java-symbol type="array" name="config_deviceSpecificSystemServices" />
<java-symbol type="string" name="config_deviceSpecificDevicePolicyManagerService" />
<java-symbol type="string" name="config_deviceSpecificAudioService" />
- <java-symbol type="integer" name="config_num_physical_slots" />
<java-symbol type="array" name="config_integrityRuleProviderPackages" />
<java-symbol type="bool" name="config_useAssistantVolume" />
-
<java-symbol type="color" name="tab_indicator_text_v4" />
-
<java-symbol type="dimen" name="accessibility_touch_slop" />
<java-symbol type="dimen" name="alert_dialog_round_padding"/>
<java-symbol type="dimen" name="config_minScrollbarTouchTarget" />
@@ -519,7 +489,6 @@
<java-symbol type="dimen" name="immersive_mode_cling_width" />
<java-symbol type="dimen" name="accessibility_magnification_indicator_width" />
<java-symbol type="dimen" name="circular_display_mask_thickness" />
-
<java-symbol type="string" name="add_account_button_label" />
<java-symbol type="string" name="addToDictionary" />
<java-symbol type="string" name="action_bar_home_description" />
@@ -573,47 +542,12 @@
<java-symbol type="string" name="define" />
<java-symbol type="string" name="define_desc" />
<java-symbol type="string" name="textSelectionCABTitle" />
- <java-symbol type="string" name="BaMmi" />
- <java-symbol type="string" name="CLIRDefaultOffNextCallOff" />
- <java-symbol type="string" name="CLIRDefaultOffNextCallOn" />
- <java-symbol type="string" name="CLIRDefaultOnNextCallOff" />
- <java-symbol type="string" name="CLIRDefaultOnNextCallOn" />
- <java-symbol type="string" name="CLIRPermanent" />
- <java-symbol type="string" name="CfMmi" />
- <java-symbol type="string" name="ClipMmi" />
- <java-symbol type="string" name="ClirMmi" />
- <java-symbol type="string" name="ColpMmi" />
- <java-symbol type="string" name="ColrMmi" />
- <java-symbol type="string" name="CwMmi" />
<java-symbol type="string" name="Midnight" />
<java-symbol type="string" name="Noon" />
- <java-symbol type="string" name="PinMmi" />
- <java-symbol type="string" name="PwdMmi" />
- <java-symbol type="string" name="NetworkPreferenceSwitchSummary" />
- <java-symbol type="string" name="NetworkPreferenceSwitchTitle" />
- <java-symbol type="string" name="EmergencyCallWarningTitle" />
- <java-symbol type="string" name="EmergencyCallWarningSummary" />
- <java-symbol type="string" name="RestrictedOnAllVoiceTitle" />
- <java-symbol type="string" name="RestrictedOnDataTitle" />
- <java-symbol type="string" name="RestrictedOnEmergencyTitle" />
- <java-symbol type="string" name="RestrictedOnNormalTitle" />
- <java-symbol type="string" name="RestrictedStateContent" />
- <java-symbol type="string" name="RestrictedStateContentMsimTemplate" />
- <java-symbol type="string" name="notification_channel_network_alert" />
- <java-symbol type="string" name="notification_channel_call_forward" />
- <java-symbol type="string" name="notification_channel_emergency_callback" />
- <java-symbol type="string" name="notification_channel_mobile_data_status" />
- <java-symbol type="string" name="notification_channel_sms" />
- <java-symbol type="string" name="notification_channel_voice_mail" />
- <java-symbol type="string" name="notification_channel_wfc" />
- <java-symbol type="string" name="notification_channel_sim" />
- <java-symbol type="string" name="notification_channel_sim_high_prio" />
- <java-symbol type="string" name="SetupCallDefault" />
<java-symbol type="string" name="accept" />
<java-symbol type="string" name="activity_chooser_view_see_all" />
<java-symbol type="string" name="activitychooserview_choose_application" />
<java-symbol type="string" name="activitychooserview_choose_application_error" />
- <java-symbol type="string" name="alternate_eri_file" />
<java-symbol type="string" name="alwaysUse" />
<java-symbol type="string" name="autofill_address_line_1_label_re" />
<java-symbol type="string" name="autofill_address_line_1_re" />
@@ -674,8 +608,6 @@
<java-symbol type="string" name="autofill_zip_4_re" />
<java-symbol type="string" name="autofill_zip_code" />
<java-symbol type="string" name="autofill_zip_code_re" />
- <java-symbol type="string" name="badPin" />
- <java-symbol type="string" name="badPuk" />
<java-symbol type="string" name="byteShort" />
<java-symbol type="string" name="capability_title_canRequestFilterKeyEvents" />
<java-symbol type="string" name="capability_desc_canRequestTouchExploration" />
@@ -690,11 +622,6 @@
<java-symbol type="string" name="captive_portal_logged_in_detailed" />
<java-symbol type="string" name="capital_off" />
<java-symbol type="string" name="capital_on" />
- <java-symbol type="string" name="cfTemplateForwarded" />
- <java-symbol type="string" name="cfTemplateForwardedTime" />
- <java-symbol type="string" name="cfTemplateNotForwarded" />
- <java-symbol type="string" name="cfTemplateRegistered" />
- <java-symbol type="string" name="cfTemplateRegisteredTime" />
<java-symbol type="string" name="chooseActivity" />
<java-symbol type="string" name="checked" />
<java-symbol type="string" name="config_default_dns_server" />
@@ -702,10 +629,7 @@
<java-symbol type="string" name="not_checked" />
<java-symbol type="array" name="config_ethernet_interfaces" />
<java-symbol type="array" name="config_wakeonlan_supported_interfaces" />
- <java-symbol type="string" name="cellbroadcast_default_package" />
<java-symbol type="string" name="config_forceVoiceInteractionServicePackage" />
- <java-symbol type="string" name="config_mms_user_agent" />
- <java-symbol type="string" name="config_mms_user_agent_profile_url" />
<java-symbol type="string" name="config_ntpServer" />
<java-symbol type="string" name="config_useragentprofile_url" />
<java-symbol type="string" name="config_appsNotReportingCrashes" />
@@ -797,7 +721,6 @@
<java-symbol type="string" name="ime_action_previous" />
<java-symbol type="string" name="ime_action_search" />
<java-symbol type="string" name="ime_action_send" />
- <java-symbol type="string" name="invalidPin" />
<java-symbol type="string" name="js_dialog_before_unload_positive_button" />
<java-symbol type="string" name="js_dialog_before_unload_negative_button" />
<java-symbol type="string" name="js_dialog_before_unload_title" />
@@ -813,7 +736,6 @@
<java-symbol type="string" name="keyboardview_keycode_shift" />
<java-symbol type="string" name="kilobyteShort" />
<java-symbol type="string" name="last_month" />
- <java-symbol type="string" name="launchBrowserDefault" />
<java-symbol type="string" name="lock_to_app_unlock_pin" />
<java-symbol type="string" name="lock_to_app_unlock_pattern" />
<java-symbol type="string" name="lock_to_app_unlock_password" />
@@ -830,16 +752,8 @@
<java-symbol type="string" name="low_memory" />
<java-symbol type="string" name="megabyteShort" />
<java-symbol type="string" name="midnight" />
- <java-symbol type="string" name="mismatchPin" />
- <java-symbol type="string" name="mmiComplete" />
- <java-symbol type="string" name="mmiError" />
- <java-symbol type="string" name="mmiFdnError" />
- <java-symbol type="string" name="mmiErrorWhileRoaming" />
<java-symbol type="string" name="month_day_year" />
<java-symbol type="string" name="more_item_label" />
- <java-symbol type="string" name="needPuk" />
- <java-symbol type="string" name="needPuk2" />
- <java-symbol type="string" name="enablePin" />
<java-symbol type="string" name="new_app_action" />
<java-symbol type="string" name="new_app_description" />
<java-symbol type="string" name="noApplications" />
@@ -854,14 +768,9 @@
<java-symbol type="string" name="orgTypeCustom" />
<java-symbol type="string" name="orgTypeOther" />
<java-symbol type="string" name="orgTypeWork" />
- <java-symbol type="string" name="passwordIncorrect" />
<java-symbol type="string" name="perms_description_app" />
<java-symbol type="string" name="perms_new_perm_prefix" />
<java-symbol type="string" name="petabyteShort" />
- <java-symbol type="string" name="peerTtyModeFull" />
- <java-symbol type="string" name="peerTtyModeHco" />
- <java-symbol type="string" name="peerTtyModeVco" />
- <java-symbol type="string" name="peerTtyModeOff" />
<java-symbol type="string" name="phoneTypeAssistant" />
<java-symbol type="string" name="phoneTypeCallback" />
<java-symbol type="string" name="phoneTypeCar" />
@@ -883,10 +792,6 @@
<java-symbol type="string" name="phoneTypeWork" />
<java-symbol type="string" name="phoneTypeWorkMobile" />
<java-symbol type="string" name="phoneTypeWorkPager" />
- <java-symbol type="string" name="wfcRegErrorTitle" />
- <java-symbol type="array" name="wfcOperatorErrorAlertMessages" />
- <java-symbol type="array" name="wfcOperatorErrorNotificationMessages" />
- <java-symbol type="array" name="wfcSpnFormats" />
<java-symbol type="string" name="wifi_calling_off_summary" />
<java-symbol type="string" name="wfc_mode_wifi_preferred_summary" />
<java-symbol type="string" name="wfc_mode_cellular_preferred_summary" />
@@ -925,7 +830,6 @@
<java-symbol type="string" name="print_service_installed_message" />
<java-symbol type="string" name="printing_disabled_by" />
<java-symbol type="string" name="progress_erasing" />
- <java-symbol type="string" name="mobile_provisioning_apn" />
<java-symbol type="string" name="mobile_provisioning_url" />
<java-symbol type="string" name="quick_contacts_not_available" />
<java-symbol type="string" name="reboot_to_update_package" />
@@ -960,41 +864,12 @@
<java-symbol type="string" name="ringtone_picker_title_notification" />
<java-symbol type="string" name="ringtone_silent" />
<java-symbol type="string" name="ringtone_unknown" />
- <java-symbol type="string" name="roamingText0" />
- <java-symbol type="string" name="roamingText1" />
- <java-symbol type="string" name="roamingText10" />
- <java-symbol type="string" name="roamingText11" />
- <java-symbol type="string" name="roamingText12" />
- <java-symbol type="string" name="roamingText2" />
- <java-symbol type="string" name="roamingText3" />
- <java-symbol type="string" name="roamingText4" />
- <java-symbol type="string" name="roamingText5" />
- <java-symbol type="string" name="roamingText6" />
- <java-symbol type="string" name="roamingText7" />
- <java-symbol type="string" name="roamingText8" />
- <java-symbol type="string" name="roamingText9" />
- <java-symbol type="string" name="roamingTextSearching" />
<java-symbol type="string" name="save_password_label" />
<java-symbol type="string" name="save_password_message" />
<java-symbol type="string" name="save_password_never" />
<java-symbol type="string" name="save_password_notnow" />
<java-symbol type="string" name="save_password_remember" />
<java-symbol type="string" name="sendText" />
- <java-symbol type="string" name="sending" />
- <java-symbol type="string" name="serviceClassData" />
- <java-symbol type="string" name="serviceClassDataAsync" />
- <java-symbol type="string" name="serviceClassDataSync" />
- <java-symbol type="string" name="serviceClassFAX" />
- <java-symbol type="string" name="serviceClassPAD" />
- <java-symbol type="string" name="serviceClassPacket" />
- <java-symbol type="string" name="serviceClassSMS" />
- <java-symbol type="string" name="serviceClassVoice" />
- <java-symbol type="string" name="serviceDisabled" />
- <java-symbol type="string" name="serviceEnabled" />
- <java-symbol type="string" name="serviceEnabledFor" />
- <java-symbol type="string" name="serviceErased" />
- <java-symbol type="string" name="serviceNotProvisioned" />
- <java-symbol type="string" name="serviceRegistered" />
<java-symbol type="string" name="setup_autofill" />
<java-symbol type="string" name="share" />
<java-symbol type="string" name="shareactionprovider_share_with" />
@@ -1002,10 +877,6 @@
<java-symbol type="string" name="shutdown_confirm" />
<java-symbol type="string" name="shutdown_confirm_question" />
<java-symbol type="string" name="shutdown_progress" />
- <java-symbol type="string" name="sim_added_message" />
- <java-symbol type="string" name="sim_added_title" />
- <java-symbol type="string" name="sim_removed_message" />
- <java-symbol type="string" name="sim_removed_title" />
<java-symbol type="string" name="sim_restart_button" />
<java-symbol type="string" name="sipAddressTypeCustom" />
<java-symbol type="string" name="sipAddressTypeHome" />
@@ -1013,18 +884,6 @@
<java-symbol type="string" name="sipAddressTypeWork" />
<java-symbol type="string" name="default_sms_application" />
<java-symbol type="string" name="default_browser" />
- <java-symbol type="string" name="sms_control_message" />
- <java-symbol type="string" name="sms_control_title" />
- <java-symbol type="string" name="sms_control_no" />
- <java-symbol type="string" name="sms_control_yes" />
- <java-symbol type="string" name="sms_short_code_confirm_allow" />
- <java-symbol type="string" name="sms_short_code_confirm_deny" />
- <java-symbol type="string" name="sms_short_code_confirm_always_allow" />
- <java-symbol type="string" name="sms_short_code_confirm_never_allow" />
- <java-symbol type="string" name="sms_short_code_confirm_message" />
- <java-symbol type="string" name="sms_short_code_details" />
- <java-symbol type="string" name="sms_premium_short_code_details" />
- <java-symbol type="string" name="sms_short_code_remember_undo_instruction" />
<java-symbol type="string" name="submit" />
<java-symbol type="string" name="sync_binding_label" />
<java-symbol type="string" name="sync_do_nothing" />
@@ -1069,8 +928,6 @@
<java-symbol type="string" name="network_switch_type_name_unknown" />
<java-symbol type="string" name="wifi_no_internet" />
<java-symbol type="string" name="wifi_no_internet_detailed" />
- <java-symbol type="string" name="imei" />
- <java-symbol type="string" name="meid" />
<java-symbol type="string" name="granularity_label_character" />
<java-symbol type="string" name="granularity_label_word" />
<java-symbol type="string" name="granularity_label_link" />
@@ -1081,14 +938,6 @@
<java-symbol type="string" name="default_audio_route_name_headphones" />
<java-symbol type="string" name="default_audio_route_name_usb" />
<java-symbol type="string" name="default_audio_route_category_name" />
- <java-symbol type="string" name="stk_cc_ss_to_dial" />
- <java-symbol type="string" name="stk_cc_ss_to_ss" />
- <java-symbol type="string" name="stk_cc_ss_to_ussd" />
- <java-symbol type="string" name="stk_cc_ss_to_dial_video" />
- <java-symbol type="string" name="stk_cc_ussd_to_dial" />
- <java-symbol type="string" name="stk_cc_ussd_to_ss" />
- <java-symbol type="string" name="stk_cc_ussd_to_ussd" />
- <java-symbol type="string" name="stk_cc_ussd_to_dial_video" />
<java-symbol type="string" name="safe_media_volume_warning" />
<java-symbol type="string" name="media_route_status_scanning" />
<java-symbol type="string" name="media_route_status_connecting" />
@@ -1225,21 +1074,15 @@
<java-symbol type="string" name="config_ethernet_tcp_buffers" />
<java-symbol type="string" name="demo_starting_message" />
<java-symbol type="string" name="demo_restarting_message" />
- <java-symbol type="string" name="conference_call" />
<java-symbol type="string" name="tooltip_popup_title" />
-
<java-symbol type="plurals" name="bugreport_countdown" />
<java-symbol type="plurals" name="file_count" />
<java-symbol type="plurals" name="last_num_days" />
<java-symbol type="plurals" name="matches_found" />
<java-symbol type="plurals" name="restr_pin_countdown" />
- <java-symbol type="plurals" name="pinpuk_attempts" />
<java-symbol type="plurals" name="ssl_ca_cert_warning" />
-
- <java-symbol type="array" name="carrier_properties" />
<java-symbol type="array" name="config_sms_enabled_locking_shift_tables" />
<java-symbol type="array" name="config_sms_enabled_single_shift_tables" />
- <java-symbol type="array" name="config_twoDigitNumberPattern" />
<java-symbol type="array" name="networkAttributes" />
<java-symbol type="array" name="preloaded_color_state_lists" />
<java-symbol type="array" name="preloaded_drawables" />
@@ -1250,11 +1093,7 @@
<java-symbol type="array" name="supported_locales" />
<java-symbol type="array" name="config_cdma_dun_supported_types" />
<java-symbol type="array" name="config_disabledUntilUsedPreinstalledImes" />
- <java-symbol type="array" name="config_callBarringMMI" />
- <java-symbol type="array" name="config_callBarringMMI_for_ims" />
<java-symbol type="array" name="config_globalActionsList" />
- <java-symbol type="array" name="config_telephonyEuiccDeviceCapabilities" />
- <java-symbol type="array" name="config_telephonyHardware" />
<java-symbol type="array" name="config_keySystemUuidMapping" />
<java-symbol type="array" name="required_apps_managed_user" />
<java-symbol type="array" name="required_apps_managed_profile" />
@@ -1270,7 +1109,6 @@
<java-symbol type="array" name="vendor_disallowed_apps_managed_device" />
<java-symbol type="array" name="cross_profile_apps" />
<java-symbol type="array" name="vendor_cross_profile_apps" />
-
<java-symbol type="drawable" name="default_wallpaper" />
<java-symbol type="drawable" name="default_lock_wallpaper" />
<java-symbol type="drawable" name="indicator_input_error" />
@@ -1407,7 +1245,6 @@
<java-symbol type="drawable" name="ic_qs_flashlight" />
<java-symbol type="drawable" name="ic_qs_auto_rotate" />
<java-symbol type="drawable" name="ic_qs_dnd" />
-
<java-symbol type="drawable" name="sim_light_blue" />
<java-symbol type="drawable" name="sim_light_green" />
<java-symbol type="drawable" name="sim_light_orange" />
@@ -1416,11 +1253,9 @@
<java-symbol type="drawable" name="sim_dark_green" />
<java-symbol type="drawable" name="sim_dark_orange" />
<java-symbol type="drawable" name="sim_dark_purple" />
-
<java-symbol type="drawable" name="ic_sim_card_multi_24px_clr" />
<java-symbol type="drawable" name="ic_sim_card_multi_48px_clr" />
<java-symbol type="drawable" name="ic_signal_cellular_alt_24px" />
-
<java-symbol type="drawable" name="btn_borderless_rect" />
<java-symbol type="drawable" name="ic_phone" />
<java-symbol type="drawable" name="ic_bt_headphones_a2dp" />
@@ -1442,13 +1277,11 @@
<java-symbol type="drawable" name="ic_signal_location" />
<java-symbol type="drawable" name="ic_info_outline_24" />
<java-symbol type="drawable" name="ic_qs_ui_mode_night" />
-
<java-symbol type="drawable" name="stat_notify_mmcc_indication_icn" />
<java-symbol type="drawable" name="autofilled_highlight"/>
<java-symbol type="drawable" name="ic_camera" />
<java-symbol type="drawable" name="ic_mic" />
<java-symbol type="drawable" name="ic_alert_window_layer" />
-
<java-symbol type="drawable" name="ic_account_circle" />
<java-symbol type="color" name="user_icon_1" />
<java-symbol type="color" name="user_icon_2" />
@@ -1464,7 +1297,6 @@
<java-symbol type="color" name="profile_badge_2" />
<java-symbol type="color" name="profile_badge_3" />
<java-symbol type="color" name="instant_app_badge" />
-
<java-symbol type="layout" name="action_bar_home" />
<java-symbol type="layout" name="action_bar_title_item" />
<java-symbol type="layout" name="action_menu_item_layout" />
@@ -1550,7 +1382,6 @@
<java-symbol type="layout" name="zoom_controls" />
<java-symbol type="layout" name="zoom_magnify" />
<java-symbol type="layout" name="notification_intruder_content" />
- <java-symbol type="layout" name="sms_short_code_confirmation_dialog" />
<java-symbol type="layout" name="action_bar_up_container" />
<java-symbol type="layout" name="app_not_authorized" />
<java-symbol type="layout" name="restrictions_pin_challenge" />
@@ -1562,14 +1393,11 @@
<java-symbol type="layout" name="resolver_list_per_profile" />
<java-symbol type="layout" name="chooser_list_per_profile" />
<java-symbol type="layout" name="resolver_empty_states" />
-
<java-symbol type="anim" name="slide_in_child_bottom" />
<java-symbol type="anim" name="slide_in_right" />
<java-symbol type="anim" name="slide_out_left" />
-
<java-symbol type="menu" name="webview_copy" />
<java-symbol type="menu" name="webview_find" />
-
<java-symbol type="xml" name="password_kbd_qwerty" />
<java-symbol type="xml" name="autotext" />
<java-symbol type="xml" name="password_kbd_numeric" />
@@ -1584,12 +1412,10 @@
<java-symbol type="xml" name="default_zen_mode_config" />
<java-symbol type="xml" name="sms_7bit_translation_table" />
<java-symbol type="xml" name="color_extraction" />
-
<java-symbol type="raw" name="color_fade_vert" />
<java-symbol type="raw" name="color_fade_frag" />
<java-symbol type="raw" name="loaderror" />
<java-symbol type="raw" name="nodomain" />
-
<java-symbol type="style" name="Animation.DropDownUp" />
<java-symbol type="style" name="Animation.DropDownDown" />
<java-symbol type="style" name="Animation.PopupWindow" />
@@ -1614,7 +1440,6 @@
<java-symbol type="style" name="Theme.DeviceDefault.VoiceInteractionSession" />
<java-symbol type="style" name="Pointer" />
<java-symbol type="style" name="LargePointer" />
-
<java-symbol type="attr" name="mediaRouteButtonStyle" />
<java-symbol type="attr" name="externalRouteEnabledDrawable" />
<java-symbol type="layout" name="media_route_chooser_dialog" />
@@ -1629,10 +1454,8 @@
<java-symbol type="string" name="media_route_chooser_title_for_remote_display" />
<java-symbol type="string" name="media_route_controller_disconnect" />
<java-symbol type="string" name="bluetooth_a2dp_audio_route_name" />
-
<java-symbol type="dimen" name="config_minScalingSpan" />
<java-symbol type="dimen" name="config_minScalingTouchMajor" />
-
<!-- From android.policy -->
<java-symbol type="anim" name="app_starting_exit" />
<java-symbol type="anim" name="dock_top_enter" />
@@ -1658,7 +1481,6 @@
<java-symbol type="anim" name="activity_translucent_close_exit" />
<java-symbol type="anim" name="activity_open_enter" />
<java-symbol type="anim" name="activity_close_exit" />
-
<java-symbol type="array" name="config_autoRotationTiltTolerance" />
<java-symbol type="array" name="config_keyboardTapVibePattern" />
<java-symbol type="array" name="config_longPressVibePattern" />
@@ -1805,7 +1627,6 @@
<java-symbol type="string" name="global_action_voice_assist" />
<java-symbol type="string" name="global_action_assist" />
<java-symbol type="string" name="global_action_screenshot" />
- <java-symbol type="string" name="invalidPuk" />
<java-symbol type="string" name="lockscreen_carrier_default" />
<java-symbol type="style" name="Animation.LockScreen" />
<java-symbol type="style" name="Theme.Dialog.RecentApplications" />
@@ -1813,7 +1634,6 @@
<java-symbol type="string" name="forward_intent_to_owner" />
<java-symbol type="string" name="forward_intent_to_work" />
<java-symbol type="dimen" name="cross_profile_apps_thumbnail_size" />
-
<!-- From services -->
<java-symbol type="anim" name="screen_rotate_0_enter" />
<java-symbol type="anim" name="screen_rotate_0_exit" />
@@ -2083,14 +1903,6 @@
<java-symbol type="string" name="low_internal_storage_view_text" />
<java-symbol type="string" name="low_internal_storage_view_text_no_boot" />
<java-symbol type="string" name="low_internal_storage_view_title" />
- <java-symbol type="string" name="mmcc_authentication_reject" />
- <java-symbol type="string" name="mmcc_imsi_unknown_in_hlr" />
- <java-symbol type="string" name="mmcc_illegal_ms" />
- <java-symbol type="string" name="mmcc_illegal_me" />
- <java-symbol type="string" name="mmcc_authentication_reject_msim_template" />
- <java-symbol type="string" name="mmcc_imsi_unknown_in_hlr_msim_template" />
- <java-symbol type="string" name="mmcc_illegal_ms_msim_template" />
- <java-symbol type="string" name="mmcc_illegal_me_msim_template" />
<java-symbol type="string" name="notification_listener_binding_label" />
<java-symbol type="string" name="vr_listener_binding_label" />
<java-symbol type="string" name="condition_provider_service_binding_label" />
@@ -2156,11 +1968,9 @@
<java-symbol type="string" name="config_customVpnConfirmDialogComponent" />
<java-symbol type="string" name="config_customVpnAlwaysOnDisconnectedDialogComponent" />
<java-symbol type="string" name="config_platformVpnConfirmDialogComponent" />
- <java-symbol type="string" name="config_carrierAppInstallDialogComponent" />
<java-symbol type="string" name="config_defaultNetworkScorerPackageName" />
<java-symbol type="string" name="config_persistentDataPackageName" />
<java-symbol type="string" name="config_deviceConfiguratorPackageName" />
-
<java-symbol type="layout" name="resolver_list" />
<java-symbol type="id" name="resolver_list" />
<java-symbol type="id" name="button_once" />
@@ -2169,7 +1979,6 @@
<java-symbol type="integer" name="config_screenshotChordKeyTimeout" />
<java-symbol type="integer" name="config_maxResolverActivityColumns" />
<java-symbol type="array" name="config_notificationSignalExtractors" />
-
<java-symbol type="layout" name="notification_material_action" />
<java-symbol type="layout" name="notification_material_action_list" />
<java-symbol type="layout" name="notification_material_action_tombstone" />
@@ -2184,9 +1993,7 @@
<java-symbol type="layout" name="notification_material_media_action" />
<java-symbol type="color" name="notification_progress_background_color" />
<java-symbol type="id" name="media_actions" />
-
<java-symbol type="dimen" name="config_mediaMetadataBitmapMaxSize" />
-
<!-- From SystemUI -->
<java-symbol type="anim" name="push_down_in" />
<java-symbol type="anim" name="push_down_out" />
@@ -2199,7 +2006,6 @@
<java-symbol type="anim" name="lock_screen_wallpaper_exit" />
<java-symbol type="anim" name="launch_task_behind_source" />
<java-symbol type="anim" name="wallpaper_open_exit" />
-
<java-symbol type="bool" name="config_alwaysUseCdmaRssi" />
<java-symbol type="dimen" name="status_bar_icon_size" />
<java-symbol type="dimen" name="status_bar_system_icon_size" />
@@ -2236,13 +2042,10 @@
<java-symbol type="style" name="Animation.RecentApplications" />
<java-symbol type="integer" name="dock_enter_exit_duration" />
<java-symbol type="bool" name="config_battery_percentage_setting_available" />
-
<!-- ImfTest -->
<java-symbol type="layout" name="auto_complete_list" />
-
<!-- From SettingsProvider -->
<java-symbol type="raw" name="fallbackring" />
-
<!-- From Settings -->
<java-symbol type="array" name="config_mobile_hotspot_provision_app" />
<java-symbol type="string" name="config_mobile_hotspot_provision_app_no_ui" />
@@ -2262,9 +2065,7 @@
<java-symbol type="id" name="body" />
<java-symbol type="string" name="fast_scroll_alphabet" />
<java-symbol type="string" name="ssl_certificate" />
-
<!-- From Phone -->
- <java-symbol type="bool" name="config_built_in_sip_phone" />
<java-symbol type="id" name="maximize_window" />
<java-symbol type="id" name="close_window" />
<java-symbol type="layout" name="decor_caption" />
@@ -2276,10 +2077,8 @@
<java-symbol type="color" name="decor_button_dark_color" />
<java-symbol type="color" name="decor_button_light_color" />
<java-symbol type="array" name="unloggable_phone_numbers" />
-
<!-- From TelephonyProvider -->
<java-symbol type="xml" name="apns" />
-
<!-- From ContactsProvider -->
<java-symbol type="array" name="common_nicknames" />
<java-symbol type="drawable" name="call_contact" />
@@ -2290,29 +2089,21 @@
<java-symbol type="string" name="common_name_conjunctions" />
<java-symbol type="string" name="dial_number_using" />
<java-symbol type="string" name="create_contact_using" />
-
<!-- From DownloadProvider -->
<java-symbol type="integer" name="config_MaxConcurrentDownloadsAllowed" />
<java-symbol type="integer" name="config_downloadDataDirSize" />
<java-symbol type="integer" name="config_downloadDataDirLowSpaceThreshold" />
-
<!-- From Contacts -->
<java-symbol type="drawable" name="quickcontact_badge_overlay_dark" />
-
<!-- From Browser -->
<java-symbol type="drawable" name="ic_menu_moreoverflow_normal_holo_dark" />
<java-symbol type="id" name="placeholder" />
<java-symbol type="string" name="ssl_certificate_is_valid" />
-
<!-- From Mms -->
<java-symbol type="drawable" name="ic_menu_play_clip" />
-
<!-- From Stk -->
- <java-symbol type="bool" name="config_sf_slowBlur" />
<java-symbol type="drawable" name="ic_volume" />
<java-symbol type="drawable" name="stat_notify_sim_toolkit" />
- <java-symbol type="bool" name="config_stkNoAlphaUsrCnf" />
-
<!-- From maps library -->
<java-symbol type="array" name="maps_starting_lat_lng" />
<java-symbol type="array" name="maps_starting_zoom" />
@@ -2327,29 +2118,23 @@
<java-symbol type="drawable" name="maps_google_logo" />
<java-symbol type="drawable" name="no_tile_256" />
<java-symbol type="drawable" name="reticle" />
-
<!-- From PinyinIME(!!!) -->
<java-symbol type="string" name="inputMethod" />
-
<!-- From Chromium-WebView -->
<java-symbol type="attr" name="actionModeWebSearchDrawable" />
<java-symbol type="string" name="websearch" />
<java-symbol type="drawable" name="ic_media_video_poster" />
<java-symbol type="xml" name="config_webview_packages" />
-
<!-- From SubtitleView -->
<java-symbol type="dimen" name="subtitle_corner_radius" />
<java-symbol type="dimen" name="subtitle_shadow_radius" />
<java-symbol type="dimen" name="subtitle_shadow_offset" />
<java-symbol type="dimen" name="subtitle_outline_width" />
-
<java-symbol type="attr" name="nestedScrollingEnabled" />
-
<java-symbol type="layout" name="time_picker_material" />
<java-symbol type="layout" name="time_picker_header_material" />
<java-symbol type="layout" name="year_label_text_view" />
<java-symbol type="layout" name="date_picker_material" />
-
<java-symbol type="id" name="time_header" />
<java-symbol type="id" name="hours" />
<java-symbol type="id" name="minutes" />
@@ -2362,7 +2147,6 @@
<java-symbol type="id" name="date_picker_header_year" />
<java-symbol type="id" name="date_picker_header_date" />
<java-symbol type="id" name="animator" />
-
<java-symbol type="string" name="done_label" />
<java-symbol type="string" name="hour_picker_description" />
<java-symbol type="string" name="minute_picker_description" />
@@ -2404,10 +2188,8 @@
<java-symbol type="array" name="config_system_condition_providers" />
<java-symbol type="string" name="muted_by" />
<java-symbol type="string" name="zen_mode_alarm" />
-
<java-symbol type="string" name="select_day" />
<java-symbol type="string" name="select_year" />
-
<java-symbol type="string" name="date_picker_month_typeface" />
<java-symbol type="string" name="date_picker_day_of_week_typeface" />
<java-symbol type="string" name="date_picker_day_typeface" />
@@ -2420,16 +2202,12 @@
<java-symbol type="dimen" name="date_picker_day_selector_radius" />
<java-symbol type="id" name="date_picker_day_picker" />
<java-symbol type="id" name="date_picker_year_picker" />
-
<java-symbol type="dimen" name="datepicker_view_animator_height" />
<java-symbol type="dimen" name="datepicker_year_label_height" />
-
<java-symbol type="array" name="config_clockTickVibePattern" />
<java-symbol type="array" name="config_calendarDateVibePattern" />
-
<!-- From KeyguardServiceDelegate -->
<java-symbol type="string" name="config_keyguardComponent" />
-
<!-- Biometric messages -->
<java-symbol type="string" name="biometric_dialog_default_title" />
<java-symbol type="string" name="biometric_error_hw_unavailable" />
@@ -2437,7 +2215,6 @@
<java-symbol type="string" name="biometric_not_recognized" />
<java-symbol type="string" name="biometric_error_canceled" />
<java-symbol type="string" name="biometric_error_device_not_secured" />
-
<!-- Fingerprint messages -->
<java-symbol type="string" name="fingerprint_error_unable_to_process" />
<java-symbol type="string" name="fingerprint_error_hw_not_available" />
@@ -2459,11 +2236,9 @@
<java-symbol type="string" name="fingerprint_error_no_fingerprints" />
<java-symbol type="string" name="fingerprint_error_hw_not_present" />
<java-symbol type="string" name="fingerprint_error_security_update_required" />
-
<!-- Fingerprint config -->
<java-symbol type="integer" name="config_fingerprintMaxTemplatesPerUser"/>
<java-symbol type="bool" name="config_fingerprintSupportsGestures"/>
-
<!-- Face authentication messages -->
<java-symbol type="string" name="face_recalibrate_notification_name" />
<java-symbol type="string" name="face_recalibrate_notification_title" />
@@ -2504,9 +2279,7 @@
<java-symbol type="string" name="face_authenticated_no_confirmation_required" />
<java-symbol type="string" name="face_authenticated_confirmation_required" />
<java-symbol type="string" name="face_error_security_update_required" />
-
<java-symbol type="array" name="config_biometric_sensors" />
-
<java-symbol type="array" name="config_face_acquire_enroll_ignorelist" />
<java-symbol type="array" name="config_face_acquire_vendor_enroll_ignorelist" />
<java-symbol type="array" name="config_face_acquire_keyguard_ignorelist" />
@@ -2514,10 +2287,8 @@
<java-symbol type="array" name="config_face_acquire_biometricprompt_ignorelist" />
<java-symbol type="array" name="config_face_acquire_vendor_biometricprompt_ignorelist" />
<java-symbol type="bool" name="config_faceAuthDismissesKeyguard" />
-
<!-- Face config -->
<java-symbol type="integer" name="config_faceMaxTemplatesPerUser" />
-
<!-- From various Material changes -->
<java-symbol type="attr" name="titleTextAppearance" />
<java-symbol type="attr" name="subtitleTextAppearance" />
@@ -2537,17 +2308,11 @@
<java-symbol type="style" name="Theme.DeviceDefault.System" />
<java-symbol type="attr" name="preferenceActivityStyle" />
<java-symbol type="attr" name="preferenceFragmentStyle" />
- <java-symbol type="bool" name="skipHoldBeforeMerge" />
<java-symbol type="bool" name="imsServiceAllowTurnOff" />
- <java-symbol type="bool" name="config_device_volte_available" />
<java-symbol type="bool" name="config_carrier_volte_available" />
<java-symbol type="bool" name="config_carrier_volte_tty_supported" />
- <java-symbol type="bool" name="config_device_vt_available" />
- <java-symbol type="bool" name="config_device_respects_hold_carrier_config" />
<java-symbol type="bool" name="config_carrier_vt_available" />
- <java-symbol type="bool" name="config_device_wfc_ims_available" />
<java-symbol type="bool" name="config_carrier_wfc_ims_available" />
- <java-symbol type="bool" name="config_use_voip_mode_for_ims" />
<java-symbol type="attr" name="touchscreenBlocksFocus" />
<java-symbol type="layout" name="resolver_list_with_default" />
<java-symbol type="string" name="activity_resolver_set_always" />
@@ -2590,7 +2355,6 @@
<java-symbol type="dimen" name="text_handle_min_size" />
<java-symbol type="id" name="transitionTransform" />
<java-symbol type="id" name="parentMatrix" />
- <java-symbol type="bool" name="config_auto_attach_data_on_creation" />
<java-symbol type="attr" name="closeItemLayout" />
<java-symbol type="layout" name="resolver_different_item_header" />
<java-symbol type="integer" name="config_cdma_3waycall_flash_delay"/>
@@ -2600,7 +2364,6 @@
<java-symbol type="array" name="dial_string_replace" />
<java-symbol type="bool" name="config_restart_radio_on_pdp_fail_regular_deactivation" />
<java-symbol type="array" name="networks_not_clear_data" />
- <java-symbol type="bool" name="config_switch_phone_on_voice_reg_state_change" />
<java-symbol type="string" name="whichHomeApplicationNamed" />
<java-symbol type="string" name="whichHomeApplicationLabel" />
<java-symbol type="bool" name="config_sms_force_7bit_encoding" />
@@ -2608,46 +2371,28 @@
<java-symbol type="bool" name="config_defaultWindowFeatureContextMenu" />
<java-symbol type="bool" name="config_overrideRemoteViewsActivityTransition" />
<java-symbol type="attr" name="colorProgressBackgroundNormal" />
-
<java-symbol type="layout" name="simple_account_item" />
- <java-symbol type="string" name="prohibit_manual_network_selection_in_gobal_mode" />
<java-symbol type="id" name="profile_button" />
-
- <java-symbol type="array" name="config_vvmSmsFilterRegexes" />
-
<!-- Cascading submenus -->
<java-symbol type="dimen" name="cascading_menus_min_smallest_width" />
-
<java-symbol type="string" name="android_system_label" />
<java-symbol type="string" name="system_error_wipe_data" />
<java-symbol type="string" name="system_error_manufacturer" />
<java-symbol type="dimen" name="fast_scroller_minimum_touch_target" />
- <java-symbol type="array" name="config_cdma_international_roaming_indicators" />
<java-symbol type="string" name="kg_text_message_separator" />
-
- <java-symbol type="bool" name="config_use_sim_language_file" />
- <java-symbol type="bool" name="config_LTE_eri_for_network_name" />
<java-symbol type="bool" name="config_defaultInTouchMode" />
-
<java-symbol type="string" name="usb_midi_peripheral_name" />
<java-symbol type="string" name="usb_midi_peripheral_manufacturer_name" />
<java-symbol type="string" name="usb_midi_peripheral_product_name" />
-
<java-symbol type="id" name="spacer" />
-
<java-symbol type="xml" name="bookmarks" />
-
<java-symbol type="integer" name="config_defaultNightMode" />
-
<java-symbol type="integer" name="config_jobSchedulerInactivityIdleThreshold" />
<java-symbol type="integer" name="config_jobSchedulerIdleWindowSlop" />
-
<java-symbol type="style" name="Animation.ImmersiveModeConfirmation" />
-
<java-symbol type="integer" name="config_screen_magnification_multi_tap_adjustment" />
<java-symbol type="dimen" name="config_screen_magnification_scaling_threshold" />
<java-symbol type="dimen" name="timepicker_selector_stroke"/>
-
<java-symbol type="style" name="TextAppearance.Material.Widget.Calendar.Month" />
<java-symbol type="style" name="TextAppearance.Material.Widget.Calendar.DayOfWeek" />
<java-symbol type="style" name="TextAppearance.Material.Widget.Calendar.Day" />
@@ -2655,14 +2400,12 @@
<java-symbol type="style" name="TextAppearance.Material.DatePicker.List.YearLabel.Activated" />
<java-symbol type="dimen" name="day_picker_padding_top"/>
<java-symbol type="dimen" name="date_picker_day_of_week_height"/>
-
<java-symbol type="string" name="storage_internal" />
<java-symbol type="string" name="storage_sd_card" />
<java-symbol type="string" name="storage_sd_card_label" />
<java-symbol type="string" name="storage_usb_drive" />
<java-symbol type="string" name="storage_usb_drive_label" />
<java-symbol type="string" name="storage_usb" />
-
<java-symbol type="drawable" name="ic_eject_24dp" />
<java-symbol type="drawable" name="ic_folder_24dp" />
<java-symbol type="drawable" name="ic_sd_card_48dp" />
@@ -2671,7 +2414,6 @@
<java-symbol type="drawable" name="ic_usb_48dp" />
<java-symbol type="drawable" name="ic_zen_24dp" />
<java-symbol type="drawable" name="ic_dnd_block_notifications" />
-
<!-- Floating toolbar -->
<java-symbol type="id" name="floating_toolbar_menu_item_image" />
<java-symbol type="id" name="floating_toolbar_menu_item_text" />
@@ -2700,7 +2442,6 @@
<java-symbol type="drawable" name="ft_avd_toarrow_animation" />
<java-symbol type="drawable" name="ft_avd_tooverflow_animation" />
<java-symbol type="attr" name="floatingToolbarDividerColor" />
-
<!-- Magnifier -->
<java-symbol type="dimen" name="default_magnifier_width" />
<java-symbol type="dimen" name="default_magnifier_height" />
@@ -2718,7 +2459,6 @@
<java-symbol type="attr" name="magnifierHorizontalOffset" />
<java-symbol type="attr" name="magnifierColorOverlay" />
<java-symbol type="attr" name="magnifierStyle" />
-
<java-symbol type="string" name="date_picker_prev_month_button" />
<java-symbol type="string" name="date_picker_next_month_button" />
<java-symbol type="layout" name="date_picker_month_item_material" />
@@ -2749,23 +2489,19 @@
<java-symbol type="id" name="day_picker_view_pager" />
<java-symbol type="layout" name="day_picker_content_material" />
<java-symbol type="drawable" name="scroll_indicator_material" />
-
<java-symbol type="layout" name="chooser_row" />
<java-symbol type="layout" name="chooser_profile_row" />
<java-symbol type="color" name="chooser_row_divider" />
<java-symbol type="layout" name="chooser_row_direct_share" />
<java-symbol type="bool" name="config_supportDoubleTapWake" />
<java-symbol type="drawable" name="ic_perm_device_info" />
- <java-symbol type="string" name="config_radio_access_family" />
<java-symbol type="string" name="notification_inbox_ellipsis" />
<java-symbol type="bool" name="config_mainBuiltInDisplayIsRound" />
-
<java-symbol type="id" name="actions_container" />
<java-symbol type="id" name="smart_reply_container" />
<java-symbol type="id" name="remote_input_tag" />
<java-symbol type="id" name="pending_intent_tag" />
<java-symbol type="id" name="notification_action_index_tag" />
-
<java-symbol type="attr" name="seekBarDialogPreferenceStyle" />
<java-symbol type="string" name="ext_media_status_removed" />
<java-symbol type="string" name="ext_media_status_unmounted" />
@@ -2782,15 +2518,9 @@
<java-symbol type="string" name="ext_media_unsupported_notification_title" />
<java-symbol type="plurals" name="selected_count" />
<java-symbol type="drawable" name="ic_dialog_alert_material" />
-
-
<java-symbol type="string" name="lockscreen_access_pattern_area" />
-
<java-symbol type="bool" name="config_eap_sim_based_auth_supported" />
-
- <java-symbol type="array" name="config_cell_retries_per_error_code" />
<java-symbol type="drawable" name="ic_more_items" />
-
<!-- Gesture -->
<java-symbol type="integer" name="config_cameraLaunchGestureSensorType" />
<java-symbol type="string" name="config_cameraLaunchGestureSensorStringType" />
@@ -2798,11 +2528,7 @@
<java-symbol type="integer" name="config_cameraLiftTriggerSensorType" />
<java-symbol type="string" name="config_cameraLiftTriggerSensorStringType" />
<java-symbol type="bool" name="config_volumeHushGestureEnabled" />
-
<java-symbol type="drawable" name="platlogo_m" />
-
- <java-symbol type="string" name="config_iccHotswapPromptForRestartDialogComponent" />
-
<java-symbol type="string" name="config_packagedKeyboardName" />
<java-symbol type="bool" name="config_forceWindowDrawsStatusBarBackground" />
<java-symbol type="integer" name="config_navBarOpacityMode" />
@@ -2815,7 +2541,6 @@
<java-symbol type="dimen" name="config_backGestureInset" />
<java-symbol type="color" name="system_bar_background_semi_transparent" />
<java-symbol type="bool" name="config_showGesturalNavigationHints" />
-
<!-- EditText suggestion popup. -->
<java-symbol type="id" name="suggestionWindowContainer" />
<java-symbol type="id" name="suggestionContainer" />
@@ -2823,14 +2548,12 @@
<java-symbol type="id" name="deleteButton" />
<!-- TextView -->
<java-symbol type="string" name="failed_to_copy_to_clipboard" />
-
<java-symbol type="id" name="notification_material_reply_container" />
<java-symbol type="id" name="notification_material_reply_text_1" />
<java-symbol type="id" name="notification_material_reply_text_1_container" />
<java-symbol type="id" name="notification_material_reply_text_2" />
<java-symbol type="id" name="notification_material_reply_text_3" />
<java-symbol type="id" name="notification_material_reply_progress" />
-
<java-symbol type="string" name="notification_hidden_text" />
<java-symbol type="id" name="app_name_text" />
<java-symbol type="id" name="header_text" />
@@ -2863,18 +2586,15 @@
<java-symbol type="string" name="default_notification_channel_label" />
<java-symbol type="string" name="importance_from_user" />
<java-symbol type="string" name="importance_from_person" />
-
<java-symbol type="layout" name="work_widget_mask_view" />
<java-symbol type="id" name="work_widget_mask_frame" />
<java-symbol type="id" name="work_widget_app_icon" />
<java-symbol type="id" name="work_widget_badge_icon" />
-
<java-symbol type="id" name="aerr_report" />
<java-symbol type="id" name="aerr_restart" />
<java-symbol type="id" name="aerr_close" />
<java-symbol type="id" name="aerr_app_info" />
<java-symbol type="id" name="aerr_mute" />
-
<java-symbol type="string" name="status_bar_rotate" />
<java-symbol type="string" name="status_bar_headset" />
<java-symbol type="string" name="status_bar_data_saver" />
@@ -2909,7 +2629,6 @@
<java-symbol type="string" name="status_bar_camera" />
<java-symbol type="string" name="status_bar_sensors_off" />
<java-symbol type="string" name="status_bar_screen_record" />
-
<!-- Locale picker -->
<java-symbol type="id" name="locale_search_menu" />
<java-symbol type="layout" name="language_picker_item" />
@@ -2921,30 +2640,19 @@
<java-symbol type="string" name="language_picker_section_suggested" />
<java-symbol type="string" name="language_selection_title" />
<java-symbol type="string" name="search_language_hint" />
-
<java-symbol type="string" name="work_mode_off_title" />
<java-symbol type="string" name="work_mode_off_message" />
<java-symbol type="string" name="work_mode_turn_on" />
-
<java-symbol type="string" name="deprecated_target_sdk_message" />
<java-symbol type="string" name="deprecated_target_sdk_app_store" />
-
<!-- New SMS notification while phone is locked. -->
- <java-symbol type="string" name="new_sms_notification_title" />
- <java-symbol type="string" name="new_sms_notification_content" />
-
<java-symbol type="dimen" name="media_notification_expanded_image_margin_bottom" />
<java-symbol type="dimen" name="notification_content_image_margin_end" />
-
<java-symbol type="bool" name="config_strongAuthRequiredOnBoot" />
-
<java-symbol type="layout" name="app_anr_dialog" />
<java-symbol type="layout" name="notification_template_material_messaging" />
-
<java-symbol type="id" name="aerr_wait" />
-
<java-symbol type="id" name="notification_content_container" />
-
<java-symbol type="plurals" name="duration_minutes_shortest" />
<java-symbol type="plurals" name="duration_hours_shortest" />
<java-symbol type="plurals" name="duration_days_shortest" />
@@ -2953,7 +2661,6 @@
<java-symbol type="plurals" name="duration_hours_shortest_future" />
<java-symbol type="plurals" name="duration_days_shortest_future" />
<java-symbol type="plurals" name="duration_years_shortest_future" />
-
<java-symbol type="plurals" name="duration_minutes_relative" />
<java-symbol type="plurals" name="duration_hours_relative" />
<java-symbol type="plurals" name="duration_days_relative" />
@@ -2962,55 +2669,33 @@
<java-symbol type="plurals" name="duration_hours_relative_future" />
<java-symbol type="plurals" name="duration_days_relative_future" />
<java-symbol type="plurals" name="duration_years_relative_future" />
-
<java-symbol type="string" name="now_string_shortest" />
-
<!-- Encryption notification while accounts are locked by credential encryption -->
<java-symbol type="string" name="profile_encrypted_title" />
<java-symbol type="string" name="profile_encrypted_detail" />
<java-symbol type="string" name="profile_encrypted_message" />
<java-symbol type="drawable" name="ic_user_secure" />
-
<java-symbol type="string" name="android_upgrading_notification_title" />
-
<java-symbol type="string" name="usb_mtp_launch_notification_title" />
<java-symbol type="string" name="usb_mtp_launch_notification_description" />
-
<java-symbol type="color" name="notification_action_list" />
<java-symbol type="color" name="notification_material_background_color" />
-
<!-- Resolver target actions -->
<java-symbol type="array" name="resolver_target_actions_pin" />
<java-symbol type="array" name="resolver_target_actions_unpin" />
<java-symbol type="string" name="pin_specific_target" />
<java-symbol type="string" name="unpin_specific_target" />
-
- <java-symbol type="array" name="non_removable_euicc_slots" />
-
- <java-symbol type="string" name="install_carrier_app_notification_title" />
- <java-symbol type="string" name="install_carrier_app_notification_text" />
- <java-symbol type="string" name="install_carrier_app_notification_text_app_name" />
- <java-symbol type="string" name="install_carrier_app_notification_button" />
- <java-symbol type="string" name="carrier_app_notification_title" />
- <java-symbol type="string" name="carrier_app_notification_text" />
<java-symbol type="string" name="negative_duration" />
-
<java-symbol type="dimen" name="notification_messaging_spacing" />
-
<java-symbol type="dimen" name="notification_text_margin_top" />
<java-symbol type="dimen" name="notification_inbox_item_top_padding" />
-
<!-- WallpaperManager config -->
<java-symbol type="string" name="config_wallpaperCropperPackage" />
<java-symbol type="string" name="expand_action_accessibility" />
-
<java-symbol type="id" name="textSpacerNoTitle" />
<java-symbol type="id" name="titleDividerNoCustom" />
-
<java-symbol type="id" name="notification_messaging" />
-
<java-symbol type="bool" name="config_sustainedPerformanceModeSupported" />
-
<!-- Wearable input extract edit view -->
<java-symbol type="drawable" name="ic_input_extract_action_go" />
<java-symbol type="drawable" name="ic_input_extract_action_search" />
@@ -3019,87 +2704,63 @@
<java-symbol type="drawable" name="ic_input_extract_action_done" />
<java-symbol type="drawable" name="ic_input_extract_action_previous" />
<java-symbol type="drawable" name="ic_input_extract_action_return" />
-
<java-symbol type="fraction" name="input_extract_layout_height" />
<java-symbol type="fraction" name="input_extract_layout_padding_left" />
<java-symbol type="fraction" name="input_extract_layout_padding_left_no_action" />
<java-symbol type="fraction" name="input_extract_layout_padding_right" />
<java-symbol type="fraction" name="input_extract_text_margin_bottom" />
<java-symbol type="fraction" name="input_extract_action_margin_bottom" />
-
<java-symbol type="dimen" name="input_extract_action_button_width" />
<java-symbol type="dimen" name="input_extract_action_button_height" />
-
<java-symbol type="dimen" name="notification_action_list_height" />
<java-symbol type="dimen" name="notification_action_emphasized_height" />
-
<!-- TV Remote Service package -->
<java-symbol type="string" name="config_tvRemoteServicePackage" />
<java-symbol type="string" name="notification_messaging_title_template" />
-
<java-symbol type="bool" name="config_supportPreRebootSecurityLogs" />
-
<java-symbol type="dimen" name="notification_media_image_margin_end" />
<java-symbol type="id" name="notification_action_list_margin_target" />
<java-symbol type="dimen" name="notification_action_disabled_alpha" />
-
<!-- Override Wake Key Behavior When Screen is Off -->
<java-symbol type="bool" name="config_wakeOnDpadKeyPress" />
<java-symbol type="bool" name="config_wakeOnAssistKeyPress" />
-
<!-- Pinner Service -->
<java-symbol type="array" name="config_defaultPinnerServiceFiles" />
<java-symbol type="bool" name="config_pinnerCameraApp" />
<java-symbol type="bool" name="config_pinnerHomeApp" />
<java-symbol type="bool" name="config_pinnerAssistantApp" />
<java-symbol type="array" name="config_jitzygoteBootImagePinnerServiceFiles" />
-
<java-symbol type="string" name="config_doubleTouchGestureEnableFile" />
-
<java-symbol type="string" name="suspended_widget_accessibility" />
-
<java-symbol type="string" name="app_suspended_title" />
<java-symbol type="string" name="app_suspended_more_details" />
<java-symbol type="string" name="app_suspended_unsuspend_message" />
<java-symbol type="string" name="app_suspended_default_message" />
-
<java-symbol type="string" name="app_blocked_title" />
<java-symbol type="string" name="app_blocked_message" />
-
<!-- Used internally for assistant to launch activity transitions -->
<java-symbol type="id" name="cross_task_transition" />
-
<java-symbol type="bool" name="config_useRoundIcon" />
-
<!-- For System navigation keys -->
<java-symbol type="bool" name="config_supportSystemNavigationKeys" />
-
<java-symbol type="layout" name="unsupported_display_size_dialog_content" />
<java-symbol type="string" name="unsupported_display_size_message" />
-
<java-symbol type="layout" name="notification_material_action_emphasized" />
-
<!-- Package name for the device provisioning package -->
<java-symbol type="string" name="config_deviceProvisioningPackage" />
-
<!-- Colon separated list of package names that should be granted DND access -->
<java-symbol type="string" name="config_defaultDndAccessPackages" />
-
<!-- For NetworkPolicyManagerService -->
<java-symbol type="string" name="config_networkOverLimitComponent" />
<java-symbol type="string" name="config_dataUsageSummaryComponent" />
-
<java-symbol type="string" name="lockscreen_storage_locked" />
-
<java-symbol type="string" name="global_action_emergency" />
<java-symbol type="string" name="config_emergency_call_number" />
<java-symbol type="string" name="config_emergency_dialer_package" />
<java-symbol type="array" name="config_emergency_mcc_codes" />
-
<java-symbol type="string" name="config_dozeDoubleTapSensorType" />
<java-symbol type="string" name="config_dozeTapSensorType" />
<java-symbol type="bool" name="config_dozePulsePickup" />
-
<!-- Used for MimeIconUtils. -->
<java-symbol type="drawable" name="ic_doc_apk" />
<java-symbol type="drawable" name="ic_doc_audio" />
@@ -3124,7 +2785,6 @@
<java-symbol type="drawable" name="ic_doc_text" />
<java-symbol type="drawable" name="ic_doc_video" />
<java-symbol type="drawable" name="ic_doc_generic" />
-
<java-symbol type="bool" name="config_setColorTransformAccelerated" />
<java-symbol type="bool" name="config_setColorTransformAcceleratedPerLayer" />
<java-symbol type="bool" name="config_nightDisplayAvailable" />
@@ -3148,46 +2808,33 @@
<java-symbol type="integer" name="config_displayWhiteBalanceColorTemperatureDefault" />
<java-symbol type="array" name="config_displayWhiteBalanceDisplayPrimaries" />
<java-symbol type="array" name="config_displayWhiteBalanceDisplayNominalWhite" />
-
<!-- Default first user restrictions -->
<java-symbol type="array" name="config_defaultFirstUserRestrictions" />
-
<java-symbol type="bool" name="config_permissionsIndividuallyControlled" />
<java-symbol type="bool" name="config_wirelessConsentRequired" />
-
<!-- Global actions icons -->
<java-symbol type="drawable" name="ic_restart" />
<java-symbol type="drawable" name="ic_screenshot" />
<java-symbol type="drawable" name="ic_faster_emergency" />
<java-symbol type="drawable" name="ic_media_seamless" />
<java-symbol type="drawable" name="emergency_icon" />
-
<java-symbol type="array" name="config_convert_to_emergency_number_map" />
-
<java-symbol type="array" name="config_nonBlockableNotificationPackages" />
<java-symbol type="array" name="config_priorityOnlyDndExemptPackages" />
-
<java-symbol type="array" name="config_allowedManagedServicesOnLowRamDevices" />
-
<!-- Screen-size-dependent modes for picker dialogs. -->
<java-symbol type="integer" name="time_picker_mode" />
<java-symbol type="integer" name="date_picker_mode" />
-
<java-symbol type="dimen" name="config_appTransitionAnimationDurationScaleDefault" />
-
<!-- Network Recommendation -->
<java-symbol type="string" name="config_defaultNetworkRecommendationProviderPackage" />
-
<!-- Whether allow 3rd party apps on internal storage. -->
<java-symbol type="bool" name="config_allow3rdPartyAppOnInternal" />
-
<java-symbol type="bool" name="use_lock_pattern_drawable" />
<java-symbol type="drawable" name="lockscreen_notselected" />
<java-symbol type="drawable" name="lockscreen_selected" />
-
<java-symbol type="string" name="notification_header_divider_symbol_with_spaces" />
<java-symbol type="array" name="config_defaultCellBroadcastReceiverPkgs" />
-
<java-symbol type="color" name="notification_primary_text_color_light" />
<java-symbol type="color" name="notification_primary_text_color_dark" />
<java-symbol type="color" name="notification_secondary_text_color_light" />
@@ -3195,7 +2842,6 @@
<java-symbol type="color" name="notification_default_color_light" />
<java-symbol type="color" name="notification_default_color_dark" />
<java-symbol type="dimen" name="notification_secondary_text_disabled_alpha" />
-
<java-symbol type="string" name="app_category_game" />
<java-symbol type="string" name="app_category_audio" />
<java-symbol type="string" name="app_category_video" />
@@ -3204,9 +2850,7 @@
<java-symbol type="string" name="app_category_news" />
<java-symbol type="string" name="app_category_maps" />
<java-symbol type="string" name="app_category_productivity" />
-
<java-symbol type="raw" name="fallback_categories" />
-
<java-symbol type="string" name="config_icon_mask" />
<java-symbol type="string" name="config_batterymeterPerimeterPath" />
<java-symbol type="string" name="config_batterymeterErrorPerimeterPath" />
@@ -3217,10 +2861,8 @@
<java-symbol type="string" name="config_signalXPath" />
<java-symbol type="dimen" name="config_signalCutoutWidthFraction" />
<java-symbol type="dimen" name="config_signalCutoutHeightFraction" />
-
<java-symbol type="bool" name="config_debugEnableAutomaticSystemServerHeapDumps" />
<java-symbol type="integer" name="config_debugSystemServerPssThresholdBytes" />
-
<!-- Accessibility Shortcut -->
<java-symbol type="string" name="accessibility_shortcut_warning_dialog_title" />
<java-symbol type="string" name="accessibility_shortcut_toogle_warning" />
@@ -3232,7 +2874,6 @@
<java-symbol type="string" name="color_correction_feature_name" />
<java-symbol type="string" name="config_defaultAccessibilityService" />
<java-symbol type="string" name="accessibility_shortcut_spoken_feedback" />
-
<!-- Accessibility Button -->
<java-symbol type="layout" name="accessibility_button_chooser_item" />
<java-symbol type="id" name="accessibility_button_target_icon" />
@@ -3243,19 +2884,15 @@
<java-symbol type="string" name="accessibility_magnification_chooser_text" />
<java-symbol type="string" name="edit_accessibility_shortcut_menu_button" />
<java-symbol type="string" name="cancel_accessibility_shortcut_menu_button" />
-
<java-symbol type="drawable" name="ic_accessibility_color_inversion" />
<java-symbol type="drawable" name="ic_accessibility_color_correction" />
<java-symbol type="drawable" name="ic_accessibility_magnification" />
-
<java-symbol type="drawable" name="ic_delete_item" />
-
<!-- com.android.internal.widget.RecyclerView -->
<java-symbol type="id" name="item_touch_helper_previous_elevation"/>
<java-symbol type="dimen" name="item_touch_helper_max_drag_scroll_per_frame"/>
<java-symbol type="dimen" name="item_touch_helper_swipe_escape_velocity"/>
<java-symbol type="dimen" name="item_touch_helper_swipe_escape_max_velocity"/>
-
<!-- com.android.server.autofill -->
<java-symbol type="layout" name="autofill_save"/>
<java-symbol type="layout" name="autofill_dataset_picker"/>
@@ -3315,12 +2952,10 @@
<java-symbol type="dimen" name="autofill_save_custom_subtitle_max_height"/>
<java-symbol type="dimen" name="autofill_save_icon_max_size"/>
<java-symbol type="integer" name="autofill_max_visible_datasets" />
-
<java-symbol type="style" name="Theme.DeviceDefault.Autofill" />
<java-symbol type="style" name="Theme.DeviceDefault.Light.Autofill" />
<java-symbol type="style" name="Theme.DeviceDefault.Autofill.Save" />
<java-symbol type="style" name="Theme.DeviceDefault.Light.Autofill.Save" />
-
<java-symbol type="dimen" name="notification_big_picture_max_height"/>
<java-symbol type="dimen" name="notification_big_picture_max_width"/>
<java-symbol type="dimen" name="notification_media_image_max_width"/>
@@ -3328,7 +2963,6 @@
<java-symbol type="dimen" name="notification_right_icon_size"/>
<java-symbol type="dimen" name="notification_custom_view_max_image_height"/>
<java-symbol type="dimen" name="notification_custom_view_max_image_width"/>
-
<java-symbol type="dimen" name="notification_big_picture_max_height_low_ram"/>
<java-symbol type="dimen" name="notification_big_picture_max_width_low_ram"/>
<java-symbol type="dimen" name="notification_media_image_max_width_low_ram"/>
@@ -3336,15 +2970,12 @@
<java-symbol type="dimen" name="notification_right_icon_size_low_ram"/>
<java-symbol type="dimen" name="notification_custom_view_max_image_height_low_ram"/>
<java-symbol type="dimen" name="notification_custom_view_max_image_width_low_ram"/>
-
<!-- Accessibility fingerprint gestures -->
<java-symbol type="string" name="capability_title_canCaptureFingerprintGestures" />
<java-symbol type="string" name="capability_desc_canCaptureFingerprintGestures" />
-
<!-- android.service.trust -->
<java-symbol type="bool" name="config_allowEscrowTokenForTrustAgent"/>
<java-symbol type="string" name="config_defaultTrustAgent" />
-
<!-- Time picker -->
<java-symbol type="id" name="right_icon_container"/>
<java-symbol type="id" name="reply_icon_action"/>
@@ -3363,10 +2994,8 @@
<java-symbol type="drawable" name="btn_clock_material"/>
<java-symbol type="string" name="time_picker_text_input_mode_description"/>
<java-symbol type="string" name="time_picker_radial_mode_description"/>
-
<!-- resolver activity -->
<java-symbol type="drawable" name="resolver_icon_placeholder" />
-
<!-- Alert windows notification -->
<java-symbol type="string" name="alert_windows_notification_channel_group_name" />
<java-symbol type="string" name="alert_windows_notification_channel_name" />
@@ -3376,16 +3005,12 @@
<java-symbol type="drawable" name="alert_window_layer" />
<java-symbol type="style" name="Widget.LockPatternView" />
<java-symbol type="attr" name="lockPatternStyle" />
-
<java-symbol type="string" name="expand_button_content_description_collapsed" />
<java-symbol type="string" name="expand_button_content_description_expanded" />
-
<!-- Colon separated list of package names that should be granted Notification Listener access -->
<java-symbol type="string" name="config_defaultListenerAccessPackages" />
-
<!-- maximum width of the display -->
<java-symbol type="integer" name="config_maxUiWidth" />
-
<!-- system notification channels -->
<java-symbol type="string" name="notification_channel_virtual_keyboard" />
<java-symbol type="string" name="notification_channel_physical_keyboard" />
@@ -3419,29 +3044,22 @@
<java-symbol type="string" name="config_defaultSystemCaptionsManagerService" />
<java-symbol type="string" name="config_retailDemoPackage" />
<java-symbol type="string" name="config_retailDemoPackageSignature" />
-
<java-symbol type="string" name="notification_channel_foreground_service" />
<java-symbol type="string" name="foreground_service_app_in_background" />
<java-symbol type="string" name="foreground_service_apps_in_background" />
<java-symbol type="string" name="foreground_service_tap_for_details" />
<java-symbol type="string" name="foreground_service_multiple_separator" />
-
<java-symbol type="bool" name="config_enableCredentialFactoryResetProtection" />
-
<!-- ETWS primary messages -->
<java-symbol type="string" name="etws_primary_default_message_earthquake" />
<java-symbol type="string" name="etws_primary_default_message_tsunami" />
<java-symbol type="string" name="etws_primary_default_message_earthquake_and_tsunami" />
<java-symbol type="string" name="etws_primary_default_message_test" />
<java-symbol type="string" name="etws_primary_default_message_others" />
-
<java-symbol type="bool" name="config_quickSettingsSupported" />
<java-symbol type="string" name="config_defaultExtraQuickSettingsTiles" />
-
<java-symbol type="style" name="Theme.DeviceDefault.QuickSettings" />
-
<java-symbol type="integer" name="default_data_warning_level_mb" />
- <java-symbol type="bool" name="config_useVideoPauseWorkaround" />
<java-symbol type="bool" name="config_sendPackageName" />
<java-symbol type="string" name="config_helpPackageNameKey" />
<java-symbol type="string" name="config_helpPackageNameValue" />
@@ -3449,17 +3067,13 @@
<java-symbol type="string" name="config_helpIntentNameKey" />
<java-symbol type="string" name="config_feedbackIntentExtraKey" />
<java-symbol type="string" name="config_feedbackIntentNameKey" />
-
<java-symbol type="array" name="config_hideWhenDisabled_packageNames" />
-
<java-symbol type="string" name="config_dozeLongPressSensorType" />
<java-symbol type="bool" name="config_dozeWakeLockScreenSensorAvailable" />
<java-symbol type="integer" name="config_dozeWakeLockScreenDebounce" />
-
<java-symbol type="array" name="config_allowedGlobalInstantAppSettings" />
<java-symbol type="array" name="config_allowedSystemInstantAppSettings" />
<java-symbol type="array" name="config_allowedSecureInstantAppSettings" />
-
<java-symbol type="bool" name="config_handleVolumeKeysInWindowManager" />
<java-symbol type="dimen" name="config_inCallNotificationVolume" />
<java-symbol type="string" name="config_inCallNotificationSound" />
@@ -3472,24 +3086,19 @@
<java-symbol type="integer" name="config_storageManagerDaystoRetainDefault" />
<java-symbol type="string" name="config_headlineFontFamily" />
<java-symbol type="string" name="config_headlineFontFamilyMedium" />
-
<java-symbol type="drawable" name="stat_sys_vitals" />
-
<java-symbol type="color" name="text_color_primary" />
<java-symbol type="color" name="material_grey_300" />
<java-symbol type="dimen" name="emphasized_button_stroke_width" />
<java-symbol type="dimen" name="button_inset_vertical_material" />
-
<java-symbol type="array" name="config_batteryPackageTypeSystem" />
<java-symbol type="array" name="config_batteryPackageTypeService" />
-
<java-symbol type="string" name="popup_window_default_title" />
<java-symbol type="bool" name="config_showAreaUpdateInfoSettings" />
<java-symbol type="layout" name="shutdown_dialog" />
<java-symbol type="dimen" name="chooser_service_spacing" />
<java-symbol type="bool" name="config_showSysuiShutdown" />
<java-symbol type="drawable" name="chooser_file_generic" />
-
<java-symbol type="layout" name="notification_template_messaging_text_message" />
<java-symbol type="layout" name="notification_template_messaging_image_message" />
<java-symbol type="layout" name="notification_template_messaging_group" />
@@ -3514,11 +3123,8 @@
<java-symbol type="id" name="messaging_group_icon_container" />
<java-symbol type="id" name="messaging_group_sending_progress" />
<java-symbol type="id" name="messaging_group_sending_progress_container" />
-
<java-symbol type="integer" name="config_stableDeviceDisplayWidth" />
<java-symbol type="integer" name="config_stableDeviceDisplayHeight" />
- <java-symbol type="array" name="config_display_no_service_when_sim_unready" />
-
<java-symbol type="layout" name="slice_grid" />
<java-symbol type="layout" name="slice_message_local" />
<java-symbol type="layout" name="slice_message" />
@@ -3533,80 +3139,58 @@
<java-symbol type="dimen" name="slice_icon_size" />
<java-symbol type="dimen" name="slice_padding" />
<java-symbol type="string" name="slice_more_content" />
-
<java-symbol type="string" name="shortcut_restored_on_lower_version" />
<java-symbol type="string" name="shortcut_restore_not_supported" />
<java-symbol type="string" name="shortcut_restore_signature_mismatch" />
<java-symbol type="string" name="shortcut_restore_unknown_issue" />
-
<java-symbol type="bool" name="config_swipe_up_gesture_setting_available" />
-
<!-- From media projection -->
<java-symbol type="string" name="config_mediaProjectionPermissionDialogComponent" />
<java-symbol type="string" name="config_batterySaverDeviceSpecificConfig" />
-
<!-- Compile SDK check -->
<java-symbol type="layout" name="unsupported_compile_sdk_dialog_content" />
<java-symbol type="string" name="unsupported_compile_sdk_message" />
<java-symbol type="string" name="unsupported_compile_sdk_check_update" />
-
<java-symbol type="string" name="keyguard_accessibility_pattern_unlock" />
<java-symbol type="string" name="keyguard_accessibility_pin_unlock" />
<java-symbol type="string" name="keyguard_accessibility_sim_pin_unlock" />
<java-symbol type="string" name="keyguard_accessibility_sim_puk_unlock" />
<java-symbol type="string" name="keyguard_accessibility_password_unlock" />
-
<java-symbol type="dimen" name="status_bar_height_portrait" />
<java-symbol type="dimen" name="status_bar_height_landscape" />
-
<java-symbol type="string" name="global_action_logout" />
<java-symbol type="string" name="config_mainBuiltInDisplayCutout" />
<java-symbol type="string" name="config_mainBuiltInDisplayCutoutRectApproximation" />
<java-symbol type="drawable" name="messaging_user" />
<java-symbol type="bool" name="config_fillMainBuiltInDisplayCutout" />
<java-symbol type="drawable" name="ic_logout" />
-
<java-symbol type="array" name="config_autoBrightnessDisplayValuesNits" />
<java-symbol type="array" name="config_screenBrightnessBacklight" />
<java-symbol type="array" name="config_screenBrightnessNits" />
-
<java-symbol type="string" name="shortcut_disabled_reason_unknown" />
-
<java-symbol type="string" name="harmful_app_warning_uninstall" />
<java-symbol type="string" name="harmful_app_warning_open_anyway" />
<java-symbol type="string" name="harmful_app_warning_title" />
<java-symbol type="layout" name="harmful_app_warning_dialog" />
-
<java-symbol type="string" name="config_defaultAssistantAccessComponent" />
-
<java-symbol type="bool" name="config_supportBluetoothPersistedState" />
-
<java-symbol type="string" name="slices_permission_request" />
-
<java-symbol type="string" name="screenshot_edit" />
-
<java-symbol type="bool" name="config_keepRestrictedProfilesInBackground" />
-
<java-symbol type="array" name="config_ringtoneEffectUris" />
-
<!-- For Wear devices -->
<java-symbol type="array" name="config_wearActivityModeRadios" />
-
<java-symbol type="string" name="zen_upgrade_notification_title" />
<java-symbol type="string" name="zen_upgrade_notification_content" />
<java-symbol type="string" name="zen_upgrade_notification_visd_title" />
<java-symbol type="string" name="zen_upgrade_notification_visd_content" />
-
<java-symbol type="string" name="config_managed_provisioning_package" />
-
<java-symbol type="string" name="notification_app_name_system" />
<java-symbol type="string" name="notification_app_name_settings" />
-
<java-symbol type="integer" name="config_lowBatteryAutoTriggerDefaultLevel" />
<java-symbol type="bool" name="config_batterySaverStickyBehaviourDisabled" />
<java-symbol type="integer" name="config_dynamicPowerSavingsDefaultDisableThreshold" />
<java-symbol type="string" name="config_batterySaverScheduleProvider" />
-
<!-- For car devices -->
<java-symbol type="string" name="car_loading_profile" />
<java-symbol type="color" name="car_body1_light" />
@@ -3623,50 +3207,36 @@
<java-symbol type="id" name="user_loading_avatar" />
<java-symbol type="id" name="user_loading" />
<java-symbol type="style" name="Theme.DeviceDefault.Light.Dialog.Alert.UserSwitchingDialog" />
-
<java-symbol type="string" name="battery_saver_description_with_learn_more" />
<java-symbol type="string" name="confirm_battery_saver" />
-
<java-symbol type="attr" name="opticalInsetLeft" />
<java-symbol type="attr" name="opticalInsetTop" />
<java-symbol type="attr" name="opticalInsetRight" />
<java-symbol type="attr" name="opticalInsetBottom" />
-
<java-symbol type="drawable" name="ic_lock_lockdown" />
<java-symbol type="drawable" name="ic_arrow_forward" />
<java-symbol type="drawable" name="ic_permission" />
-
<java-symbol type="integer" name="config_defaultHapticFeedbackIntensity" />
<java-symbol type="integer" name="config_defaultNotificationVibrationIntensity" />
<java-symbol type="integer" name="config_defaultRingVibrationIntensity" />
-
<java-symbol type="bool" name="config_maskMainBuiltInDisplayCutout" />
-
<java-symbol type="string" name="config_customCountryDetector" />
-
<!-- For Foldables -->
<java-symbol type="bool" name="config_lidControlsDisplayFold" />
<java-symbol type="string" name="config_foldedArea" />
-
<java-symbol type="array" name="config_disableApksUnlessMatchedSku_apk_list" />
<java-symbol type="array" name="config_disableApkUnlessMatchedSku_skus_list" />
-
<java-symbol type="string" name="config_misprovisionedDeviceModel" />
<java-symbol type="string" name="config_misprovisionedBrandValue" />
-
<java-symbol type="integer" name="db_wal_truncate_size" />
<java-symbol type="integer" name="config_wakeUpDelayDoze" />
-
<!-- For Bluetooth AbsoluteVolume -->
<java-symbol type="fraction" name="config_prescaleAbsoluteVolume_index1" />
<java-symbol type="fraction" name="config_prescaleAbsoluteVolume_index2" />
<java-symbol type="fraction" name="config_prescaleAbsoluteVolume_index3" />
-
<java-symbol type="bool" name="config_useSmsAppService" />
-
<java-symbol type="id" name="transition_overlay_view_tag" />
<java-symbol type="id" name="notification_custom_view_index_tag" />
-
<java-symbol type="dimen" name="rounded_corner_radius" />
<java-symbol type="dimen" name="rounded_corner_radius_top" />
<java-symbol type="dimen" name="rounded_corner_radius_bottom" />
@@ -3674,13 +3244,10 @@
<java-symbol type="dimen" name="rounded_corner_radius_top_adjustment" />
<java-symbol type="dimen" name="rounded_corner_radius_bottom_adjustment" />
<java-symbol type="bool" name="config_supportsRoundedCornersOnWindows" />
-
<java-symbol type="string" name="config_defaultModuleMetadataProvider" />
-
<!-- For Secondary Launcher -->
<java-symbol type="string" name="config_secondaryHomeComponent" />
<java-symbol type="bool" name="config_useSystemProvidedLauncherForSecondary" />
-
<java-symbol type="string" name="battery_saver_notification_channel_name" />
<java-symbol type="string" name="battery_saver_off_notification_title" />
<java-symbol type="string" name="battery_saver_charged_notification_summary" />
@@ -3688,23 +3255,15 @@
<java-symbol type="string" name="dynamic_mode_notification_title" />
<java-symbol type="string" name="dynamic_mode_notification_summary" />
<java-symbol type="drawable" name="ic_battery" />
-
<java-symbol type="bool" name="config_skipSensorAvailable" />
<java-symbol type="bool" name="config_silenceSensorAvailable" />
-
<java-symbol type="bool" name="config_zramWriteback" />
-
<!-- For CBRS -->
- <java-symbol type="bool" name="config_cbrs_supported" />
-
<java-symbol type="bool" name="config_awareSettingAvailable" />
-
<!-- For Attention Service -->
<java-symbol type="integer" name="config_attentionMaximumExtension" />
-
<java-symbol type="string" name="config_incidentReportApproverPackage" />
<java-symbol type="array" name="config_restrictedImagesServices" />
-
<!-- Display White-Balance -->
<java-symbol type="integer" name="config_displayWhiteBalanceBrightnessSensorRate" />
<java-symbol type="integer" name="config_displayWhiteBalanceBrightnessFilterHorizon" />
@@ -3728,7 +3287,6 @@
<java-symbol type="array" name="config_displayWhiteBalanceDisplayColorTemperatures" />
<java-symbol type="drawable" name="ic_action_open" />
<java-symbol type="drawable" name="ic_menu_copy_material" />
-
<!-- MIME types -->
<java-symbol type="string" name="mime_type_folder" />
<java-symbol type="string" name="mime_type_apk" />
@@ -3748,19 +3306,15 @@
<java-symbol type="string" name="mime_type_spreadsheet_ext" />
<java-symbol type="string" name="mime_type_presentation" />
<java-symbol type="string" name="mime_type_presentation_ext" />
-
<!-- For Bluetooth service -->
<java-symbol type="string" name="bluetooth_airplane_mode_toast" />
-
<!-- For high refresh rate displays -->
<java-symbol type="integer" name="config_defaultPeakRefreshRate" />
<java-symbol type="integer" name="config_defaultRefreshRateInZone" />
<java-symbol type="array" name="config_brightnessThresholdsOfPeakRefreshRate" />
<java-symbol type="array" name="config_ambientThresholdsOfPeakRefreshRate" />
-
<!-- For Auto-Brightness -->
<java-symbol type="string" name="config_displayLightSensorType" />
-
<java-symbol type="drawable" name="iconfactory_adaptive_icon_drawable_wrapper"/>
<java-symbol type="dimen" name="notification_min_height" />
<java-symbol type="dimen" name="resolver_icon_size"/>
@@ -3770,16 +3324,13 @@
<java-symbol type="dimen" name="resolver_small_margin"/>
<java-symbol type="dimen" name="resolver_edge_margin"/>
<java-symbol type="dimen" name="resolver_elevation"/>
-
<!-- For DropBox -->
<java-symbol type="integer" name="config_dropboxLowPriorityBroadcastRateLimitPeriod" />
<java-symbol type="array" name="config_dropboxLowPriorityTags" />
-
<!-- For Privacy Type -->
<java-symbol type="drawable" name="perm_group_camera" />
<java-symbol type="drawable" name="perm_group_location" />
<java-symbol type="drawable" name="perm_group_microphone" />
-
<java-symbol type="drawable" name="chooser_direct_share_icon_placeholder" />
<java-symbol type="color" name="chooser_gradient_background" />
<java-symbol type="color" name="chooser_gradient_highlight" />
@@ -3790,37 +3341,26 @@
<java-symbol type="string" name="chooser_all_apps_button_label" />
<java-symbol type="anim" name="resolver_launch_anim" />
<java-symbol type="style" name="Animation.DeviceDefault.Activity.Resolver" />
-
<java-symbol type="color" name="decor_view_status_guard_light" />
-
<java-symbol type="string" name="config_defaultSupervisionProfileOwnerComponent" />
<java-symbol type="bool" name="config_inflateSignalStrength" />
<java-symbol type="array" name="config_restrictedPreinstalledCarrierApps" />
-
<java-symbol type="drawable" name="android_logotype" />
<java-symbol type="layout" name="platlogo_layout" />
-
<java-symbol type="integer" name="config_notificationWarnRemoteViewSizeBytes" />
<java-symbol type="integer" name="config_notificationStripRemoteViewSizeBytes" />
-
<java-symbol type="string" name="config_factoryResetPackage" />
<java-symbol type="array" name="config_highRefreshRateBlacklist" />
-
<java-symbol type="id" name="chooser_copy_button" />
<java-symbol type="layout" name="chooser_action_button" />
<java-symbol type="dimen" name="chooser_action_button_icon_size" />
<java-symbol type="string" name="config_defaultNearbySharingComponent" />
-
<java-symbol type="bool" name="config_automotiveHideNavBarForKeyboard" />
-
<java-symbol type="bool" name="config_showBuiltinWirelessChargingAnim" />
-
<!-- For bug report handler -->
<java-symbol type="bool" name="config_bugReportHandlerEnabled" />
<java-symbol type="string" name="config_defaultBugReportHandlerApp" />
-
<java-symbol type="string" name="usb_device_resolve_prompt_warn" />
-
<!-- For Accessibility system actions -->
<java-symbol type="string" name="accessibility_system_action_back_label" />
<java-symbol type="string" name="accessibility_system_action_home_label" />
@@ -3832,43 +3372,31 @@
<java-symbol type="string" name="accessibility_system_action_screenshot_label" />
<java-symbol type="string" name="accessibility_system_action_toggle_split_screen_label" />
<java-symbol type="string" name="accessibility_system_action_accessibility_menu_label" />
-
<java-symbol type="string" name="accessibility_freeform_caption" />
-
<!-- For Wide Color Gamut -->
<java-symbol type="bool" name="config_enableWcgMode" />
-
<!-- For contacts provider. -->
<java-symbol type="string" name="config_rawContactsLocalAccountName" />
<java-symbol type="string" name="config_rawContactsLocalAccountType" />
-
<!-- For App Standby -->
<java-symbol type="string" name="as_app_forced_to_restricted_bucket" />
-
<!-- Assistant handles -->
<java-symbol type="dimen" name="assist_handle_shadow_radius" />
-
<!-- For Waterfall Display -->
<java-symbol type="dimen" name="waterfall_display_left_edge_size" />
<java-symbol type="dimen" name="waterfall_display_top_edge_size" />
<java-symbol type="dimen" name="waterfall_display_right_edge_size" />
<java-symbol type="dimen" name="waterfall_display_bottom_edge_size" />
-
<!-- For device policy -->
<java-symbol type="array" name="config_packagesExemptFromSuspension" />
-
<!-- Accessibility take screenshot -->
<java-symbol type="string" name="capability_desc_canTakeScreenshot" />
<java-symbol type="string" name="capability_title_canTakeScreenshot" />
-
<java-symbol type="string" name="config_servicesExtensionPackage" />
-
<!-- For app process exit info tracking -->
<java-symbol type="integer" name="config_app_exit_info_history_list_size" />
-
<java-symbol type="array" name="config_defaultImperceptibleKillingExemptionPkgs" />
<java-symbol type="array" name="config_defaultImperceptibleKillingExemptionProcStates" />
-
<!-- Intent resolver and share sheet -->
<java-symbol type="color" name="resolver_tabs_active_color" />
<java-symbol type="color" name="resolver_tabs_inactive_color" />
@@ -3895,12 +3423,9 @@
<java-symbol type="dimen" name="resolver_empty_state_height" />
<java-symbol type="dimen" name="resolver_empty_state_height_with_tabs" />
<java-symbol type="bool" name="sharesheet_show_content_preview" />
-
<!-- Toast message for background started foreground service while-in-use permission restriction feature -->
<java-symbol type="string" name="allow_while_in_use_permission_in_fgs" />
-
<java-symbol type="string" name="config_deviceSpecificDisplayAreaPolicyProvider" />
-
<!-- Whether to expand the lock screen user switcher by default -->
<java-symbol type="bool" name="config_expandLockScreenUserSwitcher" />
diff --git a/core/tests/coretests/src/android/app/NotificationHistoryTest.java b/core/tests/coretests/src/android/app/NotificationHistoryTest.java
index d1608d0..8d8acb7 100644
--- a/core/tests/coretests/src/android/app/NotificationHistoryTest.java
+++ b/core/tests/coretests/src/android/app/NotificationHistoryTest.java
@@ -21,6 +21,7 @@
import android.app.NotificationHistory.HistoricalNotification;
import android.graphics.drawable.Icon;
import android.os.Parcel;
+import android.util.Slog;
import androidx.test.InstrumentationRegistry;
import androidx.test.runner.AndroidJUnit4;
@@ -48,6 +49,10 @@
String expectedText = "text" + index;
Icon expectedIcon = Icon.createWithResource(InstrumentationRegistry.getContext(),
index);
+ String conversationId = null;
+ if (index % 2 == 0) {
+ conversationId = "convo" + index;
+ }
return new HistoricalNotification.Builder()
.setPackage(packageName)
@@ -59,6 +64,7 @@
.setTitle(expectedTitle)
.setText(expectedText)
.setIcon(expectedIcon)
+ .setConversationId(conversationId)
.build();
}
@@ -74,6 +80,7 @@
String expectedText = "text";
Icon expectedIcon = Icon.createWithResource(InstrumentationRegistry.getContext(),
android.R.drawable.btn_star);
+ String expectedConversationId = "convo";
HistoricalNotification n = new HistoricalNotification.Builder()
.setPackage(expectedPackage)
@@ -85,6 +92,7 @@
.setTitle(expectedTitle)
.setText(expectedText)
.setIcon(expectedIcon)
+ .setConversationId(expectedConversationId)
.build();
assertThat(n.getPackage()).isEqualTo(expectedPackage);
@@ -96,6 +104,7 @@
assertThat(n.getTitle()).isEqualTo(expectedTitle);
assertThat(n.getText()).isEqualTo(expectedText);
assertThat(expectedIcon.sameAs(n.getIcon())).isTrue();
+ assertThat(n.getConversationId()).isEqualTo(expectedConversationId);
}
@Test
@@ -153,6 +162,9 @@
expectedStrings.add(n.getPackage());
expectedStrings.add(n.getChannelName());
expectedStrings.add(n.getChannelId());
+ if (n.getConversationId() != null) {
+ expectedStrings.add(n.getConversationId());
+ }
history.addNotificationToWrite(n);
}
@@ -180,6 +192,9 @@
expectedStrings.add(n.getPackage());
expectedStrings.add(n.getChannelName());
expectedStrings.add(n.getChannelId());
+ if (n.getConversationId() != null) {
+ expectedStrings.add(n.getConversationId());
+ }
history.addNotificationToWrite(n);
}
@@ -212,6 +227,9 @@
postRemoveExpectedStrings.add(n.getPackage());
postRemoveExpectedStrings.add(n.getChannelName());
postRemoveExpectedStrings.add(n.getChannelId());
+ if (n.getConversationId() != null) {
+ postRemoveExpectedStrings.add(n.getConversationId());
+ }
postRemoveExpectedEntries.add(n);
}
@@ -221,14 +239,14 @@
history.poolStringsFromNotifications();
assertThat(history.getNotificationsToWrite().size()).isEqualTo(10);
- // 2 package names and 10 * 2 unique channel names and ids
- assertThat(history.getPooledStringsToWrite().length).isEqualTo(22);
+ // 2 package names and 10 * 2 unique channel names and ids and 5 conversation ids
+ assertThat(history.getPooledStringsToWrite().length).isEqualTo(27);
history.removeNotificationsFromWrite("pkgOdd");
- // 1 package names and 5 * 2 unique channel names and ids
- assertThat(history.getPooledStringsToWrite().length).isEqualTo(11);
+ // 1 package names and 5 * 2 unique channel names and ids and 5 conversation ids
+ assertThat(history.getPooledStringsToWrite().length).isEqualTo(16);
assertThat(history.getNotificationsToWrite())
.containsExactlyElementsIn(postRemoveExpectedEntries);
}
@@ -246,6 +264,9 @@
postRemoveExpectedStrings.add(n.getPackage());
postRemoveExpectedStrings.add(n.getChannelName());
postRemoveExpectedStrings.add(n.getChannelId());
+ if (n.getConversationId() != null) {
+ postRemoveExpectedStrings.add(n.getConversationId());
+ }
postRemoveExpectedEntries.add(n);
}
@@ -255,14 +276,14 @@
history.poolStringsFromNotifications();
assertThat(history.getNotificationsToWrite().size()).isEqualTo(10);
- // 1 package name and 10 unique channel names and ids
- assertThat(history.getPooledStringsToWrite().length).isEqualTo(21);
+ // 1 package name and 20 unique channel names and ids and 5 conversation ids
+ assertThat(history.getPooledStringsToWrite().length).isEqualTo(26);
history.removeNotificationFromWrite("pkg", 987654323);
- // 1 package names and 9 * 2 unique channel names and ids
- assertThat(history.getPooledStringsToWrite().length).isEqualTo(19);
+ // 1 package names and 9 * 2 unique channel names and ids and 4 conversation ids
+ assertThat(history.getPooledStringsToWrite().length).isEqualTo(23);
assertThat(history.getNotificationsToWrite())
.containsExactlyElementsIn(postRemoveExpectedEntries);
}
diff --git a/core/tests/coretests/src/android/os/BundleTest.java b/core/tests/coretests/src/android/os/BundleTest.java
index e4dc993..4cc70ba 100644
--- a/core/tests/coretests/src/android/os/BundleTest.java
+++ b/core/tests/coretests/src/android/os/BundleTest.java
@@ -30,12 +30,23 @@
* Unit tests for bundle that requires accessing hidden APS. Tests that can be written only with
* public APIs should go in the CTS counterpart.
*
- * Run with:
- * bit FrameworksCoreTests:android.os.BundleTest
+ * Run with: atest FrameworksCoreTests:android.os.BundleTest
*/
@SmallTest
@RunWith(AndroidJUnit4.class)
public class BundleTest {
+
+ /**
+ * Take a bundle, write it to a parcel and return the parcel.
+ */
+ private Parcel getParcelledBundle(Bundle bundle) {
+ final Parcel p = Parcel.obtain();
+ // Don't use p.writeParcelabe(), which would write the creator, which we don't need.
+ bundle.writeToParcel(p, 0);
+ p.setDataPosition(0);
+ return p;
+ }
+
/**
* Create a test bundle, parcel it and return the parcel.
*/
@@ -48,12 +59,7 @@
pipe[1].close();
source.putParcelable("fd", pipe[0]);
}
- final Parcel p = Parcel.obtain();
- // Don't use p.writeParcelabe(), which would write the creator, which we don't need.
- source.writeToParcel(p, 0);
- p.setDataPosition(0);
-
- return p;
+ return getParcelledBundle(source);
}
/**
@@ -137,4 +143,78 @@
checkBundle(b, withFd);
p.recycle();
}
+
+ @Test
+ public void kindofEquals_bothUnparcelled_same() {
+ Bundle bundle1 = new Bundle();
+ bundle1.putString("StringKey", "S");
+ bundle1.putInt("IntKey", 2);
+
+ Bundle bundle2 = new Bundle();
+ bundle2.putString("StringKey", "S");
+ bundle2.putInt("IntKey", 2);
+
+ assertTrue(BaseBundle.kindofEquals(bundle1, bundle2));
+ }
+
+ @Test
+ public void kindofEquals_bothUnparcelled_different() {
+ Bundle bundle1 = new Bundle();
+ bundle1.putString("StringKey", "S");
+ bundle1.putInt("IntKey", 2);
+
+ Bundle bundle2 = new Bundle();
+ bundle2.putString("StringKey", "T");
+ bundle2.putLong("LongKey", 30L);
+
+ assertFalse(BaseBundle.kindofEquals(bundle1, bundle2));
+ }
+
+ @Test
+ public void kindofEquals_bothParcelled_same() {
+ Bundle bundle1 = new Bundle();
+ bundle1.putString("StringKey", "S");
+ bundle1.putInt("IntKey", 2);
+ bundle1.readFromParcel(getParcelledBundle(bundle1));
+
+ Bundle bundle2 = new Bundle();
+ bundle2.putString("StringKey", "S");
+ bundle2.putInt("IntKey", 2);
+ bundle2.readFromParcel(getParcelledBundle(bundle2));
+
+ assertTrue(bundle1.isParcelled());
+ assertTrue(bundle2.isParcelled());
+ assertTrue(BaseBundle.kindofEquals(bundle1, bundle2));
+ }
+
+ @Test
+ public void kindofEquals_bothParcelled_different() {
+ Bundle bundle1 = new Bundle();
+ bundle1.putString("StringKey", "S");
+ bundle1.putInt("IntKey", 2);
+ bundle1.readFromParcel(getParcelledBundle(bundle1));
+
+ Bundle bundle2 = new Bundle();
+ bundle2.putString("StringKey", "T");
+ bundle2.putLong("LongKey", 5);
+ bundle2.readFromParcel(getParcelledBundle(bundle2));
+
+ assertTrue(bundle1.isParcelled());
+ assertTrue(bundle2.isParcelled());
+ assertFalse(BaseBundle.kindofEquals(bundle1, bundle2));
+ }
+
+ @Test
+ public void kindofEquals_ParcelledUnparcelled_empty() {
+ Bundle bundle1 = new Bundle();
+ bundle1.readFromParcel(getParcelledBundle(bundle1));
+
+ Bundle bundle2 = new Bundle();
+
+ assertTrue(bundle1.isParcelled());
+ assertFalse(bundle2.isParcelled());
+ // Even though one is parcelled and the other is not, both are empty, so it should
+ // return true
+ assertTrue(BaseBundle.kindofEquals(bundle1, bundle2));
+ }
}
diff --git a/libs/hwui/Android.bp b/libs/hwui/Android.bp
index debb38b2..81dedda 100644
--- a/libs/hwui/Android.bp
+++ b/libs/hwui/Android.bp
@@ -84,7 +84,6 @@
"libGLESv3",
"libvulkan",
"libui",
- "libgui",
"libnativedisplay",
"libnativewindow",
"libprotobuf-cpp-lite",
@@ -289,6 +288,13 @@
name: "hwui_test_defaults",
defaults: ["hwui_defaults"],
test_suites: ["device-tests"],
+ target: {
+ android: {
+ shared_libs: [
+ "libgui",
+ ],
+ }
+ },
srcs: [
"tests/common/scenes/*.cpp",
"tests/common/LeakChecker.cpp",
diff --git a/libs/hwui/hwui/Bitmap.cpp b/libs/hwui/hwui/Bitmap.cpp
index 58cc08b..914c046 100644
--- a/libs/hwui/hwui/Bitmap.cpp
+++ b/libs/hwui/hwui/Bitmap.cpp
@@ -32,7 +32,6 @@
#ifndef _WIN32
#include <binder/IServiceManager.h>
-#include <private/gui/ComposerService.h>
#endif
#include <ui/PixelFormat.h>
diff --git a/libs/hwui/pipeline/skia/SkiaOpenGLPipeline.h b/libs/hwui/pipeline/skia/SkiaOpenGLPipeline.h
index e482cad..fc6e114 100644
--- a/libs/hwui/pipeline/skia/SkiaOpenGLPipeline.h
+++ b/libs/hwui/pipeline/skia/SkiaOpenGLPipeline.h
@@ -16,8 +16,10 @@
#pragma once
-#include "SkiaPipeline.h"
+#include <EGL/egl.h>
+#include <system/window.h>
+#include "SkiaPipeline.h"
#include "renderstate/RenderState.h"
namespace android {
diff --git a/libs/hwui/pipeline/skia/SkiaPipeline.cpp b/libs/hwui/pipeline/skia/SkiaPipeline.cpp
index 29b4dd7..41aa1ff 100644
--- a/libs/hwui/pipeline/skia/SkiaPipeline.cpp
+++ b/libs/hwui/pipeline/skia/SkiaPipeline.cpp
@@ -24,18 +24,19 @@
#include <SkOverdrawColorFilter.h>
#include <SkPicture.h>
#include <SkPictureRecorder.h>
-#include <SkTypeface.h>
#include <SkSerialProcs.h>
+#include <SkTypeface.h>
+#include <android-base/properties.h>
+#include <unistd.h>
+
+#include <sstream>
+
#include "LightingInfo.h"
#include "VectorDrawable.h"
#include "thread/CommonPool.h"
#include "tools/SkSharingProc.h"
-#include "utils/TraceUtils.h"
#include "utils/String8.h"
-
-#include <unistd.h>
-
-#include <android-base/properties.h>
+#include "utils/TraceUtils.h"
using namespace android::uirenderer::renderthread;
@@ -600,27 +601,24 @@
// Overdraw debugging
// These colors should be kept in sync with Caches::getOverdrawColor() with a few differences.
-// This implementation:
-// (1) Requires transparent entries for "no overdraw" and "single draws".
-// (2) Requires premul colors (instead of unpremul).
-// (3) Requires RGBA colors (instead of BGRA).
-static const uint32_t kOverdrawColors[2][6] = {
- {
- 0x00000000,
- 0x00000000,
- 0x2f2f0000,
- 0x2f002f00,
- 0x3f00003f,
- 0x7f00007f,
- },
- {
- 0x00000000,
- 0x00000000,
- 0x2f2f0000,
- 0x4f004f4f,
- 0x5f50335f,
- 0x7f00007f,
- },
+// This implementation requires transparent entries for "no overdraw" and "single draws".
+static const SkColor kOverdrawColors[2][6] = {
+ {
+ 0x00000000,
+ 0x00000000,
+ 0x2f0000ff,
+ 0x2f00ff00,
+ 0x3fff0000,
+ 0x7fff0000,
+ },
+ {
+ 0x00000000,
+ 0x00000000,
+ 0x2f0000ff,
+ 0x4fffff00,
+ 0x5fff89d7,
+ 0x7fff0000,
+ },
};
void SkiaPipeline::renderOverdraw(const SkRect& clip,
@@ -642,8 +640,8 @@
// Draw overdraw colors to the canvas. The color filter will convert counts to colors.
SkPaint paint;
- const SkPMColor* colors = kOverdrawColors[static_cast<int>(Properties::overdrawColorSet)];
- paint.setColorFilter(SkOverdrawColorFilter::Make(colors));
+ const SkColor* colors = kOverdrawColors[static_cast<int>(Properties::overdrawColorSet)];
+ paint.setColorFilter(SkOverdrawColorFilter::MakeWithSkColors(colors));
surface->getCanvas()->drawImage(counts.get(), 0.0f, 0.0f, &paint);
}
diff --git a/libs/hwui/renderthread/CanvasContext.cpp b/libs/hwui/renderthread/CanvasContext.cpp
index 1df3336..4299dd3 100644
--- a/libs/hwui/renderthread/CanvasContext.cpp
+++ b/libs/hwui/renderthread/CanvasContext.cpp
@@ -139,15 +139,15 @@
mAnimationContext->destroy();
}
-void CanvasContext::setSurface(sp<Surface>&& surface, bool enableTimeout) {
+void CanvasContext::setSurface(ANativeWindow* window, bool enableTimeout) {
ATRACE_CALL();
- if (surface) {
- mNativeSurface = std::make_unique<ReliableSurface>(std::move(surface));
+ if (window) {
+ mNativeSurface = std::make_unique<ReliableSurface>(window);
mNativeSurface->init();
if (enableTimeout) {
// TODO: Fix error handling & re-shorten timeout
- ANativeWindow_setDequeueTimeout(mNativeSurface->getNativeWindow(), 4000_ms);
+ ANativeWindow_setDequeueTimeout(window, 4000_ms);
}
} else {
mNativeSurface = nullptr;
@@ -167,7 +167,7 @@
mFrameNumber = -1;
- if (hasSurface) {
+ if (window != nullptr && hasSurface) {
mHaveNewSurface = true;
mSwapHistory.clear();
// Enable frame stats after the surface has been bound to the appropriate graphics API.
diff --git a/libs/hwui/renderthread/CanvasContext.h b/libs/hwui/renderthread/CanvasContext.h
index 629c741..0f1b8ae 100644
--- a/libs/hwui/renderthread/CanvasContext.h
+++ b/libs/hwui/renderthread/CanvasContext.h
@@ -35,7 +35,6 @@
#include <SkRect.h>
#include <SkSize.h>
#include <cutils/compiler.h>
-#include <gui/Surface.h>
#include <utils/Functor.h>
#include <functional>
@@ -111,7 +110,7 @@
// Won't take effect until next EGLSurface creation
void setSwapBehavior(SwapBehavior swapBehavior);
- void setSurface(sp<Surface>&& surface, bool enableTimeout = true);
+ void setSurface(ANativeWindow* window, bool enableTimeout = true);
bool pauseSurface();
void setStopped(bool stopped);
bool hasSurface() const { return mNativeSurface.get(); }
diff --git a/libs/hwui/renderthread/EglManager.cpp b/libs/hwui/renderthread/EglManager.cpp
index c1fed26..5e0471c 100644
--- a/libs/hwui/renderthread/EglManager.cpp
+++ b/libs/hwui/renderthread/EglManager.cpp
@@ -20,7 +20,6 @@
#include <GLES/gl.h>
#include <cutils/properties.h>
#include <log/log.h>
-#include <private/gui/SyncFeatures.h>
#include <sync/sync.h>
#include <utils/Trace.h>
@@ -79,6 +78,9 @@
bool displayP3 = false;
bool contextPriority = false;
bool surfacelessContext = false;
+ bool nativeFenceSync = false;
+ bool fenceSync = false;
+ bool waitSync = false;
} EglExtensions;
EglManager::EglManager()
@@ -226,6 +228,9 @@
EglExtensions.displayP3 = extensions.has("EGL_EXT_gl_colorspace_display_p3_passthrough");
EglExtensions.contextPriority = extensions.has("EGL_IMG_context_priority");
EglExtensions.surfacelessContext = extensions.has("EGL_KHR_surfaceless_context");
+ EglExtensions.nativeFenceSync = extensions.has("EGL_ANDROID_native_fence_sync");
+ EglExtensions.fenceSync = extensions.has("EGL_KHR_fence_sync");
+ EglExtensions.waitSync = extensions.has("EGL_KHR_wait_sync");
}
bool EglManager::hasEglContext() {
@@ -527,8 +532,7 @@
return INVALID_OPERATION;
}
- if (SyncFeatures::getInstance().useWaitSync() &&
- SyncFeatures::getInstance().useNativeFenceSync()) {
+ if (EglExtensions.waitSync && EglExtensions.nativeFenceSync) {
// Block GPU on the fence.
// Create an EGLSyncKHR from the current fence.
int fenceFd = ::dup(fence);
@@ -572,7 +576,7 @@
return INVALID_OPERATION;
}
- if (SyncFeatures::getInstance().useNativeFenceSync()) {
+ if (EglExtensions.nativeFenceSync) {
EGLSyncKHR sync = eglCreateSyncKHR(mEglDisplay, EGL_SYNC_NATIVE_FENCE_ANDROID, nullptr);
if (sync == EGL_NO_SYNC_KHR) {
ALOGE("EglManager::createReleaseFence: error creating EGL fence: %#x", eglGetError());
@@ -589,7 +593,7 @@
}
*nativeFence = fenceFd;
*eglFence = EGL_NO_SYNC_KHR;
- } else if (useFenceSync && SyncFeatures::getInstance().useFenceSync()) {
+ } else if (useFenceSync && EglExtensions.fenceSync) {
if (*eglFence != EGL_NO_SYNC_KHR) {
// There is already a fence for the current slot. We need to
// wait on that before replacing it with another fence to
diff --git a/libs/hwui/renderthread/ReliableSurface.cpp b/libs/hwui/renderthread/ReliableSurface.cpp
index e92500f..8a0b4e8 100644
--- a/libs/hwui/renderthread/ReliableSurface.cpp
+++ b/libs/hwui/renderthread/ReliableSurface.cpp
@@ -16,7 +16,10 @@
#include "ReliableSurface.h"
+#include <log/log_main.h>
#include <private/android/AHardwareBufferHelpers.h>
+// TODO: this should be including apex instead.
+#include <vndk/window.h>
namespace android::uirenderer::renderthread {
@@ -26,8 +29,9 @@
// to propagate this error back to the caller
constexpr bool DISABLE_BUFFER_PREFETCH = true;
-ReliableSurface::ReliableSurface(sp<Surface>&& surface) : mSurface(std::move(surface)) {
- LOG_ALWAYS_FATAL_IF(!mSurface, "Error, unable to wrap a nullptr");
+ReliableSurface::ReliableSurface(ANativeWindow* window) : mWindow(window) {
+ LOG_ALWAYS_FATAL_IF(!mWindow, "Error, unable to wrap a nullptr");
+ ANativeWindow_acquire(mWindow);
}
ReliableSurface::~ReliableSurface() {
@@ -36,26 +40,27 @@
// As a concrete example, if the underlying ANativeWindow is associated with
// an EGLSurface that is still in use, then if we don't clear out the
// interceptors then we walk into undefined behavior.
- ANativeWindow_setCancelBufferInterceptor(mSurface.get(), nullptr, nullptr);
- ANativeWindow_setDequeueBufferInterceptor(mSurface.get(), nullptr, nullptr);
- ANativeWindow_setQueueBufferInterceptor(mSurface.get(), nullptr, nullptr);
- ANativeWindow_setPerformInterceptor(mSurface.get(), nullptr, nullptr);
+ ANativeWindow_setCancelBufferInterceptor(mWindow, nullptr, nullptr);
+ ANativeWindow_setDequeueBufferInterceptor(mWindow, nullptr, nullptr);
+ ANativeWindow_setQueueBufferInterceptor(mWindow, nullptr, nullptr);
+ ANativeWindow_setPerformInterceptor(mWindow, nullptr, nullptr);
+ ANativeWindow_release(mWindow);
}
void ReliableSurface::init() {
- int result = ANativeWindow_setCancelBufferInterceptor(mSurface.get(), hook_cancelBuffer, this);
+ int result = ANativeWindow_setCancelBufferInterceptor(mWindow, hook_cancelBuffer, this);
LOG_ALWAYS_FATAL_IF(result != NO_ERROR, "Failed to set cancelBuffer interceptor: error = %d",
result);
- result = ANativeWindow_setDequeueBufferInterceptor(mSurface.get(), hook_dequeueBuffer, this);
+ result = ANativeWindow_setDequeueBufferInterceptor(mWindow, hook_dequeueBuffer, this);
LOG_ALWAYS_FATAL_IF(result != NO_ERROR, "Failed to set dequeueBuffer interceptor: error = %d",
result);
- result = ANativeWindow_setQueueBufferInterceptor(mSurface.get(), hook_queueBuffer, this);
+ result = ANativeWindow_setQueueBufferInterceptor(mWindow, hook_queueBuffer, this);
LOG_ALWAYS_FATAL_IF(result != NO_ERROR, "Failed to set queueBuffer interceptor: error = %d",
result);
- result = ANativeWindow_setPerformInterceptor(mSurface.get(), hook_perform, this);
+ result = ANativeWindow_setPerformInterceptor(mWindow, hook_perform, this);
LOG_ALWAYS_FATAL_IF(result != NO_ERROR, "Failed to set perform interceptor: error = %d",
result);
}
@@ -87,7 +92,7 @@
ANativeWindowBuffer* buffer = nullptr;
// Note that this calls back into our own hooked method.
- int result = ANativeWindow_dequeueBuffer(mSurface.get(), &buffer, &fenceFd);
+ int result = ANativeWindow_dequeueBuffer(mWindow, &buffer, &fenceFd);
{
std::lock_guard _lock{mMutex};
@@ -117,7 +122,7 @@
// Note that clearReservedBuffer may be reentrant here, so
// mReservedBuffer must be cleared once we reach here to avoid recursing
// forever.
- ANativeWindow_cancelBuffer(mSurface.get(), buffer, releaseFd);
+ ANativeWindow_cancelBuffer(mWindow, buffer, releaseFd);
}
}
@@ -239,10 +244,10 @@
case ANATIVEWINDOW_PERFORM_SET_BUFFERS_GEOMETRY:
/* width */ va_arg(args, uint32_t);
/* height */ va_arg(args, uint32_t);
- rs->mFormat = va_arg(args, PixelFormat);
+ rs->mFormat = static_cast<AHardwareBuffer_Format>(va_arg(args, int32_t));
break;
case ANATIVEWINDOW_PERFORM_SET_BUFFERS_FORMAT:
- rs->mFormat = va_arg(args, PixelFormat);
+ rs->mFormat = static_cast<AHardwareBuffer_Format>(va_arg(args, int32_t));
break;
}
}
diff --git a/libs/hwui/renderthread/ReliableSurface.h b/libs/hwui/renderthread/ReliableSurface.h
index e3cd8c0..58cd067 100644
--- a/libs/hwui/renderthread/ReliableSurface.h
+++ b/libs/hwui/renderthread/ReliableSurface.h
@@ -16,12 +16,14 @@
#pragma once
+#include <android-base/unique_fd.h>
#include <apex/window.h>
-#include <gui/Surface.h>
+#include <utils/Errors.h>
#include <utils/Macros.h>
#include <utils/StrongPointer.h>
#include <memory>
+#include <mutex>
namespace android::uirenderer::renderthread {
@@ -29,7 +31,7 @@
PREVENT_COPY_AND_ASSIGN(ReliableSurface);
public:
- ReliableSurface(sp<Surface>&& surface);
+ ReliableSurface(ANativeWindow* window);
~ReliableSurface();
// Performs initialization that is not safe to do in the constructor.
@@ -37,12 +39,10 @@
// passed as the data pointer is not safe.
void init();
- ANativeWindow* getNativeWindow() { return mSurface.get(); }
+ ANativeWindow* getNativeWindow() { return mWindow; }
int reserveNext();
- int query(int what, int* value) const { return mSurface->query(what, value); }
-
int getAndClearError() {
int ret = mBufferQueueState;
mBufferQueueState = OK;
@@ -50,12 +50,12 @@
}
private:
- sp<Surface> mSurface;
+ ANativeWindow* mWindow;
mutable std::mutex mMutex;
uint64_t mUsage = AHARDWAREBUFFER_USAGE_GPU_FRAMEBUFFER;
- PixelFormat mFormat = PIXEL_FORMAT_RGBA_8888;
+ AHardwareBuffer_Format mFormat = AHARDWAREBUFFER_FORMAT_R8G8B8A8_UNORM;
std::unique_ptr<AHardwareBuffer, void (*)(AHardwareBuffer*)> mScratchBuffer{
nullptr, AHardwareBuffer_release};
ANativeWindowBuffer* mReservedBuffer = nullptr;
diff --git a/libs/hwui/renderthread/RenderProxy.cpp b/libs/hwui/renderthread/RenderProxy.cpp
index 1e7fc71..b66a13d 100644
--- a/libs/hwui/renderthread/RenderProxy.cpp
+++ b/libs/hwui/renderthread/RenderProxy.cpp
@@ -16,8 +16,6 @@
#include "RenderProxy.h"
-#include <gui/Surface.h>
-
#include "DeferredLayerUpdater.h"
#include "DisplayList.h"
#include "Properties.h"
@@ -78,9 +76,11 @@
mRenderThread.queue().runSync([this, name]() { mContext->setName(std::string(name)); });
}
-void RenderProxy::setSurface(const sp<Surface>& surface, bool enableTimeout) {
- mRenderThread.queue().post([this, surf = surface, enableTimeout]() mutable {
- mContext->setSurface(std::move(surf), enableTimeout);
+void RenderProxy::setSurface(ANativeWindow* window, bool enableTimeout) {
+ ANativeWindow_acquire(window);
+ mRenderThread.queue().post([this, win = window, enableTimeout]() mutable {
+ mContext->setSurface(win, enableTimeout);
+ ANativeWindow_release(win);
});
}
@@ -314,10 +314,9 @@
[context = mContext, renderAhead] { context->setRenderAheadDepth(renderAhead); });
}
-int RenderProxy::copySurfaceInto(sp<Surface>& surface, int left, int top, int right, int bottom,
+int RenderProxy::copySurfaceInto(ANativeWindow* window, int left, int top, int right, int bottom,
SkBitmap* bitmap) {
auto& thread = RenderThread::getInstance();
- ANativeWindow* window = surface.get();
return static_cast<int>(thread.queue().runSync([&]() -> auto {
return thread.readback().copySurfaceInto(window, Rect(left, top, right, bottom), bitmap);
}));
diff --git a/libs/hwui/renderthread/RenderProxy.h b/libs/hwui/renderthread/RenderProxy.h
index ab0dd2b..3baeb2f 100644
--- a/libs/hwui/renderthread/RenderProxy.h
+++ b/libs/hwui/renderthread/RenderProxy.h
@@ -18,6 +18,7 @@
#define RENDERPROXY_H_
#include <SkBitmap.h>
+#include <android/native_window.h>
#include <cutils/compiler.h>
#include <utils/Functor.h>
@@ -69,7 +70,7 @@
ANDROID_API bool loadSystemProperties();
ANDROID_API void setName(const char* name);
- ANDROID_API void setSurface(const sp<Surface>& surface, bool enableTimeout = true);
+ ANDROID_API void setSurface(ANativeWindow* window, bool enableTimeout = true);
ANDROID_API void allocateBuffers();
ANDROID_API bool pause();
ANDROID_API void setStopped(bool stopped);
@@ -140,11 +141,7 @@
*/
ANDROID_API void setRenderAheadDepth(int renderAhead);
- // TODO: This api will need to take in an ANativeWindow instead, but the
- // caller, ThreadedRenderer, doesn't have access to libandroid due to a
- // circular dependency, so it can't use the JNI ANativeWindow methods. Once
- // that is resolved then replace the surface type here.
- ANDROID_API static int copySurfaceInto(sp<Surface>& surface, int left, int top, int right,
+ ANDROID_API static int copySurfaceInto(ANativeWindow* window, int left, int top, int right,
int bottom, SkBitmap* bitmap);
ANDROID_API static void prepareToDraw(Bitmap& bitmap);
diff --git a/libs/hwui/tests/common/scenes/MagnifierAnimation.cpp b/libs/hwui/tests/common/scenes/MagnifierAnimation.cpp
index f6cff1c..f4fce27 100644
--- a/libs/hwui/tests/common/scenes/MagnifierAnimation.cpp
+++ b/libs/hwui/tests/common/scenes/MagnifierAnimation.cpp
@@ -70,7 +70,7 @@
magnifier->getSkBitmap(&temp);
constexpr int x = 90;
constexpr int y = 325;
- RenderProxy::copySurfaceInto(renderTarget, x, y, x + magnifier->width(),
+ RenderProxy::copySurfaceInto(renderTarget.get(), x, y, x + magnifier->width(),
y + magnifier->height(), &temp);
}
}
diff --git a/libs/hwui/tests/macrobench/TestSceneRunner.cpp b/libs/hwui/tests/macrobench/TestSceneRunner.cpp
index 3b6baa7..801cb7d 100644
--- a/libs/hwui/tests/macrobench/TestSceneRunner.cpp
+++ b/libs/hwui/tests/macrobench/TestSceneRunner.cpp
@@ -131,7 +131,7 @@
ContextFactory factory;
std::unique_ptr<RenderProxy> proxy(new RenderProxy(false, rootNode.get(), &factory));
proxy->loadSystemProperties();
- proxy->setSurface(surface);
+ proxy->setSurface(surface.get());
float lightX = width / 2.0;
proxy->setLightAlpha(255 * 0.075, 255 * 0.15);
proxy->setLightGeometry((Vector3){lightX, dp(-200.0f), dp(800.0f)}, dp(800.0f));
diff --git a/libs/hwui/tests/unit/SkiaDisplayListTests.cpp b/libs/hwui/tests/unit/SkiaDisplayListTests.cpp
index 7d999c4..d08aea6 100644
--- a/libs/hwui/tests/unit/SkiaDisplayListTests.cpp
+++ b/libs/hwui/tests/unit/SkiaDisplayListTests.cpp
@@ -210,7 +210,7 @@
auto surface = testContext.surface();
int width = ANativeWindow_getWidth(surface.get());
int height = ANativeWindow_getHeight(surface.get());
- canvasContext->setSurface(std::move(surface));
+ canvasContext->setSurface(surface.get());
TreeInfo info(TreeInfo::MODE_FULL, *canvasContext.get());
DamageAccumulator damageAccumulator;
diff --git a/libs/protoutil/Android.bp b/libs/protoutil/Android.bp
index b0af997..d2b7d5c 100644
--- a/libs/protoutil/Android.bp
+++ b/libs/protoutil/Android.bp
@@ -45,6 +45,12 @@
defaults: ["libprotoutil_defaults"],
export_include_dirs: ["include"],
+
+ apex_available: [
+ "//apex_available:platform",
+ "com.android.os.statsd",
+ "test_com.android.os.statsd",
+ ],
}
cc_test {
diff --git a/location/java/android/location/GnssMeasurementCorrections.java b/location/java/android/location/GnssMeasurementCorrections.java
index 19c3992..ffbe11a 100644
--- a/location/java/android/location/GnssMeasurementCorrections.java
+++ b/location/java/android/location/GnssMeasurementCorrections.java
@@ -179,6 +179,10 @@
* Gets the environment bearing in degrees clockwise from true north, in the direction of user
* motion. Environment bearing is provided when it is known with high probability that
* velocity is aligned with an environment feature (such as edge of a building, or road).
+ *
+ * {@link #hasEnvironmentBearing} should be called to check the environment bearing is available
+ * before calling this method. The value is undefined if {@link #hasEnvironmentBearing} returns
+ * false.
*/
@FloatRange(from = 0.0f, to = 360.0f)
public float getEnvironmentBearingDegrees() {
@@ -186,7 +190,15 @@
}
/**
- * Gets the environment bearing uncertainty in degrees.
+ * Gets the environment bearing uncertainty in degrees. It represents the standard deviation of
+ * the physical structure in the circle of position uncertainty. The uncertainty can take values
+ * between 0 and 180 degrees. The {@link #hasEnvironmentBearing} becomes false as the
+ * uncertainty value passes a predefined threshold depending on the physical structure around
+ * the user.
+ *
+ * {@link #hasEnvironmentBearing} should be called to check the environment bearing is available
+ * before calling this method. The value is undefined if {@link #hasEnvironmentBearing} returns
+ * false.
*/
@FloatRange(from = 0.0f, to = 180.0f)
public float getEnvironmentBearingUncertaintyDegrees() {
@@ -358,6 +370,8 @@
* user motion. Environment bearing is provided when it is known with high probability
* that velocity is aligned with an environment feature (such as edge of a building, or
* road).
+ *
+ * Both the bearing and uncertainty must be set for the environment bearing to be valid.
*/
@NonNull public Builder setEnvironmentBearingDegrees(
@FloatRange(from = 0.0f, to = 360.0f)
@@ -369,6 +383,8 @@
/**
* Sets the environment bearing uncertainty in degrees.
+ *
+ * Both the bearing and uncertainty must be set for the environment bearing to be valid.
*/
@NonNull public Builder setEnvironmentBearingUncertaintyDegrees(
@FloatRange(from = 0.0f, to = 180.0f)
diff --git a/packages/CarSystemUI/src/com/android/systemui/CarSystemUIBinder.java b/packages/CarSystemUI/src/com/android/systemui/CarSystemUIBinder.java
index 07b7b22..8eeaefd 100644
--- a/packages/CarSystemUI/src/com/android/systemui/CarSystemUIBinder.java
+++ b/packages/CarSystemUI/src/com/android/systemui/CarSystemUIBinder.java
@@ -17,8 +17,10 @@
package com.android.systemui;
import com.android.systemui.biometrics.AuthController;
+import com.android.systemui.bubbles.dagger.BubbleModule;
import com.android.systemui.globalactions.GlobalActionsComponent;
import com.android.systemui.keyguard.KeyguardViewMediator;
+import com.android.systemui.keyguard.dagger.KeyguardModule;
import com.android.systemui.navigationbar.car.CarNavigationBar;
import com.android.systemui.pip.PipUI;
import com.android.systemui.power.PowerUI;
@@ -29,6 +31,7 @@
import com.android.systemui.statusbar.car.CarStatusBar;
import com.android.systemui.statusbar.car.CarStatusBarModule;
import com.android.systemui.statusbar.notification.InstantAppNotifier;
+import com.android.systemui.statusbar.notification.dagger.NotificationsModule;
import com.android.systemui.statusbar.phone.StatusBar;
import com.android.systemui.statusbar.tv.TvStatusBar;
import com.android.systemui.theme.ThemeOverlayController;
@@ -42,7 +45,8 @@
import dagger.multibindings.IntoMap;
/** Binder for car specific {@link SystemUI} modules. */
-@Module(includes = {RecentsModule.class, CarStatusBarModule.class})
+@Module(includes = {RecentsModule.class, CarStatusBarModule.class, NotificationsModule.class,
+ BubbleModule.class, KeyguardModule.class})
public abstract class CarSystemUIBinder {
/** Inject into AuthController. */
@Binds
diff --git a/packages/CarSystemUI/src/com/android/systemui/statusbar/car/CarStatusBarModule.java b/packages/CarSystemUI/src/com/android/systemui/statusbar/car/CarStatusBarModule.java
index 498bd87..7f64990 100644
--- a/packages/CarSystemUI/src/com/android/systemui/statusbar/car/CarStatusBarModule.java
+++ b/packages/CarSystemUI/src/com/android/systemui/statusbar/car/CarStatusBarModule.java
@@ -54,10 +54,10 @@
import com.android.systemui.statusbar.NotificationRemoteInputManager;
import com.android.systemui.statusbar.NotificationViewHierarchyManager;
import com.android.systemui.statusbar.PulseExpansionHandler;
-import com.android.systemui.statusbar.StatusBarDependenciesModule;
import com.android.systemui.statusbar.SuperStatusBarViewFactory;
import com.android.systemui.statusbar.SysuiStatusBarStateController;
import com.android.systemui.statusbar.VibratorHelper;
+import com.android.systemui.statusbar.dagger.StatusBarDependenciesModule;
import com.android.systemui.statusbar.notification.BypassHeadsUpNotifier;
import com.android.systemui.statusbar.notification.DynamicPrivacyController;
import com.android.systemui.statusbar.notification.NotificationAlertingManager;
@@ -67,6 +67,7 @@
import com.android.systemui.statusbar.notification.init.NotificationsController;
import com.android.systemui.statusbar.notification.logging.NotificationLogger;
import com.android.systemui.statusbar.notification.row.NotificationGutsManager;
+import com.android.systemui.statusbar.notification.row.NotificationRowModule;
import com.android.systemui.statusbar.phone.AutoHideController;
import com.android.systemui.statusbar.phone.BiometricUnlockController;
import com.android.systemui.statusbar.phone.DozeParameters;
@@ -87,6 +88,7 @@
import com.android.systemui.statusbar.phone.StatusBarKeyguardViewManager;
import com.android.systemui.statusbar.phone.StatusBarNotificationActivityStarter;
import com.android.systemui.statusbar.phone.dagger.StatusBarComponent;
+import com.android.systemui.statusbar.phone.dagger.StatusBarPhoneDependenciesModule;
import com.android.systemui.statusbar.policy.BatteryController;
import com.android.systemui.statusbar.policy.ConfigurationController;
import com.android.systemui.statusbar.policy.DeviceProvisionedController;
@@ -112,7 +114,8 @@
/**
* Dagger Module providing {@link CarStatusBar}.
*/
-@Module(includes = {StatusBarDependenciesModule.class})
+@Module(includes = {StatusBarDependenciesModule.class, StatusBarPhoneDependenciesModule.class,
+ NotificationRowModule.class})
public class CarStatusBarModule {
/**
* Provides our instance of StatusBar which is considered optional.
diff --git a/packages/SettingsLib/src/com/android/settingslib/notification/ConversationIconFactory.java b/packages/SettingsLib/src/com/android/settingslib/notification/ConversationIconFactory.java
new file mode 100644
index 0000000..885b7d3
--- /dev/null
+++ b/packages/SettingsLib/src/com/android/settingslib/notification/ConversationIconFactory.java
@@ -0,0 +1,113 @@
+/*
+ * Copyright (C) 2020 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT 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.settingslib.notification;
+
+import android.content.Context;
+import android.content.pm.ApplicationInfo;
+import android.content.pm.LauncherApps;
+import android.content.pm.PackageManager;
+import android.content.pm.ShortcutInfo;
+import android.graphics.Bitmap;
+import android.graphics.Canvas;
+import android.graphics.drawable.BitmapDrawable;
+import android.graphics.drawable.Drawable;
+import android.os.UserHandle;
+import android.util.IconDrawableFactory;
+
+import com.android.launcher3.icons.BaseIconFactory;
+import com.android.launcher3.icons.BitmapInfo;
+import com.android.launcher3.icons.ShadowGenerator;
+
+/**
+ * Factory for creating normalized conversation icons.
+ * We are not using Launcher's IconFactory because conversation rendering only runs on the UI
+ * thread, so there is no need to manage a pool across multiple threads.
+ */
+public class ConversationIconFactory extends BaseIconFactory {
+
+ final LauncherApps mLauncherApps;
+ final PackageManager mPackageManager;
+ final IconDrawableFactory mIconDrawableFactory;
+
+ public ConversationIconFactory(Context context, LauncherApps la, PackageManager pm,
+ IconDrawableFactory iconDrawableFactory, int iconSizePx) {
+ super(context, context.getResources().getConfiguration().densityDpi,
+ iconSizePx);
+ mLauncherApps = la;
+ mPackageManager = pm;
+ mIconDrawableFactory = iconDrawableFactory;
+ }
+
+ private int getBadgeSize() {
+ return mContext.getResources().getDimensionPixelSize(
+ com.android.launcher3.icons.R.dimen.profile_badge_size);
+ }
+ /**
+ * Returns the conversation info drawable
+ */
+ private Drawable getConversationDrawable(ShortcutInfo shortcutInfo) {
+ return mLauncherApps.getShortcutIconDrawable(shortcutInfo, mFillResIconDpi);
+ }
+
+ /**
+ * Get the {@link Drawable} that represents the app icon
+ */
+ private Drawable getBadgedIcon(String packageName, int userId) {
+ try {
+ final ApplicationInfo appInfo = mPackageManager.getApplicationInfoAsUser(
+ packageName, PackageManager.GET_META_DATA, userId);
+ return mIconDrawableFactory.getBadgedIcon(appInfo, userId);
+ } catch (PackageManager.NameNotFoundException e) {
+ return mPackageManager.getDefaultActivityIcon();
+ }
+ }
+
+ /**
+ * Turns a Drawable into a Bitmap
+ */
+ BitmapInfo toBitmap(Drawable userBadgedAppIcon) {
+ Bitmap bitmap = createIconBitmap(
+ userBadgedAppIcon, 1f, getBadgeSize());
+
+ Canvas c = new Canvas();
+ ShadowGenerator shadowGenerator = new ShadowGenerator(getBadgeSize());
+ c.setBitmap(bitmap);
+ shadowGenerator.recreateIcon(Bitmap.createBitmap(bitmap), c);
+ return createIconBitmap(bitmap);
+ }
+
+ /**
+ * Returns a {@link BitmapInfo} for the entire conversation icon including the badge.
+ */
+ public Bitmap getConversationBitmap(ShortcutInfo info, String packageName, int uid) {
+ return getConversationBitmap(getConversationDrawable(info), packageName, uid);
+ }
+
+ /**
+ * Returns a {@link BitmapInfo} for the entire conversation icon including the badge.
+ */
+ public Bitmap getConversationBitmap(Drawable baseIcon, String packageName, int uid) {
+ int userId = UserHandle.getUserId(uid);
+ Drawable badge = getBadgedIcon(packageName, userId);
+ BitmapInfo iconInfo = createBadgedIconBitmap(baseIcon,
+ UserHandle.of(userId),
+ true /* shrinkNonAdaptiveIcons */);
+
+ badgeWithDrawable(iconInfo.icon,
+ new BitmapDrawable(mContext.getResources(), toBitmap(badge).icon));
+ return iconInfo.icon;
+ }
+}
diff --git a/packages/SystemUI/src/com/android/systemui/ScreenDecorations.java b/packages/SystemUI/src/com/android/systemui/ScreenDecorations.java
index e66b9f2..a2ae59e 100644
--- a/packages/SystemUI/src/com/android/systemui/ScreenDecorations.java
+++ b/packages/SystemUI/src/com/android/systemui/ScreenDecorations.java
@@ -22,12 +22,8 @@
import static android.view.ViewGroup.LayoutParams.WRAP_CONTENT;
import static android.view.WindowManager.LayoutParams.LAYOUT_IN_DISPLAY_CUTOUT_MODE_ALWAYS;
-import static com.android.systemui.tuner.TunablePadding.FLAG_END;
-import static com.android.systemui.tuner.TunablePadding.FLAG_START;
-
import android.annotation.Dimension;
import android.app.ActivityManager;
-import android.app.Fragment;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
@@ -69,13 +65,7 @@
import com.android.systemui.RegionInterceptingFrameLayout.RegionInterceptableView;
import com.android.systemui.broadcast.BroadcastDispatcher;
import com.android.systemui.dagger.qualifiers.Main;
-import com.android.systemui.fragments.FragmentHostManager;
-import com.android.systemui.fragments.FragmentHostManager.FragmentListener;
-import com.android.systemui.plugins.qs.QS;
import com.android.systemui.qs.SecureSetting;
-import com.android.systemui.statusbar.phone.CollapsedStatusBarFragment;
-import com.android.systemui.statusbar.phone.StatusBar;
-import com.android.systemui.tuner.TunablePadding;
import com.android.systemui.tuner.TunerService;
import com.android.systemui.tuner.TunerService.Tunable;
import com.android.systemui.util.leak.RotationUtils;
@@ -86,8 +76,6 @@
import javax.inject.Inject;
import javax.inject.Singleton;
-import dagger.Lazy;
-
/**
* An overlay that draws screen decorations in software (e.g for rounded corners or display cutout)
* for antialiasing and emulation purposes.
@@ -102,7 +90,6 @@
private static final boolean DEBUG_SCREENSHOT_ROUNDED_CORNERS =
SystemProperties.getBoolean("debug.screenshot_rounded_corners", false);
private static final boolean VERBOSE = false;
- private final Lazy<StatusBar> mStatusBarLazy;
private DisplayManager mDisplayManager;
private final BroadcastDispatcher mBroadcastDispatcher;
@@ -146,12 +133,10 @@
@Inject
public ScreenDecorations(Context context,
- Lazy<StatusBar> statusBarLazy,
@Main Handler handler,
BroadcastDispatcher broadcastDispatcher,
TunerService tunerService) {
super(context);
- mStatusBarLazy = statusBarLazy;
mMainHandler = handler;
mBroadcastDispatcher = broadcastDispatcher;
mTunerService = tunerService;
@@ -161,7 +146,6 @@
public void start() {
mHandler = startHandlerThread();
mHandler.post(this::startOnScreenDecorationsThread);
- setupStatusBarPaddingIfNeeded();
}
@VisibleForTesting
@@ -440,42 +424,6 @@
com.android.internal.R.bool.config_fillMainBuiltInDisplayCutout);
}
-
- private void setupStatusBarPaddingIfNeeded() {
- // TODO: This should be moved to a more appropriate place, as it is not related to the
- // screen decorations overlay.
- int padding = mContext.getResources().getDimensionPixelSize(
- R.dimen.rounded_corner_content_padding);
- if (padding != 0) {
- setupStatusBarPadding(padding);
- }
-
- }
-
- private void setupStatusBarPadding(int padding) {
- // Add some padding to all the content near the edge of the screen.
- StatusBar statusBar = mStatusBarLazy.get();
- final View notificationShadeWindowView = statusBar.getNotificationShadeWindowView();
- if (notificationShadeWindowView != null) {
- TunablePadding.addTunablePadding(
- notificationShadeWindowView.findViewById(R.id.keyguard_header),
- PADDING, padding, FLAG_END);
-
- final FragmentHostManager fragmentHostManager =
- FragmentHostManager.get(notificationShadeWindowView);
- fragmentHostManager.addTagListener(QS.TAG,
- new TunablePaddingTagListener(padding, R.id.header));
- }
-
- final View statusBarWindow = statusBar.getStatusBarWindow();
- if (statusBarWindow != null) {
- final FragmentHostManager fragmentHostManager =
- FragmentHostManager.get(statusBarWindow);
- fragmentHostManager.addTagListener(CollapsedStatusBarFragment.TAG,
- new TunablePaddingTagListener(padding, R.id.status_bar));
- }
- }
-
@VisibleForTesting
WindowManager.LayoutParams getWindowLayoutParams() {
final WindowManager.LayoutParams lp = new WindowManager.LayoutParams(
@@ -566,32 +514,6 @@
view.setLayoutParams(params);
}
- @VisibleForTesting
- static class TunablePaddingTagListener implements FragmentListener {
-
- private final int mPadding;
- private final int mId;
- private TunablePadding mTunablePadding;
-
- public TunablePaddingTagListener(int padding, int id) {
- mPadding = padding;
- mId = id;
- }
-
- @Override
- public void onFragmentViewCreated(String tag, Fragment fragment) {
- if (mTunablePadding != null) {
- mTunablePadding.destroy();
- }
- View view = fragment.getView();
- if (mId != 0) {
- view = view.findViewById(mId);
- }
- mTunablePadding = TunablePadding.addTunablePadding(view, PADDING, mPadding,
- FLAG_START | FLAG_END);
- }
- }
-
public static class DisplayCutoutView extends View implements DisplayManager.DisplayListener,
RegionInterceptableView {
@@ -763,11 +685,11 @@
return false;
}
if (mStart) {
- return displayCutout.getSafeInsetLeft() > 0
- || displayCutout.getSafeInsetTop() > 0;
+ return !displayCutout.getBoundingRectLeft().isEmpty()
+ || !displayCutout.getBoundingRectTop().isEmpty();
} else {
- return displayCutout.getSafeInsetRight() > 0
- || displayCutout.getSafeInsetBottom() > 0;
+ return !displayCutout.getBoundingRectRight().isEmpty()
+ || !displayCutout.getBoundingRectBottom().isEmpty();
}
}
@@ -809,15 +731,15 @@
private int getGravity(DisplayCutout displayCutout) {
if (mStart) {
- if (displayCutout.getSafeInsetLeft() > 0) {
+ if (!displayCutout.getBoundingRectLeft().isEmpty()) {
return Gravity.LEFT;
- } else if (displayCutout.getSafeInsetTop() > 0) {
+ } else if (!displayCutout.getBoundingRectTop().isEmpty()) {
return Gravity.TOP;
}
} else {
- if (displayCutout.getSafeInsetRight() > 0) {
+ if (!displayCutout.getBoundingRectRight().isEmpty()) {
return Gravity.RIGHT;
- } else if (displayCutout.getSafeInsetBottom() > 0) {
+ } else if (!displayCutout.getBoundingRectBottom().isEmpty()) {
return Gravity.BOTTOM;
}
}
diff --git a/packages/SystemUI/src/com/android/systemui/bubbles/BubbleController.java b/packages/SystemUI/src/com/android/systemui/bubbles/BubbleController.java
index 762e5f2..1f94dbd 100644
--- a/packages/SystemUI/src/com/android/systemui/bubbles/BubbleController.java
+++ b/packages/SystemUI/src/com/android/systemui/bubbles/BubbleController.java
@@ -72,9 +72,7 @@
import com.android.systemui.DumpController;
import com.android.systemui.Dumpable;
import com.android.systemui.R;
-import com.android.systemui.bubbles.BubbleController.BubbleExpandListener;
-import com.android.systemui.bubbles.BubbleController.BubbleStateChangeListener;
-import com.android.systemui.bubbles.BubbleController.NotifCallback;
+import com.android.systemui.bubbles.dagger.BubbleModule;
import com.android.systemui.plugins.statusbar.StatusBarStateController;
import com.android.systemui.shared.system.ActivityManagerWrapper;
import com.android.systemui.shared.system.PinnedStackListenerForwarder;
@@ -105,16 +103,12 @@
import java.util.HashSet;
import java.util.List;
-import javax.inject.Inject;
-import javax.inject.Singleton;
-
/**
* Bubbles are a special type of content that can "float" on top of other apps or System UI.
* Bubbles can be expanded to show more content.
*
* The controller manages addition, removal, and visible state of bubbles on screen.
*/
-@Singleton
public class BubbleController implements ConfigurationController.ConfigurationListener, Dumpable {
private static final String TAG = TAG_WITH_CLASS_NAME ? "BubbleController" : TAG_BUBBLES;
@@ -277,7 +271,6 @@
}
}
- @Inject
public BubbleController(Context context,
NotificationShadeWindowController notificationShadeWindowController,
StatusBarStateController statusBarStateController,
@@ -298,6 +291,9 @@
notifPipeline, featureFlags, dumpController);
}
+ /**
+ * Injected constructor. See {@link BubbleModule}.
+ */
public BubbleController(Context context,
NotificationShadeWindowController notificationShadeWindowController,
StatusBarStateController statusBarStateController,
diff --git a/packages/SystemUI/src/com/android/systemui/bubbles/dagger/BubbleModule.java b/packages/SystemUI/src/com/android/systemui/bubbles/dagger/BubbleModule.java
new file mode 100644
index 0000000..0337ee3
--- /dev/null
+++ b/packages/SystemUI/src/com/android/systemui/bubbles/dagger/BubbleModule.java
@@ -0,0 +1,81 @@
+/*
+ * Copyright (C) 2020 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT 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.bubbles.dagger;
+
+import android.content.Context;
+
+import com.android.systemui.DumpController;
+import com.android.systemui.bubbles.BubbleController;
+import com.android.systemui.bubbles.BubbleData;
+import com.android.systemui.plugins.statusbar.StatusBarStateController;
+import com.android.systemui.statusbar.FeatureFlags;
+import com.android.systemui.statusbar.NotificationLockscreenUserManager;
+import com.android.systemui.statusbar.notification.NotificationEntryManager;
+import com.android.systemui.statusbar.notification.NotificationInterruptionStateProvider;
+import com.android.systemui.statusbar.notification.collection.NotifPipeline;
+import com.android.systemui.statusbar.phone.NotificationGroupManager;
+import com.android.systemui.statusbar.phone.NotificationShadeWindowController;
+import com.android.systemui.statusbar.phone.ShadeController;
+import com.android.systemui.statusbar.policy.ConfigurationController;
+import com.android.systemui.statusbar.policy.ZenModeController;
+
+import javax.inject.Singleton;
+
+import dagger.Module;
+import dagger.Provides;
+
+/** */
+@Module
+public interface BubbleModule {
+
+ /**
+ */
+ @Singleton
+ @Provides
+ static BubbleController newBubbleController(
+ Context context,
+ NotificationShadeWindowController notificationShadeWindowController,
+ StatusBarStateController statusBarStateController,
+ ShadeController shadeController,
+ BubbleData data,
+ ConfigurationController configurationController,
+ NotificationInterruptionStateProvider interruptionStateProvider,
+ ZenModeController zenModeController,
+ NotificationLockscreenUserManager notifUserManager,
+ NotificationGroupManager groupManager,
+ NotificationEntryManager entryManager,
+ NotifPipeline notifPipeline,
+ FeatureFlags featureFlags,
+ DumpController dumpController) {
+ return new BubbleController(
+ context,
+ notificationShadeWindowController,
+ statusBarStateController,
+ shadeController,
+ data,
+ /* synchronizer */null,
+ configurationController,
+ interruptionStateProvider,
+ zenModeController,
+ notifUserManager,
+ groupManager,
+ entryManager,
+ notifPipeline,
+ featureFlags,
+ dumpController);
+ }
+}
diff --git a/packages/SystemUI/src/com/android/systemui/controls/controller/ControlsProviderLifecycleManager.kt b/packages/SystemUI/src/com/android/systemui/controls/controller/ControlsProviderLifecycleManager.kt
index e09d20b..9ec71c7 100644
--- a/packages/SystemUI/src/com/android/systemui/controls/controller/ControlsProviderLifecycleManager.kt
+++ b/packages/SystemUI/src/com/android/systemui/controls/controller/ControlsProviderLifecycleManager.kt
@@ -86,7 +86,7 @@
private const val MSG_ACTION = 2
private const val MSG_UNBIND = 3
private const val BIND_RETRY_DELAY = 1000L // ms
- private const val LOAD_TIMEOUT = 5000L // ms
+ private const val LOAD_TIMEOUT_SECONDS = 30L // seconds
private const val MAX_BIND_RETRIES = 5
private const val MAX_CONTROLS_REQUEST = 100000L
private const val DEBUG = true
@@ -231,7 +231,7 @@
// Don't accept load callbacks after this
lastLoadCallback = null
unbindService()
- }, LOAD_TIMEOUT, TimeUnit.MILLISECONDS)
+ }, LOAD_TIMEOUT_SECONDS, TimeUnit.SECONDS)
invokeOrQueue(::load, Message.Load)
}
diff --git a/packages/SystemUI/src/com/android/systemui/controls/ui/Behavior.kt b/packages/SystemUI/src/com/android/systemui/controls/ui/Behavior.kt
index 44f3fbc..275c778 100644
--- a/packages/SystemUI/src/com/android/systemui/controls/ui/Behavior.kt
+++ b/packages/SystemUI/src/com/android/systemui/controls/ui/Behavior.kt
@@ -16,6 +16,20 @@
package com.android.systemui.controls.ui
+/**
+ * All controls need to respond to changes in state and handle user-generated events.
+ * Implementations of this interface provide these different means by adding their own
+ * event handlers, and will update the control ui as they see fit.
+ */
interface Behavior {
- fun apply(cvh: ControlViewHolder, cws: ControlWithState)
+
+ /**
+ * Only called once per instance
+ */
+ fun initialize(cvh: ControlViewHolder)
+
+ /**
+ * Will be invoked on every update provided to the Control
+ */
+ fun bind(cws: ControlWithState)
}
diff --git a/packages/SystemUI/src/com/android/systemui/controls/ui/ControlViewHolder.kt b/packages/SystemUI/src/com/android/systemui/controls/ui/ControlViewHolder.kt
index aec20751..feaea7c 100644
--- a/packages/SystemUI/src/com/android/systemui/controls/ui/ControlViewHolder.kt
+++ b/packages/SystemUI/src/com/android/systemui/controls/ui/ControlViewHolder.kt
@@ -37,6 +37,8 @@
import com.android.systemui.util.concurrency.DelayableExecutor
import com.android.systemui.R
+import kotlin.reflect.KClass
+
private const val UPDATE_DELAY_IN_MILLIS = 3000L
class ControlViewHolder(
@@ -54,6 +56,7 @@
val clipLayer: ClipDrawable
lateinit var cws: ControlWithState
var cancelUpdate: Runnable? = null
+ var behavior: Behavior? = null
init {
val ld = layout.getBackground() as LayerDrawable
@@ -83,7 +86,14 @@
})
}
- findBehavior(status, template).apply(this, cws)
+ val clazz = findBehavior(status, template)
+ if (behavior == null || behavior!!::class != clazz) {
+ // Behavior changes can signal a change in template from the app or
+ // first time setup
+ behavior = clazz.java.newInstance()
+ behavior?.initialize(this)
+ }
+ behavior?.bind(cws)
}
fun actionResponse(@ControlAction.ResponseResult response: Int) {
@@ -115,21 +125,14 @@
controlsController.action(cws.ci, action)
}
- private fun findBehavior(status: Int, template: ControlTemplate): Behavior {
+ private fun findBehavior(status: Int, template: ControlTemplate): KClass<out Behavior> {
return when {
- status == Control.STATUS_UNKNOWN -> UnknownBehavior()
- template is ToggleTemplate -> ToggleBehavior()
- template is ToggleRangeTemplate -> ToggleRangeBehavior()
- template is TemperatureControlTemplate -> TemperatureControlBehavior()
- template is ThumbnailTemplate -> StaticBehavior(uiExecutor, bgExecutor)
- else -> {
- object : Behavior {
- override fun apply(cvh: ControlViewHolder, cws: ControlWithState) {
- cvh.status.setText(cws.control?.getStatusText())
- cvh.applyRenderInfo(RenderInfo.lookup(cws.ci.deviceType, false))
- }
- }
- }
+ status == Control.STATUS_UNKNOWN -> UnknownBehavior::class
+ template is ToggleTemplate -> ToggleBehavior::class
+ template is ToggleRangeTemplate -> ToggleRangeBehavior::class
+ template is TemperatureControlTemplate -> TemperatureControlBehavior::class
+ template is ThumbnailTemplate -> StaticBehavior::class
+ else -> DefaultBehavior::class
}
}
@@ -142,9 +145,12 @@
icon.setImageIcon(Icon.createWithResource(context, ri.iconResourceId))
icon.setImageTintList(fg)
- clipLayer.getDrawable().setTintBlendMode(BlendMode.HUE)
- clipLayer.getDrawable().setTintList(bg)
+ clipLayer.getDrawable().apply {
+ setTintBlendMode(BlendMode.HUE)
+ setTintList(bg)
+ }
}
+
fun setEnabled(enabled: Boolean) {
status.setEnabled(enabled)
icon.setEnabled(enabled)
diff --git a/packages/SystemUI/src/com/android/systemui/controls/ui/DefaultBehavior.kt b/packages/SystemUI/src/com/android/systemui/controls/ui/DefaultBehavior.kt
new file mode 100644
index 0000000..1747929
--- /dev/null
+++ b/packages/SystemUI/src/com/android/systemui/controls/ui/DefaultBehavior.kt
@@ -0,0 +1,31 @@
+/*
+ * Copyright (C) 2020 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT 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.controls.ui
+
+class DefaultBehavior : Behavior {
+ lateinit var cvh: ControlViewHolder
+
+ override fun initialize(cvh: ControlViewHolder) {
+ this.cvh = cvh
+ }
+
+ override fun bind(cws: ControlWithState) {
+ cvh.status.setText(cws.control?.getStatusText() ?: "")
+ cvh.setEnabled(false)
+ cvh.applyRenderInfo(RenderInfo.lookup(cws.ci.deviceType, false))
+ }
+}
diff --git a/packages/SystemUI/src/com/android/systemui/controls/ui/StaticBehavior.kt b/packages/SystemUI/src/com/android/systemui/controls/ui/StaticBehavior.kt
index 340cdc0..c006d6f 100644
--- a/packages/SystemUI/src/com/android/systemui/controls/ui/StaticBehavior.kt
+++ b/packages/SystemUI/src/com/android/systemui/controls/ui/StaticBehavior.kt
@@ -24,20 +24,20 @@
import com.android.systemui.R
import com.android.systemui.controls.ui.ControlActionCoordinator.MAX_LEVEL
-import java.util.concurrent.Executor
-
/**
* Used for controls that cannot be interacted with. Information is presented to the user
* but no actions can be taken. If using a ThumbnailTemplate, the background image will
* be changed.
*/
-class StaticBehavior(
- val uiExecutor: Executor,
- val bgExecutor: Executor
-) : Behavior {
+class StaticBehavior() : Behavior {
lateinit var control: Control
+ lateinit var cvh: ControlViewHolder
- override fun apply(cvh: ControlViewHolder, cws: ControlWithState) {
+ override fun initialize(cvh: ControlViewHolder) {
+ this.cvh = cvh
+ }
+
+ override fun bind(cws: ControlWithState) {
this.control = cws.control!!
cvh.status.setText(control.getStatusText())
@@ -51,12 +51,12 @@
val template = control.getControlTemplate()
if (template is ThumbnailTemplate) {
- bgExecutor.execute {
+ cvh.bgExecutor.execute {
// clear the default tinting in favor of only using alpha
val drawable = template.getThumbnail().loadDrawable(cvh.context)
drawable.setTintList(null)
drawable.setAlpha((0.45 * 255).toInt())
- uiExecutor.execute {
+ cvh.uiExecutor.execute {
val radius = cvh.context.getResources()
.getDimensionPixelSize(R.dimen.control_corner_radius).toFloat()
clipLayer.setDrawable(CornerDrawable(drawable, radius))
diff --git a/packages/SystemUI/src/com/android/systemui/controls/ui/TemperatureControlBehavior.kt b/packages/SystemUI/src/com/android/systemui/controls/ui/TemperatureControlBehavior.kt
index 7661c6f..239d2e5 100644
--- a/packages/SystemUI/src/com/android/systemui/controls/ui/TemperatureControlBehavior.kt
+++ b/packages/SystemUI/src/com/android/systemui/controls/ui/TemperatureControlBehavior.kt
@@ -16,12 +16,10 @@
package com.android.systemui.controls.ui
-import android.content.Context
import android.graphics.drawable.Drawable
import android.graphics.drawable.LayerDrawable
import android.service.controls.Control
import android.service.controls.templates.TemperatureControlTemplate
-import android.widget.TextView
import com.android.systemui.R
import com.android.systemui.controls.ui.ControlActionCoordinator.MIN_LEVEL
@@ -32,15 +30,15 @@
lateinit var control: Control
lateinit var cvh: ControlViewHolder
lateinit var template: TemperatureControlTemplate
- lateinit var status: TextView
- lateinit var context: Context
- override fun apply(cvh: ControlViewHolder, cws: ControlWithState) {
- this.control = cws.control!!
+ override fun initialize(cvh: ControlViewHolder) {
this.cvh = cvh
- status = cvh.status
+ }
- status.setText(control.getStatusText())
+ override fun bind(cws: ControlWithState) {
+ this.control = cws.control!!
+
+ cvh.status.setText(control.getStatusText())
val ld = cvh.layout.getBackground() as LayerDrawable
clipLayer = ld.findDrawableByLayerId(R.id.clip_layer)
diff --git a/packages/SystemUI/src/com/android/systemui/controls/ui/ToggleBehavior.kt b/packages/SystemUI/src/com/android/systemui/controls/ui/ToggleBehavior.kt
index 4c35d26..d306d7c 100644
--- a/packages/SystemUI/src/com/android/systemui/controls/ui/ToggleBehavior.kt
+++ b/packages/SystemUI/src/com/android/systemui/controls/ui/ToggleBehavior.kt
@@ -16,11 +16,9 @@
package com.android.systemui.controls.ui
-import android.content.Context
import android.graphics.drawable.Drawable
import android.graphics.drawable.LayerDrawable
import android.view.View
-import android.widget.TextView
import android.service.controls.Control
import android.service.controls.templates.ToggleTemplate
@@ -33,21 +31,21 @@
lateinit var template: ToggleTemplate
lateinit var control: Control
lateinit var cvh: ControlViewHolder
- lateinit var context: Context
- lateinit var status: TextView
- override fun apply(cvh: ControlViewHolder, cws: ControlWithState) {
- this.control = cws.control!!
+ override fun initialize(cvh: ControlViewHolder) {
this.cvh = cvh
- status = cvh.status
-
- status.setText(control.getStatusText())
-
- template = control.getControlTemplate() as ToggleTemplate
+ cvh.setEnabled(false)
cvh.layout.setOnClickListener(View.OnClickListener() {
ControlActionCoordinator.toggle(cvh, template.getTemplateId(), template.isChecked())
})
+ }
+
+ override fun bind(cws: ControlWithState) {
+ this.control = cws.control!!
+
+ cvh.status.setText(control.getStatusText())
+ template = control.getControlTemplate() as ToggleTemplate
val ld = cvh.layout.getBackground() as LayerDrawable
clipLayer = ld.findDrawableByLayerId(R.id.clip_layer)
diff --git a/packages/SystemUI/src/com/android/systemui/controls/ui/ToggleRangeBehavior.kt b/packages/SystemUI/src/com/android/systemui/controls/ui/ToggleRangeBehavior.kt
index 8d65ca3..45d7397 100644
--- a/packages/SystemUI/src/com/android/systemui/controls/ui/ToggleRangeBehavior.kt
+++ b/packages/SystemUI/src/com/android/systemui/controls/ui/ToggleRangeBehavior.kt
@@ -51,17 +51,13 @@
private const val DEFAULT_FORMAT = "%.1f"
}
- override fun apply(cvh: ControlViewHolder, cws: ControlWithState) {
- this.control = cws.control!!
+ override fun initialize(cvh: ControlViewHolder) {
this.cvh = cvh
-
- statusExtra = cvh.statusExtra
status = cvh.status
-
- status.setText(control.getStatusText())
-
context = status.getContext()
+ cvh.setEnabled(false)
+
val gestureListener = ToggleRangeGestureListener(cvh.layout)
val gestureDetector = GestureDetector(context, gestureListener)
cvh.layout.setOnTouchListener({ v: View, e: MotionEvent ->
@@ -77,6 +73,13 @@
return@setOnTouchListener false
})
+ }
+
+ override fun bind(cws: ControlWithState) {
+ this.control = cws.control!!
+
+ statusExtra = cvh.statusExtra
+ status.setText(control.getStatusText())
val ld = cvh.layout.getBackground() as LayerDrawable
clipLayer = ld.findDrawableByLayerId(R.id.clip_layer)
diff --git a/packages/SystemUI/src/com/android/systemui/controls/ui/UnknownBehavior.kt b/packages/SystemUI/src/com/android/systemui/controls/ui/UnknownBehavior.kt
index 27f1b33..1f33b85 100644
--- a/packages/SystemUI/src/com/android/systemui/controls/ui/UnknownBehavior.kt
+++ b/packages/SystemUI/src/com/android/systemui/controls/ui/UnknownBehavior.kt
@@ -17,7 +17,13 @@
package com.android.systemui.controls.ui
class UnknownBehavior : Behavior {
- override fun apply(cvh: ControlViewHolder, cws: ControlWithState) {
+ lateinit var cvh: ControlViewHolder
+
+ override fun initialize(cvh: ControlViewHolder) {
+ this.cvh = cvh
+ }
+
+ override fun bind(cws: ControlWithState) {
cvh.status.setText(cvh.context.getString(com.android.internal.R.string.loading))
cvh.setEnabled(false)
cvh.applyRenderInfo(RenderInfo.lookup(cws.ci.deviceType, false))
diff --git a/packages/SystemUI/src/com/android/systemui/dagger/DependencyProvider.java b/packages/SystemUI/src/com/android/systemui/dagger/DependencyProvider.java
index bf501ce..7c0033c 100644
--- a/packages/SystemUI/src/com/android/systemui/dagger/DependencyProvider.java
+++ b/packages/SystemUI/src/com/android/systemui/dagger/DependencyProvider.java
@@ -27,7 +27,6 @@
import android.os.ServiceManager;
import android.util.DisplayMetrics;
import android.view.Choreographer;
-import android.view.IWindowManager;
import android.view.LayoutInflater;
import android.view.WindowManager;
@@ -46,8 +45,6 @@
import com.android.systemui.shared.system.DevicePolicyManagerWrapper;
import com.android.systemui.statusbar.CommandQueue;
import com.android.systemui.statusbar.NavigationBarController;
-import com.android.systemui.statusbar.NotificationRemoteInputManager;
-import com.android.systemui.statusbar.phone.AutoHideController;
import com.android.systemui.statusbar.phone.ConfigurationControllerImpl;
import com.android.systemui.statusbar.policy.ConfigurationController;
import com.android.systemui.statusbar.policy.DataSaverController;
@@ -162,16 +159,6 @@
@Singleton
@Provides
- public AutoHideController provideAutoHideController(Context context,
- @Main Handler mainHandler,
- NotificationRemoteInputManager notificationRemoteInputManager,
- IWindowManager iWindowManager) {
- return new AutoHideController(context, mainHandler, notificationRemoteInputManager,
- iWindowManager);
- }
-
- @Singleton
- @Provides
public ActivityManagerWrapper provideActivityManagerWrapper() {
return ActivityManagerWrapper.getInstance();
}
diff --git a/packages/SystemUI/src/com/android/systemui/dagger/SystemUIBinder.java b/packages/SystemUI/src/com/android/systemui/dagger/SystemUIBinder.java
index 5de88e1..413a522 100644
--- a/packages/SystemUI/src/com/android/systemui/dagger/SystemUIBinder.java
+++ b/packages/SystemUI/src/com/android/systemui/dagger/SystemUIBinder.java
@@ -24,17 +24,19 @@
import com.android.systemui.accessibility.SystemActions;
import com.android.systemui.accessibility.WindowMagnification;
import com.android.systemui.biometrics.AuthController;
+import com.android.systemui.bubbles.dagger.BubbleModule;
import com.android.systemui.globalactions.GlobalActionsComponent;
import com.android.systemui.keyguard.KeyguardViewMediator;
+import com.android.systemui.keyguard.dagger.KeyguardModule;
import com.android.systemui.pip.PipUI;
import com.android.systemui.power.PowerUI;
import com.android.systemui.recents.Recents;
import com.android.systemui.recents.RecentsModule;
import com.android.systemui.shortcut.ShortcutKeyDispatcher;
import com.android.systemui.stackdivider.Divider;
+import com.android.systemui.statusbar.dagger.StatusBarModule;
import com.android.systemui.statusbar.notification.InstantAppNotifier;
import com.android.systemui.statusbar.phone.StatusBar;
-import com.android.systemui.statusbar.phone.StatusBarModule;
import com.android.systemui.statusbar.tv.TvStatusBar;
import com.android.systemui.theme.ThemeOverlayController;
import com.android.systemui.toast.ToastUI;
@@ -49,7 +51,8 @@
/**
* SystemUI objects that are injectable should go here.
*/
-@Module(includes = {RecentsModule.class, StatusBarModule.class})
+@Module(includes = {RecentsModule.class, StatusBarModule.class, BubbleModule.class,
+ KeyguardModule.class})
public abstract class SystemUIBinder {
/** Inject into AuthController. */
@Binds
@@ -142,7 +145,7 @@
@ClassKey(StatusBar.class)
public abstract SystemUI bindsStatusBar(StatusBar sysui);
- /** Inject into SystemActions. */
+ /** Inject into SystemActions. */
@Binds
@IntoMap
@ClassKey(SystemActions.class)
diff --git a/packages/SystemUI/src/com/android/systemui/dagger/SystemUIModule.java b/packages/SystemUI/src/com/android/systemui/dagger/SystemUIModule.java
index 91aeb22..030b504 100644
--- a/packages/SystemUI/src/com/android/systemui/dagger/SystemUIModule.java
+++ b/packages/SystemUI/src/com/android/systemui/dagger/SystemUIModule.java
@@ -35,10 +35,8 @@
import com.android.systemui.statusbar.CommandQueue;
import com.android.systemui.statusbar.NotificationShadeWindowBlurController;
import com.android.systemui.statusbar.SysuiStatusBarStateController;
-import com.android.systemui.statusbar.notification.NotificationEntryManager;
import com.android.systemui.statusbar.notification.collection.inflation.NotificationRowBinder;
import com.android.systemui.statusbar.notification.collection.inflation.NotificationRowBinderImpl;
-import com.android.systemui.statusbar.notification.dagger.NotificationsModule;
import com.android.systemui.statusbar.notification.people.PeopleHubModule;
import com.android.systemui.statusbar.notification.row.dagger.ExpandableNotificationRowComponent;
import com.android.systemui.statusbar.notification.row.dagger.NotificationRowComponent;
@@ -69,7 +67,6 @@
AssistModule.class,
ConcurrencyModule.class,
LogModule.class,
- NotificationsModule.class,
PeopleHubModule.class,
},
subcomponents = {StatusBarComponent.class,
diff --git a/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java b/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java
index 83a6d75..b1db7df 100644
--- a/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java
+++ b/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java
@@ -86,6 +86,7 @@
import com.android.systemui.SystemUIFactory;
import com.android.systemui.broadcast.BroadcastDispatcher;
import com.android.systemui.dagger.qualifiers.UiBackground;
+import com.android.systemui.keyguard.dagger.KeyguardModule;
import com.android.systemui.plugins.FalsingManager;
import com.android.systemui.statusbar.phone.BiometricUnlockController;
import com.android.systemui.statusbar.phone.KeyguardBypassController;
@@ -100,9 +101,6 @@
import java.util.ArrayList;
import java.util.concurrent.Executor;
-import javax.inject.Inject;
-import javax.inject.Singleton;
-
import dagger.Lazy;
/**
@@ -146,7 +144,6 @@
* directly to the keyguard UI is posted to a {@link android.os.Handler} to ensure it is taken on the UI
* thread of the keyguard.
*/
-@Singleton
public class KeyguardViewMediator extends SystemUI {
private static final int KEYGUARD_DISPLAY_TIMEOUT_DELAY_DEFAULT = 30000;
private static final long KEYGUARD_DONE_PENDING_TIMEOUT_MS = 3000;
@@ -688,7 +685,9 @@
}
};
- @Inject
+ /**
+ * Injected constructor. See {@link KeyguardModule}.
+ */
public KeyguardViewMediator(
Context context,
FalsingManager falsingManager,
diff --git a/packages/SystemUI/src/com/android/systemui/keyguard/dagger/KeyguardModule.java b/packages/SystemUI/src/com/android/systemui/keyguard/dagger/KeyguardModule.java
new file mode 100644
index 0000000..2c023ca
--- /dev/null
+++ b/packages/SystemUI/src/com/android/systemui/keyguard/dagger/KeyguardModule.java
@@ -0,0 +1,68 @@
+/*
+ * Copyright (C) 2020 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT 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.keyguard.dagger;
+
+import android.content.Context;
+
+import com.android.internal.widget.LockPatternUtils;
+import com.android.systemui.broadcast.BroadcastDispatcher;
+import com.android.systemui.dagger.qualifiers.UiBackground;
+import com.android.systemui.keyguard.DismissCallbackRegistry;
+import com.android.systemui.keyguard.KeyguardViewMediator;
+import com.android.systemui.plugins.FalsingManager;
+import com.android.systemui.statusbar.phone.NotificationShadeWindowController;
+import com.android.systemui.statusbar.phone.StatusBar;
+import com.android.systemui.statusbar.phone.StatusBarKeyguardViewManager;
+
+import java.util.concurrent.Executor;
+
+import javax.inject.Singleton;
+
+import dagger.Lazy;
+import dagger.Module;
+import dagger.Provides;
+
+/**
+ * Dagger Module providing {@link StatusBar}.
+ */
+@Module
+public class KeyguardModule {
+ /**
+ * Provides our instance of KeyguardViewMediator which is considered optional.
+ */
+ @Provides
+ @Singleton
+ public static KeyguardViewMediator newKeyguardViewMediator(
+ Context context,
+ FalsingManager falsingManager,
+ LockPatternUtils lockPatternUtils,
+ BroadcastDispatcher broadcastDispatcher,
+ NotificationShadeWindowController notificationShadeWindowController,
+ Lazy<StatusBarKeyguardViewManager> statusBarKeyguardViewManagerLazy,
+ DismissCallbackRegistry dismissCallbackRegistry,
+ @UiBackground Executor uiBgExecutor) {
+ return new KeyguardViewMediator(
+ context,
+ falsingManager,
+ lockPatternUtils,
+ broadcastDispatcher,
+ notificationShadeWindowController,
+ statusBarKeyguardViewManagerLazy,
+ dismissCallbackRegistry,
+ uiBgExecutor);
+ }
+}
diff --git a/packages/SystemUI/src/com/android/systemui/model/SysUiState.java b/packages/SystemUI/src/com/android/systemui/model/SysUiState.java
index 029ab43..a827f59 100644
--- a/packages/SystemUI/src/com/android/systemui/model/SysUiState.java
+++ b/packages/SystemUI/src/com/android/systemui/model/SysUiState.java
@@ -19,6 +19,7 @@
import static android.view.Display.DEFAULT_DISPLAY;
import android.annotation.NonNull;
+import android.util.Log;
import com.android.systemui.Dumpable;
import com.android.systemui.shared.system.QuickStepContract;
@@ -37,6 +38,9 @@
@Singleton
public class SysUiState implements Dumpable {
+ private static final String TAG = SysUiState.class.getSimpleName();
+ public static final boolean DEBUG = true;
+
private @QuickStepContract.SystemUiStateFlags int mFlags;
private final List<SysUiStateCallback> mCallbacks = new ArrayList<>();
private int mFlagsToSet = 0;
@@ -76,6 +80,7 @@
private void updateFlags(int displayId) {
if (displayId != DEFAULT_DISPLAY) {
// Ignore non-default displays for now
+ Log.w(TAG, "Ignoring flag update for display: " + displayId, new Throwable());
return;
}
@@ -87,6 +92,9 @@
/** Notify all those who are registered that the state has changed. */
private void notifyAndSetSystemUiStateChanged(int newFlags, int oldFlags) {
+ if (DEBUG) {
+ Log.d(TAG, "SysUiState changed: old=" + oldFlags + " new=" + newFlags);
+ }
if (newFlags != oldFlags) {
mCallbacks.forEach(callback -> callback.onSystemUiStateChanged(newFlags));
mFlags = newFlags;
diff --git a/packages/SystemUI/src/com/android/systemui/qs/QuickStatusBarHeader.java b/packages/SystemUI/src/com/android/systemui/qs/QuickStatusBarHeader.java
index d4af154..8cd70cf 100644
--- a/packages/SystemUI/src/com/android/systemui/qs/QuickStatusBarHeader.java
+++ b/packages/SystemUI/src/com/android/systemui/qs/QuickStatusBarHeader.java
@@ -61,9 +61,9 @@
import com.android.systemui.plugins.DarkIconDispatcher.DarkReceiver;
import com.android.systemui.qs.QSDetail.Callback;
import com.android.systemui.statusbar.CommandQueue;
-import com.android.systemui.statusbar.phone.PhoneStatusBarView;
import com.android.systemui.statusbar.phone.StatusBarIconController;
import com.android.systemui.statusbar.phone.StatusBarIconController.TintedIconManager;
+import com.android.systemui.statusbar.phone.StatusBarWindowView;
import com.android.systemui.statusbar.phone.StatusIconContainer;
import com.android.systemui.statusbar.policy.Clock;
import com.android.systemui.statusbar.policy.DateView;
@@ -146,6 +146,7 @@
}
};
private boolean mHasTopCutout = false;
+ private int mRoundedCornerPadding = 0;
@Inject
public QuickStatusBarHeader(@Named(VIEW_CONTEXT) Context context, AttributeSet attrs,
@@ -325,6 +326,9 @@
Resources resources = mContext.getResources();
updateMinimumHeight();
+ mRoundedCornerPadding = resources.getDimensionPixelSize(
+ R.dimen.rounded_corner_content_padding);
+
// Update height for a few views, especially due to landscape mode restricting space.
mHeaderTextContainerView.getLayoutParams().height =
resources.getDimensionPixelSize(R.dimen.qs_header_tooltip_height);
@@ -432,16 +436,23 @@
@Override
public WindowInsets onApplyWindowInsets(WindowInsets insets) {
DisplayCutout cutout = insets.getDisplayCutout();
- Pair<Integer, Integer> padding = PhoneStatusBarView.cornerCutoutMargins(
- cutout, getDisplay());
- if (padding == null) {
- mSystemIconsView.setPaddingRelative(
- getResources().getDimensionPixelSize(R.dimen.status_bar_padding_start), 0,
- getResources().getDimensionPixelSize(R.dimen.status_bar_padding_end), 0);
- } else {
- mSystemIconsView.setPadding(padding.first, 0, padding.second, 0);
- }
+ // Handle padding of QuickStatusBarHeader
+ Pair<Integer, Integer> cornerCutoutPadding = StatusBarWindowView.cornerCutoutMargins(
+ cutout, getDisplay());
+ Pair<Integer, Integer> padding =
+ StatusBarWindowView.paddingNeededForCutoutAndRoundedCorner(
+ cutout, cornerCutoutPadding, mRoundedCornerPadding);
+ setPadding(padding.first, 0, padding.second, getPaddingBottom());
+
+ // Handle padding of SystemIconsView
+ final int waterfallTopInset = cutout == null ? 0 : cutout.getWaterfallInsets().top;
+ mSystemIconsView.setPaddingRelative(
+ getResources().getDimensionPixelSize(R.dimen.status_bar_padding_start),
+ waterfallTopInset,
+ getResources().getDimensionPixelSize(R.dimen.status_bar_padding_end),
+ 0);
+
return super.onApplyWindowInsets(insets);
}
diff --git a/packages/SystemUI/src/com/android/systemui/recents/OverviewProxyService.java b/packages/SystemUI/src/com/android/systemui/recents/OverviewProxyService.java
index fd484ef..34cad51 100644
--- a/packages/SystemUI/src/com/android/systemui/recents/OverviewProxyService.java
+++ b/packages/SystemUI/src/com/android/systemui/recents/OverviewProxyService.java
@@ -418,6 +418,9 @@
private final ServiceConnection mOverviewServiceConnection = new ServiceConnection() {
@Override
public void onServiceConnected(ComponentName name, IBinder service) {
+ if (SysUiState.DEBUG) {
+ Log.d(TAG_OPS, "Overview proxy service connected");
+ }
mConnectionBackoffAttempts = 0;
mHandler.removeCallbacks(mDeferredConnectionCallback);
try {
@@ -570,6 +573,10 @@
mNavBarController.getDefaultNavigationBarFragment();
final NavigationBarView navBarView =
mNavBarController.getNavigationBarView(mContext.getDisplayId());
+ if (SysUiState.DEBUG) {
+ Log.d(TAG_OPS, "Updating sysui state flags: navBarFragment=" + navBarFragment
+ + " navBarView=" + navBarView);
+ }
if (navBarFragment != null) {
navBarFragment.updateSystemUiStateFlags(-1);
@@ -584,6 +591,10 @@
}
private void notifySystemUiStateFlags(int flags) {
+ if (SysUiState.DEBUG) {
+ Log.d(TAG_OPS, "Notifying sysui state change to overview service: proxy="
+ + mOverviewProxy + " flags=" + flags);
+ }
try {
if (mOverviewProxy != null) {
mOverviewProxy.onSystemUiStateChanged(flags);
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/NotificationListener.java b/packages/SystemUI/src/com/android/systemui/statusbar/NotificationListener.java
index 4d6764e..b43fe73 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/NotificationListener.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/NotificationListener.java
@@ -31,20 +31,17 @@
import android.util.Log;
import com.android.systemui.dagger.qualifiers.Main;
+import com.android.systemui.statusbar.dagger.StatusBarModule;
import com.android.systemui.statusbar.phone.NotificationListenerWithPlugins;
import java.util.ArrayList;
import java.util.List;
-import javax.inject.Inject;
-import javax.inject.Singleton;
-
/**
* This class handles listening to notification updates and passing them along to
* NotificationPresenter to be displayed to the user.
*/
@SuppressLint("OverrideAbstract")
-@Singleton
public class NotificationListener extends NotificationListenerWithPlugins {
private static final String TAG = "NotificationListener";
@@ -54,7 +51,9 @@
private final List<NotificationHandler> mNotificationHandlers = new ArrayList<>();
private final ArrayList<NotificationSettingsListener> mSettingsListeners = new ArrayList<>();
- @Inject
+ /**
+ * Injected constructor. See {@link StatusBarModule}.
+ */
public NotificationListener(
Context context,
NotificationManager notificationManager,
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/NotificationMediaManager.java b/packages/SystemUI/src/com/android/systemui/statusbar/NotificationMediaManager.java
index a457266..d0af106 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/NotificationMediaManager.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/NotificationMediaManager.java
@@ -53,6 +53,7 @@
import com.android.systemui.Interpolators;
import com.android.systemui.colorextraction.SysuiColorExtractor;
import com.android.systemui.plugins.statusbar.StatusBarStateController;
+import com.android.systemui.statusbar.dagger.StatusBarModule;
import com.android.systemui.statusbar.notification.NotificationEntryListener;
import com.android.systemui.statusbar.notification.NotificationEntryManager;
import com.android.systemui.statusbar.notification.collection.NotificationEntry;
@@ -73,16 +74,12 @@
import java.util.List;
import java.util.Set;
-import javax.inject.Inject;
-import javax.inject.Singleton;
-
import dagger.Lazy;
/**
* Handles tasks and state related to media notifications. For example, there is a 'current' media
* notification, which this class keeps track of.
*/
-@Singleton
public class NotificationMediaManager implements Dumpable {
private static final String TAG = "NotificationMediaManager";
public static final boolean DEBUG_MEDIA = false;
@@ -101,11 +98,10 @@
PAUSED_MEDIA_STATES.add(PlaybackState.STATE_ERROR);
}
-
private final NotificationEntryManager mEntryManager;
@Nullable
- private Lazy<NotificationShadeWindowController> mStatusBarWindowController;
+ private Lazy<NotificationShadeWindowController> mNotificationShadeWindowController;
@Nullable
private BiometricUnlockController mBiometricUnlockController;
@@ -176,11 +172,13 @@
}
};
- @Inject
+ /**
+ * Injected constructor. See {@link StatusBarModule}.
+ */
public NotificationMediaManager(
Context context,
Lazy<StatusBar> statusBarLazy,
- Lazy<NotificationShadeWindowController> statusBarWindowController,
+ Lazy<NotificationShadeWindowController> notificationShadeWindowController,
NotificationEntryManager notificationEntryManager,
MediaArtworkProcessor mediaArtworkProcessor,
KeyguardBypassController keyguardBypassController) {
@@ -194,7 +192,7 @@
Context.MEDIA_SESSION_SERVICE);
// TODO: use KeyguardStateController#isOccluded to remove this dependency
mStatusBarLazy = statusBarLazy;
- mStatusBarWindowController = statusBarWindowController;
+ mNotificationShadeWindowController = notificationShadeWindowController;
mEntryManager = notificationEntryManager;
notificationEntryManager.addNotificationEntryListener(new NotificationEntryListener() {
@Override
@@ -525,7 +523,8 @@
}
}
- NotificationShadeWindowController windowController = mStatusBarWindowController.get();
+ NotificationShadeWindowController windowController =
+ mNotificationShadeWindowController.get();
boolean hideBecauseOccluded = mStatusBarLazy.get().isOccluded();
final boolean hasArtwork = artworkDrawable != null;
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/NotificationRemoteInputManager.java b/packages/SystemUI/src/com/android/systemui/statusbar/NotificationRemoteInputManager.java
index f3783c8..ebc2fa6 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/NotificationRemoteInputManager.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/NotificationRemoteInputManager.java
@@ -54,6 +54,7 @@
import com.android.systemui.R;
import com.android.systemui.dagger.qualifiers.Main;
import com.android.systemui.plugins.statusbar.StatusBarStateController;
+import com.android.systemui.statusbar.dagger.StatusBarModule;
import com.android.systemui.statusbar.notification.NotificationEntryListener;
import com.android.systemui.statusbar.notification.NotificationEntryManager;
import com.android.systemui.statusbar.notification.collection.NotificationEntry;
@@ -70,9 +71,6 @@
import java.util.Objects;
import java.util.Set;
-import javax.inject.Inject;
-import javax.inject.Singleton;
-
import dagger.Lazy;
/**
@@ -81,7 +79,6 @@
* interaction, keeping track of notifications to remove when NotificationPresenter is collapsed,
* and handling clicks on remote views.
*/
-@Singleton
public class NotificationRemoteInputManager implements Dumpable {
public static final boolean ENABLE_REMOTE_INPUT =
SystemProperties.getBoolean("debug.enable_remote_input", true);
@@ -257,7 +254,9 @@
}
};
- @Inject
+ /**
+ * Injected constructor. See {@link StatusBarModule}.
+ */
public NotificationRemoteInputManager(
Context context,
NotificationLockscreenUserManager lockscreenUserManager,
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/NotificationViewHierarchyManager.java b/packages/SystemUI/src/com/android/systemui/statusbar/NotificationViewHierarchyManager.java
index 37f9f88..7e70c20 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/NotificationViewHierarchyManager.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/NotificationViewHierarchyManager.java
@@ -29,6 +29,7 @@
import com.android.systemui.bubbles.BubbleController;
import com.android.systemui.dagger.qualifiers.Main;
import com.android.systemui.plugins.statusbar.StatusBarStateController;
+import com.android.systemui.statusbar.dagger.StatusBarModule;
import com.android.systemui.statusbar.notification.DynamicPrivacyController;
import com.android.systemui.statusbar.notification.NotificationEntryManager;
import com.android.systemui.statusbar.notification.VisualStabilityManager;
@@ -46,9 +47,6 @@
import java.util.List;
import java.util.Stack;
-import javax.inject.Inject;
-import javax.inject.Singleton;
-
/**
* NotificationViewHierarchyManager manages updating the view hierarchy of notification views based
* on their group structure. For example, if a notification becomes bundled with another,
@@ -56,7 +54,6 @@
* tell NotificationListContainer which notifications to display, and inform it of changes to those
* notifications that might affect their display.
*/
-@Singleton
public class NotificationViewHierarchyManager implements DynamicPrivacyController.Listener {
private static final String TAG = "NotificationViewHierarchyManager";
@@ -94,8 +91,12 @@
// the problem.
private boolean mIsHandleDynamicPrivacyChangeScheduled;
- @Inject
- public NotificationViewHierarchyManager(Context context, @Main Handler mainHandler,
+ /**
+ * Injected constructor. See {@link StatusBarModule}.
+ */
+ public NotificationViewHierarchyManager(
+ Context context,
+ @Main Handler mainHandler,
NotificationLockscreenUserManager notificationLockscreenUserManager,
NotificationGroupManager groupManager,
VisualStabilityManager visualStabilityManager,
@@ -104,8 +105,7 @@
KeyguardBypassController bypassController,
BubbleController bubbleController,
DynamicPrivacyController privacyController,
- ForegroundServiceSectionController fgsSectionController
- ) {
+ ForegroundServiceSectionController fgsSectionController) {
mContext = context;
mHandler = mainHandler;
mLockscreenUserManager = notificationLockscreenUserManager;
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/SmartReplyController.java b/packages/SystemUI/src/com/android/systemui/statusbar/SmartReplyController.java
index 40f8e39..bb96f42 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/SmartReplyController.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/SmartReplyController.java
@@ -21,27 +21,26 @@
import com.android.internal.statusbar.IStatusBarService;
import com.android.internal.statusbar.NotificationVisibility;
+import com.android.systemui.statusbar.dagger.StatusBarModule;
import com.android.systemui.statusbar.notification.NotificationEntryManager;
import com.android.systemui.statusbar.notification.collection.NotificationEntry;
import com.android.systemui.statusbar.notification.logging.NotificationLogger;
import java.util.Set;
-import javax.inject.Inject;
-import javax.inject.Singleton;
-
/**
* Handles when smart replies are added to a notification
* and clicked upon.
*/
-@Singleton
public class SmartReplyController {
private final IStatusBarService mBarService;
private final NotificationEntryManager mEntryManager;
private Set<String> mSendingKeys = new ArraySet<>();
private Callback mCallback;
- @Inject
+ /**
+ * Injected constructor. See {@link StatusBarModule}.
+ */
public SmartReplyController(NotificationEntryManager entryManager,
IStatusBarService statusBarService) {
mBarService = statusBarService;
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/StatusBarDependenciesModule.java b/packages/SystemUI/src/com/android/systemui/statusbar/StatusBarDependenciesModule.java
deleted file mode 100644
index 493482a..0000000
--- a/packages/SystemUI/src/com/android/systemui/statusbar/StatusBarDependenciesModule.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- * Copyright (C) 2019 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.android.systemui.statusbar;
-
-import android.content.Context;
-
-import com.android.systemui.statusbar.notification.row.NotificationRowModule;
-import com.android.systemui.recents.OverviewProxyService;
-import com.android.systemui.tracing.ProtoTracer;
-
-import javax.inject.Singleton;
-
-import dagger.Module;
-import dagger.Provides;
-
-/**
- * Dagger Module providing common dependencies of StatusBar.
- */
-@Module(includes = {NotificationRowModule.class})
-public class StatusBarDependenciesModule {
- /**
- * Provides our instance of CommandQueue which is considered optional.
- */
- @Provides
- @Singleton
- public CommandQueue provideCommandQueue(Context context, ProtoTracer protoTracer) {
- return new CommandQueue(context, protoTracer);
- }
-
-}
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/dagger/StatusBarDependenciesModule.java b/packages/SystemUI/src/com/android/systemui/statusbar/dagger/StatusBarDependenciesModule.java
new file mode 100644
index 0000000..0b37c22
--- /dev/null
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/dagger/StatusBarDependenciesModule.java
@@ -0,0 +1,157 @@
+/*
+ * Copyright (C) 2020 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT 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.dagger;
+
+import android.app.NotificationManager;
+import android.content.Context;
+import android.os.Handler;
+
+import com.android.internal.statusbar.IStatusBarService;
+import com.android.systemui.bubbles.BubbleController;
+import com.android.systemui.dagger.qualifiers.Main;
+import com.android.systemui.plugins.statusbar.StatusBarStateController;
+import com.android.systemui.statusbar.CommandQueue;
+import com.android.systemui.statusbar.MediaArtworkProcessor;
+import com.android.systemui.statusbar.NotificationListener;
+import com.android.systemui.statusbar.NotificationLockscreenUserManager;
+import com.android.systemui.statusbar.NotificationMediaManager;
+import com.android.systemui.statusbar.NotificationRemoteInputManager;
+import com.android.systemui.statusbar.NotificationViewHierarchyManager;
+import com.android.systemui.statusbar.SmartReplyController;
+import com.android.systemui.statusbar.notification.DynamicPrivacyController;
+import com.android.systemui.statusbar.notification.NotificationEntryManager;
+import com.android.systemui.statusbar.notification.VisualStabilityManager;
+import com.android.systemui.statusbar.notification.stack.ForegroundServiceSectionController;
+import com.android.systemui.statusbar.phone.KeyguardBypassController;
+import com.android.systemui.statusbar.phone.NotificationGroupManager;
+import com.android.systemui.statusbar.phone.NotificationShadeWindowController;
+import com.android.systemui.statusbar.phone.StatusBar;
+import com.android.systemui.statusbar.policy.RemoteInputUriController;
+import com.android.systemui.tracing.ProtoTracer;
+
+import javax.inject.Singleton;
+
+import dagger.Lazy;
+import dagger.Module;
+import dagger.Provides;
+
+/**
+ * This module provides instances needed to construct {@link StatusBar}. These are moved to this
+ * separate from {@link StatusBarModule} module so that components that wish to build their own
+ * version of StatusBar can include just dependencies, without injecting StatusBar itself.
+ */
+@Module
+public interface StatusBarDependenciesModule {
+ /** */
+ @Singleton
+ @Provides
+ static NotificationRemoteInputManager provideNotificationRemoteInputManager(
+ Context context,
+ NotificationLockscreenUserManager lockscreenUserManager,
+ SmartReplyController smartReplyController,
+ NotificationEntryManager notificationEntryManager,
+ Lazy<StatusBar> statusBarLazy,
+ StatusBarStateController statusBarStateController,
+ Handler mainHandler,
+ RemoteInputUriController remoteInputUriController) {
+ return new NotificationRemoteInputManager(
+ context,
+ lockscreenUserManager,
+ smartReplyController,
+ notificationEntryManager,
+ statusBarLazy,
+ statusBarStateController,
+ mainHandler,
+ remoteInputUriController);
+ }
+
+ /** */
+ @Singleton
+ @Provides
+ static NotificationMediaManager provideNotificationMediaManager(
+ Context context,
+ Lazy<StatusBar> statusBarLazy,
+ Lazy<NotificationShadeWindowController> notificationShadeWindowController,
+ NotificationEntryManager notificationEntryManager,
+ MediaArtworkProcessor mediaArtworkProcessor,
+ KeyguardBypassController keyguardBypassController) {
+ return new NotificationMediaManager(
+ context,
+ statusBarLazy,
+ notificationShadeWindowController,
+ notificationEntryManager,
+ mediaArtworkProcessor,
+ keyguardBypassController);
+ }
+
+ /** */
+ @Singleton
+ @Provides
+ static NotificationListener provideNotificationListener(
+ Context context,
+ NotificationManager notificationManager,
+ @Main Handler mainHandler) {
+ return new NotificationListener(
+ context, notificationManager, mainHandler);
+ }
+
+ /** */
+ @Singleton
+ @Provides
+ static SmartReplyController provideSmartReplyController(
+ NotificationEntryManager entryManager, IStatusBarService statusBarService) {
+ return new SmartReplyController(entryManager, statusBarService);
+ }
+
+ /** */
+ @Singleton
+ @Provides
+ static NotificationViewHierarchyManager provideNotificationViewHierarchyManager(
+ Context context,
+ @Main Handler mainHandler,
+ NotificationLockscreenUserManager notificationLockscreenUserManager,
+ NotificationGroupManager groupManager,
+ VisualStabilityManager visualStabilityManager,
+ StatusBarStateController statusBarStateController,
+ NotificationEntryManager notificationEntryManager,
+ KeyguardBypassController bypassController,
+ BubbleController bubbleController,
+ DynamicPrivacyController privacyController,
+ ForegroundServiceSectionController fgsSectionController) {
+ return new NotificationViewHierarchyManager(
+ context,
+ mainHandler,
+ notificationLockscreenUserManager,
+ groupManager,
+ visualStabilityManager,
+ statusBarStateController,
+ notificationEntryManager,
+ bypassController,
+ bubbleController,
+ privacyController,
+ fgsSectionController);
+ }
+
+ /**
+ * Provides our instance of CommandQueue which is considered optional.
+ */
+ @Provides
+ @Singleton
+ static CommandQueue provideCommandQueue(Context context, ProtoTracer protoTracer) {
+ return new CommandQueue(context, protoTracer);
+ }
+}
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/dagger/StatusBarModule.java b/packages/SystemUI/src/com/android/systemui/statusbar/dagger/StatusBarModule.java
new file mode 100644
index 0000000..ad5ef20
--- /dev/null
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/dagger/StatusBarModule.java
@@ -0,0 +1,29 @@
+/*
+ * Copyright (C) 2020 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT 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.dagger;
+
+import com.android.systemui.statusbar.notification.dagger.NotificationsModule;
+import com.android.systemui.statusbar.notification.row.NotificationRowModule;
+import com.android.systemui.statusbar.phone.dagger.StatusBarPhoneModule;
+
+import dagger.Module;
+
+/** */
+@Module(includes = {StatusBarPhoneModule.class, StatusBarDependenciesModule.class,
+ NotificationsModule.class, NotificationRowModule.class})
+public interface StatusBarModule {
+}
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/NotificationAlertingManager.java b/packages/SystemUI/src/com/android/systemui/statusbar/notification/NotificationAlertingManager.java
index d0e238a..72a7e11 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/NotificationAlertingManager.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/NotificationAlertingManager.java
@@ -28,13 +28,10 @@
import com.android.systemui.statusbar.NotificationListener;
import com.android.systemui.statusbar.NotificationRemoteInputManager;
import com.android.systemui.statusbar.notification.collection.NotificationEntry;
+import com.android.systemui.statusbar.notification.dagger.NotificationsModule;
import com.android.systemui.statusbar.policy.HeadsUpManager;
-import javax.inject.Inject;
-import javax.inject.Singleton;
-
/** Handles heads-up and pulsing behavior driven by notification changes. */
-@Singleton
public class NotificationAlertingManager {
private static final String TAG = "NotifAlertManager";
@@ -47,7 +44,9 @@
private HeadsUpManager mHeadsUpManager;
- @Inject
+ /**
+ * Injected constructor. See {@link NotificationsModule}.
+ */
public NotificationAlertingManager(
NotificationEntryManager notificationEntryManager,
NotificationRemoteInputManager remoteInputManager,
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/NotificationEntryManager.java b/packages/SystemUI/src/com/android/systemui/statusbar/notification/NotificationEntryManager.java
index b0bf813..4f55e02 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/NotificationEntryManager.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/NotificationEntryManager.java
@@ -47,6 +47,7 @@
import com.android.systemui.statusbar.notification.collection.inflation.NotificationRowBinder;
import com.android.systemui.statusbar.notification.collection.notifcollection.CommonNotifCollection;
import com.android.systemui.statusbar.notification.collection.notifcollection.NotifCollectionListener;
+import com.android.systemui.statusbar.notification.dagger.NotificationsModule;
import com.android.systemui.statusbar.notification.logging.NotificationLogger;
import com.android.systemui.statusbar.notification.stack.NotificationListContainer;
import com.android.systemui.statusbar.phone.NotificationGroupManager;
@@ -64,9 +65,6 @@
import java.util.Map;
import java.util.Set;
-import javax.inject.Inject;
-import javax.inject.Singleton;
-
import dagger.Lazy;
/**
@@ -94,7 +92,6 @@
* aware of
* @see #getActiveNotificationsForCurrentUser() to see every notification that the current user owns
*/
-@Singleton
public class NotificationEntryManager implements
CommonNotifCollection,
Dumpable,
@@ -181,7 +178,9 @@
}
}
- @Inject
+ /**
+ * Injected constructor. See {@link NotificationsModule}.
+ */
public NotificationEntryManager(
NotificationEntryManagerLogger logger,
NotificationGroupManager groupManager,
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/VisualStabilityManager.java b/packages/SystemUI/src/com/android/systemui/statusbar/notification/VisualStabilityManager.java
index 99718abb..616c110 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/VisualStabilityManager.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/VisualStabilityManager.java
@@ -26,6 +26,7 @@
import com.android.systemui.dagger.qualifiers.Main;
import com.android.systemui.statusbar.NotificationPresenter;
import com.android.systemui.statusbar.notification.collection.NotificationEntry;
+import com.android.systemui.statusbar.notification.dagger.NotificationsModule;
import com.android.systemui.statusbar.notification.row.ExpandableNotificationRow;
import com.android.systemui.statusbar.policy.OnHeadsUpChangedListener;
@@ -33,14 +34,10 @@
import java.io.PrintWriter;
import java.util.ArrayList;
-import javax.inject.Inject;
-import javax.inject.Singleton;
-
/**
* A manager that ensures that notifications are visually stable. It will suppress reorderings
* and reorder at the right time when they are out of view.
*/
-@Singleton
public class VisualStabilityManager implements OnHeadsUpChangedListener, Dumpable {
private static final long TEMPORARY_REORDERING_ALLOWED_DURATION = 1000;
@@ -60,7 +57,9 @@
private ArraySet<View> mAddedChildren = new ArraySet<>();
private boolean mPulsing;
- @Inject
+ /**
+ * Injected constructor. See {@link NotificationsModule}.
+ */
public VisualStabilityManager(
NotificationEntryManager notificationEntryManager, @Main Handler handler) {
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/dagger/NotificationsModule.java b/packages/SystemUI/src/com/android/systemui/statusbar/notification/dagger/NotificationsModule.java
index 39f4dfa..8f8f742 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/dagger/NotificationsModule.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/dagger/NotificationsModule.java
@@ -17,15 +17,39 @@
package com.android.systemui.statusbar.notification.dagger;
import android.content.Context;
+import android.os.Handler;
+import android.view.accessibility.AccessibilityManager;
+import com.android.internal.logging.MetricsLogger;
import com.android.systemui.R;
+import com.android.systemui.dagger.qualifiers.Main;
+import com.android.systemui.dagger.qualifiers.UiBackground;
+import com.android.systemui.plugins.statusbar.StatusBarStateController;
import com.android.systemui.statusbar.FeatureFlags;
+import com.android.systemui.statusbar.NotificationListener;
+import com.android.systemui.statusbar.NotificationRemoteInputManager;
+import com.android.systemui.statusbar.notification.ForegroundServiceDismissalFeatureController;
+import com.android.systemui.statusbar.notification.NotificationAlertingManager;
import com.android.systemui.statusbar.notification.NotificationEntryManager;
+import com.android.systemui.statusbar.notification.NotificationEntryManagerLogger;
+import com.android.systemui.statusbar.notification.NotificationInterruptionStateProvider;
+import com.android.systemui.statusbar.notification.VisualStabilityManager;
import com.android.systemui.statusbar.notification.collection.NotifPipeline;
+import com.android.systemui.statusbar.notification.collection.NotificationRankingManager;
+import com.android.systemui.statusbar.notification.collection.inflation.NotificationRowBinder;
import com.android.systemui.statusbar.notification.collection.notifcollection.CommonNotifCollection;
+import com.android.systemui.statusbar.notification.collection.provider.HighPriorityProvider;
import com.android.systemui.statusbar.notification.init.NotificationsController;
import com.android.systemui.statusbar.notification.init.NotificationsControllerImpl;
import com.android.systemui.statusbar.notification.init.NotificationsControllerStub;
+import com.android.systemui.statusbar.notification.logging.NotificationLogger;
+import com.android.systemui.statusbar.notification.row.NotificationBlockingHelperManager;
+import com.android.systemui.statusbar.notification.row.NotificationGutsManager;
+import com.android.systemui.statusbar.phone.NotificationGroupManager;
+import com.android.systemui.statusbar.phone.StatusBar;
+import com.android.systemui.util.leak.LeakDetector;
+
+import java.util.concurrent.Executor;
import javax.inject.Singleton;
@@ -33,9 +57,111 @@
import dagger.Module;
import dagger.Provides;
-/** Module for classes related to the notifications data pipeline */
+/**
+ * Dagger Module for classes found within the com.android.systemui.statusbar.notification package.
+ */
@Module
-public class NotificationsModule {
+public interface NotificationsModule {
+ /** Provides an instance of {@link NotificationEntryManager} */
+ @Singleton
+ @Provides
+ static NotificationEntryManager provideNotificationEntryManager(
+ NotificationEntryManagerLogger logger,
+ NotificationGroupManager groupManager,
+ NotificationRankingManager rankingManager,
+ NotificationEntryManager.KeyguardEnvironment keyguardEnvironment,
+ FeatureFlags featureFlags,
+ Lazy<NotificationRowBinder> notificationRowBinderLazy,
+ Lazy<NotificationRemoteInputManager> notificationRemoteInputManagerLazy,
+ LeakDetector leakDetector,
+ ForegroundServiceDismissalFeatureController fgsFeatureController) {
+ return new NotificationEntryManager(
+ logger,
+ groupManager,
+ rankingManager,
+ keyguardEnvironment,
+ featureFlags,
+ notificationRowBinderLazy,
+ notificationRemoteInputManagerLazy,
+ leakDetector,
+ fgsFeatureController);
+ }
+
+ /** Provides an instance of {@link NotificationGutsManager} */
+ @Singleton
+ @Provides
+ static NotificationGutsManager provideNotificationGutsManager(
+ Context context,
+ VisualStabilityManager visualStabilityManager,
+ Lazy<StatusBar> statusBarLazy,
+ @Main Handler mainHandler,
+ AccessibilityManager accessibilityManager,
+ HighPriorityProvider highPriorityProvider) {
+ return new NotificationGutsManager(
+ context,
+ visualStabilityManager,
+ statusBarLazy,
+ mainHandler,
+ accessibilityManager,
+ highPriorityProvider);
+ }
+
+ /** Provides an instance of {@link VisualStabilityManager} */
+ @Singleton
+ @Provides
+ static VisualStabilityManager provideVisualStabilityManager(
+ NotificationEntryManager notificationEntryManager, Handler handler) {
+ return new VisualStabilityManager(notificationEntryManager, handler);
+ }
+
+ /** Provides an instance of {@link NotificationAlertingManager} */
+ @Singleton
+ @Provides
+ static NotificationAlertingManager provideNotificationAlertingManager(
+ NotificationEntryManager notificationEntryManager,
+ NotificationRemoteInputManager remoteInputManager,
+ VisualStabilityManager visualStabilityManager,
+ StatusBarStateController statusBarStateController,
+ NotificationInterruptionStateProvider notificationInterruptionStateProvider,
+ NotificationListener notificationListener) {
+ return new NotificationAlertingManager(
+ notificationEntryManager,
+ remoteInputManager,
+ visualStabilityManager,
+ statusBarStateController,
+ notificationInterruptionStateProvider,
+ notificationListener);
+ }
+
+ /** Provides an instance of {@link NotificationLogger} */
+ @Singleton
+ @Provides
+ static NotificationLogger provideNotificationLogger(
+ NotificationListener notificationListener,
+ @UiBackground Executor uiBgExecutor,
+ NotificationEntryManager entryManager,
+ StatusBarStateController statusBarStateController,
+ NotificationLogger.ExpansionStateLogger expansionStateLogger) {
+ return new NotificationLogger(
+ notificationListener,
+ uiBgExecutor,
+ entryManager,
+ statusBarStateController,
+ expansionStateLogger);
+ }
+
+ /** Provides an instance of {@link NotificationBlockingHelperManager} */
+ @Singleton
+ @Provides
+ static NotificationBlockingHelperManager provideNotificationBlockingHelperManager(
+ Context context,
+ NotificationGutsManager notificationGutsManager,
+ NotificationEntryManager notificationEntryManager,
+ MetricsLogger metricsLogger) {
+ return new NotificationBlockingHelperManager(
+ context, notificationGutsManager, notificationEntryManager, metricsLogger);
+ }
+
/** Initializes the notification data pipeline (can be disabled via config). */
@Singleton
@Provides
@@ -55,7 +181,7 @@
*/
@Provides
@Singleton
- public CommonNotifCollection provideCommonNotifCollection(
+ static CommonNotifCollection provideCommonNotifCollection(
FeatureFlags featureFlags,
Lazy<NotifPipeline> pipeline,
NotificationEntryManager entryManager) {
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/logging/NotificationLogger.java b/packages/SystemUI/src/com/android/systemui/statusbar/notification/logging/NotificationLogger.java
index 89e5f55..becb758 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/logging/NotificationLogger.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/logging/NotificationLogger.java
@@ -39,6 +39,7 @@
import com.android.systemui.statusbar.notification.NotificationEntryListener;
import com.android.systemui.statusbar.notification.NotificationEntryManager;
import com.android.systemui.statusbar.notification.collection.NotificationEntry;
+import com.android.systemui.statusbar.notification.dagger.NotificationsModule;
import com.android.systemui.statusbar.notification.stack.ExpandableViewState;
import com.android.systemui.statusbar.notification.stack.NotificationListContainer;
import com.android.systemui.statusbar.policy.HeadsUpManager;
@@ -50,13 +51,11 @@
import java.util.concurrent.Executor;
import javax.inject.Inject;
-import javax.inject.Singleton;
/**
* Handles notification logging, in particular, logging which notifications are visible and which
* are not.
*/
-@Singleton
public class NotificationLogger implements StateListener {
private static final String TAG = "NotificationLogger";
@@ -192,7 +191,9 @@
}
}
- @Inject
+ /**
+ * Injected constructor. See {@link NotificationsModule}.
+ */
public NotificationLogger(NotificationListener notificationListener,
@UiBackground Executor uiBgExecutor,
NotificationEntryManager entryManager,
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/NotificationBlockingHelperManager.java b/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/NotificationBlockingHelperManager.java
index 7b758aa..9212325 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/NotificationBlockingHelperManager.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/NotificationBlockingHelperManager.java
@@ -16,8 +16,7 @@
package com.android.systemui.statusbar.notification.row;
-import static android.service.notification.NotificationListenerService.Ranking
- .USER_SENTIMENT_NEGATIVE;
+import static android.service.notification.NotificationListenerService.Ranking.USER_SENTIMENT_NEGATIVE;
import android.content.Context;
import android.metrics.LogMaker;
@@ -27,29 +26,28 @@
import com.android.internal.logging.MetricsLogger;
import com.android.internal.logging.nano.MetricsProto.MetricsEvent;
-import com.android.systemui.Dependency;
import com.android.systemui.plugins.statusbar.NotificationMenuRowPlugin;
import com.android.systemui.statusbar.notification.NotificationEntryManager;
+import com.android.systemui.statusbar.notification.dagger.NotificationsModule;
import com.android.systemui.statusbar.notification.logging.NotificationCounters;
import java.util.Collections;
import java.util.HashSet;
import java.util.Set;
-import javax.inject.Inject;
-import javax.inject.Singleton;
-
/**
* Manager for the notification blocking helper - tracks and helps create the blocking helper
* affordance.
*/
-@Singleton
public class NotificationBlockingHelperManager {
/** Enables debug logging and always makes the blocking helper show up after a dismiss. */
private static final boolean DEBUG = false;
private static final String TAG = "BlockingHelper";
private final Context mContext;
+ private final NotificationGutsManager mNotificationGutsManager;
+ private final NotificationEntryManager mNotificationEntryManager;
+ private final MetricsLogger mMetricsLogger;
/** Row that the blocking helper will be shown in (via {@link NotificationGuts}. */
private ExpandableNotificationRow mBlockingHelperRow;
private Set<String> mNonBlockablePkgs;
@@ -60,11 +58,18 @@
*/
private boolean mIsShadeExpanded;
- private MetricsLogger mMetricsLogger = new MetricsLogger();
-
- @Inject
- public NotificationBlockingHelperManager(Context context) {
+ /**
+ * Injected constructor. See {@link NotificationsModule}.
+ */
+ public NotificationBlockingHelperManager(
+ Context context,
+ NotificationGutsManager notificationGutsManager,
+ NotificationEntryManager notificationEntryManager,
+ MetricsLogger metricsLogger) {
mContext = context;
+ mNotificationGutsManager = notificationGutsManager;
+ mNotificationEntryManager = notificationEntryManager;
+ mMetricsLogger = metricsLogger;
mNonBlockablePkgs = new HashSet<>();
Collections.addAll(mNonBlockablePkgs, mContext.getResources().getStringArray(
com.android.internal.R.array.config_nonBlockableNotificationPackages));
@@ -99,7 +104,6 @@
if (DEBUG) {
Log.d(TAG, "Manager.perhapsShowBlockingHelper: Showing new blocking helper");
}
- NotificationGutsManager manager = Dependency.get(NotificationGutsManager.class);
// Enable blocking helper on the row before moving forward so everything in the guts is
// correctly prepped.
@@ -113,10 +117,10 @@
// We don't care about the touch origin (x, y) since we're opening guts without any
// explicit user interaction.
- manager.openGuts(mBlockingHelperRow, 0, 0, menuRow.getLongpressMenuItem(mContext));
+ mNotificationGutsManager.openGuts(
+ mBlockingHelperRow, 0, 0, menuRow.getLongpressMenuItem(mContext));
- Dependency.get(MetricsLogger.class)
- .count(NotificationCounters.BLOCKING_HELPER_SHOWN, 1);
+ mMetricsLogger.count(NotificationCounters.BLOCKING_HELPER_SHOWN, 1);
return true;
}
return false;
@@ -139,8 +143,7 @@
mBlockingHelperRow.setBlockingHelperShowing(false);
if (mBlockingHelperRow.isAttachedToWindow()) {
- Dependency.get(NotificationEntryManager.class).updateNotifications(
- "dismissCurrentBlockingHelper");
+ mNotificationEntryManager.updateNotifications("dismissCurrentBlockingHelper");
}
mBlockingHelperRow = null;
return true;
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/NotificationContentInflater.java b/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/NotificationContentInflater.java
index 566da65..e3ca283 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/NotificationContentInflater.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/NotificationContentInflater.java
@@ -33,7 +33,6 @@
import com.android.internal.annotations.VisibleForTesting;
import com.android.internal.widget.ImageMessageConsumer;
-import com.android.systemui.Dependency;
import com.android.systemui.statusbar.InflationTask;
import com.android.systemui.statusbar.NotificationRemoteInputManager;
import com.android.systemui.statusbar.SmartReplyController;
@@ -53,6 +52,8 @@
import javax.inject.Inject;
import javax.inject.Singleton;
+import dagger.Lazy;
+
/**
* {@link NotificationContentInflater} binds content to a {@link ExpandableNotificationRow} by
* asynchronously building the content's {@link RemoteViews} and applying it to the row.
@@ -66,13 +67,19 @@
private boolean mInflateSynchronously = false;
private final NotificationRemoteInputManager mRemoteInputManager;
private final NotifRemoteViewCache mRemoteViewCache;
+ private final Lazy<SmartReplyConstants> mSmartReplyConstants;
+ private final Lazy<SmartReplyController> mSmartReplyController;
@Inject
NotificationContentInflater(
NotifRemoteViewCache remoteViewCache,
- NotificationRemoteInputManager remoteInputManager) {
+ NotificationRemoteInputManager remoteInputManager,
+ Lazy<SmartReplyConstants> smartReplyConstants,
+ Lazy<SmartReplyController> smartReplyController) {
mRemoteViewCache = remoteViewCache;
mRemoteInputManager = remoteInputManager;
+ mSmartReplyConstants = smartReplyConstants;
+ mSmartReplyController = smartReplyController;
}
@Override
@@ -104,6 +111,8 @@
contentToBind,
mRemoteViewCache,
entry,
+ mSmartReplyConstants.get(),
+ mSmartReplyController.get(),
row,
bindParams.isLowPriority,
bindParams.isChildInGroup,
@@ -136,6 +145,7 @@
packageContext);
result = inflateSmartReplyViews(result, reInflateFlags, entry,
row.getContext(), packageContext, row.getHeadsUpManager(),
+ mSmartReplyConstants.get(), mSmartReplyController.get(),
row.getExistingSmartRepliesAndActions());
apply(
@@ -204,9 +214,8 @@
private static InflationProgress inflateSmartReplyViews(InflationProgress result,
@InflationFlag int reInflateFlags, NotificationEntry entry, Context context,
Context packageContext, HeadsUpManager headsUpManager,
+ SmartReplyConstants smartReplyConstants, SmartReplyController smartReplyController,
SmartRepliesAndActions previousSmartRepliesAndActions) {
- SmartReplyConstants smartReplyConstants = Dependency.get(SmartReplyConstants.class);
- SmartReplyController smartReplyController = Dependency.get(SmartReplyController.class);
if ((reInflateFlags & FLAG_CONTENT_VIEW_EXPANDED) != 0 && result.newExpandedView != null) {
result.expandedInflatedSmartReplies =
InflatedSmartReplies.inflate(
@@ -643,6 +652,8 @@
private final boolean mUsesIncreasedHeadsUpHeight;
private final @InflationFlag int mReInflateFlags;
private final NotifRemoteViewCache mRemoteViewCache;
+ private final SmartReplyConstants mSmartReplyConstants;
+ private final SmartReplyController mSmartReplyController;
private ExpandableNotificationRow mRow;
private Exception mError;
private RemoteViews.OnClickHandler mRemoteViewClickHandler;
@@ -653,6 +664,8 @@
@InflationFlag int reInflateFlags,
NotifRemoteViewCache cache,
NotificationEntry entry,
+ SmartReplyConstants smartReplyConstants,
+ SmartReplyController smartReplyController,
ExpandableNotificationRow row,
boolean isLowPriority,
boolean isChildInGroup,
@@ -662,6 +675,8 @@
RemoteViews.OnClickHandler remoteViewClickHandler) {
mEntry = entry;
mRow = row;
+ mSmartReplyConstants = smartReplyConstants;
+ mSmartReplyController = smartReplyController;
mInflateSynchronously = inflateSynchronously;
mReInflateFlags = reInflateFlags;
mRemoteViewCache = cache;
@@ -701,6 +716,7 @@
mUsesIncreasedHeadsUpHeight, packageContext);
return inflateSmartReplyViews(inflationProgress, mReInflateFlags, mEntry,
mRow.getContext(), packageContext, mRow.getHeadsUpManager(),
+ mSmartReplyConstants, mSmartReplyController,
mRow.getExistingSmartRepliesAndActions());
} catch (Exception e) {
mError = e;
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/NotificationConversationInfo.java b/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/NotificationConversationInfo.java
index a0af4ac..923c348 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/NotificationConversationInfo.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/NotificationConversationInfo.java
@@ -33,11 +33,9 @@
import android.app.NotificationChannelGroup;
import android.content.Context;
import android.content.Intent;
-import android.content.pm.ActivityInfo;
import android.content.pm.ApplicationInfo;
import android.content.pm.LauncherApps;
import android.content.pm.PackageManager;
-import android.content.pm.ResolveInfo;
import android.content.pm.ShortcutInfo;
import android.content.pm.ShortcutManager;
import android.graphics.drawable.Icon;
@@ -61,6 +59,7 @@
import android.widget.TextView;
import com.android.internal.annotations.VisibleForTesting;
+import com.android.settingslib.notification.ConversationIconFactory;
import com.android.settingslib.utils.ThreadUtils;
import com.android.systemui.Dependency;
import com.android.systemui.R;
@@ -87,6 +86,7 @@
private PackageManager mPm;
private VisualStabilityManager mVisualStabilityManager;
private ShadeController mShadeController;
+ private ConversationIconFactory mIconFactory;
private String mPackageName;
private String mAppName;
@@ -186,6 +186,7 @@
OnSettingsClickListener onSettingsClick,
OnAppSettingsClickListener onAppSettingsClick,
OnSnoozeClickListener onSnoozeClickListener,
+ ConversationIconFactory conversationIconFactory,
boolean isDeviceProvisioned) {
mSelectedAction = -1;
mINotificationManager = iNotificationManager;
@@ -203,6 +204,7 @@
mIsDeviceProvisioned = isDeviceProvisioned;
mOnSnoozeClickListener = onSnoozeClickListener;
mShadeController = Dependency.get(ShadeController.class);
+ mIconFactory = conversationIconFactory;
mShortcutManager = shortcutManager;
mLauncherApps = launcherApps;
@@ -320,8 +322,8 @@
private void bindIcon() {
ImageView image = findViewById(R.id.conversation_icon);
if (mShortcutInfo != null) {
- image.setImageDrawable(mLauncherApps.getShortcutBadgedIconDrawable(mShortcutInfo,
- mContext.getResources().getDisplayMetrics().densityDpi));
+ image.setImageBitmap(mIconFactory.getConversationBitmap(
+ mShortcutInfo, mPackageName, mAppUid));
} else {
if (mSbn.getNotification().extras.getBoolean(EXTRA_IS_GROUP_CONVERSATION, false)) {
// TODO: maybe use a generic group icon, or a composite of recent senders
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/NotificationGutsManager.java b/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/NotificationGutsManager.java
index 352abcf..c01f6c4 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/NotificationGutsManager.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/NotificationGutsManager.java
@@ -34,6 +34,7 @@
import android.provider.Settings;
import android.service.notification.StatusBarNotification;
import android.util.ArraySet;
+import android.util.IconDrawableFactory;
import android.util.Log;
import android.view.HapticFeedbackConstants;
import android.view.View;
@@ -42,8 +43,10 @@
import com.android.internal.annotations.VisibleForTesting;
import com.android.internal.logging.MetricsLogger;
import com.android.internal.logging.nano.MetricsProto;
+import com.android.settingslib.notification.ConversationIconFactory;
import com.android.systemui.Dependency;
import com.android.systemui.Dumpable;
+import com.android.systemui.R;
import com.android.systemui.dagger.qualifiers.Main;
import com.android.systemui.plugins.statusbar.NotificationMenuRowPlugin;
import com.android.systemui.plugins.statusbar.StatusBarStateController;
@@ -56,25 +59,21 @@
import com.android.systemui.statusbar.notification.VisualStabilityManager;
import com.android.systemui.statusbar.notification.collection.NotificationEntry;
import com.android.systemui.statusbar.notification.collection.provider.HighPriorityProvider;
+import com.android.systemui.statusbar.notification.dagger.NotificationsModule;
import com.android.systemui.statusbar.notification.row.NotificationInfo.CheckSaveListener;
import com.android.systemui.statusbar.notification.stack.NotificationListContainer;
-import com.android.systemui.statusbar.phone.ShadeController;
import com.android.systemui.statusbar.phone.StatusBar;
import com.android.systemui.statusbar.policy.DeviceProvisionedController;
import java.io.FileDescriptor;
import java.io.PrintWriter;
-import javax.inject.Inject;
-import javax.inject.Singleton;
-
import dagger.Lazy;
/**
* Handles various NotificationGuts related tasks, such as binding guts to a row, opening and
* closing guts, and keeping track of the currently exposed notification guts.
*/
-@Singleton
public class NotificationGutsManager implements Dumpable, NotificationLifetimeExtender {
private static final String TAG = "NotificationGutsManager";
@@ -111,7 +110,9 @@
private final Handler mMainHandler;
private Runnable mOpenRunnable;
- @Inject
+ /**
+ * Injected constructor. See {@link NotificationsModule}.
+ */
public NotificationGutsManager(Context context, VisualStabilityManager visualStabilityManager,
Lazy<StatusBar> statusBarLazy, @Main Handler mainHandler,
AccessibilityManager accessibilityManager,
@@ -388,6 +389,10 @@
notificationInfoView.closeControls(v, false);
};
}
+ ConversationIconFactory iconFactoryLoader = new ConversationIconFactory(mContext,
+ launcherApps, pmUser, IconDrawableFactory.newInstance(mContext),
+ mContext.getResources().getDimensionPixelSize(
+ R.dimen.notification_guts_conversation_icon_size));
notificationInfoView.bindNotification(
shortcutManager,
@@ -401,8 +406,8 @@
onSettingsClick,
onAppSettingsClick,
onSnoozeClickListener,
+ iconFactoryLoader,
mDeviceProvisionedController.isDeviceProvisioned());
-
}
/**
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayout.java b/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayout.java
index b2b46d5..2eeda1f 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayout.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayout.java
@@ -60,6 +60,7 @@
import android.util.MathUtils;
import android.util.Pair;
import android.view.ContextThemeWrapper;
+import android.view.DisplayCutout;
import android.view.InputDevice;
import android.view.LayoutInflater;
import android.view.MotionEvent;
@@ -524,6 +525,8 @@
private float mLastSentExpandedHeight;
private boolean mWillExpand;
+ private int mWaterfallTopInset;
+
@Inject
public NotificationStackScrollLayout(
@Named(VIEW_CONTEXT) Context context,
@@ -1739,6 +1742,12 @@
public WindowInsets onApplyWindowInsets(WindowInsets insets) {
mBottomInset = insets.getSystemWindowInsetBottom();
+ mWaterfallTopInset = 0;
+ final DisplayCutout cutout = insets.getDisplayCutout();
+ if (cutout != null) {
+ mWaterfallTopInset = cutout.getWaterfallInsets().top;
+ }
+
if (ANCHOR_SCROLLING) {
// TODO
} else {
@@ -5335,7 +5344,9 @@
@ShadeViewRefactor(RefactorComponent.COORDINATOR)
public int getMinExpansionHeight() {
- return mShelf.getIntrinsicHeight() - (mShelf.getIntrinsicHeight() - mStatusBarHeight) / 2;
+ return mShelf.getIntrinsicHeight()
+ - (mShelf.getIntrinsicHeight() - mStatusBarHeight + mWaterfallTopInset) / 2
+ + mWaterfallTopInset;
}
@ShadeViewRefactor(RefactorComponent.SHADE_VIEW)
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/AutoHideController.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/AutoHideController.java
index 3165597..971f045 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/AutoHideController.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/AutoHideController.java
@@ -25,8 +25,7 @@
import com.android.systemui.dagger.qualifiers.Main;
import com.android.systemui.statusbar.NotificationRemoteInputManager;
-
-import javax.inject.Inject;
+import com.android.systemui.statusbar.phone.dagger.StatusBarPhoneModule;
/** A controller to control all auto-hide things. */
public class AutoHideController {
@@ -51,7 +50,9 @@
}
};
- @Inject
+ /**
+ * Injected constructor. See {@link StatusBarPhoneModule}.
+ */
public AutoHideController(Context context, @Main Handler handler,
NotificationRemoteInputManager notificationRemoteInputManager,
IWindowManager iWindowManager) {
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardStatusBarView.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardStatusBarView.java
index b24942a..b46ca40 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardStatusBarView.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardStatusBarView.java
@@ -102,6 +102,9 @@
*/
private int mCutoutSideNudge = 0;
+ private DisplayCutout mDisplayCutout;
+ private int mRoundedCornerPadding = 0;
+
public KeyguardStatusBarView(Context context, AttributeSet attrs) {
super(context, attrs);
}
@@ -159,9 +162,15 @@
getResources().getDimensionPixelSize(R.dimen.keyguard_carrier_text_margin));
mCarrierLabel.setLayoutParams(lp);
- lp = (MarginLayoutParams) getLayoutParams();
+ updateKeyguardStatusBarHeight();
+ }
+
+ private void updateKeyguardStatusBarHeight() {
+ final int waterfallTop =
+ mDisplayCutout == null ? 0 : mDisplayCutout.getWaterfallInsets().top;
+ MarginLayoutParams lp = (MarginLayoutParams) getLayoutParams();
lp.height = getResources().getDimensionPixelSize(
- R.dimen.status_bar_header_height_keyguard);
+ R.dimen.status_bar_header_height_keyguard) + waterfallTop;
setLayoutParams(lp);
}
@@ -175,6 +184,8 @@
R.dimen.display_cutout_margin_consumption);
mShowPercentAvailable = getContext().getResources().getBoolean(
com.android.internal.R.bool.config_battery_percentage_setting_available);
+ mRoundedCornerPadding = res.getDimensionPixelSize(
+ R.dimen.rounded_corner_content_padding);
}
private void updateVisibilities() {
@@ -225,23 +236,26 @@
}
private boolean updateLayoutConsideringCutout() {
- DisplayCutout dc = getRootWindowInsets().getDisplayCutout();
+ mDisplayCutout = getRootWindowInsets().getDisplayCutout();
+ updateKeyguardStatusBarHeight();
+
Pair<Integer, Integer> cornerCutoutMargins =
- PhoneStatusBarView.cornerCutoutMargins(dc, getDisplay());
- updateCornerCutoutPadding(cornerCutoutMargins);
- if (dc == null || cornerCutoutMargins != null) {
+ StatusBarWindowView.cornerCutoutMargins(mDisplayCutout, getDisplay());
+ updatePadding(cornerCutoutMargins);
+ if (mDisplayCutout == null || cornerCutoutMargins != null) {
return updateLayoutParamsNoCutout();
} else {
- return updateLayoutParamsForCutout(dc);
+ return updateLayoutParamsForCutout();
}
}
- private void updateCornerCutoutPadding(Pair<Integer, Integer> cornerCutoutMargins) {
- if (cornerCutoutMargins != null) {
- setPadding(cornerCutoutMargins.first, 0, cornerCutoutMargins.second, 0);
- } else {
- setPadding(0, 0, 0, 0);
- }
+ private void updatePadding(Pair<Integer, Integer> cornerCutoutMargins) {
+ final int waterfallTop =
+ mDisplayCutout == null ? 0 : mDisplayCutout.getWaterfallInsets().top;
+ Pair<Integer, Integer> padding =
+ StatusBarWindowView.paddingNeededForCutoutAndRoundedCorner(
+ mDisplayCutout, cornerCutoutMargins, mRoundedCornerPadding);
+ setPadding(padding.first, waterfallTop, padding.second, 0);
}
private boolean updateLayoutParamsNoCutout() {
@@ -268,7 +282,7 @@
return true;
}
- private boolean updateLayoutParamsForCutout(DisplayCutout dc) {
+ private boolean updateLayoutParamsForCutout() {
if (mLayoutState == LAYOUT_CUTOUT) {
return false;
}
@@ -279,7 +293,7 @@
}
Rect bounds = new Rect();
- boundsFromDirection(dc, Gravity.TOP, bounds);
+ boundsFromDirection(mDisplayCutout, Gravity.TOP, bounds);
mCutoutSpace.setVisibility(View.VISIBLE);
RelativeLayout.LayoutParams lp = (LayoutParams) mCutoutSpace.getLayoutParams();
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationBarView.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationBarView.java
index 18777bc..84aecd4 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationBarView.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationBarView.java
@@ -770,7 +770,14 @@
public void updatePanelSystemUiStateFlags() {
int displayId = mContext.getDisplayId();
+ if (SysUiState.DEBUG) {
+ Log.d(TAG, "Updating panel sysui state flags: panelView=" + mPanelView);
+ }
if (mPanelView != null) {
+ if (SysUiState.DEBUG) {
+ Log.d(TAG, "Updating panel sysui state flags: fullyExpanded="
+ + mPanelView.isFullyExpanded() + " inQs=" + mPanelView.isInSettings());
+ }
mSysUiFlagContainer.setFlag(SYSUI_STATE_NOTIFICATION_PANEL_EXPANDED,
mPanelView.isFullyExpanded() && !mPanelView.isInSettings())
.setFlag(SYSUI_STATE_QUICK_SETTINGS_EXPANDED,
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationModeController.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationModeController.java
index 826af66..67e7f23 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationModeController.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationModeController.java
@@ -73,7 +73,7 @@
public class NavigationModeController implements Dumpable {
private static final String TAG = NavigationModeController.class.getSimpleName();
- private static final boolean DEBUG = false;
+ private static final boolean DEBUG = true;
public interface ModeChangedListener {
void onNavigationModeChanged(int mode);
@@ -248,8 +248,7 @@
Secure.NAVIGATION_MODE, String.valueOf(mode));
});
if (DEBUG) {
- Log.e(TAG, "updateCurrentInteractionMode: mode=" + mMode
- + " contextUser=" + mCurrentUserContext.getUserId());
+ Log.e(TAG, "updateCurrentInteractionMode: mode=" + mMode);
dumpAssetPaths(mCurrentUserContext);
}
@@ -293,6 +292,7 @@
0 /* flags */, UserHandle.of(userId));
} catch (PackageManager.NameNotFoundException e) {
// Never happens for the sysui package
+ Log.e(TAG, "Failed to create package context", e);
return null;
}
}
@@ -404,11 +404,17 @@
defaultOverlays = "failed_to_fetch";
}
pw.println(" defaultOverlays=" + defaultOverlays);
+ pw.println(" restoreGesturalNavMode:");
+ for (int i = 0; i < mRestoreGesturalNavBarMode.size(); i++) {
+ pw.println(" userId=" + mRestoreGesturalNavBarMode.keyAt(i)
+ + " shouldRestore=" + mRestoreGesturalNavBarMode.valueAt(i));
+ }
dumpAssetPaths(mCurrentUserContext);
}
private void dumpAssetPaths(Context context) {
- Log.d(TAG, "assetPaths=");
+ Log.d(TAG, " contextUser=" + mCurrentUserContext.getUserId());
+ Log.d(TAG, " assetPaths=");
ApkAssets[] assets = context.getResources().getAssets().getApkAssets();
for (ApkAssets a : assets) {
Log.d(TAG, " " + a.getAssetPath());
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationGroupAlertTransferHelper.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationGroupAlertTransferHelper.java
index bdca9a4..d709e02 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationGroupAlertTransferHelper.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationGroupAlertTransferHelper.java
@@ -36,21 +36,18 @@
import com.android.systemui.statusbar.notification.row.RowContentBindStage;
import com.android.systemui.statusbar.phone.NotificationGroupManager.NotificationGroup;
import com.android.systemui.statusbar.phone.NotificationGroupManager.OnGroupChangeListener;
+import com.android.systemui.statusbar.phone.dagger.StatusBarPhoneModule;
import com.android.systemui.statusbar.policy.HeadsUpManager;
import com.android.systemui.statusbar.policy.OnHeadsUpChangedListener;
import java.util.ArrayList;
import java.util.Objects;
-import javax.inject.Inject;
-import javax.inject.Singleton;
-
/**
* A helper class dealing with the alert interactions between {@link NotificationGroupManager} and
* {@link HeadsUpManager}. In particular, this class deals with keeping
* the correct notification in a group alerting based off the group suppression.
*/
-@Singleton
public class NotificationGroupAlertTransferHelper implements OnHeadsUpChangedListener,
StateListener {
@@ -76,7 +73,9 @@
private boolean mIsDozing;
- @Inject
+ /**
+ * Injected constructor. See {@link StatusBarPhoneModule}.
+ */
public NotificationGroupAlertTransferHelper(RowContentBindStage bindStage) {
Dependency.get(StatusBarStateController.class).addCallback(this);
mRowContentBindStage = bindStage;
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationShadeWindowView.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationShadeWindowView.java
index 7650a3a..bc80a1a 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationShadeWindowView.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationShadeWindowView.java
@@ -88,33 +88,11 @@
boolean paddingChanged = insets.top != getPaddingTop()
|| insets.bottom != getPaddingBottom();
- int rightCutout = 0;
- int leftCutout = 0;
- DisplayCutout displayCutout = getRootWindowInsets().getDisplayCutout();
- if (displayCutout != null) {
- leftCutout = displayCutout.getSafeInsetLeft();
- rightCutout = displayCutout.getSafeInsetRight();
- }
-
- int targetLeft = Math.max(insets.left, leftCutout);
- int targetRight = Math.max(insets.right, rightCutout);
-
- // Super-special right inset handling, because scrims and backdrop need to ignore it.
- if (targetRight != mRightInset || targetLeft != mLeftInset) {
- mRightInset = targetRight;
- mLeftInset = targetLeft;
- applyMargins();
- }
// Drop top inset, and pass through bottom inset.
if (paddingChanged) {
setPadding(0, 0, 0, 0);
}
} else {
- if (mRightInset != 0 || mLeftInset != 0) {
- mRightInset = 0;
- mLeftInset = 0;
- applyMargins();
- }
boolean changed = getPaddingLeft() != 0
|| getPaddingRight() != 0
|| getPaddingTop() != 0
@@ -123,6 +101,17 @@
setPadding(0, 0, 0, 0);
}
}
+
+ mLeftInset = 0;
+ mRightInset = 0;
+ DisplayCutout displayCutout = getRootWindowInsets().getDisplayCutout();
+ if (displayCutout != null) {
+ mLeftInset = displayCutout.getSafeInsetLeft();
+ mRightInset = displayCutout.getSafeInsetRight();
+ }
+ mLeftInset = Math.max(insets.left, mLeftInset);
+ mRightInset = Math.max(insets.right, mRightInset);
+ applyMargins();
return windowInsets;
}
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBarView.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBarView.java
index f3b0a79..156a7e5 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBarView.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBarView.java
@@ -23,12 +23,10 @@
import android.annotation.Nullable;
import android.content.Context;
import android.content.res.Configuration;
-import android.graphics.Point;
import android.graphics.Rect;
import android.util.AttributeSet;
import android.util.EventLog;
import android.util.Pair;
-import android.view.Display;
import android.view.DisplayCutout;
import android.view.Gravity;
import android.view.MotionEvent;
@@ -36,7 +34,6 @@
import android.view.ViewGroup;
import android.view.WindowInsets;
import android.view.accessibility.AccessibilityEvent;
-import android.widget.FrameLayout;
import android.widget.LinearLayout;
import com.android.systemui.Dependency;
@@ -84,6 +81,8 @@
private int mCutoutSideNudge = 0;
private boolean mHeadsUpVisible;
+ private int mRoundedCornerPadding = 0;
+
public PhoneStatusBarView(Context context, AttributeSet attrs) {
super(context, attrs);
@@ -294,15 +293,25 @@
public void updateResources() {
mCutoutSideNudge = getResources().getDimensionPixelSize(
R.dimen.display_cutout_margin_consumption);
+ mRoundedCornerPadding = getResources().getDimensionPixelSize(
+ R.dimen.rounded_corner_content_padding);
+ updateStatusBarHeight();
+ }
+
+ private void updateStatusBarHeight() {
+ final int waterfallTopInset =
+ mDisplayCutout == null ? 0 : mDisplayCutout.getWaterfallInsets().top;
ViewGroup.LayoutParams layoutParams = getLayoutParams();
- layoutParams.height = getResources().getDimensionPixelSize(R.dimen.status_bar_height);
+ layoutParams.height =
+ getResources().getDimensionPixelSize(R.dimen.status_bar_height) - waterfallTopInset;
setLayoutParams(layoutParams);
}
private void updateLayoutForCutout() {
- Pair<Integer, Integer> cornerCutoutMargins = cornerCutoutMargins(mDisplayCutout,
- getDisplay());
+ updateStatusBarHeight();
+ Pair<Integer, Integer> cornerCutoutMargins =
+ StatusBarWindowView.cornerCutoutMargins(mDisplayCutout, getDisplay());
updateCutoutLocation(cornerCutoutMargins);
updateSafeInsets(cornerCutoutMargins);
}
@@ -337,47 +346,11 @@
// Depending on our rotation, we may have to work around a cutout in the middle of the view,
// or letterboxing from the right or left sides.
- FrameLayout.LayoutParams lp = (FrameLayout.LayoutParams) getLayoutParams();
- if (mDisplayCutout == null || mDisplayCutout.isEmpty()
- || mLastOrientation != ORIENTATION_PORTRAIT || cornerCutoutMargins == null) {
- lp.leftMargin = 0;
- lp.rightMargin = 0;
- return;
- }
+ Pair<Integer, Integer> padding =
+ StatusBarWindowView.paddingNeededForCutoutAndRoundedCorner(
+ mDisplayCutout, cornerCutoutMargins, mRoundedCornerPadding);
- lp.leftMargin = Math.max(lp.leftMargin, cornerCutoutMargins.first);
- lp.rightMargin = Math.max(lp.rightMargin, cornerCutoutMargins.second);
-
- // If we're already inset enough (e.g. on the status bar side), we can have 0 margin
- WindowInsets insets = getRootWindowInsets();
- int leftInset = insets.getSystemWindowInsetLeft();
- int rightInset = insets.getSystemWindowInsetRight();
- if (lp.leftMargin <= leftInset) {
- lp.leftMargin = 0;
- }
- if (lp.rightMargin <= rightInset) {
- lp.rightMargin = 0;
- }
- }
-
- public static Pair<Integer, Integer> cornerCutoutMargins(DisplayCutout cutout,
- Display display) {
- if (cutout == null) {
- return null;
- }
- Point size = new Point();
- display.getRealSize(size);
-
- Rect bounds = new Rect();
- boundsFromDirection(cutout, Gravity.TOP, bounds);
-
- if (bounds.left <= 0) {
- return new Pair<>(bounds.right, 0);
- }
- if (bounds.right >= size.x) {
- return new Pair<>(0, size.x - bounds.left);
- }
- return null;
+ setPadding(padding.first, getPaddingTop(), padding.second, getPaddingBottom());
}
public void setHeadsUpVisible(boolean headsUpVisible) {
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 419d136..6298afe 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java
@@ -198,6 +198,7 @@
import com.android.systemui.statusbar.notification.row.NotificationGutsManager;
import com.android.systemui.statusbar.notification.stack.NotificationListContainer;
import com.android.systemui.statusbar.phone.dagger.StatusBarComponent;
+import com.android.systemui.statusbar.phone.dagger.StatusBarPhoneModule;
import com.android.systemui.statusbar.policy.BatteryController;
import com.android.systemui.statusbar.policy.BatteryController.BatteryStateChangeCallback;
import com.android.systemui.statusbar.policy.BrightnessMirrorController;
@@ -596,7 +597,7 @@
* Public constructor for StatusBar.
*
* StatusBar is considered optional, and therefore can not be marked as @Inject directly.
- * Instead, an @Provide method is included.
+ * Instead, an @Provide method is included. See {@link StatusBarPhoneModule}.
*/
@SuppressWarnings("OptionalUsedAsFieldOrParameterType")
public StatusBar(
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarWindowView.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarWindowView.java
index da5df6a..22bf513 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarWindowView.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarWindowView.java
@@ -16,8 +16,21 @@
package com.android.systemui.statusbar.phone;
+import static android.view.WindowInsets.Type.systemBars;
+
+import static com.android.systemui.ScreenDecorations.DisplayCutoutView.boundsFromDirection;
+
import android.content.Context;
+import android.graphics.Insets;
+import android.graphics.Point;
+import android.graphics.Rect;
import android.util.AttributeSet;
+import android.util.Pair;
+import android.view.Display;
+import android.view.DisplayCutout;
+import android.view.Gravity;
+import android.view.View;
+import android.view.WindowInsets;
import android.widget.FrameLayout;
/**
@@ -28,7 +41,118 @@
public static final String TAG = "PhoneStatusBarWindowView";
public static final boolean DEBUG = StatusBar.DEBUG;
+ private int mLeftInset = 0;
+ private int mRightInset = 0;
+ private int mTopInset = 0;
+
public StatusBarWindowView(Context context, AttributeSet attrs) {
super(context, attrs);
}
+
+ @Override
+ public WindowInsets onApplyWindowInsets(WindowInsets windowInsets) {
+ final Insets insets = windowInsets.getInsetsIgnoringVisibility(systemBars());
+ mLeftInset = 0;
+ mRightInset = 0;
+ mTopInset = 0;
+ DisplayCutout displayCutout = getRootWindowInsets().getDisplayCutout();
+ if (displayCutout != null) {
+ mTopInset = displayCutout.getWaterfallInsets().top;
+ mLeftInset = displayCutout.getSafeInsetLeft();
+ mRightInset = displayCutout.getSafeInsetRight();
+ }
+ mLeftInset = Math.max(insets.left, mLeftInset);
+ mRightInset = Math.max(insets.right, mRightInset);
+ applyMargins();
+ return windowInsets;
+ }
+
+ private void applyMargins() {
+ final int count = getChildCount();
+ for (int i = 0; i < count; i++) {
+ View child = getChildAt(i);
+ if (child.getLayoutParams() instanceof LayoutParams) {
+ LayoutParams lp = (LayoutParams) child.getLayoutParams();
+ if (lp.rightMargin != mRightInset || lp.leftMargin != mLeftInset
+ || lp.topMargin != mTopInset) {
+ lp.rightMargin = mRightInset;
+ lp.leftMargin = mLeftInset;
+ lp.topMargin = mTopInset;
+ child.requestLayout();
+ }
+ }
+ }
+ }
+
+ /**
+ * Compute the padding needed for status bar related views, e.g., PhoneStatusBar,
+ * QuickStatusBarHeader and KeyguardStatusBarView).
+ *
+ * @param cutout
+ * @param cornerCutoutPadding
+ * @param roundedCornerContentPadding
+ * @return
+ */
+ public static Pair<Integer, Integer> paddingNeededForCutoutAndRoundedCorner(
+ DisplayCutout cutout, Pair<Integer, Integer> cornerCutoutPadding,
+ int roundedCornerContentPadding) {
+ if (cutout == null) {
+ return new Pair<>(roundedCornerContentPadding, roundedCornerContentPadding);
+ }
+
+ // compute the padding needed for corner cutout.
+ final int leftMargin = cutout.getSafeInsetLeft();
+ final int rightMargin = cutout.getSafeInsetRight();
+ int leftCornerCutoutPadding = 0;
+ int rightCornerCutoutPadding = 0;
+ if (cornerCutoutPadding != null) {
+ if (cornerCutoutPadding.first > leftMargin) {
+ leftCornerCutoutPadding = cornerCutoutPadding.first - leftMargin;
+ }
+ if (cornerCutoutPadding.second > rightMargin) {
+ rightCornerCutoutPadding = cornerCutoutPadding.second - rightMargin;
+ }
+ }
+
+ // compute the padding needed for rounded corner
+ int leftRoundedCornerPadding = 0;
+ int rightRoundedCornerPadding = 0;
+ if (roundedCornerContentPadding > leftMargin) {
+ leftRoundedCornerPadding = roundedCornerContentPadding - leftMargin;
+ }
+ if (roundedCornerContentPadding > rightMargin) {
+ rightRoundedCornerPadding = roundedCornerContentPadding - rightMargin;
+ }
+
+ return new Pair<>(
+ Math.max(leftCornerCutoutPadding, leftRoundedCornerPadding),
+ Math.max(rightCornerCutoutPadding, rightRoundedCornerPadding));
+ }
+
+ /**
+ * Compute the corner cutout margins
+ *
+ * @param cutout
+ * @param display
+ * @return
+ */
+ public static Pair<Integer, Integer> cornerCutoutMargins(DisplayCutout cutout,
+ Display display) {
+ if (cutout == null) {
+ return null;
+ }
+ Point size = new Point();
+ display.getRealSize(size);
+
+ Rect bounds = new Rect();
+ boundsFromDirection(cutout, Gravity.TOP, bounds);
+
+ if (bounds.left <= 0) {
+ return new Pair<>(bounds.right, 0);
+ }
+ if (bounds.right >= size.x) {
+ return new Pair<>(0, size.x - bounds.left);
+ }
+ return null;
+ }
}
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/dagger/StatusBarPhoneDependenciesModule.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/dagger/StatusBarPhoneDependenciesModule.java
new file mode 100644
index 0000000..fcf698c
--- /dev/null
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/dagger/StatusBarPhoneDependenciesModule.java
@@ -0,0 +1,60 @@
+/*
+ * Copyright (C) 2020 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT 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.phone.dagger;
+
+import android.content.Context;
+import android.os.Handler;
+import android.view.IWindowManager;
+
+import com.android.systemui.dagger.qualifiers.Main;
+import com.android.systemui.statusbar.NotificationRemoteInputManager;
+import com.android.systemui.statusbar.notification.row.RowContentBindStage;
+import com.android.systemui.statusbar.phone.AutoHideController;
+import com.android.systemui.statusbar.phone.NotificationGroupAlertTransferHelper;
+import com.android.systemui.statusbar.phone.StatusBar;
+
+import javax.inject.Singleton;
+
+import dagger.Module;
+import dagger.Provides;
+
+/**
+ * This module provides instances needed to construct {@link StatusBar}. These are moved to this
+ * separate from {@link StatusBarPhoneModule} module so that components that wish to build their own
+ * version of StatusBar can include just dependencies, without injecting StatusBar itself.
+ */
+@Module
+public interface StatusBarPhoneDependenciesModule {
+ /** */
+ @Singleton
+ @Provides
+ static AutoHideController newAutoHideController(Context context,
+ @Main Handler handler,
+ NotificationRemoteInputManager notificationRemoteInputManager,
+ IWindowManager iWindowManager) {
+ return new AutoHideController(context, handler, notificationRemoteInputManager,
+ iWindowManager);
+ }
+
+ /** */
+ @Singleton
+ @Provides
+ static NotificationGroupAlertTransferHelper provideNotificationGroupAlertTransferHelper(
+ RowContentBindStage bindStage) {
+ return new NotificationGroupAlertTransferHelper(bindStage);
+ }
+}
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarModule.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/dagger/StatusBarPhoneModule.java
similarity index 87%
rename from packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarModule.java
rename to packages/SystemUI/src/com/android/systemui/statusbar/phone/dagger/StatusBarPhoneModule.java
index 15a0e08..26459a9 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarModule.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/dagger/StatusBarPhoneModule.java
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2019 The Android Open Source Project
+ * Copyright (C) 2020 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-package com.android.systemui.statusbar.phone;
+package com.android.systemui.statusbar.phone.dagger;
import static com.android.systemui.Dependency.TIME_TICK_HANDLER_NAME;
@@ -52,7 +52,6 @@
import com.android.systemui.statusbar.NotificationRemoteInputManager;
import com.android.systemui.statusbar.NotificationViewHierarchyManager;
import com.android.systemui.statusbar.PulseExpansionHandler;
-import com.android.systemui.statusbar.StatusBarDependenciesModule;
import com.android.systemui.statusbar.SuperStatusBarViewFactory;
import com.android.systemui.statusbar.SysuiStatusBarStateController;
import com.android.systemui.statusbar.VibratorHelper;
@@ -65,7 +64,27 @@
import com.android.systemui.statusbar.notification.init.NotificationsController;
import com.android.systemui.statusbar.notification.logging.NotificationLogger;
import com.android.systemui.statusbar.notification.row.NotificationGutsManager;
-import com.android.systemui.statusbar.phone.dagger.StatusBarComponent;
+import com.android.systemui.statusbar.phone.AutoHideController;
+import com.android.systemui.statusbar.phone.BiometricUnlockController;
+import com.android.systemui.statusbar.phone.DozeParameters;
+import com.android.systemui.statusbar.phone.DozeScrimController;
+import com.android.systemui.statusbar.phone.DozeServiceHost;
+import com.android.systemui.statusbar.phone.HeadsUpManagerPhone;
+import com.android.systemui.statusbar.phone.KeyguardBypassController;
+import com.android.systemui.statusbar.phone.KeyguardDismissUtil;
+import com.android.systemui.statusbar.phone.KeyguardLiftController;
+import com.android.systemui.statusbar.phone.LightBarController;
+import com.android.systemui.statusbar.phone.LightsOutNotifController;
+import com.android.systemui.statusbar.phone.LockscreenLockIconController;
+import com.android.systemui.statusbar.phone.LockscreenWallpaper;
+import com.android.systemui.statusbar.phone.NotificationGroupManager;
+import com.android.systemui.statusbar.phone.NotificationShadeWindowController;
+import com.android.systemui.statusbar.phone.ScrimController;
+import com.android.systemui.statusbar.phone.ShadeController;
+import com.android.systemui.statusbar.phone.StatusBar;
+import com.android.systemui.statusbar.phone.StatusBarIconController;
+import com.android.systemui.statusbar.phone.StatusBarKeyguardViewManager;
+import com.android.systemui.statusbar.phone.StatusBarNotificationActivityStarter;
import com.android.systemui.statusbar.policy.BatteryController;
import com.android.systemui.statusbar.policy.ConfigurationController;
import com.android.systemui.statusbar.policy.DeviceProvisionedController;
@@ -91,8 +110,8 @@
/**
* Dagger Module providing {@link StatusBar}.
*/
-@Module(includes = {StatusBarDependenciesModule.class})
-public class StatusBarModule {
+@Module(includes = {StatusBarPhoneDependenciesModule.class})
+public interface StatusBarPhoneModule {
/**
* Provides our instance of StatusBar which is considered optional.
*/
diff --git a/packages/SystemUI/tests/src/com/android/systemui/ScreenDecorationsTest.java b/packages/SystemUI/tests/src/com/android/systemui/ScreenDecorationsTest.java
index 5706bee..79188ce 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/ScreenDecorationsTest.java
+++ b/packages/SystemUI/tests/src/com/android/systemui/ScreenDecorationsTest.java
@@ -17,25 +17,18 @@
import static android.view.WindowManager.LayoutParams.PRIVATE_FLAG_IS_ROUNDED_CORNERS_OVERLAY;
import static com.android.systemui.ScreenDecorations.rectsToRegion;
-import static com.android.systemui.tuner.TunablePadding.FLAG_END;
-import static com.android.systemui.tuner.TunablePadding.FLAG_START;
import static org.hamcrest.Matchers.is;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertThat;
import static org.mockito.ArgumentMatchers.any;
-import static org.mockito.ArgumentMatchers.anyInt;
-import static org.mockito.ArgumentMatchers.anyString;
-import static org.mockito.ArgumentMatchers.eq;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.never;
import static org.mockito.Mockito.reset;
-import static org.mockito.Mockito.spy;
import static org.mockito.Mockito.times;
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.when;
-import android.app.Fragment;
import android.content.res.Configuration;
import android.graphics.Rect;
import android.os.Handler;
@@ -43,21 +36,12 @@
import android.testing.TestableLooper;
import android.testing.TestableLooper.RunWithLooper;
import android.view.Display;
-import android.view.View;
import android.view.WindowManager;
import androidx.test.filters.SmallTest;
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.NotificationShadeWindowView;
-import com.android.systemui.statusbar.phone.StatusBar;
-import com.android.systemui.statusbar.phone.StatusBarWindowView;
-import com.android.systemui.tuner.TunablePadding;
-import com.android.systemui.tuner.TunablePadding.TunablePaddingService;
import com.android.systemui.tuner.TunerService;
import org.junit.Before;
@@ -68,8 +52,6 @@
import java.util.Collections;
-import dagger.Lazy;
-
@RunWithLooper
@RunWith(AndroidTestingRunner.class)
@SmallTest
@@ -77,19 +59,12 @@
private TestableLooper mTestableLooper;
private ScreenDecorations mScreenDecorations;
- @Mock private StatusBar mStatusBar;
private WindowManager mWindowManager;
- private FragmentService mFragmentService;
- private FragmentHostManager mFragmentHostManager;
- private NotificationShadeWindowView mView;
- private StatusBarWindowView mStatusBarWindowView;
- private TunablePaddingService mTunablePaddingService;
private Handler mMainHandler;
@Mock
private TunerService mTunerService;
@Mock
private BroadcastDispatcher mBroadcastDispatcher;
- @Mock private Lazy<StatusBar> mStatusBarLazy;
@Before
public void setup() {
@@ -97,25 +72,14 @@
mTestableLooper = TestableLooper.get(this);
mMainHandler = new Handler(mTestableLooper.getLooper());
- mTunablePaddingService = mDependency.injectMockDependency(TunablePaddingService.class);
- mFragmentService = mDependency.injectMockDependency(FragmentService.class);
mWindowManager = mock(WindowManager.class);
- mView = spy(new NotificationShadeWindowView(mContext, null));
- mStatusBarWindowView = spy(new StatusBarWindowView(mContext, null));
- when(mStatusBarLazy.get()).thenReturn(mStatusBar);
- when(mStatusBar.getNotificationShadeWindowView()).thenReturn(mView);
- when(mStatusBar.getStatusBarWindow()).thenReturn(mStatusBarWindowView);
Display display = mContext.getSystemService(WindowManager.class).getDefaultDisplay();
when(mWindowManager.getDefaultDisplay()).thenReturn(display);
mContext.addMockSystemService(WindowManager.class, mWindowManager);
- mFragmentHostManager = mock(FragmentHostManager.class);
- when(mFragmentService.getFragmentHostManager(any())).thenReturn(mFragmentHostManager);
-
-
- mScreenDecorations = new ScreenDecorations(mContext, mStatusBarLazy, mMainHandler,
+ mScreenDecorations = new ScreenDecorations(mContext, mMainHandler,
mBroadcastDispatcher, mTunerService) {
@Override
public void start() {
@@ -159,8 +123,6 @@
mScreenDecorations.start();
// No views added.
verify(mWindowManager, never()).addView(any(), any());
- // No Fragments watched.
- verify(mFragmentHostManager, never()).addTagListener(any(), any());
// No Tuners tuned.
verify(mTunerService, never()).addTunable(any(), any());
}
@@ -178,12 +140,8 @@
// Add 2 windows for rounded corners (top and bottom).
verify(mWindowManager, times(2)).addView(any(), any());
- // Add 2 tag listeners for each of the fragments that are needed.
- verify(mFragmentHostManager, times(2)).addTagListener(any(), any());
// One tunable.
verify(mTunerService, times(1)).addTunable(any(), any());
- // One TunablePadding.
- verify(mTunablePaddingService, times(1)).add(any(), anyString(), anyInt(), anyInt());
}
@Test
@@ -227,29 +185,6 @@
}
@Test
- public void testPaddingTagListener() {
- TunablePaddingTagListener tagListener = new TunablePaddingTagListener(14, 5);
- View v = mock(View.class);
- View child = mock(View.class);
- Fragment f = mock(Fragment.class);
- TunablePadding padding = mock(TunablePadding.class);
-
- when(mTunablePaddingService.add(any(), anyString(), anyInt(), anyInt()))
- .thenReturn(padding);
- when(f.getView()).thenReturn(v);
- when(v.findViewById(5)).thenReturn(child);
-
- // Trigger callback and verify we get a TunablePadding created.
- tagListener.onFragmentViewCreated(null, f);
- verify(mTunablePaddingService).add(eq(child), eq(ScreenDecorations.PADDING), eq(14),
- eq(FLAG_START | FLAG_END));
-
- // Call again and verify destroy is called.
- tagListener.onFragmentViewCreated(null, f);
- verify(padding).destroy();
- }
-
- @Test
public void testUpdateRoundedCorners() {
mContext.getOrCreateTestableResources().addOverride(
com.android.internal.R.bool.config_fillMainBuiltInDisplayCutout, false);
diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/row/NotificationBlockingHelperManagerTest.java b/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/row/NotificationBlockingHelperManagerTest.java
index 1dfe7bc..a8c438a 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/row/NotificationBlockingHelperManagerTest.java
+++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/row/NotificationBlockingHelperManagerTest.java
@@ -28,6 +28,7 @@
import static org.mockito.ArgumentMatchers.any;
import static org.mockito.ArgumentMatchers.anyInt;
import static org.mockito.ArgumentMatchers.anyString;
+import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.never;
import static org.mockito.Mockito.spy;
import static org.mockito.Mockito.times;
@@ -43,6 +44,7 @@
import androidx.test.filters.FlakyTest;
import androidx.test.filters.SmallTest;
+import com.android.internal.logging.MetricsLogger;
import com.android.systemui.SysuiTestCase;
import com.android.systemui.bubbles.BubbleController;
import com.android.systemui.plugins.statusbar.NotificationMenuRowPlugin;
@@ -83,13 +85,12 @@
any(NotificationMenuRowPlugin.MenuItem.class)))
.thenReturn(true);
when(mMenuRow.getLongpressMenuItem(any(Context.class))).thenReturn(mMenuItem);
- mDependency.injectTestDependency(NotificationGutsManager.class, mGutsManager);
- mDependency.injectTestDependency(NotificationEntryManager.class, mEntryManager);
mDependency.injectMockDependency(BubbleController.class);
mHelper = new NotificationTestHelper(mContext, mDependency);
- mBlockingHelperManager = new NotificationBlockingHelperManager(mContext);
+ mBlockingHelperManager = new NotificationBlockingHelperManager(
+ mContext, mGutsManager, mEntryManager, mock(MetricsLogger.class));
// By default, have the shade visible/expanded.
mBlockingHelperManager.setNotificationShadeExpanded(1f);
}
diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/row/NotificationContentInflaterTest.java b/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/row/NotificationContentInflaterTest.java
index 8a42e5f..149a95a 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/row/NotificationContentInflaterTest.java
+++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/row/NotificationContentInflaterTest.java
@@ -50,10 +50,12 @@
import com.android.systemui.SysuiTestCase;
import com.android.systemui.statusbar.NotificationRemoteInputManager;
+import com.android.systemui.statusbar.SmartReplyController;
import com.android.systemui.statusbar.notification.collection.NotificationEntry;
import com.android.systemui.statusbar.notification.row.NotificationRowContentBinder.BindParams;
import com.android.systemui.statusbar.notification.row.NotificationRowContentBinder.InflationCallback;
import com.android.systemui.statusbar.notification.row.NotificationRowContentBinder.InflationFlag;
+import com.android.systemui.statusbar.policy.SmartReplyConstants;
import com.android.systemui.tests.R;
import org.junit.Assert;
@@ -92,9 +94,14 @@
ExpandableNotificationRow row = new NotificationTestHelper(mContext, mDependency).createRow(
mBuilder.build());
mRow = spy(row);
+
+ final SmartReplyConstants smartReplyConstants = mock(SmartReplyConstants.class);
+ final SmartReplyController smartReplyController = mock(SmartReplyController.class);
mNotificationInflater = new NotificationContentInflater(
mCache,
- mock(NotificationRemoteInputManager.class));
+ mock(NotificationRemoteInputManager.class),
+ () -> smartReplyConstants,
+ () -> smartReplyController);
}
@Test
diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/row/NotificationConversationInfoTest.java b/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/row/NotificationConversationInfoTest.java
index e8de10f7..27b263f 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/row/NotificationConversationInfoTest.java
+++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/row/NotificationConversationInfoTest.java
@@ -51,7 +51,8 @@
import android.content.pm.PackageManager;
import android.content.pm.ShortcutInfo;
import android.content.pm.ShortcutManager;
-import android.graphics.drawable.Drawable;
+import android.graphics.Bitmap;
+import android.graphics.drawable.BitmapDrawable;
import android.graphics.drawable.Icon;
import android.os.UserHandle;
import android.service.notification.StatusBarNotification;
@@ -60,12 +61,12 @@
import android.testing.TestableLooper;
import android.view.LayoutInflater;
import android.view.View;
-import android.widget.Button;
import android.widget.ImageButton;
import android.widget.ImageView;
import android.widget.TextView;
import com.android.internal.logging.MetricsLogger;
+import com.android.settingslib.notification.ConversationIconFactory;
import com.android.systemui.Dependency;
import com.android.systemui.R;
import com.android.systemui.SysuiTestCase;
@@ -112,7 +113,8 @@
private NotificationEntry mBubbleEntry;
@Mock
private ShortcutInfo mShortcutInfo;
- private Drawable mImage;
+ @Mock
+ private Bitmap mImage;
@Rule
public MockitoRule mockito = MockitoJUnit.rule();
@@ -134,6 +136,8 @@
private NotificationGuts mNotificationGuts;
@Mock
private ShadeController mShadeController;
+ @Mock
+ private ConversationIconFactory mIconFactory;
@Before
public void setUp() throws Exception {
@@ -176,9 +180,8 @@
when(mShortcutInfo.getShortLabel()).thenReturn("Convo name");
List<ShortcutInfo> shortcuts = Arrays.asList(mShortcutInfo);
when(mLauncherApps.getShortcuts(any(), any())).thenReturn(shortcuts);
- mImage = mContext.getDrawable(R.drawable.ic_remove);
- when(mLauncherApps.getShortcutBadgedIconDrawable(eq(mShortcutInfo),
- anyInt())).thenReturn(mImage);
+ when(mIconFactory.getConversationBitmap(any(ShortcutInfo.class), anyString(), anyInt()))
+ .thenReturn(mImage);
mNotificationChannel = new NotificationChannel(
TEST_CHANNEL, TEST_CHANNEL_NAME, IMPORTANCE_LOW);
@@ -224,9 +227,10 @@
null,
null,
null,
+ mIconFactory,
true);
final ImageView view = mNotificationInfo.findViewById(R.id.conversation_icon);
- assertEquals(mImage, view.getDrawable());
+ assertEquals(mImage, ((BitmapDrawable) view.getDrawable()).getBitmap());
}
@Test
@@ -244,6 +248,7 @@
null,
null,
null,
+ mIconFactory,
true);
final TextView textView = mNotificationInfo.findViewById(R.id.pkg_name);
assertTrue(textView.getText().toString().contains("App Name"));
@@ -290,6 +295,7 @@
null,
null,
null,
+ mIconFactory,
true);
final TextView textView = mNotificationInfo.findViewById(R.id.group_name);
assertTrue(textView.getText().toString().contains(group.getName()));
@@ -312,6 +318,7 @@
null,
null,
null,
+ mIconFactory,
true);
final TextView textView = mNotificationInfo.findViewById(R.id.group_name);
assertEquals(VISIBLE, mNotificationInfo.findViewById(R.id.header).getVisibility());
@@ -333,6 +340,7 @@
null,
null,
null,
+ mIconFactory,
true);
final TextView nameView = mNotificationInfo.findViewById(R.id.delegate_name);
assertEquals(GONE, nameView.getVisibility());
@@ -361,6 +369,7 @@
null,
null,
null,
+ mIconFactory,
true);
final TextView nameView = mNotificationInfo.findViewById(R.id.delegate_name);
assertEquals(VISIBLE, nameView.getVisibility());
@@ -385,6 +394,7 @@
},
null,
null,
+ mIconFactory,
true);
final View settingsButton = mNotificationInfo.findViewById(R.id.info);
@@ -407,6 +417,7 @@
null,
null,
null,
+ mIconFactory,
true);
final View settingsButton = mNotificationInfo.findViewById(R.id.info);
assertTrue(settingsButton.getVisibility() != View.VISIBLE);
@@ -430,6 +441,7 @@
},
null,
null,
+ mIconFactory,
false);
final View settingsButton = mNotificationInfo.findViewById(R.id.info);
assertTrue(settingsButton.getVisibility() != View.VISIBLE);
@@ -449,6 +461,7 @@
null,
null,
null,
+ mIconFactory,
true);
View bubbleView = mNotificationInfo.findViewById(R.id.bubble);
@@ -469,6 +482,7 @@
null,
null,
null,
+ mIconFactory,
true);
View bubbleView = mNotificationInfo.findViewById(R.id.bubble);
@@ -491,9 +505,9 @@
null,
null,
null,
+ mIconFactory,
true);
-
// Promote it
mNotificationInfo.findViewById(R.id.home).performClick();
mTestableLooper.processAllMessages();
@@ -522,9 +536,9 @@
(View v, int hours) -> {
latch.countDown();
},
+ mIconFactory,
true);
-
// Promote it
mNotificationInfo.findViewById(R.id.snooze).performClick();
mTestableLooper.processAllMessages();
@@ -551,6 +565,7 @@
null,
null,
null,
+ mIconFactory,
true);
assertFalse(mBubbleEntry.isBubble());
@@ -583,6 +598,7 @@
null,
null,
null,
+ mIconFactory,
true);
assertTrue(mBubbleEntry.isBubble());
@@ -613,6 +629,7 @@
null,
null,
null,
+ mIconFactory,
true);
assertFalse(mBubbleEntry.isBubble());
@@ -641,9 +658,9 @@
null,
null,
null,
+ mIconFactory,
true);
-
ImageButton fave = mNotificationInfo.findViewById(R.id.fave);
assertEquals(mContext.getString(R.string.notification_conversation_unfavorite),
fave.getContentDescription().toString());
@@ -675,6 +692,7 @@
null,
null,
null,
+ mIconFactory,
true);
ImageButton fave = mNotificationInfo.findViewById(R.id.fave);
@@ -708,6 +726,7 @@
null,
null,
null,
+ mIconFactory,
true);
ImageButton mute = mNotificationInfo.findViewById(R.id.mute);
@@ -743,9 +762,9 @@
null,
null,
null,
+ mIconFactory,
true);
-
ImageButton mute = mNotificationInfo.findViewById(R.id.mute);
assertEquals(mContext.getString(R.string.notification_conversation_mute),
mute.getContentDescription().toString());
@@ -774,7 +793,9 @@
null,
null,
null,
+ mIconFactory,
true);
+
verify(mMockINotificationManager, times(1)).createConversationNotificationChannelForPackage(
anyString(), anyInt(), anyString(), any(), eq(CONVERSATION_ID));
}
@@ -794,7 +815,9 @@
null,
null,
null,
+ mIconFactory,
true);
+
verify(mMockINotificationManager, never()).createConversationNotificationChannelForPackage(
anyString(), anyInt(), anyString(), any(), eq(CONVERSATION_ID));
}
@@ -815,6 +838,7 @@
null,
null,
null,
+ mIconFactory,
true);
mNotificationInfo.findViewById(R.id.mute).performClick();
diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/row/NotificationTestHelper.java b/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/row/NotificationTestHelper.java
index 7a1bd05..9a52ee8 100644
--- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/row/NotificationTestHelper.java
+++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/row/NotificationTestHelper.java
@@ -60,6 +60,7 @@
import com.android.systemui.statusbar.phone.KeyguardBypassController;
import com.android.systemui.statusbar.phone.NotificationGroupManager;
import com.android.systemui.statusbar.phone.NotificationShadeWindowController;
+import com.android.systemui.statusbar.policy.SmartReplyConstants;
import com.android.systemui.tests.R;
import org.mockito.ArgumentCaptor;
@@ -98,7 +99,6 @@
dependency.injectMockDependency(NotificationMediaManager.class);
dependency.injectMockDependency(BubbleController.class);
dependency.injectMockDependency(NotificationShadeWindowController.class);
- dependency.injectMockDependency(SmartReplyController.class);
mStatusBarStateController = mock(StatusBarStateController.class);
mGroupManager = new NotificationGroupManager(mStatusBarStateController);
mHeadsUpManager = new HeadsUpManagerPhone(mContext, mStatusBarStateController,
@@ -106,10 +106,11 @@
mHeadsUpManager.setUp(null, mGroupManager, null, null);
mGroupManager.setHeadsUpManager(mHeadsUpManager);
-
NotificationContentInflater contentBinder = new NotificationContentInflater(
mock(NotifRemoteViewCache.class),
- mock(NotificationRemoteInputManager.class));
+ mock(NotificationRemoteInputManager.class),
+ () -> mock(SmartReplyConstants.class),
+ () -> mock(SmartReplyController.class));
contentBinder.setInflateSynchronously(true);
mBindStage = new RowContentBindStage(contentBinder,
mock(NotifInflationErrorManager.class),
diff --git a/services/autofill/java/com/android/server/autofill/Session.java b/services/autofill/java/com/android/server/autofill/Session.java
index b3ef134..697e5d7 100644
--- a/services/autofill/java/com/android/server/autofill/Session.java
+++ b/services/autofill/java/com/android/server/autofill/Session.java
@@ -1018,7 +1018,8 @@
// FillServiceCallbacks
@Override
- public void authenticate(int requestId, int datasetIndex, IntentSender intent, Bundle extras) {
+ public void authenticate(int requestId, int datasetIndex, IntentSender intent, Bundle extras,
+ boolean authenticateInline) {
if (sDebug) {
Slog.d(TAG, "authenticate(): requestId=" + requestId + "; datasetIdx=" + datasetIndex
+ "; intentSender=" + intent);
@@ -1042,7 +1043,7 @@
final int authenticationId = AutofillManager.makeAuthenticationId(requestId, datasetIndex);
mHandler.sendMessage(obtainMessage(
Session::startAuthentication,
- this, authenticationId, intent, fillInIntent));
+ this, authenticationId, intent, fillInIntent, authenticateInline));
}
// VultureCallback
@@ -2623,8 +2624,6 @@
mService.getServicePackageName(), mComponentName,
serviceLabel, serviceIcon, this, id, mCompatMode);
- mService.logDatasetShown(id, mClientState);
-
synchronized (mLock) {
if (mUiShownTime == 0) {
// Log first time UI is shown.
@@ -2656,10 +2655,6 @@
private boolean requestShowInlineSuggestionsLocked(@NonNull FillResponse response,
@Nullable String filterText) {
final List<Dataset> datasets = response.getDatasets();
- if (datasets == null) {
- Log.w(TAG, "response returned null datasets");
- return false;
- }
final InlineSuggestionSession.ImeResponse imeResponse =
mInlineSuggestionSession.waitAndGetImeResponse();
@@ -2671,9 +2666,8 @@
final InlineSuggestionsRequest request = imeResponse.getRequest();
InlineSuggestionsResponse inlineSuggestionsResponse =
InlineSuggestionFactory.createInlineSuggestionsResponse(request,
- response.getRequestId(),
- datasets.toArray(new Dataset[]{}), filterText, response.getInlineActions(),
- mCurrentViewId, mContext, this, () -> {
+ response, filterText, response.getInlineActions(), mCurrentViewId, mContext,
+ this, () -> {
synchronized (mLock) {
requestHideFillUi(mCurrentViewId);
}
@@ -3160,7 +3154,8 @@
}
final int authenticationId = AutofillManager.makeAuthenticationId(requestId,
datasetIndex);
- startAuthentication(authenticationId, dataset.getAuthentication(), fillInIntent);
+ startAuthentication(authenticationId, dataset.getAuthentication(), fillInIntent,
+ /* authenticateInline= */false);
}
}
@@ -3184,10 +3179,11 @@
}
private void startAuthentication(int authenticationId, IntentSender intent,
- Intent fillInIntent) {
+ Intent fillInIntent, boolean authenticateInline) {
try {
synchronized (mLock) {
- mClient.authenticate(id, authenticationId, intent, fillInIntent);
+ mClient.authenticate(id, authenticationId, intent, fillInIntent,
+ authenticateInline);
}
} catch (RemoteException e) {
Slog.e(TAG, "Error launching auth intent", e);
diff --git a/services/autofill/java/com/android/server/autofill/ui/AutoFillUI.java b/services/autofill/java/com/android/server/autofill/ui/AutoFillUI.java
index 26bb7c3..71c3c16 100644
--- a/services/autofill/java/com/android/server/autofill/ui/AutoFillUI.java
+++ b/services/autofill/java/com/android/server/autofill/ui/AutoFillUI.java
@@ -79,7 +79,7 @@
public interface AutoFillUiCallback {
void authenticate(int requestId, int datasetIndex, @NonNull IntentSender intent,
- @Nullable Bundle extras);
+ @Nullable Bundle extras, boolean authenticateInline);
void fill(int requestId, int datasetIndex, @NonNull Dataset dataset);
void save();
void cancelSave();
@@ -217,7 +217,8 @@
if (mCallback != null) {
mCallback.authenticate(response.getRequestId(),
AutofillManager.AUTHENTICATION_ID_DATASET_ID_UNDEFINED,
- response.getAuthentication(), response.getClientState());
+ response.getAuthentication(), response.getClientState(),
+ /* authenticateInline= */ false);
}
}
diff --git a/services/autofill/java/com/android/server/autofill/ui/InlineSuggestionFactory.java b/services/autofill/java/com/android/server/autofill/ui/InlineSuggestionFactory.java
index 54d0433..a8886fc 100644
--- a/services/autofill/java/com/android/server/autofill/ui/InlineSuggestionFactory.java
+++ b/services/autofill/java/com/android/server/autofill/ui/InlineSuggestionFactory.java
@@ -25,12 +25,14 @@
import android.os.IBinder;
import android.os.RemoteException;
import android.service.autofill.Dataset;
+import android.service.autofill.FillResponse;
import android.service.autofill.IInlineSuggestionUiCallback;
import android.service.autofill.InlinePresentation;
import android.text.TextUtils;
import android.util.Slog;
import android.view.SurfaceControl;
import android.view.autofill.AutofillId;
+import android.view.autofill.AutofillManager;
import android.view.autofill.AutofillValue;
import android.view.inline.InlinePresentationSpec;
import android.view.inputmethod.InlineSuggestion;
@@ -69,8 +71,7 @@
* autofill service, potentially filtering the datasets.
*/
public static InlineSuggestionsResponse createInlineSuggestionsResponse(
- @NonNull InlineSuggestionsRequest request, int requestId,
- @NonNull Dataset[] datasets,
+ @NonNull InlineSuggestionsRequest request, @NonNull FillResponse response,
@Nullable String filterText,
@Nullable List<InlinePresentation> inlineActions,
@NonNull AutofillId autofillId,
@@ -79,10 +80,24 @@
@NonNull Runnable onErrorCallback,
@Nullable RemoteInlineSuggestionRenderService remoteRenderService) {
if (sDebug) Slog.d(TAG, "createInlineSuggestionsResponse called");
- return createInlineSuggestionsResponseInternal(/* isAugmented= */ false, request, datasets,
- filterText, inlineActions, autofillId, context, onErrorCallback,
- (dataset, datasetIndex) -> client.fill(requestId, datasetIndex, dataset),
- remoteRenderService);
+ final BiConsumer<Dataset, Integer> onClickFactory;
+ if (response.getAuthentication() != null) {
+ onClickFactory = (dataset, datasetIndex) -> client.authenticate(response.getRequestId(),
+ datasetIndex, response.getAuthentication(), response.getClientState(),
+ /* authenticateInline= */ true);
+ } else {
+ onClickFactory = (dataset, datasetIndex) ->
+ client.fill(response.getRequestId(), datasetIndex, dataset);
+ }
+
+ final List<Dataset> datasetList = response.getDatasets();
+ final Dataset[] datasets = datasetList == null
+ ? null
+ : datasetList.toArray(new Dataset[]{});
+
+ return createInlineSuggestionsResponseInternal(/* isAugmented= */ false, request, response,
+ datasets, filterText, inlineActions, autofillId, context, onErrorCallback,
+ onClickFactory, remoteRenderService);
}
/**
@@ -99,22 +114,38 @@
@Nullable RemoteInlineSuggestionRenderService remoteRenderService) {
if (sDebug) Slog.d(TAG, "createAugmentedInlineSuggestionsResponse called");
return createInlineSuggestionsResponseInternal(/* isAugmented= */ true, request,
- datasets, /* filterText= */ null, /* inlineActions= */ null, autofillId, context,
- onErrorCallback,
- (dataset, fieldIndex) -> inlineSuggestionUiCallback.autofill(dataset),
- remoteRenderService);
+ /* fillResponse= */ null, datasets, /* filterText= */ null,
+ /* inlineActions= */ null, autofillId, context, onErrorCallback,
+ (dataset, fieldIndex) ->
+ inlineSuggestionUiCallback.autofill(dataset), remoteRenderService);
}
private static InlineSuggestionsResponse createInlineSuggestionsResponseInternal(
boolean isAugmented, @NonNull InlineSuggestionsRequest request,
- @NonNull Dataset[] datasets, @Nullable String filterText,
+ @Nullable FillResponse response, @Nullable Dataset[] datasets,
+ @Nullable String filterText,
@Nullable List<InlinePresentation> inlineActions, @NonNull AutofillId autofillId,
@NonNull Context context, @NonNull Runnable onErrorCallback,
@NonNull BiConsumer<Dataset, Integer> onClickFactory,
@Nullable RemoteInlineSuggestionRenderService remoteRenderService) {
+
final ArrayList<InlineSuggestion> inlineSuggestions = new ArrayList<>();
- for (int i = 0; i < datasets.length; i++) {
- final Dataset dataset = datasets[i];
+ if (response.getAuthentication() != null) {
+ InlineSuggestion inlineAuthSuggestion = createInlineAuthSuggestion(response,
+ remoteRenderService, onClickFactory, onErrorCallback,
+ request.getHostInputToken());
+ inlineSuggestions.add(inlineAuthSuggestion);
+
+ return new InlineSuggestionsResponse(inlineSuggestions);
+ }
+
+ if (datasets == null) {
+ Slog.w(TAG, "Datasets should not be null here");
+ return null;
+ }
+
+ for (int datasetIndex = 0; datasetIndex < datasets.length; datasetIndex++) {
+ final Dataset dataset = datasets[datasetIndex];
final int fieldIndex = dataset.getFieldIds().indexOf(autofillId);
if (fieldIndex < 0) {
Slog.w(TAG, "AutofillId=" + autofillId + " not found in dataset");
@@ -130,9 +161,10 @@
continue;
}
InlineSuggestion inlineSuggestion = createInlineSuggestion(isAugmented, dataset,
- fieldIndex, mergedInlinePresentation(request, i, inlinePresentation),
+ fieldIndex, mergedInlinePresentation(request, datasetIndex, inlinePresentation),
onClickFactory, remoteRenderService, onErrorCallback,
request.getHostInputToken());
+
inlineSuggestions.add(inlineSuggestion);
}
if (inlineActions != null) {
@@ -198,7 +230,7 @@
}
private static InlineSuggestion createInlineSuggestion(boolean isAugmented,
- @NonNull Dataset dataset, int fieldIndex,
+ @NonNull Dataset dataset, int datasetIndex,
@NonNull InlinePresentation inlinePresentation,
@NonNull BiConsumer<Dataset, Integer> onClickFactory,
@NonNull RemoteInlineSuggestionRenderService remoteRenderService,
@@ -212,12 +244,28 @@
final InlineSuggestion inlineSuggestion = new InlineSuggestion(inlineSuggestionInfo,
createInlineContentProvider(inlinePresentation,
- () -> onClickFactory.accept(dataset, fieldIndex), onErrorCallback,
+ () -> onClickFactory.accept(dataset, datasetIndex), onErrorCallback,
remoteRenderService, hostInputToken));
return inlineSuggestion;
}
+ private static InlineSuggestion createInlineAuthSuggestion(@NonNull FillResponse response,
+ @NonNull RemoteInlineSuggestionRenderService remoteRenderService,
+ @NonNull BiConsumer<Dataset, Integer> onClickFactory, @NonNull Runnable onErrorCallback,
+ @Nullable IBinder hostInputToken) {
+ final InlinePresentation inlinePresentation = response.getInlinePresentation();
+ final InlineSuggestionInfo inlineSuggestionInfo = new InlineSuggestionInfo(
+ inlinePresentation.getInlinePresentationSpec(),
+ InlineSuggestionInfo.SOURCE_AUTOFILL, null, InlineSuggestionInfo.TYPE_SUGGESTION);
+
+ return new InlineSuggestion(inlineSuggestionInfo,
+ createInlineContentProvider(inlinePresentation,
+ () -> onClickFactory.accept(null,
+ AutofillManager.AUTHENTICATION_ID_DATASET_ID_UNDEFINED),
+ onErrorCallback, remoteRenderService, hostInputToken));
+ }
+
/**
* Returns an {@link InlinePresentation} with the style spec from the request/host, and
* everything else from the provided {@code inlinePresentation}.
@@ -299,4 +347,4 @@
private InlineSuggestionFactory() {
}
-}
+}
\ No newline at end of file
diff --git a/services/core/java/com/android/server/BluetoothManagerService.java b/services/core/java/com/android/server/BluetoothManagerService.java
index 311a494..a4a42bc 100644
--- a/services/core/java/com/android/server/BluetoothManagerService.java
+++ b/services/core/java/com/android/server/BluetoothManagerService.java
@@ -69,6 +69,7 @@
import android.util.FeatureFlagUtils;
import android.util.Log;
import android.util.Slog;
+import android.util.proto.ProtoOutputStream;
import com.android.internal.R;
import com.android.internal.annotations.VisibleForTesting;
@@ -196,6 +197,12 @@
+ " due to " + getEnableDisableReasonString(mReason) + " by " + mPackageName;
}
+ void dump(ProtoOutputStream proto) {
+ proto.write(BluetoothManagerServiceDumpProto.ActiveLog.TIMESTAMP_MS, mTimestamp);
+ proto.write(BluetoothManagerServiceDumpProto.ActiveLog.ENABLE, mEnable);
+ proto.write(BluetoothManagerServiceDumpProto.ActiveLog.PACKAGE_NAME, mPackageName);
+ proto.write(BluetoothManagerServiceDumpProto.ActiveLog.REASON, mReason);
+ }
}
private final LinkedList<ActiveLog> mActiveLogs = new LinkedList<>();
@@ -2408,56 +2415,56 @@
if (!DumpUtils.checkDumpPermission(mContext, TAG, writer)) {
return;
}
+ if ((args.length > 0) && args[0].startsWith("--proto")) {
+ dumpProto(fd);
+ return;
+ }
String errorMsg = null;
- boolean protoOut = (args.length > 0) && args[0].startsWith("--proto");
+ writer.println("Bluetooth Status");
+ writer.println(" enabled: " + isEnabled());
+ writer.println(" state: " + BluetoothAdapter.nameForState(mState));
+ writer.println(" address: " + mAddress);
+ writer.println(" name: " + mName);
+ if (mEnable) {
+ long onDuration = SystemClock.elapsedRealtime() - mLastEnabledTime;
+ String onDurationString = String.format(Locale.US, "%02d:%02d:%02d.%03d",
+ (int) (onDuration / (1000 * 60 * 60)),
+ (int) ((onDuration / (1000 * 60)) % 60), (int) ((onDuration / 1000) % 60),
+ (int) (onDuration % 1000));
+ writer.println(" time since enabled: " + onDurationString);
+ }
- if (!protoOut) {
- writer.println("Bluetooth Status");
- writer.println(" enabled: " + isEnabled());
- writer.println(" state: " + BluetoothAdapter.nameForState(mState));
- writer.println(" address: " + mAddress);
- writer.println(" name: " + mName);
- if (mEnable) {
- long onDuration = SystemClock.elapsedRealtime() - mLastEnabledTime;
- String onDurationString = String.format(Locale.US, "%02d:%02d:%02d.%03d",
- (int) (onDuration / (1000 * 60 * 60)),
- (int) ((onDuration / (1000 * 60)) % 60), (int) ((onDuration / 1000) % 60),
- (int) (onDuration % 1000));
- writer.println(" time since enabled: " + onDurationString);
+ if (mActiveLogs.size() == 0) {
+ writer.println("\nBluetooth never enabled!");
+ } else {
+ writer.println("\nEnable log:");
+ for (ActiveLog log : mActiveLogs) {
+ writer.println(" " + log);
}
+ }
- if (mActiveLogs.size() == 0) {
- writer.println("\nBluetooth never enabled!");
- } else {
- writer.println("\nEnable log:");
- for (ActiveLog log : mActiveLogs) {
- writer.println(" " + log);
- }
- }
+ writer.println(
+ "\nBluetooth crashed " + mCrashes + " time" + (mCrashes == 1 ? "" : "s"));
+ if (mCrashes == CRASH_LOG_MAX_SIZE) {
+ writer.println("(last " + CRASH_LOG_MAX_SIZE + ")");
+ }
+ for (Long time : mCrashTimestamps) {
+ writer.println(" " + timeToLog(time));
+ }
- writer.println(
- "\nBluetooth crashed " + mCrashes + " time" + (mCrashes == 1 ? "" : "s"));
- if (mCrashes == CRASH_LOG_MAX_SIZE) {
- writer.println("(last " + CRASH_LOG_MAX_SIZE + ")");
- }
- for (Long time : mCrashTimestamps) {
- writer.println(" " + timeToLog(time));
- }
+ writer.println("\n" + mBleApps.size() + " BLE app" + (mBleApps.size() == 1 ? "" : "s")
+ + " registered");
+ for (ClientDeathRecipient app : mBleApps.values()) {
+ writer.println(" " + app.getPackageName());
+ }
- writer.println("\n" + mBleApps.size() + " BLE app" + (mBleApps.size() == 1 ? "" : "s")
- + "registered");
- for (ClientDeathRecipient app : mBleApps.values()) {
- writer.println(" " + app.getPackageName());
- }
-
- writer.println("");
- writer.flush();
- if (args.length == 0) {
- // Add arg to produce output
- args = new String[1];
- args[0] = "--print";
- }
+ writer.println("");
+ writer.flush();
+ if (args.length == 0) {
+ // Add arg to produce output
+ args = new String[1];
+ args[0] = "--print";
}
if (mBluetoothBinder == null) {
@@ -2470,14 +2477,42 @@
}
}
if (errorMsg != null) {
- // Silently return if we are extracting metrics in Protobuf format
- if (protoOut) {
- return;
- }
writer.println(errorMsg);
}
}
+ private void dumpProto(FileDescriptor fd) {
+ final ProtoOutputStream proto = new ProtoOutputStream(fd);
+ proto.write(BluetoothManagerServiceDumpProto.ENABLED, isEnabled());
+ proto.write(BluetoothManagerServiceDumpProto.STATE, mState);
+ proto.write(BluetoothManagerServiceDumpProto.STATE_NAME,
+ BluetoothAdapter.nameForState(mState));
+ proto.write(BluetoothManagerServiceDumpProto.ADDRESS, mAddress);
+ proto.write(BluetoothManagerServiceDumpProto.NAME, mName);
+ if (mEnable) {
+ proto.write(BluetoothManagerServiceDumpProto.LAST_ENABLED_TIME_MS, mLastEnabledTime);
+ }
+ proto.write(BluetoothManagerServiceDumpProto.CURR_TIMESTAMP_MS,
+ SystemClock.elapsedRealtime());
+ for (ActiveLog log : mActiveLogs) {
+ long token = proto.start(BluetoothManagerServiceDumpProto.ACTIVE_LOGS);
+ log.dump(proto);
+ proto.end(token);
+ }
+ proto.write(BluetoothManagerServiceDumpProto.NUM_CRASHES, mCrashes);
+ proto.write(BluetoothManagerServiceDumpProto.CRASH_LOG_MAXED,
+ mCrashes == CRASH_LOG_MAX_SIZE);
+ for (Long time : mCrashTimestamps) {
+ proto.write(BluetoothManagerServiceDumpProto.CRASH_TIMESTAMPS_MS, time);
+ }
+ proto.write(BluetoothManagerServiceDumpProto.NUM_BLE_APPS, mBleApps.size());
+ for (ClientDeathRecipient app : mBleApps.values()) {
+ proto.write(BluetoothManagerServiceDumpProto.BLE_APP_PACKAGE_NAMES,
+ app.getPackageName());
+ }
+ proto.flush();
+ }
+
private static String getEnableDisableReasonString(int reason) {
switch (reason) {
case BluetoothProtoEnums.ENABLE_DISABLE_REASON_APPLICATION_REQUEST:
diff --git a/services/core/java/com/android/server/StorageManagerService.java b/services/core/java/com/android/server/StorageManagerService.java
index b5b22f1..033f63b 100644
--- a/services/core/java/com/android/server/StorageManagerService.java
+++ b/services/core/java/com/android/server/StorageManagerService.java
@@ -28,6 +28,10 @@
import static android.app.AppOpsManager.OP_READ_EXTERNAL_STORAGE;
import static android.app.AppOpsManager.OP_REQUEST_INSTALL_PACKAGES;
import static android.app.AppOpsManager.OP_WRITE_EXTERNAL_STORAGE;
+import static android.content.pm.PackageManager.MATCH_ANY_USER;
+import static android.content.pm.PackageManager.MATCH_DIRECT_BOOT_AWARE;
+import static android.content.pm.PackageManager.MATCH_DIRECT_BOOT_UNAWARE;
+import static android.content.pm.PackageManager.MATCH_UNINSTALLED_PACKAGES;
import static android.content.pm.PackageManager.PERMISSION_GRANTED;
import static android.os.ParcelFileDescriptor.MODE_READ_WRITE;
import static android.os.storage.OnObbStateChangeListener.ERROR_ALREADY_MOUNTED;
@@ -136,6 +140,7 @@
import com.android.internal.annotations.GuardedBy;
import com.android.internal.app.IAppOpsCallback;
import com.android.internal.app.IAppOpsService;
+import com.android.internal.content.PackageMonitor;
import com.android.internal.os.AppFuseMount;
import com.android.internal.os.BackgroundThread;
import com.android.internal.os.FuseUnavailableMountException;
@@ -149,6 +154,7 @@
import com.android.internal.util.IndentingPrintWriter;
import com.android.internal.util.Preconditions;
import com.android.internal.widget.LockPatternUtils;
+import com.android.server.SystemService.TargetUser;
import com.android.server.pm.Installer;
import com.android.server.storage.AppFuseBridge;
import com.android.server.storage.StorageSessionController;
@@ -184,6 +190,7 @@
import java.util.Map;
import java.util.Map.Entry;
import java.util.Objects;
+import java.util.Set;
import java.util.concurrent.CopyOnWriteArrayList;
import java.util.concurrent.CountDownLatch;
import java.util.concurrent.TimeUnit;
@@ -270,6 +277,11 @@
public void onStopUser(int userHandle) {
mStorageManagerService.onStopUser(userHandle);
}
+
+ @Override
+ public void onStartUser(TargetUser user) {
+ mStorageManagerService.snapshotAndMonitorLegacyStorageAppOp(user.getUserHandle());
+ }
}
private static final boolean DEBUG_EVENTS = false;
@@ -578,6 +590,12 @@
private final boolean mIsFuseEnabled;
+ @GuardedBy("mLock")
+ private final Set<Integer> mUidsWithLegacyExternalStorage = new ArraySet<>();
+ // Not guarded by lock, always used on the ActivityManager thread
+ private final Map<Integer, PackageMonitor> mPackageMonitorsForUser = new ArrayMap<>();
+
+
class ObbState implements IBinder.DeathRecipient {
public ObbState(String rawPath, String canonicalPath, int callingUid,
IObbActionListener token, int nonce, String volId) {
@@ -1145,6 +1163,10 @@
} catch (Exception e) {
Slog.wtf(TAG, e);
}
+ PackageMonitor monitor = mPackageMonitorsForUser.remove(userId);
+ if (monitor != null) {
+ monitor.unregister();
+ }
}
private boolean supportsBlockCheckpoint() throws RemoteException {
@@ -1836,6 +1858,49 @@
}
}
+ private void updateLegacyStorageApps(String packageName, int uid, boolean hasLegacy) {
+ synchronized (mLock) {
+ if (hasLegacy) {
+ Slog.v(TAG, "Package " + packageName + " has legacy storage");
+ mUidsWithLegacyExternalStorage.add(uid);
+ } else {
+ // TODO(b/149391976): Handle shared user id. Check if there's any other
+ // installed app with legacy external storage before removing
+ Slog.v(TAG, "Package " + packageName + " does not have legacy storage");
+ mUidsWithLegacyExternalStorage.remove(uid);
+ }
+ }
+ }
+
+ private void snapshotAndMonitorLegacyStorageAppOp(UserHandle user) {
+ int userId = user.getIdentifier();
+
+ // TODO(b/149391976): Use mIAppOpsService.getPackagesForOps instead of iterating below
+ // It should improve performance but the AppOps method doesn't return any app here :(
+ // This operation currently takes about ~20ms on a freshly flashed device
+ for (ApplicationInfo ai : mPmInternal.getInstalledApplications(MATCH_DIRECT_BOOT_AWARE
+ | MATCH_DIRECT_BOOT_UNAWARE | MATCH_UNINSTALLED_PACKAGES | MATCH_ANY_USER,
+ userId, Process.myUid())) {
+ try {
+ boolean hasLegacy = mIAppOpsService.checkOperation(OP_LEGACY_STORAGE, ai.uid,
+ ai.packageName) == MODE_ALLOWED;
+ updateLegacyStorageApps(ai.packageName, ai.uid, hasLegacy);
+ } catch (RemoteException e) {
+ Slog.e(TAG, "Failed to check legacy op for package " + ai.packageName, e);
+ }
+ }
+
+ PackageMonitor monitor = new PackageMonitor() {
+ @Override
+ public void onPackageRemoved(String packageName, int uid) {
+ updateLegacyStorageApps(packageName, uid, false);
+ }
+ };
+ // TODO(b/149391976): Use different handler?
+ monitor.register(mContext, user, true, mHandler);
+ mPackageMonitorsForUser.put(userId, monitor);
+ }
+
private static long getLastAccessTime(AppOpsManager manager,
int uid, String packageName, int[] ops) {
long maxTime = 0;
@@ -3975,7 +4040,7 @@
if (mIsFuseEnabled && hasMtp) {
ApplicationInfo ai = mIPackageManager.getApplicationInfo(packageName,
0, UserHandle.getUserId(uid));
- if (ai.isSignedWithPlatformKey()) {
+ if (ai != null && ai.isSignedWithPlatformKey()) {
// Platform processes hosting the MTP server should be able to write in Android/
return Zygote.MOUNT_EXTERNAL_ANDROID_WRITABLE;
}
@@ -4337,6 +4402,13 @@
mHandler.obtainMessage(H_RESET).sendToTarget();
}
+ @Override
+ public boolean hasLegacyExternalStorage(int uid) {
+ synchronized (mLock) {
+ return mUidsWithLegacyExternalStorage.contains(uid);
+ }
+ }
+
public boolean hasExternalStorage(int uid, String packageName) {
// No need to check for system uid. This avoids a deadlock between
// PackageManagerService and AppOpsService.
@@ -4382,8 +4454,11 @@
// volumes, USB OTGs that are rarely mounted. The app will get the
// external_storage gid on next organic restart.
killAppForOpChange(code, uid, packageName);
- return;
}
+ return;
+ case OP_LEGACY_STORAGE:
+ updateLegacyStorageApps(packageName, uid, mode == MODE_ALLOWED);
+ return;
}
}
diff --git a/services/core/java/com/android/server/am/ActivityManagerService.java b/services/core/java/com/android/server/am/ActivityManagerService.java
index ad550c5..1da07ef 100644
--- a/services/core/java/com/android/server/am/ActivityManagerService.java
+++ b/services/core/java/com/android/server/am/ActivityManagerService.java
@@ -7156,7 +7156,7 @@
} finally {
Binder.restoreCallingIdentity(ident);
}
- } else if (dyingProc == cpr.proc) {
+ } else if (dyingProc == cpr.proc && dyingProc != null) {
// The old stable connection's client should be killed during proc cleaning up,
// so do not re-use the old ContentProviderRecord, otherwise the new clients
// could get killed unexpectedly.
@@ -8387,6 +8387,9 @@
@Override
public void setActivityController(IActivityController controller, boolean imAMonkey) {
+ if (controller != null) {
+ Binder.allowBlocking(controller.asBinder());
+ }
mActivityTaskManager.setActivityController(controller, imAMonkey);
}
diff --git a/services/core/java/com/android/server/am/UserController.java b/services/core/java/com/android/server/am/UserController.java
index 88eb885..fb48db4 100644
--- a/services/core/java/com/android/server/am/UserController.java
+++ b/services/core/java/com/android/server/am/UserController.java
@@ -30,6 +30,7 @@
import static android.os.Process.SHELL_UID;
import static android.os.Process.SYSTEM_UID;
+import static com.android.internal.util.FrameworkStatsLog.BOOT_TIME_EVENT_ELAPSED_TIME__EVENT__FRAMEWORK_LOCKED_BOOT_COMPLETED;
import static com.android.server.am.ActivityManagerDebugConfig.DEBUG_MU;
import static com.android.server.am.ActivityManagerDebugConfig.TAG_AM;
import static com.android.server.am.ActivityManagerDebugConfig.TAG_WITH_CLASS_NAME;
@@ -92,8 +93,8 @@
import com.android.internal.R;
import com.android.internal.annotations.GuardedBy;
import com.android.internal.annotations.VisibleForTesting;
-import com.android.internal.logging.MetricsLogger;
import com.android.internal.util.ArrayUtils;
+import com.android.internal.util.FrameworkStatsLog;
import com.android.internal.widget.LockPatternUtils;
import com.android.server.FgThread;
import com.android.server.LocalServices;
@@ -398,13 +399,14 @@
// Do not report secondary users, runtime restarts or first boot/upgrade
if (userId == UserHandle.USER_SYSTEM
&& !mInjector.isRuntimeRestarted() && !mInjector.isFirstBootOrUpgrade()) {
- int uptimeSeconds = (int)(SystemClock.elapsedRealtime() / 1000);
- MetricsLogger.histogram(mInjector.getContext(),
- "framework_locked_boot_completed", uptimeSeconds);
- final int MAX_UPTIME_SECONDS = 120;
- if (uptimeSeconds > MAX_UPTIME_SECONDS) {
+ final long elapsedTimeMs = SystemClock.elapsedRealtime();
+ FrameworkStatsLog.write(FrameworkStatsLog.BOOT_TIME_EVENT_ELAPSED_TIME_REPORTED,
+ BOOT_TIME_EVENT_ELAPSED_TIME__EVENT__FRAMEWORK_LOCKED_BOOT_COMPLETED,
+ elapsedTimeMs);
+ final long maxElapsedTimeMs = 120_000;
+ if (elapsedTimeMs > maxElapsedTimeMs) {
Slog.wtf("SystemServerTiming",
- "finishUserBoot took too long. uptimeSeconds=" + uptimeSeconds);
+ "finishUserBoot took too long. elapsedTimeMs=" + elapsedTimeMs);
}
}
@@ -618,9 +620,10 @@
// Do not report secondary users, runtime restarts or first boot/upgrade
if (userId == UserHandle.USER_SYSTEM
&& !mInjector.isRuntimeRestarted() && !mInjector.isFirstBootOrUpgrade()) {
- int uptimeSeconds = (int) (SystemClock.elapsedRealtime() / 1000);
- MetricsLogger.histogram(mInjector.getContext(), "framework_boot_completed",
- uptimeSeconds);
+ final long elapsedTimeMs = SystemClock.elapsedRealtime();
+ FrameworkStatsLog.write(FrameworkStatsLog.BOOT_TIME_EVENT_ELAPSED_TIME_REPORTED,
+ FrameworkStatsLog.BOOT_TIME_EVENT_ELAPSED_TIME__EVENT__FRAMEWORK_BOOT_COMPLETED,
+ elapsedTimeMs);
}
final Intent bootIntent = new Intent(Intent.ACTION_BOOT_COMPLETED, null);
bootIntent.putExtra(Intent.EXTRA_USER_HANDLE, userId);
diff --git a/services/core/java/com/android/server/appop/AppOpsService.java b/services/core/java/com/android/server/appop/AppOpsService.java
index 0edc160..5e1582c 100644
--- a/services/core/java/com/android/server/appop/AppOpsService.java
+++ b/services/core/java/com/android/server/appop/AppOpsService.java
@@ -34,6 +34,7 @@
import static android.app.AppOpsManager.OP_COARSE_LOCATION;
import static android.app.AppOpsManager.OP_FLAGS_ALL;
import static android.app.AppOpsManager.OP_FLAG_SELF;
+import static android.app.AppOpsManager.OP_FLAG_TRUSTED_PROXIED;
import static android.app.AppOpsManager.OP_NONE;
import static android.app.AppOpsManager.OP_PLAY_AUDIO;
import static android.app.AppOpsManager.OP_RECORD_AUDIO;
@@ -52,11 +53,14 @@
import static android.app.AppOpsManager.makeKey;
import static android.app.AppOpsManager.modeToName;
import static android.app.AppOpsManager.opToName;
+import static android.app.AppOpsManager.opToPublicName;
import static android.app.AppOpsManager.resolveFirstUnrestrictedUidState;
import static android.content.Intent.ACTION_PACKAGE_REMOVED;
import static android.content.Intent.EXTRA_REPLACING;
import static android.content.pm.PermissionInfo.PROTECTION_DANGEROUS;
import static android.content.pm.PermissionInfo.PROTECTION_FLAG_APPOP;
+import static android.util.StatsLogInternal.RUNTIME_APP_OP_ACCESS__SAMPLING_STRATEGY__RARELY_USED;
+import static android.util.StatsLogInternal.RUNTIME_APP_OP_ACCESS__SAMPLING_STRATEGY__UNIFORM;
import static com.android.server.appop.AppOpsService.ModeCallback.ALL_OPS;
@@ -79,6 +83,8 @@
import android.app.AppOpsManagerInternal;
import android.app.AppOpsManagerInternal.CheckOpsDelegate;
import android.app.AsyncNotedAppOp;
+import android.app.RuntimeAppOpAccessMessage;
+import android.app.SyncNotedAppOp;
import android.compat.Compatibility;
import android.content.BroadcastReceiver;
import android.content.ContentResolver;
@@ -87,6 +93,7 @@
import android.content.IntentFilter;
import android.content.pm.ApplicationInfo;
import android.content.pm.IPackageManager;
+import android.content.pm.PackageInfo;
import android.content.pm.PackageManager;
import android.content.pm.PackageManagerInternal;
import android.content.pm.PermissionInfo;
@@ -137,6 +144,7 @@
import com.android.internal.app.IAppOpsCallback;
import com.android.internal.app.IAppOpsNotedCallback;
import com.android.internal.app.IAppOpsService;
+import com.android.internal.app.MessageSamplingConfig;
import com.android.internal.os.Zygote;
import com.android.internal.util.ArrayUtils;
import com.android.internal.util.DumpUtils;
@@ -147,6 +155,7 @@
import com.android.server.LocalServices;
import com.android.server.LockGuard;
import com.android.server.SystemServerInitThreadPool;
+import com.android.server.pm.PackageList;
import libcore.util.EmptyArray;
@@ -163,6 +172,8 @@
import java.io.PrintWriter;
import java.nio.charset.StandardCharsets;
import java.text.SimpleDateFormat;
+import java.time.Instant;
+import java.time.temporal.ChronoUnit;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
@@ -172,6 +183,8 @@
import java.util.List;
import java.util.Map;
import java.util.Objects;
+import java.util.concurrent.ThreadLocalRandom;
+import java.util.function.Consumer;
public class AppOpsService extends IAppOpsService.Stub {
static final String TAG = "AppOps";
@@ -308,6 +321,34 @@
private ActivityManagerInternal mActivityManagerInternal;
+ /** Package sampled for message collection in the current session */
+ @GuardedBy("this")
+ private String mSampledPackage = null;
+
+ /** Appop sampled for message collection in the current session */
+ @GuardedBy("this")
+ private int mSampledAppOpCode = OP_NONE;
+
+ /** Maximum distance for appop to be considered for message collection in the current session */
+ @GuardedBy("this")
+ private int mAcceptableLeftDistance = 0;
+
+ /** Number of messages collected for sampled package and appop in the current session */
+ @GuardedBy("this")
+ private float mMessagesCollectedCount;
+
+ /** List of rarely used packages priorities for message collection */
+ @GuardedBy("this")
+ private ArraySet<String> mRarelyUsedPackages = new ArraySet<>();
+
+ /** Sampling strategy used for current session */
+ @GuardedBy("this")
+ @AppOpsManager.SamplingStrategy
+ private int mSamplingStrategy;
+
+ /** Last runtime permission access message collected and ready for reporting */
+ @GuardedBy("this")
+ private RuntimeAppOpAccessMessage mCollectedRuntimePermissionMessage;
/**
* An unsynchronized pool of {@link OpEventProxyInfo} objects.
*/
@@ -1236,9 +1277,16 @@
UserHandle.formatUid(sb, mWatchingUid);
sb.append(" flags=0x");
sb.append(Integer.toHexString(mFlags));
- if (mWatchedOpCode != OP_NONE) {
- sb.append(" op=");
- sb.append(opToName(mWatchedOpCode));
+ switch (mWatchedOpCode) {
+ case OP_NONE:
+ break;
+ case ALL_OPS:
+ sb.append(" op=(all)");
+ break;
+ default:
+ sb.append(" op=");
+ sb.append(opToName(mWatchedOpCode));
+ break;
}
sb.append(" from uid=");
UserHandle.formatUid(sb, mCallingUid);
@@ -1535,6 +1583,38 @@
}
}, packageSuspendFilter);
+ final IntentFilter packageAddedFilter = new IntentFilter();
+ packageAddedFilter.addAction(Intent.ACTION_PACKAGE_ADDED);
+ packageAddedFilter.addDataScheme("package");
+ mContext.registerReceiver(new BroadcastReceiver() {
+ @Override
+ public void onReceive(Context context, Intent intent) {
+ final Uri data = intent.getData();
+
+ final String packageName = data.getSchemeSpecificPart();
+ PackageInfo pi = LocalServices.getService(
+ PackageManagerInternal.class).getPackageInfo(packageName,
+ PackageManager.GET_PERMISSIONS, Process.myUid(), mContext.getUserId());
+ if (isSamplingTarget(pi)) {
+ synchronized (this) {
+ mRarelyUsedPackages.add(packageName);
+ }
+ }
+ }
+ }, packageAddedFilter);
+
+ List<String> packageNames = getPackageNamesForSampling();
+ synchronized (this) {
+ resamplePackageAndAppOpLocked(packageNames);
+ }
+
+ AsyncTask.THREAD_POOL_EXECUTOR.execute(new Runnable() {
+ @Override
+ public void run() {
+ initializeRarelyUsedPackagesList(new ArraySet<>(packageNames));
+ }
+ });
+
PackageManagerInternal packageManagerInternal = LocalServices.getService(
PackageManagerInternal.class);
packageManagerInternal.setExternalSourcesPolicy(
@@ -3030,6 +3110,9 @@
featureId, message, System.currentTimeMillis());
final boolean[] wasNoteForwarded = {false};
+ reportRuntimeAppOpAccessMessageAsyncLocked(uid, packageName, opCode, featureId,
+ message);
+
if (callbacks != null) {
callbacks.broadcast((cb) -> {
try {
@@ -5494,6 +5577,227 @@
mHistoricalRegistry.clearHistory();
}
+ /**
+ * Report runtime access to AppOp together with message (including stack trace)
+ *
+ * @param packageName The package which reported the op
+ * @param notedAppOp contains code of op and featureId provided by developer
+ * @param message Message describing AppOp access (can be stack trace)
+ *
+ * @return Config for future sampling to reduce amount of reporting
+ */
+ @Override
+ public MessageSamplingConfig reportRuntimeAppOpAccessMessageAndGetConfig(
+ String packageName, SyncNotedAppOp notedAppOp, String message) {
+ int uid = Binder.getCallingUid();
+ Objects.requireNonNull(packageName);
+ synchronized (this) {
+ switchPackageIfRarelyUsedLocked(packageName);
+ if (!packageName.equals(mSampledPackage)) {
+ return new MessageSamplingConfig(OP_NONE, 0,
+ Instant.now().plus(1, ChronoUnit.HOURS).toEpochMilli());
+ }
+
+ Objects.requireNonNull(notedAppOp);
+ Objects.requireNonNull(message);
+
+ reportRuntimeAppOpAccessMessageInternalLocked(uid, packageName,
+ AppOpsManager.strOpToOp(notedAppOp.getOp()),
+ notedAppOp.getFeatureId(), message);
+
+ return new MessageSamplingConfig(mSampledAppOpCode, mAcceptableLeftDistance,
+ Instant.now().plus(1, ChronoUnit.HOURS).toEpochMilli());
+ }
+ }
+
+ /**
+ * Report runtime access to AppOp together with message (entry point for reporting
+ * asynchronous access)
+ * @param uid Uid of the package which reported the op
+ * @param packageName The package which reported the op
+ * @param opCode Code of AppOp
+ * @param featureId FeautreId of AppOp reported
+ * @param message Message describing AppOp access (can be stack trace)
+ */
+ private void reportRuntimeAppOpAccessMessageAsyncLocked(int uid,
+ @NonNull String packageName, int opCode, @Nullable String featureId,
+ @NonNull String message) {
+ switchPackageIfRarelyUsedLocked(packageName);
+ if (!Objects.equals(mSampledPackage, packageName)) {
+ return;
+ }
+ reportRuntimeAppOpAccessMessageInternalLocked(uid, packageName, opCode, featureId, message);
+ }
+
+ /**
+ * Decides whether reported message is within the range of watched AppOps and picks it for
+ * reporting uniformly at random across all received messages.
+ */
+ private void reportRuntimeAppOpAccessMessageInternalLocked(int uid,
+ @NonNull String packageName, int opCode, @Nullable String featureId,
+ @NonNull String message) {
+ int newLeftDistance = AppOpsManager.leftCircularDistance(opCode,
+ mSampledAppOpCode, _NUM_OP);
+
+ if (mAcceptableLeftDistance < newLeftDistance) {
+ return;
+ }
+
+ if (mAcceptableLeftDistance > newLeftDistance) {
+ mAcceptableLeftDistance = newLeftDistance;
+ mMessagesCollectedCount = 0.0f;
+ }
+
+ mMessagesCollectedCount += 1.0f;
+ if (ThreadLocalRandom.current().nextFloat() <= 1.0f / mMessagesCollectedCount) {
+ mCollectedRuntimePermissionMessage = new RuntimeAppOpAccessMessage(uid, opCode,
+ packageName, featureId, message, mSamplingStrategy);
+ }
+ return;
+ }
+
+ /** Pulls current AppOps access report and resamples package and app op to watch */
+ @Override
+ public @Nullable RuntimeAppOpAccessMessage collectRuntimeAppOpAccessMessage() {
+ mContext.enforcePermission(android.Manifest.permission.GET_APP_OPS_STATS,
+ Binder.getCallingPid(), Binder.getCallingUid(), null);
+ RuntimeAppOpAccessMessage result;
+ List<String> packageNames = getPackageNamesForSampling();
+ synchronized (this) {
+ result = mCollectedRuntimePermissionMessage;
+ resamplePackageAndAppOpLocked(packageNames);
+ }
+ return result;
+ }
+
+ /**
+ * Checks if package is in the list of rarely used package and starts watching the new package
+ * to collect incoming message.
+ * @param packageName
+ */
+ private void switchPackageIfRarelyUsedLocked(@NonNull String packageName) {
+ if (mRarelyUsedPackages.contains(packageName)) {
+ mRarelyUsedPackages.remove(packageName);
+ if (ThreadLocalRandom.current().nextFloat() < 0.5f) {
+ mSamplingStrategy = RUNTIME_APP_OP_ACCESS__SAMPLING_STRATEGY__RARELY_USED;
+ resampleAppOpForPackageLocked(packageName);
+ }
+ }
+ }
+
+ /** Resamples package and appop to watch from the list provided. */
+ private void resamplePackageAndAppOpLocked(@NonNull List<String> packageNames) {
+ if (!packageNames.isEmpty()) {
+ mSamplingStrategy = RUNTIME_APP_OP_ACCESS__SAMPLING_STRATEGY__UNIFORM;
+ resampleAppOpForPackageLocked(packageNames.get(
+ ThreadLocalRandom.current().nextInt(packageNames.size())));
+ }
+ }
+
+ /** Resamples appop for the chosen package and initializes sampling state */
+ private void resampleAppOpForPackageLocked(@NonNull String packageName) {
+ mMessagesCollectedCount = 0.0f;
+ mSampledAppOpCode = ThreadLocalRandom.current().nextInt(_NUM_OP);
+ mAcceptableLeftDistance = _NUM_OP;
+ mSampledPackage = packageName;
+ mCollectedRuntimePermissionMessage = null;
+ }
+
+ /**
+ * Creates list of rarely used packages - packages which were not used over last week or
+ * which declared but did not use permissions over last week.
+ * */
+ private void initializeRarelyUsedPackagesList(@NonNull ArraySet<String> candidates) {
+ AppOpsManager appOps = mContext.getSystemService(AppOpsManager.class);
+ List<String> runtimeAppOpsList = getRuntimeAppOpsList();
+ AppOpsManager.HistoricalOpsRequest histOpsRequest =
+ new AppOpsManager.HistoricalOpsRequest.Builder(
+ Instant.now().minus(7, ChronoUnit.DAYS).toEpochMilli(),
+ Long.MAX_VALUE).setOpNames(runtimeAppOpsList).setFlags(
+ OP_FLAG_SELF | OP_FLAG_TRUSTED_PROXIED).build();
+ appOps.getHistoricalOps(histOpsRequest, AsyncTask.THREAD_POOL_EXECUTOR,
+ new Consumer<HistoricalOps>() {
+ @Override
+ public void accept(HistoricalOps histOps) {
+ int uidCount = histOps.getUidCount();
+ for (int uidIdx = 0; uidIdx < uidCount; uidIdx++) {
+ final AppOpsManager.HistoricalUidOps uidOps = histOps.getUidOpsAt(
+ uidIdx);
+ int pkgCount = uidOps.getPackageCount();
+ for (int pkgIdx = 0; pkgIdx < pkgCount; pkgIdx++) {
+ String packageName = uidOps.getPackageOpsAt(
+ pkgIdx).getPackageName();
+ if (!candidates.contains(packageName)) {
+ continue;
+ }
+ AppOpsManager.HistoricalPackageOps packageOps =
+ uidOps.getPackageOpsAt(pkgIdx);
+ if (packageOps.getOpCount() != 0) {
+ candidates.remove(packageName);
+ }
+ }
+ }
+ synchronized (this) {
+ mRarelyUsedPackages = candidates;
+ }
+ }
+ });
+ }
+
+ /** List of app ops related to runtime permissions */
+ private List<String> getRuntimeAppOpsList() {
+ ArrayList<String> result = new ArrayList();
+ for (int i = 0; i < _NUM_OP; i++) {
+ if (shouldCollectNotes(i)) {
+ result.add(opToPublicName(i));
+ }
+ }
+ return result;
+ }
+
+ /** Returns list of packages to be used for package sampling */
+ private @NonNull List<String> getPackageNamesForSampling() {
+ List<String> packageNames = new ArrayList<>();
+ PackageManagerInternal packageManagerInternal = LocalServices.getService(
+ PackageManagerInternal.class);
+ PackageList packages = packageManagerInternal.getPackageList();
+ for (String packageName : packages.getPackageNames()) {
+ PackageInfo pkg = packageManagerInternal.getPackageInfo(packageName,
+ PackageManager.GET_PERMISSIONS, Process.myUid(), mContext.getUserId());
+ if (isSamplingTarget(pkg)) {
+ packageNames.add(pkg.packageName);
+ }
+ }
+ return packageNames;
+ }
+
+ /** Checks whether package should be included in sampling pool */
+ private boolean isSamplingTarget(@Nullable PackageInfo pkg) {
+ if (pkg == null) {
+ return false;
+ }
+ if (pkg.applicationInfo.targetSdkVersion <= Build.VERSION_CODES.Q) {
+ return false;
+ }
+
+ String[] requestedPermissions = pkg.requestedPermissions;
+ if (requestedPermissions == null) {
+ return false;
+ }
+ for (String permission : requestedPermissions) {
+ PermissionInfo permissionInfo;
+ try {
+ permissionInfo = mContext.getPackageManager().getPermissionInfo(permission, 0);
+ } catch (PackageManager.NameNotFoundException ignored) {
+ continue;
+ }
+ if (permissionInfo.getProtection() == PROTECTION_DANGEROUS) {
+ return true;
+ }
+ }
+ return false;
+ }
+
private void removeUidsForUserLocked(int userHandle) {
for (int i = mUidStates.size() - 1; i >= 0; --i) {
final int uid = mUidStates.keyAt(i);
diff --git a/services/core/java/com/android/server/audio/AudioService.java b/services/core/java/com/android/server/audio/AudioService.java
index f41eeeb..4be74b5 100644
--- a/services/core/java/com/android/server/audio/AudioService.java
+++ b/services/core/java/com/android/server/audio/AudioService.java
@@ -30,6 +30,7 @@
import android.annotation.IntDef;
import android.annotation.NonNull;
import android.annotation.Nullable;
+import android.annotation.UserIdInt;
import android.app.ActivityManager;
import android.app.ActivityManagerInternal;
import android.app.AppGlobals;
@@ -158,6 +159,7 @@
import java.util.HashSet;
import java.util.Iterator;
import java.util.List;
+import java.util.Map;
import java.util.NoSuchElementException;
import java.util.Objects;
import java.util.Set;
@@ -1075,6 +1077,15 @@
+ AudioSystem.audioSystemErrorToString(status)
+ " when connecting mixes for policy " + policy.toLogFriendlyString());
policy.release();
+ } else {
+ final int deviceAffinitiesStatus = policy.setupDeviceAffinities();
+ if (deviceAffinitiesStatus != AudioSystem.SUCCESS) {
+ Log.e(TAG, "onAudioServerDied: error "
+ + AudioSystem.audioSystemErrorToString(deviceAffinitiesStatus)
+ + " when connecting device affinities for policy "
+ + policy.toLogFriendlyString());
+ policy.release();
+ }
}
}
}
@@ -7898,22 +7909,16 @@
int setUidDeviceAffinities(int uid, @NonNull int[] types, @NonNull String[] addresses) {
final Integer Uid = new Integer(uid);
- int res;
if (mUidDeviceAffinities.remove(Uid) != null) {
- final long identity = Binder.clearCallingIdentity();
- res = AudioSystem.removeUidDeviceAffinities(uid);
- Binder.restoreCallingIdentity(identity);
- if (res != AudioSystem.SUCCESS) {
+ if (removeUidDeviceAffinitiesFromSystem(uid) != AudioSystem.SUCCESS) {
Log.e(TAG, "AudioSystem. removeUidDeviceAffinities(" + uid + ") failed, "
+ " cannot call AudioSystem.setUidDeviceAffinities");
return AudioManager.ERROR;
}
}
- final long identity = Binder.clearCallingIdentity();
- res = AudioSystem.setUidDeviceAffinities(uid, types, addresses);
- Binder.restoreCallingIdentity(identity);
- if (res == AudioSystem.SUCCESS) {
- mUidDeviceAffinities.put(Uid, new AudioDeviceArray(types, addresses));
+ AudioDeviceArray deviceArray = new AudioDeviceArray(types, addresses);
+ if (setUidDeviceAffinitiesOnSystem(uid, deviceArray) == AudioSystem.SUCCESS) {
+ mUidDeviceAffinities.put(Uid, deviceArray);
return AudioManager.SUCCESS;
}
Log.e(TAG, "AudioSystem. setUidDeviceAffinities(" + uid + ") failed");
@@ -7922,10 +7927,7 @@
int removeUidDeviceAffinities(int uid) {
if (mUidDeviceAffinities.remove(new Integer(uid)) != null) {
- final long identity = Binder.clearCallingIdentity();
- final int res = AudioSystem.removeUidDeviceAffinities(uid);
- Binder.restoreCallingIdentity(identity);
- if (res == AudioSystem.SUCCESS) {
+ if (removeUidDeviceAffinitiesFromSystem(uid) == AudioSystem.SUCCESS) {
return AudioManager.SUCCESS;
}
}
@@ -7933,26 +7935,41 @@
return AudioManager.ERROR;
}
+ @AudioSystem.AudioSystemError private int removeUidDeviceAffinitiesFromSystem(int uid) {
+ final long identity = Binder.clearCallingIdentity();
+ try {
+ return AudioSystem.removeUidDeviceAffinities(uid);
+ } finally {
+ Binder.restoreCallingIdentity(identity);
+ }
+ }
+
+ @AudioSystem.AudioSystemError private int setUidDeviceAffinitiesOnSystem(int uid,
+ AudioDeviceArray deviceArray) {
+ final long identity = Binder.clearCallingIdentity();
+ try {
+ return AudioSystem.setUidDeviceAffinities(uid, deviceArray.mDeviceTypes,
+ deviceArray.mDeviceAddresses);
+ } finally {
+ Binder.restoreCallingIdentity(identity);
+ }
+ }
+
int setUserIdDeviceAffinities(int userId,
@NonNull int[] types, @NonNull String[] addresses) {
final Integer UserId = new Integer(userId);
- int res;
if (mUserIdDeviceAffinities.remove(UserId) != null) {
- final long identity = Binder.clearCallingIdentity();
- res = AudioSystem.removeUserIdDeviceAffinities(UserId);
- Binder.restoreCallingIdentity(identity);
- if (res != AudioSystem.SUCCESS) {
+ if (removeUserIdDeviceAffinitiesFromSystem(userId) != AudioSystem.SUCCESS) {
Log.e(TAG, "AudioSystem. removeUserIdDeviceAffinities("
+ UserId + ") failed, "
+ " cannot call AudioSystem.setUserIdDeviceAffinities");
return AudioManager.ERROR;
}
}
- final long identity = Binder.clearCallingIdentity();
- res = AudioSystem.setUserIdDeviceAffinities(userId, types, addresses);
- Binder.restoreCallingIdentity(identity);
- if (res == AudioSystem.SUCCESS) {
- mUserIdDeviceAffinities.put(UserId, new AudioDeviceArray(types, addresses));
+ AudioDeviceArray audioDeviceArray = new AudioDeviceArray(types, addresses);
+ if (setUserIdDeviceAffinitiesOnSystem(userId, audioDeviceArray)
+ == AudioSystem.SUCCESS) {
+ mUserIdDeviceAffinities.put(UserId, audioDeviceArray);
return AudioManager.SUCCESS;
}
Log.e(TAG, "AudioSystem.setUserIdDeviceAffinities(" + userId + ") failed");
@@ -7961,10 +7978,7 @@
int removeUserIdDeviceAffinities(int userId) {
if (mUserIdDeviceAffinities.remove(new Integer(userId)) != null) {
- final long identity = Binder.clearCallingIdentity();
- final int res = AudioSystem.removeUserIdDeviceAffinities(userId);
- Binder.restoreCallingIdentity(identity);
- if (res == AudioSystem.SUCCESS) {
+ if (removeUserIdDeviceAffinitiesFromSystem(userId) == AudioSystem.SUCCESS) {
return AudioManager.SUCCESS;
}
}
@@ -7972,9 +7986,76 @@
return AudioManager.ERROR;
}
+ @AudioSystem.AudioSystemError private int removeUserIdDeviceAffinitiesFromSystem(
+ @UserIdInt int userId) {
+ final long identity = Binder.clearCallingIdentity();
+ try {
+ return AudioSystem.removeUserIdDeviceAffinities(userId);
+ } finally {
+ Binder.restoreCallingIdentity(identity);
+ }
+ }
+
+ @AudioSystem.AudioSystemError private int setUserIdDeviceAffinitiesOnSystem(
+ @UserIdInt int userId, AudioDeviceArray deviceArray) {
+ final long identity = Binder.clearCallingIdentity();
+ try {
+ return AudioSystem.setUserIdDeviceAffinities(userId, deviceArray.mDeviceTypes,
+ deviceArray.mDeviceAddresses);
+ } finally {
+ Binder.restoreCallingIdentity(identity);
+ }
+ }
+
+ @AudioSystem.AudioSystemError int setupDeviceAffinities() {
+ for (Map.Entry<Integer, AudioDeviceArray> uidEntry : mUidDeviceAffinities.entrySet()) {
+ int uidStatus = removeUidDeviceAffinitiesFromSystem(uidEntry.getKey());
+ if (uidStatus != AudioSystem.SUCCESS) {
+ Log.e(TAG,
+ "setupDeviceAffinities failed to remove device affinity for uid "
+ + uidEntry.getKey());
+ return uidStatus;
+ }
+ uidStatus = setUidDeviceAffinitiesOnSystem(uidEntry.getKey(), uidEntry.getValue());
+ if (uidStatus != AudioSystem.SUCCESS) {
+ Log.e(TAG,
+ "setupDeviceAffinities failed to set device affinity for uid "
+ + uidEntry.getKey());
+ return uidStatus;
+ }
+ }
+
+ for (Map.Entry<Integer, AudioDeviceArray> userIdEntry :
+ mUserIdDeviceAffinities.entrySet()) {
+ int userIdStatus = removeUserIdDeviceAffinitiesFromSystem(userIdEntry.getKey());
+ if (userIdStatus != AudioSystem.SUCCESS) {
+ Log.e(TAG,
+ "setupDeviceAffinities failed to remove device affinity for userId "
+ + userIdEntry.getKey());
+ return userIdStatus;
+ }
+ userIdStatus = setUserIdDeviceAffinitiesOnSystem(userIdEntry.getKey(),
+ userIdEntry.getValue());
+ if (userIdStatus != AudioSystem.SUCCESS) {
+ Log.e(TAG,
+ "setupDeviceAffinities failed to set device affinity for userId "
+ + userIdEntry.getKey());
+ return userIdStatus;
+ }
+ }
+ return AudioSystem.SUCCESS;
+ }
+
/** @return human readable debug informations summarizing the state of the object. */
public String toLogFriendlyString() {
String textDump = super.toLogFriendlyString();
+ textDump += " Uid Device Affinities:\n";
+ String spacer = " ";
+ textDump += logFriendlyAttributeDeviceArrayMap("Uid",
+ mUidDeviceAffinities, spacer);
+ textDump += " UserId Device Affinities:\n";
+ textDump += logFriendlyAttributeDeviceArrayMap("UserId",
+ mUserIdDeviceAffinities, spacer);
textDump += " Proxy:\n";
textDump += " is focus policy= " + mIsFocusPolicy + "\n";
if (mIsFocusPolicy) {
@@ -7985,6 +8066,24 @@
textDump += " media projection= " + mProjection + "\n";
return textDump;
}
+
+ private String logFriendlyAttributeDeviceArrayMap(String attribute,
+ Map<Integer, AudioDeviceArray> map, String spacer) {
+ final StringBuilder stringBuilder = new StringBuilder();
+ for (Map.Entry<Integer, AudioDeviceArray> mapEntry : map.entrySet()) {
+ stringBuilder.append(spacer).append(attribute).append(": ")
+ .append(mapEntry.getKey()).append("\n");
+ AudioDeviceArray deviceArray = mapEntry.getValue();
+ String deviceSpacer = spacer + " ";
+ for (int i = 0; i < deviceArray.mDeviceTypes.length; i++) {
+ stringBuilder.append(deviceSpacer).append("Type: 0x")
+ .append(Integer.toHexString(deviceArray.mDeviceTypes[i]))
+ .append(" Address: ").append(deviceArray.mDeviceAddresses[i])
+ .append("\n");
+ }
+ }
+ return stringBuilder.toString();
+ }
};
//======================
diff --git a/services/core/java/com/android/server/display/DisplayManagerService.java b/services/core/java/com/android/server/display/DisplayManagerService.java
index 9140589..1ff8a94 100644
--- a/services/core/java/com/android/server/display/DisplayManagerService.java
+++ b/services/core/java/com/android/server/display/DisplayManagerService.java
@@ -121,7 +121,7 @@
* The display manager service relies on a collection of {@link DisplayAdapter} components,
* for discovering and configuring physical display devices attached to the system.
* There are separate display adapters for each manner that devices are attached:
- * one display adapter for built-in local displays, one for simulated non-functional
+ * one display adapter for physical displays, one for simulated non-functional
* displays when the system is headless, one for simulated overlay displays used for
* development, one for wifi displays, etc.
* </p><p>
@@ -231,7 +231,7 @@
private int mGlobalDisplayState = Display.STATE_ON;
// The overall display brightness.
- // For now, this only applies to the built-in display but we may split it up eventually.
+ // For now, this only applies to the default display but we may split it up eventually.
private float mGlobalDisplayBrightness;
// Set to true when there are pending display changes that have yet to be applied
diff --git a/services/core/java/com/android/server/display/LocalDisplayAdapter.java b/services/core/java/com/android/server/display/LocalDisplayAdapter.java
index 2b225e5..4ebbdda 100644
--- a/services/core/java/com/android/server/display/LocalDisplayAdapter.java
+++ b/services/core/java/com/android/server/display/LocalDisplayAdapter.java
@@ -35,7 +35,6 @@
import android.view.DisplayAddress;
import android.view.DisplayCutout;
import android.view.DisplayEventReceiver;
-import android.view.Surface;
import android.view.SurfaceControl;
import com.android.internal.BrightnessSynchronizer;
@@ -53,7 +52,7 @@
import java.util.Objects;
/**
- * A display adapter for the local displays managed by Surface Flinger.
+ * A display adapter for the local displays managed by SurfaceFlinger.
* <p>
* Display adapters are guarded by the {@link DisplayManagerService.SyncRoot} lock.
* </p>
@@ -129,10 +128,10 @@
LocalDisplayDevice device = mDevices.get(physicalDisplayId);
if (device == null) {
// Display was added.
- final boolean isInternal = mDevices.size() == 0;
+ final boolean isDefaultDisplay = mDevices.size() == 0;
device = new LocalDisplayDevice(displayToken, physicalDisplayId, info,
configs, activeConfig, configSpecs, colorModes, activeColorMode,
- hdrCapabilities, isInternal);
+ hdrCapabilities, isDefaultDisplay);
mDevices.put(physicalDisplayId, device);
sendDisplayDeviceEventLocked(device, DISPLAY_DEVICE_EVENT_ADDED);
} else if (device.updateDisplayProperties(configs, activeConfig,
@@ -175,7 +174,7 @@
private final LogicalLight mBacklight;
private final SparseArray<DisplayModeRecord> mSupportedModes = new SparseArray<>();
private final ArrayList<Integer> mSupportedColorModes = new ArrayList<>();
- private final boolean mIsInternal;
+ private final boolean mIsDefaultDisplay;
private DisplayDeviceInfo mInfo;
private boolean mHavePendingChanges;
@@ -207,15 +206,15 @@
SurfaceControl.DisplayInfo info, SurfaceControl.DisplayConfig[] configs,
int activeConfigId, SurfaceControl.DesiredDisplayConfigSpecs configSpecs,
int[] colorModes, int activeColorMode, Display.HdrCapabilities hdrCapabilities,
- boolean isInternal) {
+ boolean isDefaultDisplay) {
super(LocalDisplayAdapter.this, displayToken, UNIQUE_ID_PREFIX + physicalDisplayId);
mPhysicalDisplayId = physicalDisplayId;
- mIsInternal = isInternal;
+ mIsDefaultDisplay = isDefaultDisplay;
mDisplayInfo = info;
updateDisplayProperties(configs, activeConfigId, configSpecs, colorModes,
activeColorMode, hdrCapabilities);
mSidekickInternal = LocalServices.getService(SidekickInternal.class);
- if (mIsInternal) {
+ if (mIsDefaultDisplay) {
LightsManager lights = LocalServices.getService(LightsManager.class);
mBacklight = lights.getLight(LightsManager.LIGHT_ID_BACKLIGHT);
} else {
@@ -523,11 +522,10 @@
}
final Resources res = getOverlayContext().getResources();
- if (mIsInternal) {
- mInfo.name = res.getString(
- com.android.internal.R.string.display_manager_built_in_display_name);
- mInfo.flags |= DisplayDeviceInfo.FLAG_DEFAULT_DISPLAY
- | DisplayDeviceInfo.FLAG_ROTATES_WITH_CONTENT;
+
+ if (mIsDefaultDisplay) {
+ mInfo.flags |= DisplayDeviceInfo.FLAG_DEFAULT_DISPLAY;
+
if (res.getBoolean(com.android.internal.R.bool.config_mainBuiltInDisplayIsRound)
|| (Build.IS_EMULATOR
&& SystemProperties.getBoolean(PROPERTY_EMULATOR_CIRCULAR, false))) {
@@ -539,28 +537,7 @@
}
mInfo.displayCutout = DisplayCutout.fromResourcesRectApproximation(res,
mInfo.width, mInfo.height);
- mInfo.type = Display.TYPE_BUILT_IN;
- mInfo.touch = DisplayDeviceInfo.TOUCH_INTERNAL;
} else {
- mInfo.displayCutout = null;
- mInfo.type = Display.TYPE_HDMI;
- mInfo.flags |= DisplayDeviceInfo.FLAG_PRESENTATION;
- mInfo.name = getContext().getResources().getString(
- com.android.internal.R.string.display_manager_hdmi_display_name);
- mInfo.touch = DisplayDeviceInfo.TOUCH_EXTERNAL;
-
- // For demonstration purposes, allow rotation of the external display.
- // In the future we might allow the user to configure this directly.
- if ("portrait".equals(SystemProperties.get("persist.demo.hdmirotation"))) {
- mInfo.rotation = Surface.ROTATION_270;
- }
-
- // For demonstration purposes, allow rotation of the external display
- // to follow the built-in display.
- if (SystemProperties.getBoolean("persist.demo.hdmirotates", false)) {
- mInfo.flags |= DisplayDeviceInfo.FLAG_ROTATES_WITH_CONTENT;
- }
-
if (!res.getBoolean(
com.android.internal.R.bool.config_localDisplaysMirrorContent)) {
mInfo.flags |= DisplayDeviceInfo.FLAG_OWN_CONTENT_ONLY;
@@ -570,6 +547,20 @@
mInfo.flags |= DisplayDeviceInfo.FLAG_PRIVATE;
}
}
+
+ if (mDisplayInfo.isInternal) {
+ mInfo.type = Display.TYPE_INTERNAL;
+ mInfo.touch = DisplayDeviceInfo.TOUCH_INTERNAL;
+ mInfo.flags |= DisplayDeviceInfo.FLAG_ROTATES_WITH_CONTENT;
+ mInfo.name = res.getString(
+ com.android.internal.R.string.display_manager_built_in_display_name);
+ } else {
+ mInfo.type = Display.TYPE_EXTERNAL;
+ mInfo.touch = DisplayDeviceInfo.TOUCH_EXTERNAL;
+ mInfo.flags |= DisplayDeviceInfo.FLAG_PRESENTATION;
+ mInfo.name = getContext().getResources().getString(
+ com.android.internal.R.string.display_manager_hdmi_display_name);
+ }
}
return mInfo;
}
diff --git a/services/core/java/com/android/server/notification/NotificationHistoryProtoHelper.java b/services/core/java/com/android/server/notification/NotificationHistoryProtoHelper.java
index 2831d37..7ba993b 100644
--- a/services/core/java/com/android/server/notification/NotificationHistoryProtoHelper.java
+++ b/services/core/java/com/android/server/notification/NotificationHistoryProtoHelper.java
@@ -19,6 +19,7 @@
import android.app.NotificationHistory.HistoricalNotification;
import android.content.res.Resources;
import android.graphics.drawable.Icon;
+import android.text.TextUtils;
import android.util.Slog;
import android.util.proto.ProtoInputStream;
import android.util.proto.ProtoOutputStream;
@@ -141,6 +142,16 @@
loadIcon(parser, notification, pkg);
parser.end(iconToken);
break;
+ case (int) Notification.CONVERSATION_ID_INDEX:
+ String conversationId =
+ stringPool.get(parser.readInt(Notification.CONVERSATION_ID_INDEX) - 1);
+ notification.setConversationId(conversationId);
+ break;
+ case (int) Notification.CONVERSATION_ID:
+ conversationId = parser.readString(Notification.CONVERSATION_ID);
+ notification.setConversationId(conversationId);
+ stringPool.add(conversationId);
+ break;
case ProtoInputStream.NO_MORE_FIELDS:
return notification.build();
}
@@ -271,6 +282,17 @@
+ ") not found in string cache");
proto.write(Notification.CHANNEL_ID, notification.getChannelId());
}
+ if (!TextUtils.isEmpty(notification.getConversationId())) {
+ final int conversationIdIndex = Arrays.binarySearch(
+ stringPool, notification.getConversationId());
+ if (conversationIdIndex >= 0) {
+ proto.write(Notification.CONVERSATION_ID_INDEX, conversationIdIndex + 1);
+ } else {
+ Slog.w(TAG, "notification conversation id (" + notification.getConversationId()
+ + ") not found in string cache");
+ proto.write(Notification.CONVERSATION_ID, notification.getConversationId());
+ }
+ }
proto.write(Notification.UID, notification.getUid());
proto.write(Notification.USER_ID, notification.getUserId());
proto.write(Notification.POSTED_TIME_MS, notification.getPostedTimeMs());
diff --git a/services/core/java/com/android/server/notification/NotificationManagerService.java b/services/core/java/com/android/server/notification/NotificationManagerService.java
index d0d0f5a..2e4a977 100755
--- a/services/core/java/com/android/server/notification/NotificationManagerService.java
+++ b/services/core/java/com/android/server/notification/NotificationManagerService.java
@@ -6243,6 +6243,7 @@
private final int mRank;
private final int mCount;
private final ManagedServiceInfo mListener;
+ private final long mWhen;
CancelNotificationRunnable(final int callingUid, final int callingPid,
final String pkg, final String tag, final int id,
@@ -6262,6 +6263,7 @@
this.mRank = rank;
this.mCount = count;
this.mListener = listener;
+ this.mWhen = System.currentTimeMillis();
}
@Override
@@ -6273,13 +6275,28 @@
}
synchronized (mNotificationLock) {
- // If the notification is currently enqueued, repost this runnable so it has a
- // chance to notify listeners
- if ((findNotificationByListLocked(mEnqueuedNotifications, mPkg, mTag, mId, mUserId))
- != null) {
+ // Check to see if there is a notification in the enqueued list that hasn't had a
+ // chance to post yet.
+ List<NotificationRecord> enqueued = findEnqueuedNotificationsForCriteria(
+ mPkg, mTag, mId, mUserId);
+ boolean repost = false;
+ if (enqueued.size() > 0) {
+ // Found something, let's see what it was
+ repost = true;
+ // If all enqueues happened before this cancel then wait for them to happen,
+ // otherwise we should let this cancel through so the next enqueue happens
+ for (NotificationRecord r : enqueued) {
+ if (r.mUpdateTimeMs > mWhen) {
+ // At least one enqueue was posted after the cancel, so we're invalid
+ return;
+ }
+ }
+ }
+ if (repost) {
mHandler.post(this);
return;
}
+
// Look for the notification in the posted list, since we already checked enqueued.
NotificationRecord r =
findNotificationByListLocked(mNotificationList, mPkg, mTag, mId, mUserId);
@@ -6298,6 +6315,10 @@
if ((r.getNotification().flags & mMustNotHaveFlags) != 0) {
return;
}
+ if (r.getUpdateTimeMs() > mWhen) {
+ // In this case, a post must have slipped by when this runnable reposted
+ return;
+ }
// Bubbled children get to stick around if the summary was manually cancelled
// (user removed) from systemui.
@@ -8220,6 +8241,29 @@
return null;
}
+ /**
+ * There may be multiple records that match your criteria. For instance if there have been
+ * multiple notifications posted which are enqueued for the same pkg, tag, id, userId. This
+ * method will find all of them in the given list
+ * @return
+ */
+ @GuardedBy("mNotificationLock")
+ private List<NotificationRecord> findEnqueuedNotificationsForCriteria(
+ String pkg, String tag, int id, int userId) {
+ final ArrayList<NotificationRecord> records = new ArrayList<>();
+ final int n = mEnqueuedNotifications.size();
+ for (int i = 0; i < n; i++) {
+ NotificationRecord r = mEnqueuedNotifications.get(i);
+ if (notificationMatchesUserId(r, userId)
+ && r.getSbn().getId() == id
+ && TextUtils.equals(r.getSbn().getTag(), tag)
+ && r.getSbn().getPackageName().equals(pkg)) {
+ records.add(r);
+ }
+ }
+ return records;
+ }
+
@GuardedBy("mNotificationLock")
int indexOfNotificationLocked(String key) {
final int N = mNotificationList.size();
diff --git a/services/core/java/com/android/server/notification/NotificationRecord.java b/services/core/java/com/android/server/notification/NotificationRecord.java
index 0ada58e..f92e1fc 100644
--- a/services/core/java/com/android/server/notification/NotificationRecord.java
+++ b/services/core/java/com/android/server/notification/NotificationRecord.java
@@ -906,6 +906,10 @@
return (int) (now - mInterruptionTimeMs);
}
+ public long getUpdateTimeMs() {
+ return mUpdateTimeMs;
+ }
+
/**
* Set the visibility of the notification.
*/
diff --git a/services/core/java/com/android/server/pm/CrossProfileAppsServiceImpl.java b/services/core/java/com/android/server/pm/CrossProfileAppsServiceImpl.java
index 96d3cc1..3939f26 100644
--- a/services/core/java/com/android/server/pm/CrossProfileAppsServiceImpl.java
+++ b/services/core/java/com/android/server/pm/CrossProfileAppsServiceImpl.java
@@ -68,7 +68,6 @@
private Context mContext;
private Injector mInjector;
- private AppOpsManager mAppOpsManager;
public CrossProfileAppsServiceImpl(Context context) {
this(context, new InjectorImpl(context));
@@ -217,19 +216,27 @@
mInjector.getActivityTaskManagerInternal().startActivityAsUser(caller, callingPackage,
callingFeatureId, launchIntent, /* options= */ null, userId);
+ logStartActivityByIntent(callingPackage);
+ }
+
+ private void logStartActivityByIntent(String packageName) {
+ DevicePolicyEventLogger
+ .createEvent(DevicePolicyEnums.START_ACTIVITY_BY_INTENT)
+ .setStrings(packageName)
+ .setBoolean(isCallingUserAManagedProfile())
+ .write();
}
@Override
public boolean canRequestInteractAcrossProfiles(String callingPackage) {
Objects.requireNonNull(callingPackage);
verifyCallingPackage(callingPackage);
- return canRequestInteractAcrossProfilesUnchecked(
- callingPackage, mInjector.getCallingUserId());
+ return canRequestInteractAcrossProfilesUnchecked(callingPackage);
}
- private boolean canRequestInteractAcrossProfilesUnchecked(
- String packageName, @UserIdInt int userId) {
- List<UserHandle> targetUserProfiles = getTargetUserProfilesUnchecked(packageName, userId);
+ private boolean canRequestInteractAcrossProfilesUnchecked(String packageName) {
+ List<UserHandle> targetUserProfiles =
+ getTargetUserProfilesUnchecked(packageName, mInjector.getCallingUserId());
if (targetUserProfiles.isEmpty()) {
return false;
}
@@ -256,12 +263,11 @@
Objects.requireNonNull(callingPackage);
verifyCallingPackage(callingPackage);
- final List<UserHandle> targetUserProfiles = getTargetUserProfilesUnchecked(callingPackage,
- mInjector.getCallingUserId());
+ final List<UserHandle> targetUserProfiles = getTargetUserProfilesUnchecked(
+ callingPackage, mInjector.getCallingUserId());
if (targetUserProfiles.isEmpty()) {
return false;
}
-
return hasInteractAcrossProfilesPermission(callingPackage);
}
@@ -363,6 +369,12 @@
});
}
+ /**
+ * See {@link android.content.pm.CrossProfileApps#setInteractAcrossProfilesAppOp(String, int)}.
+ *
+ * <p>Logs metrics. Use {@link #setInteractAcrossProfilesAppOpUnchecked(String, int, boolean)}
+ * to avoid permission checks or to specify not to log metrics.
+ */
@Override
public void setInteractAcrossProfilesAppOp(String packageName, @Mode int newMode) {
final int callingUid = mInjector.getCallingUid();
@@ -379,6 +391,11 @@
"MANAGE_APP_OPS_MODES or CONFIGURE_INTERACT_ACROSS_PROFILES is required to set"
+ " the app-op for interacting across profiles.");
}
+ setInteractAcrossProfilesAppOpUnchecked(packageName, newMode, /* logMetrics= */ true);
+ }
+
+ private void setInteractAcrossProfilesAppOpUnchecked(
+ String packageName, @Mode int newMode, boolean logMetrics) {
if (newMode == AppOpsManager.MODE_ALLOWED
&& !canConfigureInteractAcrossProfiles(packageName)) {
// The user should not be prompted for apps that cannot request to interact across
@@ -394,7 +411,7 @@
if (!isPackageInstalled(packageName, profileId)) {
continue;
}
- setInteractAcrossProfilesAppOpForUser(packageName, newMode, profileId);
+ setInteractAcrossProfilesAppOpForUser(packageName, newMode, profileId, logMetrics);
}
}
@@ -413,16 +430,16 @@
}
private void setInteractAcrossProfilesAppOpForUser(
- String packageName, @Mode int newMode, @UserIdInt int userId) {
+ String packageName, @Mode int newMode, @UserIdInt int userId, boolean logMetrics) {
try {
- setInteractAcrossProfilesAppOpForUserOrThrow(packageName, newMode, userId);
+ setInteractAcrossProfilesAppOpForUserOrThrow(packageName, newMode, userId, logMetrics);
} catch (PackageManager.NameNotFoundException e) {
Slog.e(TAG, "Missing package " + packageName + " on user ID " + userId, e);
}
}
private void setInteractAcrossProfilesAppOpForUserOrThrow(
- String packageName, @Mode int newMode, @UserIdInt int userId)
+ String packageName, @Mode int newMode, @UserIdInt int userId, boolean logMetrics)
throws PackageManager.NameNotFoundException {
final int uid = mInjector.getPackageManager()
.getPackageUidAsUser(packageName, /* flags= */ 0, userId);
@@ -444,6 +461,28 @@
.setMode(OP_INTERACT_ACROSS_PROFILES, uid, packageName, newMode);
}
sendCanInteractAcrossProfilesChangedBroadcast(packageName, uid, UserHandle.of(userId));
+ maybeLogSetInteractAcrossProfilesAppOp(packageName, newMode, userId, logMetrics, uid);
+ }
+
+ private void maybeLogSetInteractAcrossProfilesAppOp(
+ String packageName,
+ @Mode int newMode,
+ @UserIdInt int userId,
+ boolean logMetrics,
+ int uid) {
+ if (!logMetrics) {
+ return;
+ }
+ if (userId != mInjector.getCallingUserId()) {
+ // Only log once per profile group by checking for the calling user ID.
+ return;
+ }
+ DevicePolicyEventLogger
+ .createEvent(DevicePolicyEnums.SET_INTERACT_ACROSS_PROFILES_APP_OP)
+ .setStrings(packageName)
+ .setInt(newMode)
+ .setBoolean(appDeclaresCrossProfileAttribute(uid))
+ .write();
}
/**
@@ -541,11 +580,13 @@
permission, uid, /* owningUid= */-1, /* exported= */ true);
}
- private AppOpsManager getAppOpsManager() {
- if (mAppOpsManager == null) {
- mAppOpsManager = mContext.getSystemService(AppOpsManager.class);
- }
- return mAppOpsManager;
+ private boolean isCallingUserAManagedProfile() {
+ return isManagedProfile(mInjector.getCallingUserId());
+ }
+
+ private boolean isManagedProfile(@UserIdInt int userId) {
+ return mInjector.withCleanCallingIdentity(()
+ -> mContext.getSystemService(UserManager.class).isManagedProfile(userId));
}
private static class InjectorImpl implements Injector {
diff --git a/services/core/java/com/android/server/pm/PackageManagerServiceUtils.java b/services/core/java/com/android/server/pm/PackageManagerServiceUtils.java
index 9395c97..a9035b2 100644
--- a/services/core/java/com/android/server/pm/PackageManagerServiceUtils.java
+++ b/services/core/java/com/android/server/pm/PackageManagerServiceUtils.java
@@ -578,7 +578,9 @@
/** Returns true if standard APK Verity is enabled. */
static boolean isApkVerityEnabled() {
- return SystemProperties.getInt("ro.apk_verity.mode", FSVERITY_DISABLED) == FSVERITY_ENABLED;
+ return Build.VERSION.FIRST_SDK_INT >= Build.VERSION_CODES.R
+ || SystemProperties.getInt("ro.apk_verity.mode", FSVERITY_DISABLED)
+ == FSVERITY_ENABLED;
}
static boolean isLegacyApkVerityEnabled() {
diff --git a/services/core/java/com/android/server/pm/Settings.java b/services/core/java/com/android/server/pm/Settings.java
index 832c9b7..d451152 100644
--- a/services/core/java/com/android/server/pm/Settings.java
+++ b/services/core/java/com/android/server/pm/Settings.java
@@ -5233,9 +5233,7 @@
List<RuntimePermissionsState.PermissionState> permissions =
getPermissionsFromPermissionsState(
packageSetting.getPermissionsState(), userId);
- if (permissions != null) {
- packagePermissions.put(packageName, permissions);
- }
+ packagePermissions.put(packageName, permissions);
}
}
@@ -5248,9 +5246,7 @@
List<RuntimePermissionsState.PermissionState> permissions =
getPermissionsFromPermissionsState(
sharedUserSetting.getPermissionsState(), userId);
- if (permissions != null) {
- sharedUserPermissions.put(sharedUserName, permissions);
- }
+ sharedUserPermissions.put(sharedUserName, permissions);
}
runtimePermissions = new RuntimePermissionsState(version, fingerprint,
@@ -5260,15 +5256,11 @@
mPersistence.write(runtimePermissions, UserHandle.of(userId));
}
- @Nullable
+ @NonNull
private List<RuntimePermissionsState.PermissionState> getPermissionsFromPermissionsState(
@NonNull PermissionsState permissionsState, @UserIdInt int userId) {
List<PermissionState> permissionStates = permissionsState.getRuntimePermissionStates(
userId);
- if (permissionStates.isEmpty()) {
- return null;
- }
-
List<RuntimePermissionsState.PermissionState> permissions =
new ArrayList<>();
int permissionStatesSize = permissionStates.size();
@@ -5340,31 +5332,60 @@
boolean defaultPermissionsGranted = Build.FINGERPRINT.equals(fingerprint);
mDefaultPermissionsGranted.put(userId, defaultPermissionsGranted);
- for (Map.Entry<String, List<RuntimePermissionsState.PermissionState>> entry
- : runtimePermissions.getPackagePermissions().entrySet()) {
- String packageName = entry.getKey();
- List<RuntimePermissionsState.PermissionState> permissions = entry.getValue();
+ boolean isUpgradeToR = getInternalVersion().sdkVersion < Build.VERSION_CODES.R;
- PackageSetting packageSetting = mPackages.get(packageName);
- if (packageSetting == null) {
- Slog.w(PackageManagerService.TAG, "Unknown package:" + packageName);
- continue;
+ Map<String, List<RuntimePermissionsState.PermissionState>> packagePermissions =
+ runtimePermissions.getPackagePermissions();
+ int packagesSize = mPackages.size();
+ for (int i = 0; i < packagesSize; i++) {
+ String packageName = mPackages.keyAt(i);
+ PackageSetting packageSetting = mPackages.valueAt(i);
+
+ List<RuntimePermissionsState.PermissionState> permissions =
+ packagePermissions.get(packageName);
+ if (permissions != null) {
+ readPermissionsStateLpr(permissions, packageSetting.getPermissionsState(),
+ userId);
+ } else if (packageSetting.sharedUser == null && !isUpgradeToR) {
+ Slog.w(TAG, "Missing permission state for package: " + packageName);
+ generateFallbackPermissionsStateLpr(
+ packageSetting.pkg.getRequestedPermissions(),
+ packageSetting.pkg.getTargetSdkVersion(),
+ packageSetting.getPermissionsState(), userId);
}
- readPermissionsStateLpr(permissions, packageSetting.getPermissionsState(), userId);
}
- for (Map.Entry<String, List<RuntimePermissionsState.PermissionState>> entry
- : runtimePermissions.getSharedUserPermissions().entrySet()) {
- String sharedUserName = entry.getKey();
- List<RuntimePermissionsState.PermissionState> permissions = entry.getValue();
+ Map<String, List<RuntimePermissionsState.PermissionState>> sharedUserPermissions =
+ runtimePermissions.getSharedUserPermissions();
+ int sharedUsersSize = mSharedUsers.size();
+ for (int i = 0; i < sharedUsersSize; i++) {
+ String sharedUserName = mSharedUsers.keyAt(i);
+ SharedUserSetting sharedUserSetting = mSharedUsers.valueAt(i);
- SharedUserSetting sharedUserSetting = mSharedUsers.get(sharedUserName);
- if (sharedUserSetting == null) {
- Slog.w(PackageManagerService.TAG, "Unknown shared user:" + sharedUserName);
- continue;
+ List<RuntimePermissionsState.PermissionState> permissions =
+ sharedUserPermissions.get(sharedUserName);
+ if (permissions != null) {
+ readPermissionsStateLpr(permissions, sharedUserSetting.getPermissionsState(),
+ userId);
+ } else if (!isUpgradeToR) {
+ Slog.w(TAG, "Missing permission state for shared user: " + sharedUserName);
+ ArraySet<String> requestedPermissions = new ArraySet<>();
+ int targetSdkVersion = Build.VERSION_CODES.CUR_DEVELOPMENT;
+ int sharedUserPackagesSize = sharedUserSetting.packages.size();
+ for (int packagesI = 0; packagesI < sharedUserPackagesSize; packagesI++) {
+ PackageSetting packageSetting = sharedUserSetting.packages.valueAt(
+ packagesI);
+ if (packageSetting == null || packageSetting.pkg == null
+ || !packageSetting.getInstalled(userId)) {
+ continue;
+ }
+ AndroidPackage pkg = packageSetting.pkg;
+ requestedPermissions.addAll(pkg.getRequestedPermissions());
+ targetSdkVersion = Math.min(targetSdkVersion, pkg.getTargetSdkVersion());
+ }
+ generateFallbackPermissionsStateLpr(requestedPermissions, targetSdkVersion,
+ sharedUserSetting.getPermissionsState(), userId);
}
- readPermissionsStateLpr(permissions, sharedUserSetting.getPermissionsState(),
- userId);
}
}
@@ -5395,6 +5416,30 @@
}
}
+ private void generateFallbackPermissionsStateLpr(
+ @NonNull Collection<String> requestedPermissions, int targetSdkVersion,
+ @NonNull PermissionsState permissionsState, @UserIdInt int userId) {
+ for (String permissionName : requestedPermissions) {
+ BasePermission permission = mPermissions.getPermission(permissionName);
+ if (Objects.equals(permission.getSourcePackageName(), PLATFORM_PACKAGE_NAME)
+ && permission.isRuntime() && !permission.isRemoved()) {
+ if (permission.isHardOrSoftRestricted() || permission.isImmutablyRestricted()) {
+ permissionsState.updatePermissionFlags(permission, userId,
+ PackageManager.FLAG_PERMISSION_RESTRICTION_UPGRADE_EXEMPT,
+ PackageManager.FLAG_PERMISSION_RESTRICTION_UPGRADE_EXEMPT);
+ }
+ if (targetSdkVersion < Build.VERSION_CODES.M) {
+ permissionsState.updatePermissionFlags(permission, userId,
+ PackageManager.FLAG_PERMISSION_REVIEW_REQUIRED
+ | PackageManager.FLAG_PERMISSION_REVOKED_COMPAT,
+ PackageManager.FLAG_PERMISSION_REVIEW_REQUIRED
+ | PackageManager.FLAG_PERMISSION_REVOKED_COMPAT);
+ permissionsState.grantRuntimePermission(permission, userId);
+ }
+ }
+ }
+ }
+
@GuardedBy("Settings.this.mLock")
private void readLegacyStateForUserSyncLPr(int userId) {
File permissionsFile = getUserRuntimePermissionsFile(userId);
diff --git a/services/core/java/com/android/server/policy/SoftRestrictedPermissionPolicy.java b/services/core/java/com/android/server/policy/SoftRestrictedPermissionPolicy.java
index a83c58d..740472e 100644
--- a/services/core/java/com/android/server/policy/SoftRestrictedPermissionPolicy.java
+++ b/services/core/java/com/android/server/policy/SoftRestrictedPermissionPolicy.java
@@ -35,14 +35,17 @@
import android.content.Context;
import android.content.pm.ApplicationInfo;
import android.content.pm.PackageManager;
+import android.content.pm.PackageManagerInternal;
import android.os.Binder;
import android.os.IBinder;
import android.os.RemoteException;
import android.os.ServiceManager;
import android.os.UserHandle;
+import android.os.storage.StorageManagerInternal;
import android.util.Log;
import com.android.internal.compat.IPlatformCompat;
+import com.android.server.LocalServices;
/**
* The behavior of soft restricted permissions is different for each permission. This class collects
@@ -107,11 +110,16 @@
final boolean isWhiteListed;
boolean shouldApplyRestriction;
final boolean hasRequestedLegacyExternalStorage;
+ final boolean shouldPreserveLegacyExternalStorage;
final boolean hasWriteMediaStorageGrantedForUid;
final boolean isScopedStorageEnabled;
if (appInfo != null) {
PackageManager pm = context.getPackageManager();
+ PackageManagerInternal pmInternal =
+ LocalServices.getService(PackageManagerInternal.class);
+ StorageManagerInternal smInternal =
+ LocalServices.getService(StorageManagerInternal.class);
int flags = pm.getPermissionFlags(permission, appInfo.packageName, user);
isWhiteListed = (flags & FLAGS_PERMISSION_RESTRICTION_ANY_EXEMPT) != 0;
hasRequestedLegacyExternalStorage = hasUidRequestedLegacyExternalStorage(
@@ -123,12 +131,16 @@
isScopedStorageEnabled =
isChangeEnabledForUid(context, appInfo, user, ENABLE_SCOPED_STORAGE)
|| isScopedStorageRequired;
+ shouldPreserveLegacyExternalStorage = pmInternal.getPackage(
+ appInfo.packageName).hasPreserveLegacyExternalStorage()
+ && smInternal.hasLegacyExternalStorage(appInfo.uid);
shouldApplyRestriction = (flags & FLAG_PERMISSION_APPLY_RESTRICTION) != 0
- || isScopedStorageRequired;
+ || (isScopedStorageRequired && !shouldPreserveLegacyExternalStorage);
} else {
isWhiteListed = false;
shouldApplyRestriction = false;
hasRequestedLegacyExternalStorage = false;
+ shouldPreserveLegacyExternalStorage = false;
hasWriteMediaStorageGrantedForUid = false;
isScopedStorageEnabled = false;
}
@@ -150,7 +162,8 @@
public boolean mayAllowExtraAppOp() {
return !shouldApplyRestriction
&& (hasRequestedLegacyExternalStorage
- || hasWriteMediaStorageGrantedForUid);
+ || hasWriteMediaStorageGrantedForUid
+ || shouldPreserveLegacyExternalStorage);
}
@Override
public boolean mayDenyExtraAppOpIfGranted() {
diff --git a/services/core/java/com/android/server/security/FileIntegrityService.java b/services/core/java/com/android/server/security/FileIntegrityService.java
index e90c02a..8cf2d03 100644
--- a/services/core/java/com/android/server/security/FileIntegrityService.java
+++ b/services/core/java/com/android/server/security/FileIntegrityService.java
@@ -20,6 +20,7 @@
import android.annotation.Nullable;
import android.content.Context;
import android.content.pm.PackageManager;
+import android.os.Build;
import android.os.IBinder;
import android.os.Process;
import android.os.SystemProperties;
@@ -55,7 +56,8 @@
private final IBinder mService = new IFileIntegrityService.Stub() {
@Override
public boolean isApkVeritySupported() {
- return SystemProperties.getInt("ro.apk_verity.mode", 0) == 2;
+ return Build.VERSION.FIRST_SDK_INT >= Build.VERSION_CODES.R
+ || SystemProperties.getInt("ro.apk_verity.mode", 0) == 2;
}
@Override
diff --git a/services/core/java/com/android/server/wm/ActivityMetricsLogger.java b/services/core/java/com/android/server/wm/ActivityMetricsLogger.java
index 0502d0b..68a7188 100644
--- a/services/core/java/com/android/server/wm/ActivityMetricsLogger.java
+++ b/services/core/java/com/android/server/wm/ActivityMetricsLogger.java
@@ -581,6 +581,9 @@
/**
* Notifies the tracker that all windows of the app have been drawn.
+ *
+ * @return Non-null info if the activity was pending to draw, otherwise it might have been set
+ * to invisible (removed from active transition) or it was already drawn.
*/
@Nullable
TransitionInfoSnapshot notifyWindowsDrawn(@NonNull ActivityRecord r, long timestampNs) {
diff --git a/services/core/java/com/android/server/wm/ActivityRecord.java b/services/core/java/com/android/server/wm/ActivityRecord.java
index 084800c..b3b8159 100644
--- a/services/core/java/com/android/server/wm/ActivityRecord.java
+++ b/services/core/java/com/android/server/wm/ActivityRecord.java
@@ -5202,11 +5202,17 @@
}
final TransitionInfoSnapshot info = mStackSupervisor
.getActivityMetricsLogger().notifyWindowsDrawn(this, timestampNs);
- final int windowsDrawnDelayMs = info != null ? info.windowsDrawnDelayMs : INVALID_DELAY;
- final @LaunchState int launchState = info != null ? info.getLaunchState() : -1;
- mStackSupervisor.reportActivityLaunchedLocked(false /* timeout */, this,
- windowsDrawnDelayMs, launchState);
- mStackSupervisor.stopWaitingForActivityVisible(this, windowsDrawnDelayMs);
+ final boolean validInfo = info != null;
+ final int windowsDrawnDelayMs = validInfo ? info.windowsDrawnDelayMs : INVALID_DELAY;
+ final @LaunchState int launchState = validInfo ? info.getLaunchState() : -1;
+ // The activity may have been requested to be invisible (another activity has been launched)
+ // so there is no valid info. But if it is the current top activity (e.g. sleeping), the
+ // invalid state is still reported to make sure the waiting result is notified.
+ if (validInfo || this == mDisplayContent.topRunningActivity()) {
+ mStackSupervisor.reportActivityLaunchedLocked(false /* timeout */, this,
+ windowsDrawnDelayMs, launchState);
+ mStackSupervisor.stopWaitingForActivityVisible(this, windowsDrawnDelayMs);
+ }
finishLaunchTickingLocked();
if (task != null) {
task.hasBeenVisible = true;
diff --git a/services/core/java/com/android/server/wm/DisplayPolicy.java b/services/core/java/com/android/server/wm/DisplayPolicy.java
index 38b0ca8..d719dbe3 100644
--- a/services/core/java/com/android/server/wm/DisplayPolicy.java
+++ b/services/core/java/com/android/server/wm/DisplayPolicy.java
@@ -24,7 +24,7 @@
import static android.app.WindowConfiguration.WINDOWING_MODE_SPLIT_SCREEN_SECONDARY;
import static android.content.res.Configuration.UI_MODE_TYPE_CAR;
import static android.content.res.Configuration.UI_MODE_TYPE_MASK;
-import static android.view.Display.TYPE_BUILT_IN;
+import static android.view.Display.TYPE_INTERNAL;
import static android.view.InsetsState.ITYPE_BOTTOM_GESTURES;
import static android.view.InsetsState.ITYPE_BOTTOM_TAPPABLE_ELEMENT;
import static android.view.InsetsState.ITYPE_LEFT_GESTURES;
@@ -2983,11 +2983,12 @@
/**
* Return corner radius in pixels that should be used on windows in order to cover the display.
- * The radius is only valid for built-in displays since the one who configures window corner
- * radius cannot know the corner radius of non-built-in display.
+ *
+ * The radius is only valid for internal displays, since the corner radius of external displays
+ * is not known at build time when window corners are configured.
*/
float getWindowCornerRadius() {
- return mDisplayContent.getDisplay().getType() == TYPE_BUILT_IN
+ return mDisplayContent.getDisplay().getType() == TYPE_INTERNAL
? ScreenDecorationsUtils.getWindowCornerRadius(mContext.getResources()) : 0f;
}
diff --git a/services/core/java/com/android/server/wm/Task.java b/services/core/java/com/android/server/wm/Task.java
index 9279271..c7f2cc7 100644
--- a/services/core/java/com/android/server/wm/Task.java
+++ b/services/core/java/com/android/server/wm/Task.java
@@ -199,6 +199,7 @@
static final int INVALID_MIN_SIZE = -1;
private float mShadowRadius = 0;
private final Rect mLastSurfaceCrop = new Rect();
+ private static final boolean ENABLE_FREEFORM_COMPOSITOR_SHADOWS = false;
/**
* The modes to control how the stack is moved to the front when calling {@link Task#reparent}.
@@ -2547,8 +2548,10 @@
}
private void updateSurfaceCrop() {
+ // TODO(b/149585281) remove when root task has the correct bounds for freeform
// Only update the crop if we are drawing shadows on the task.
- if (mSurfaceControl == null || !mWmService.mRenderShadowsInCompositor) {
+ if (mSurfaceControl == null || !mWmService.mRenderShadowsInCompositor
+ || !isRootTask() || !ENABLE_FREEFORM_COMPOSITOR_SHADOWS) {
return;
}
@@ -2972,8 +2975,14 @@
}
@Override
+ void onSurfaceShown(SurfaceControl.Transaction t) {
+ super.onSurfaceShown(t);
+ t.unsetColor(mSurfaceControl);
+ }
+
+ @Override
SurfaceControl.Builder makeSurface() {
- return super.makeSurface().setMetadata(METADATA_TASK_ID, mTaskId);
+ return super.makeSurface().setColorLayer().setMetadata(METADATA_TASK_ID, mTaskId);
}
boolean isTaskAnimating() {
@@ -3932,7 +3941,8 @@
return dipToPixel(PINNED_WINDOWING_MODE_ELEVATION_IN_DIP,
mDisplayContent.getDisplayMetrics());
}
- if (inFreeformWindowingMode()) {
+ // TODO(b/149585281) remove when root task has the correct bounds for freeform
+ if (ENABLE_FREEFORM_COMPOSITOR_SHADOWS && inFreeformWindowingMode()) {
final int elevation = taskIsFocused
? DECOR_SHADOW_FOCUSED_HEIGHT_IN_DIP : DECOR_SHADOW_UNFOCUSED_HEIGHT_IN_DIP;
return dipToPixel(elevation, mDisplayContent.getDisplayMetrics());
@@ -3947,7 +3957,7 @@
*/
private void updateShadowsRadius(boolean taskIsFocused,
SurfaceControl.Transaction pendingTransaction) {
- if (!mWmService.mRenderShadowsInCompositor) return;
+ if (!mWmService.mRenderShadowsInCompositor || !isRootTask()) return;
final float newShadowRadius = getShadowRadius(taskIsFocused);
if (mShadowRadius != newShadowRadius) {
diff --git a/services/core/java/com/android/server/wm/WindowContainer.java b/services/core/java/com/android/server/wm/WindowContainer.java
index 0bb4e03..294c36a 100644
--- a/services/core/java/com/android/server/wm/WindowContainer.java
+++ b/services/core/java/com/android/server/wm/WindowContainer.java
@@ -365,6 +365,7 @@
// build a surface.
setSurfaceControl(makeSurface().build());
getPendingTransaction().show(mSurfaceControl);
+ onSurfaceShown(getPendingTransaction());
updateSurfacePosition();
} else {
// If we have a surface but a new parent, we just need to perform a reparent. Go through
@@ -383,6 +384,13 @@
scheduleAnimation();
}
+ /**
+ * Called when the surface is shown for the first time.
+ */
+ void onSurfaceShown(Transaction t) {
+ // do nothing
+ }
+
// Temp. holders for a chain of containers we are currently processing.
private final LinkedList<WindowContainer> mTmpChain1 = new LinkedList<>();
private final LinkedList<WindowContainer> mTmpChain2 = new LinkedList<>();
@@ -1908,7 +1916,7 @@
@Override
public Builder makeAnimationLeash() {
- return makeSurface();
+ return makeSurface().setContainerLayer();
}
@Override
diff --git a/services/core/jni/com_android_server_location_GnssLocationProvider.cpp b/services/core/jni/com_android_server_location_GnssLocationProvider.cpp
index d0eaa48..e1615af 100644
--- a/services/core/jni/com_android_server_location_GnssLocationProvider.cpp
+++ b/services/core/jni/com_android_server_location_GnssLocationProvider.cpp
@@ -645,10 +645,12 @@
Return<void> gnssSvStatusCb_2_0(const hidl_vec<IGnssCallback_V2_0::GnssSvInfo>& svInfoList) override {
return gnssSvStatusCbImpl(svInfoList);
}
+
+ // New in 2.1
Return<void> gnssSvStatusCb_2_1(const hidl_vec<IGnssCallback_V2_1::GnssSvInfo>& svInfoList) override {
return gnssSvStatusCbImpl(svInfoList);
}
- Return<void> gnssSetCapabilitesCbImpl(uint32_t capabilities, bool hasSubHalCapabilityFlags);
+ Return<void> gnssSetCapabilitiesCb_2_1(uint32_t capabilities) override;
// TODO: Reconsider allocation cost vs threadsafety on these statics
static const char* sNmeaString;
@@ -851,6 +853,10 @@
return GnssCallback::gnssSetCapabilitesCb(capabilities);
}
+Return<void> GnssCallback::gnssSetCapabilitiesCb_2_1(uint32_t capabilities) {
+ return GnssCallback::gnssSetCapabilitesCb(capabilities);
+}
+
Return<void> GnssCallback::gnssAcquireWakelockCb() {
acquire_wake_lock(PARTIAL_WAKE_LOCK, WAKE_LOCK_NAME);
return Void();
diff --git a/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java b/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
index aa5dafc..063ad0f 100644
--- a/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
+++ b/services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
@@ -15230,15 +15230,27 @@
final ActiveAdmin admin =
getActiveAdminForCallerLocked(who, DeviceAdminInfo.USES_POLICY_PROFILE_OWNER);
previousCrossProfilePackages = admin.mCrossProfilePackages;
+ if (packageNames.equals(previousCrossProfilePackages)) {
+ return;
+ }
admin.mCrossProfilePackages = packageNames;
saveSettingsLocked(mInjector.userHandleGetCallingUserId());
}
+ logSetCrossProfilePackages(who, packageNames);
final CrossProfileApps crossProfileApps = mContext.getSystemService(CrossProfileApps.class);
mInjector.binderWithCleanCallingIdentity(
() -> crossProfileApps.resetInteractAcrossProfilesAppOps(
previousCrossProfilePackages, new HashSet<>(packageNames)));
}
+ private void logSetCrossProfilePackages(ComponentName who, List<String> packageNames) {
+ DevicePolicyEventLogger
+ .createEvent(DevicePolicyEnums.SET_CROSS_PROFILE_PACKAGES)
+ .setAdmin(who)
+ .setStrings(packageNames.toArray(new String[packageNames.size()]))
+ .write();
+ }
+
@Override
public List<String> getCrossProfilePackages(ComponentName who) {
if (!mHasFeature) {
diff --git a/services/people/java/com/android/server/people/data/ConversationInfo.java b/services/people/java/com/android/server/people/data/ConversationInfo.java
index ce35366..859cdf2 100644
--- a/services/people/java/com/android/server/people/data/ConversationInfo.java
+++ b/services/people/java/com/android/server/people/data/ConversationInfo.java
@@ -137,6 +137,11 @@
return hasShortcutFlags(ShortcutInfo.FLAG_LONG_LIVED);
}
+ /** Whether the shortcut for this conversation is cached in Shortcut Service. */
+ public boolean isShortcutCached() {
+ return hasShortcutFlags(ShortcutInfo.FLAG_CACHED);
+ }
+
/** Whether this conversation is marked as important by the user. */
public boolean isImportant() {
return hasConversationFlags(FLAG_IMPORTANT);
@@ -213,6 +218,9 @@
if (isShortcutLongLived()) {
sb.append("Liv");
}
+ if (isShortcutCached()) {
+ sb.append("Cac");
+ }
sb.append("]");
sb.append(", conversationFlags=0x").append(Integer.toHexString(mConversationFlags));
sb.append(" [");
diff --git a/services/people/java/com/android/server/people/data/DataManager.java b/services/people/java/com/android/server/people/data/DataManager.java
index 2d7c937..dd9cbd0 100644
--- a/services/people/java/com/android/server/people/data/DataManager.java
+++ b/services/people/java/com/android/server/people/data/DataManager.java
@@ -640,6 +640,14 @@
private class NotificationListener extends NotificationListenerService {
@Override
+ public void onNotificationPosted(StatusBarNotification sbn) {
+ EventHistoryImpl eventHistory = getEventHistoryIfEligible(sbn);
+ if (eventHistory != null) {
+ eventHistory.addEvent(new Event(sbn.getPostTime(), Event.TYPE_NOTIFICATION_POSTED));
+ }
+ }
+
+ @Override
public void onNotificationRemoved(StatusBarNotification sbn, RankingMap rankingMap,
int reason) {
if (reason != REASON_CLICK) {
@@ -688,7 +696,15 @@
break;
}
conversationStore.addOrUpdate(builder.build());
- // TODO: Cache the shortcut when a conversation's notification setting is changed.
+
+ if (modificationType == NOTIFICATION_CHANNEL_OR_GROUP_UPDATED
+ && conversationInfo.isShortcutLongLived()
+ && !conversationInfo.isShortcutCached()) {
+ mShortcutServiceInternal.cacheShortcuts(user.getIdentifier(),
+ mContext.getPackageName(), pkg,
+ Collections.singletonList(conversationInfo.getShortcutId()),
+ user.getIdentifier());
+ }
}
}
diff --git a/services/people/java/com/android/server/people/data/UsageStatsQueryHelper.java b/services/people/java/com/android/server/people/data/UsageStatsQueryHelper.java
index 6dcfaa0..72f1abb 100644
--- a/services/people/java/com/android/server/people/data/UsageStatsQueryHelper.java
+++ b/services/people/java/com/android/server/people/data/UsageStatsQueryHelper.java
@@ -80,10 +80,6 @@
addEventByShortcutId(packageData, e.getShortcutId(),
new Event(e.getTimeStamp(), Event.TYPE_SHORTCUT_INVOCATION));
break;
- case UsageEvents.Event.NOTIFICATION_INTERRUPTION:
- addEventByNotificationChannelId(packageData, e.getNotificationChannelId(),
- new Event(e.getTimeStamp(), Event.TYPE_NOTIFICATION_POSTED));
- break;
case UsageEvents.Event.LOCUS_ID_SET:
onInAppConversationEnded(packageData, e);
LocusId locusId = e.getLocusId() != null ? new LocusId(e.getLocusId()) : null;
@@ -142,17 +138,4 @@
EventStore.CATEGORY_LOCUS_ID_BASED, locusId.getId());
eventHistory.addEvent(event);
}
-
- private void addEventByNotificationChannelId(PackageData packageData,
- String notificationChannelId, Event event) {
- ConversationInfo conversationInfo =
- packageData.getConversationStore().getConversationByNotificationChannelId(
- notificationChannelId);
- if (conversationInfo == null) {
- return;
- }
- EventHistoryImpl eventHistory = packageData.getEventStore().getOrCreateEventHistory(
- EventStore.CATEGORY_SHORTCUT_BASED, conversationInfo.getShortcutId());
- eventHistory.addEvent(event);
- }
}
diff --git a/services/tests/servicestests/src/com/android/server/display/DisplayManagerServiceTest.java b/services/tests/servicestests/src/com/android/server/display/DisplayManagerServiceTest.java
index 8d5939a..7027185 100644
--- a/services/tests/servicestests/src/com/android/server/display/DisplayManagerServiceTest.java
+++ b/services/tests/servicestests/src/com/android/server/display/DisplayManagerServiceTest.java
@@ -202,7 +202,7 @@
assertEquals(1, displayIds.length);
final int displayId = displayIds[0];
DisplayInfo info = bs.getDisplayInfo(displayId);
- assertEquals(info.type, Display.TYPE_BUILT_IN);
+ assertEquals(info.type, Display.TYPE_INTERNAL);
displayManager.performTraversalInternal(mock(SurfaceControl.Transaction.class));
diff --git a/services/tests/servicestests/src/com/android/server/people/data/ConversationInfoTest.java b/services/tests/servicestests/src/com/android/server/people/data/ConversationInfoTest.java
index c0e7927..70d6cf8 100644
--- a/services/tests/servicestests/src/com/android/server/people/data/ConversationInfoTest.java
+++ b/services/tests/servicestests/src/com/android/server/people/data/ConversationInfoTest.java
@@ -46,7 +46,7 @@
.setContactUri(CONTACT_URI)
.setContactPhoneNumber(PHONE_NUMBER)
.setNotificationChannelId(NOTIFICATION_CHANNEL_ID)
- .setShortcutFlags(ShortcutInfo.FLAG_LONG_LIVED)
+ .setShortcutFlags(ShortcutInfo.FLAG_LONG_LIVED | ShortcutInfo.FLAG_CACHED)
.setImportant(true)
.setNotificationSilenced(true)
.setBubbled(true)
@@ -62,6 +62,7 @@
assertEquals(PHONE_NUMBER, conversationInfo.getContactPhoneNumber());
assertEquals(NOTIFICATION_CHANNEL_ID, conversationInfo.getNotificationChannelId());
assertTrue(conversationInfo.isShortcutLongLived());
+ assertTrue(conversationInfo.isShortcutCached());
assertTrue(conversationInfo.isImportant());
assertTrue(conversationInfo.isNotificationSilenced());
assertTrue(conversationInfo.isBubbled());
@@ -83,6 +84,7 @@
assertNull(conversationInfo.getContactPhoneNumber());
assertNull(conversationInfo.getNotificationChannelId());
assertFalse(conversationInfo.isShortcutLongLived());
+ assertFalse(conversationInfo.isShortcutCached());
assertFalse(conversationInfo.isImportant());
assertFalse(conversationInfo.isNotificationSilenced());
assertFalse(conversationInfo.isBubbled());
diff --git a/services/tests/servicestests/src/com/android/server/people/data/DataManagerTest.java b/services/tests/servicestests/src/com/android/server/people/data/DataManagerTest.java
index 0bb984e..3ecd319 100644
--- a/services/tests/servicestests/src/com/android/server/people/data/DataManagerTest.java
+++ b/services/tests/servicestests/src/com/android/server/people/data/DataManagerTest.java
@@ -184,6 +184,7 @@
when(mStatusBarNotification.getNotification()).thenReturn(mNotification);
when(mStatusBarNotification.getPackageName()).thenReturn(TEST_PKG_NAME);
when(mStatusBarNotification.getUser()).thenReturn(UserHandle.of(USER_ID_PRIMARY));
+ when(mStatusBarNotification.getPostTime()).thenReturn(System.currentTimeMillis());
when(mNotification.getShortcutId()).thenReturn(TEST_SHORTCUT_ID);
mNotificationChannel = new NotificationChannel(
@@ -325,6 +326,28 @@
}
@Test
+ public void testNotificationPosted() {
+ mDataManager.onUserUnlocked(USER_ID_PRIMARY);
+
+ ShortcutInfo shortcut = buildShortcutInfo(TEST_PKG_NAME, USER_ID_PRIMARY, TEST_SHORTCUT_ID,
+ buildPerson());
+ mDataManager.onShortcutAddedOrUpdated(shortcut);
+
+ NotificationListenerService listenerService =
+ mDataManager.getNotificationListenerServiceForTesting(USER_ID_PRIMARY);
+
+ listenerService.onNotificationPosted(mStatusBarNotification);
+
+ List<Range<Long>> activeNotificationOpenTimeSlots = new ArrayList<>();
+ mDataManager.forAllPackages(packageData ->
+ activeNotificationOpenTimeSlots.addAll(
+ packageData.getEventHistory(TEST_SHORTCUT_ID)
+ .getEventIndex(Event.TYPE_NOTIFICATION_POSTED)
+ .getActiveTimeSlots()));
+ assertEquals(1, activeNotificationOpenTimeSlots.size());
+ }
+
+ @Test
public void testNotificationOpened() {
mDataManager.onUserUnlocked(USER_ID_PRIMARY);
@@ -393,6 +416,9 @@
assertTrue(conversationInfo.isImportant());
assertFalse(conversationInfo.isNotificationSilenced());
assertFalse(conversationInfo.isDemoted());
+ verify(mShortcutServiceInternal).cacheShortcuts(
+ anyInt(), any(), eq(TEST_PKG_NAME),
+ eq(Collections.singletonList(TEST_SHORTCUT_ID)), eq(USER_ID_PRIMARY));
}
@Test
@@ -589,6 +615,7 @@
when(mockContext.getUser()).thenReturn(UserHandle.of(userId));
ShortcutInfo.Builder builder = new ShortcutInfo.Builder(mockContext, id)
.setShortLabel(id)
+ .setLongLived(true)
.setIntent(new Intent("TestIntent"));
if (person != null) {
builder.setPersons(new Person[] {person});
diff --git a/services/tests/servicestests/src/com/android/server/people/data/UsageStatsQueryHelperTest.java b/services/tests/servicestests/src/com/android/server/people/data/UsageStatsQueryHelperTest.java
index dc4876b..d444466 100644
--- a/services/tests/servicestests/src/com/android/server/people/data/UsageStatsQueryHelperTest.java
+++ b/services/tests/servicestests/src/com/android/server/people/data/UsageStatsQueryHelperTest.java
@@ -59,7 +59,6 @@
private static final String PKG_NAME = "pkg";
private static final String ACTIVITY_NAME = "TestActivity";
private static final String SHORTCUT_ID = "abc";
- private static final String NOTIFICATION_CHANNEL_ID = "test : abc";
private static final LocusId LOCUS_ID_1 = new LocusId("locus_1");
private static final LocusId LOCUS_ID_2 = new LocusId("locus_2");
@@ -83,7 +82,6 @@
scheduledExecutorService, testDir, helper);
mPackageData.mConversationStore.mConversationInfo = new ConversationInfo.Builder()
.setShortcutId(SHORTCUT_ID)
- .setNotificationChannelId(NOTIFICATION_CHANNEL_ID)
.setLocusId(LOCUS_ID_1)
.build();
@@ -114,19 +112,6 @@
}
@Test
- public void testQueryNotificationInterruptionEvent() {
- addUsageEvents(createNotificationInterruptionEvent(100L));
-
- assertTrue(mHelper.querySince(50L));
- assertEquals(100L, mHelper.getLastEventTimestamp());
- Event expectedEvent = new Event(100L, Event.TYPE_NOTIFICATION_POSTED);
- List<Event> events = mPackageData.mEventStore.mShortcutEventHistory.queryEvents(
- Event.ALL_EVENT_TYPES, 0L, Long.MAX_VALUE);
- assertEquals(1, events.size());
- assertEquals(expectedEvent, events.get(0));
- }
-
- @Test
public void testInAppConversationSwitch() {
addUsageEvents(
createLocusIdSetEvent(100_000L, LOCUS_ID_1.getId()),
@@ -203,13 +188,6 @@
return e;
}
- private static UsageEvents.Event createNotificationInterruptionEvent(long timestamp) {
- UsageEvents.Event e = createUsageEvent(UsageEvents.Event.NOTIFICATION_INTERRUPTION,
- timestamp);
- e.mNotificationChannelId = NOTIFICATION_CHANNEL_ID;
- return e;
- }
-
private static UsageEvents.Event createLocusIdSetEvent(long timestamp, String locusId) {
UsageEvents.Event e = createUsageEvent(UsageEvents.Event.LOCUS_ID_SET, timestamp);
e.mClass = ACTIVITY_NAME;
diff --git a/services/tests/servicestests/src/com/android/server/pm/AppsFilterTest.java b/services/tests/servicestests/src/com/android/server/pm/AppsFilterTest.java
index e28d13a..9670658 100644
--- a/services/tests/servicestests/src/com/android/server/pm/AppsFilterTest.java
+++ b/services/tests/servicestests/src/com/android/server/pm/AppsFilterTest.java
@@ -37,6 +37,7 @@
import android.content.pm.parsing.ParsingPackage;
import android.os.Build;
import android.os.Process;
+import android.platform.test.annotations.Presubmit;
import android.util.ArrayMap;
import android.util.ArraySet;
@@ -57,6 +58,7 @@
import java.util.Map;
import java.util.Set;
+@Presubmit
@RunWith(JUnit4.class)
public class AppsFilterTest {
@@ -314,7 +316,8 @@
b -> b.setSigningDetails(frameworkSigningDetails));
PackageSetting target = simulateAddPackage(appsFilter, pkg("com.some.package"),
DUMMY_TARGET_UID,
- b -> b.setSigningDetails(frameworkSigningDetails));
+ b -> b.setSigningDetails(frameworkSigningDetails)
+ .setPkgFlags(ApplicationInfo.FLAG_SYSTEM));
PackageSetting calling = simulateAddPackage(appsFilter,
pkg("com.some.other.package"), DUMMY_CALLING_UID,
b -> b.setSigningDetails(otherSigningDetails));
diff --git a/services/tests/servicestests/src/com/android/server/systemconfig/SystemConfigTest.java b/services/tests/servicestests/src/com/android/server/systemconfig/SystemConfigTest.java
index 4d0481be..eef9012 100644
--- a/services/tests/servicestests/src/com/android/server/systemconfig/SystemConfigTest.java
+++ b/services/tests/servicestests/src/com/android/server/systemconfig/SystemConfigTest.java
@@ -18,6 +18,7 @@
import static org.junit.Assert.assertEquals;
+import android.platform.test.annotations.Presubmit;
import android.util.ArrayMap;
import android.util.ArraySet;
import android.util.Log;
@@ -48,8 +49,9 @@
* Build/Install/Run:
* atest FrameworksServicesTests:SystemConfigTest
*/
-@RunWith(AndroidJUnit4.class)
@SmallTest
+@Presubmit
+@RunWith(AndroidJUnit4.class)
public class SystemConfigTest {
private static final String LOG_TAG = "SystemConfigTest";
diff --git a/services/tests/uiservicestests/src/com/android/server/notification/NotificationHistoryProtoHelperTest.java b/services/tests/uiservicestests/src/com/android/server/notification/NotificationHistoryProtoHelperTest.java
index 458117d..6eaf546 100644
--- a/services/tests/uiservicestests/src/com/android/server/notification/NotificationHistoryProtoHelperTest.java
+++ b/services/tests/uiservicestests/src/com/android/server/notification/NotificationHistoryProtoHelperTest.java
@@ -21,6 +21,7 @@
import android.app.NotificationHistory.HistoricalNotification;
import android.graphics.drawable.Icon;
import android.test.suitebuilder.annotation.SmallTest;
+import android.text.TextUtils;
import androidx.test.InstrumentationRegistry;
import androidx.test.runner.AndroidJUnit4;
@@ -57,6 +58,10 @@
String expectedText = "text" + index;
Icon expectedIcon = Icon.createWithResource(InstrumentationRegistry.getContext(),
index);
+ String conversationId = null;
+ if (index % 2 == 0) {
+ conversationId = "convo" + index;
+ }
return new HistoricalNotification.Builder()
.setPackage(packageName)
@@ -68,6 +73,7 @@
.setTitle(expectedTitle)
.setText(expectedText)
.setIcon(expectedIcon)
+ .setConversationId(conversationId)
.build();
}
@@ -139,6 +145,9 @@
expectedStrings.add(n.getPackage());
expectedStrings.add(n.getChannelName());
expectedStrings.add(n.getChannelId());
+ if (!TextUtils.isEmpty(n.getConversationId())) {
+ expectedStrings.add(n.getConversationId());
+ }
expectedEntries.add(n);
}
history.addNotificationToWrite(n);
@@ -178,6 +187,9 @@
expectedStrings.add(n.getPackage());
expectedStrings.add(n.getChannelName());
expectedStrings.add(n.getChannelId());
+ if (!TextUtils.isEmpty(n.getConversationId())) {
+ expectedStrings.add(n.getConversationId());
+ }
expectedEntries.add(n);
}
history.addNotificationToWrite(n);
@@ -227,6 +239,9 @@
expectedStrings.add(n.getPackage());
expectedStrings.add(n.getChannelName());
expectedStrings.add(n.getChannelId());
+ if (n.getConversationId() != null) {
+ expectedStrings.add(n.getConversationId());
+ }
expectedEntries.add(n);
}
history.addNotificationToWrite(n);
@@ -264,6 +279,9 @@
expectedStrings.add(n.getPackage());
expectedStrings.add(n.getChannelName());
expectedStrings.add(n.getChannelId());
+ if (n.getConversationId() != null) {
+ expectedStrings.add(n.getConversationId());
+ }
history.addNotificationToWrite(n);
}
history.poolStringsFromNotifications();
@@ -279,6 +297,9 @@
expectedStrings.add(n.getPackage());
expectedStrings.add(n.getChannelName());
expectedStrings.add(n.getChannelId());
+ if (n.getConversationId() != null) {
+ expectedStrings.add(n.getConversationId());
+ }
actualHistory.addNotificationToWrite(n);
}
actualHistory.poolStringsFromNotifications();
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 bc33f08..e5ffb4d 100755
--- a/services/tests/uiservicestests/src/com/android/server/notification/NotificationManagerServiceTest.java
+++ b/services/tests/uiservicestests/src/com/android/server/notification/NotificationManagerServiceTest.java
@@ -1284,6 +1284,27 @@
}
@Test
+ public void testPostCancelPostNotifiesListeners() throws Exception {
+ // WHEN a notification is posted
+ final StatusBarNotification sbn = generateNotificationRecord(null).getSbn();
+ mBinderService.enqueueNotificationWithTag(PKG, PKG, "tag", sbn.getId(),
+ sbn.getNotification(), sbn.getUserId());
+ // THEN it is canceled
+ mBinderService.cancelNotificationWithTag(PKG, PKG, "tag", sbn.getId(), sbn.getUserId());
+ // THEN it is posted again (before the cancel has a chance to finish)
+ mBinderService.enqueueNotificationWithTag(PKG, PKG, "tag", sbn.getId(),
+ sbn.getNotification(), sbn.getUserId());
+ // THEN the later enqueue isn't swallowed by the cancel. I.e., ordering is respected
+ waitForIdle();
+
+ // The final enqueue made it to the listener instead of being canceled
+ StatusBarNotification[] notifs =
+ mBinderService.getActiveNotifications(PKG);
+ assertEquals(1, notifs.length);
+ assertEquals(1, mService.getNotificationRecordCount());
+ }
+
+ @Test
public void testCancelNotificationWhilePostedAndEnqueued() throws Exception {
mBinderService.enqueueNotificationWithTag(PKG, PKG,
"testCancelNotificationWhilePostedAndEnqueued", 0,
diff --git a/telephony/java/android/telephony/CellIdentityGsm.java b/telephony/java/android/telephony/CellIdentityGsm.java
index 9f2537c..203047f 100644
--- a/telephony/java/android/telephony/CellIdentityGsm.java
+++ b/telephony/java/android/telephony/CellIdentityGsm.java
@@ -22,11 +22,12 @@
import android.os.Parcel;
import android.telephony.gsm.GsmCellLocation;
import android.text.TextUtils;
+import android.util.ArraySet;
-import java.util.ArrayList;
+import java.util.Collection;
import java.util.Collections;
-import java.util.List;
import java.util.Objects;
+import java.util.Set;
/**
* CellIdentity to represent a unique GSM cell
@@ -50,7 +51,7 @@
private final int mBsic;
// a list of additional PLMN-IDs reported for this cell
- private final List<String> mAdditionalPlmns;
+ private final ArraySet<String> mAdditionalPlmns;
/**
* @hide
@@ -62,7 +63,7 @@
mCid = CellInfo.UNAVAILABLE;
mArfcn = CellInfo.UNAVAILABLE;
mBsic = CellInfo.UNAVAILABLE;
- mAdditionalPlmns = Collections.emptyList();
+ mAdditionalPlmns = new ArraySet<>();
}
/**
@@ -81,13 +82,13 @@
*/
public CellIdentityGsm(int lac, int cid, int arfcn, int bsic, @Nullable String mccStr,
@Nullable String mncStr, @Nullable String alphal, @Nullable String alphas,
- @NonNull List<String> additionalPlmns) {
+ @NonNull Collection<String> additionalPlmns) {
super(TAG, CellInfo.TYPE_GSM, mccStr, mncStr, alphal, alphas);
mLac = inRangeOrUnavailable(lac, 0, MAX_LAC);
mCid = inRangeOrUnavailable(cid, 0, MAX_CID);
mArfcn = inRangeOrUnavailable(arfcn, 0, MAX_ARFCN);
mBsic = inRangeOrUnavailable(bsic, 0, MAX_BSIC);
- mAdditionalPlmns = new ArrayList<>(additionalPlmns.size());
+ mAdditionalPlmns = new ArraySet<>(additionalPlmns.size());
for (String plmn : additionalPlmns) {
if (isValidPlmn(plmn)) {
mAdditionalPlmns.add(plmn);
@@ -99,7 +100,7 @@
public CellIdentityGsm(@NonNull android.hardware.radio.V1_0.CellIdentityGsm cid) {
this(cid.lac, cid.cid, cid.arfcn,
cid.bsic == (byte) 0xFF ? CellInfo.UNAVAILABLE : cid.bsic,
- cid.mcc, cid.mnc, "", "", Collections.emptyList());
+ cid.mcc, cid.mnc, "", "", new ArraySet<>());
}
/** @hide */
@@ -107,7 +108,7 @@
this(cid.base.lac, cid.base.cid, cid.base.arfcn,
cid.base.bsic == (byte) 0xFF ? CellInfo.UNAVAILABLE : cid.base.bsic, cid.base.mcc,
cid.base.mnc, cid.operatorNames.alphaLong, cid.operatorNames.alphaShort,
- Collections.emptyList());
+ new ArraySet<>());
}
/** @hide */
@@ -221,8 +222,8 @@
* @return a list of additional PLMN IDs supported by this cell.
*/
@NonNull
- public List<String> getAdditionalPlmns() {
- return mAdditionalPlmns;
+ public Set<String> getAdditionalPlmns() {
+ return Collections.unmodifiableSet(mAdditionalPlmns);
}
/**
@@ -296,7 +297,7 @@
dest.writeInt(mCid);
dest.writeInt(mArfcn);
dest.writeInt(mBsic);
- dest.writeList(mAdditionalPlmns);
+ dest.writeArraySet(mAdditionalPlmns);
}
/** Construct from Parcel, type has already been processed */
@@ -306,7 +307,7 @@
mCid = in.readInt();
mArfcn = in.readInt();
mBsic = in.readInt();
- mAdditionalPlmns = in.readArrayList(null);
+ mAdditionalPlmns = (ArraySet<String>) in.readArraySet(null);
if (DBG) log(toString());
}
diff --git a/telephony/java/android/telephony/CellIdentityLte.java b/telephony/java/android/telephony/CellIdentityLte.java
index a194ae3..e4198d1 100644
--- a/telephony/java/android/telephony/CellIdentityLte.java
+++ b/telephony/java/android/telephony/CellIdentityLte.java
@@ -23,11 +23,13 @@
import android.os.Parcel;
import android.telephony.gsm.GsmCellLocation;
import android.text.TextUtils;
+import android.util.ArraySet;
-import java.util.ArrayList;
+import java.util.Collection;
import java.util.Collections;
import java.util.List;
import java.util.Objects;
+import java.util.Set;
/**
* CellIdentity is to represent a unique LTE cell
@@ -54,7 +56,7 @@
private final int mBandwidth;
// a list of additional PLMN-IDs reported for this cell
- private final List<String> mAdditionalPlmns;
+ private final ArraySet<String> mAdditionalPlmns;
private ClosedSubscriberGroupInfo mCsgInfo;
@@ -69,7 +71,7 @@
mTac = CellInfo.UNAVAILABLE;
mEarfcn = CellInfo.UNAVAILABLE;
mBandwidth = CellInfo.UNAVAILABLE;
- mAdditionalPlmns = Collections.emptyList();
+ mAdditionalPlmns = new ArraySet<>();
mCsgInfo = null;
}
@@ -86,7 +88,7 @@
@UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.P, trackingBug = 115609023)
public CellIdentityLte(int mcc, int mnc, int ci, int pci, int tac) {
this(ci, pci, tac, CellInfo.UNAVAILABLE, CellInfo.UNAVAILABLE, String.valueOf(mcc),
- String.valueOf(mnc), null, null, Collections.emptyList(), null);
+ String.valueOf(mnc), null, null, new ArraySet<>(), null);
}
/**
@@ -107,7 +109,7 @@
*/
public CellIdentityLte(int ci, int pci, int tac, int earfcn, int bandwidth,
@Nullable String mccStr, @Nullable String mncStr, @Nullable String alphal,
- @Nullable String alphas, @NonNull List<String> additionalPlmns,
+ @Nullable String alphas, @NonNull Collection<String> additionalPlmns,
@Nullable ClosedSubscriberGroupInfo csgInfo) {
super(TAG, CellInfo.TYPE_LTE, mccStr, mncStr, alphal, alphas);
mCi = inRangeOrUnavailable(ci, 0, MAX_CI);
@@ -115,7 +117,7 @@
mTac = inRangeOrUnavailable(tac, 0, MAX_TAC);
mEarfcn = inRangeOrUnavailable(earfcn, 0, MAX_EARFCN);
mBandwidth = inRangeOrUnavailable(bandwidth, 0, MAX_BANDWIDTH);
- mAdditionalPlmns = new ArrayList<>(additionalPlmns.size());
+ mAdditionalPlmns = new ArraySet<>(additionalPlmns.size());
for (String plmn : additionalPlmns) {
if (isValidPlmn(plmn)) {
mAdditionalPlmns.add(plmn);
@@ -127,14 +129,14 @@
/** @hide */
public CellIdentityLte(@NonNull android.hardware.radio.V1_0.CellIdentityLte cid) {
this(cid.ci, cid.pci, cid.tac, cid.earfcn,
- CellInfo.UNAVAILABLE, cid.mcc, cid.mnc, "", "", Collections.emptyList(), null);
+ CellInfo.UNAVAILABLE, cid.mcc, cid.mnc, "", "", new ArraySet<>(), null);
}
/** @hide */
public CellIdentityLte(@NonNull android.hardware.radio.V1_2.CellIdentityLte cid) {
this(cid.base.ci, cid.base.pci, cid.base.tac, cid.base.earfcn, cid.bandwidth,
cid.base.mcc, cid.base.mnc, cid.operatorNames.alphaLong,
- cid.operatorNames.alphaShort, Collections.emptyList(), null);
+ cid.operatorNames.alphaShort, new ArraySet<>(), null);
}
/** @hide */
@@ -270,8 +272,8 @@
* @return a list of additional PLMN IDs supported by this cell.
*/
@NonNull
- public List<String> getAdditionalPlmns() {
- return mAdditionalPlmns;
+ public Set<String> getAdditionalPlmns() {
+ return Collections.unmodifiableSet(mAdditionalPlmns);
}
/**
@@ -361,7 +363,7 @@
dest.writeInt(mTac);
dest.writeInt(mEarfcn);
dest.writeInt(mBandwidth);
- dest.writeList(mAdditionalPlmns);
+ dest.writeArraySet(mAdditionalPlmns);
dest.writeParcelable(mCsgInfo, flags);
}
@@ -373,7 +375,7 @@
mTac = in.readInt();
mEarfcn = in.readInt();
mBandwidth = in.readInt();
- mAdditionalPlmns = in.readArrayList(null);
+ mAdditionalPlmns = (ArraySet<String>) in.readArraySet(null);
mCsgInfo = in.readParcelable(null);
if (DBG) log(toString());
}
diff --git a/telephony/java/android/telephony/CellIdentityNr.java b/telephony/java/android/telephony/CellIdentityNr.java
index a0ef5aa..cba500a 100644
--- a/telephony/java/android/telephony/CellIdentityNr.java
+++ b/telephony/java/android/telephony/CellIdentityNr.java
@@ -22,11 +22,14 @@
import android.os.Parcel;
import android.telephony.AccessNetworkConstants.NgranBands.NgranBand;
import android.telephony.gsm.GsmCellLocation;
+import android.util.ArraySet;
import java.util.ArrayList;
+import java.util.Collection;
import java.util.Collections;
import java.util.List;
import java.util.Objects;
+import java.util.Set;
/**
* Information to represent a unique NR(New Radio 5G) cell.
@@ -46,7 +49,7 @@
private final List<Integer> mBands;
// a list of additional PLMN-IDs reported for this cell
- private final List<String> mAdditionalPlmns;
+ private final ArraySet<String> mAdditionalPlmns;
/**
*
@@ -66,14 +69,14 @@
public CellIdentityNr(int pci, int tac, int nrArfcn, @NgranBand List<Integer> bands,
@Nullable String mccStr, @Nullable String mncStr, long nci,
@Nullable String alphal, @Nullable String alphas,
- @NonNull List<String> additionalPlmns) {
+ @NonNull Collection<String> additionalPlmns) {
super(TAG, CellInfo.TYPE_NR, mccStr, mncStr, alphal, alphas);
mPci = inRangeOrUnavailable(pci, 0, MAX_PCI);
mTac = inRangeOrUnavailable(tac, 0, MAX_TAC);
mNrArfcn = inRangeOrUnavailable(nrArfcn, 0, MAX_NRARFCN);
mBands = new ArrayList<>(bands);
mNci = inRangeOrUnavailable(nci, 0, MAX_NCI);
- mAdditionalPlmns = new ArrayList<>(additionalPlmns.size());
+ mAdditionalPlmns = new ArraySet<>(additionalPlmns.size());
for (String plmn : additionalPlmns) {
if (isValidPlmn(plmn)) {
mAdditionalPlmns.add(plmn);
@@ -85,7 +88,7 @@
public CellIdentityNr(@NonNull android.hardware.radio.V1_4.CellIdentityNr cid) {
this(cid.pci, cid.tac, cid.nrarfcn, Collections.emptyList(), cid.mcc, cid.mnc, cid.nci,
cid.operatorNames.alphaLong, cid.operatorNames.alphaShort,
- Collections.emptyList());
+ new ArraySet<>());
}
/** @hide */
@@ -212,8 +215,8 @@
* @return a list of additional PLMN IDs supported by this cell.
*/
@NonNull
- public List<String> getAdditionalPlmns() {
- return Collections.unmodifiableList(mAdditionalPlmns);
+ public Set<String> getAdditionalPlmns() {
+ return Collections.unmodifiableSet(mAdditionalPlmns);
}
@Override
@@ -241,7 +244,7 @@
dest.writeInt(mNrArfcn);
dest.writeList(mBands);
dest.writeLong(mNci);
- dest.writeList(mAdditionalPlmns);
+ dest.writeArraySet(mAdditionalPlmns);
}
/** Construct from Parcel, type has already been processed */
@@ -252,7 +255,7 @@
mNrArfcn = in.readInt();
mBands = in.readArrayList(null);
mNci = in.readLong();
- mAdditionalPlmns = in.readArrayList(null);
+ mAdditionalPlmns = (ArraySet<String>) in.readArraySet(null);
}
/** Implement the Parcelable interface */
diff --git a/telephony/java/android/telephony/CellIdentityTdscdma.java b/telephony/java/android/telephony/CellIdentityTdscdma.java
index 531487a..30f98bc 100644
--- a/telephony/java/android/telephony/CellIdentityTdscdma.java
+++ b/telephony/java/android/telephony/CellIdentityTdscdma.java
@@ -20,11 +20,12 @@
import android.annotation.Nullable;
import android.os.Parcel;
import android.telephony.gsm.GsmCellLocation;
+import android.util.ArraySet;
-import java.util.ArrayList;
+import java.util.Collection;
import java.util.Collections;
-import java.util.List;
import java.util.Objects;
+import java.util.Set;
/**
* CellIdentity is to represent a unique TD-SCDMA cell
@@ -50,7 +51,7 @@
private final int mUarfcn;
// a list of additional PLMN-IDs reported for this cell
- private final List<String> mAdditionalPlmns;
+ private final ArraySet<String> mAdditionalPlmns;
private ClosedSubscriberGroupInfo mCsgInfo;
@@ -63,7 +64,7 @@
mCid = CellInfo.UNAVAILABLE;
mCpid = CellInfo.UNAVAILABLE;
mUarfcn = CellInfo.UNAVAILABLE;
- mAdditionalPlmns = Collections.emptyList();
+ mAdditionalPlmns = new ArraySet<>();
mCsgInfo = null;
}
@@ -85,13 +86,14 @@
*/
public CellIdentityTdscdma(@Nullable String mcc, @Nullable String mnc, int lac, int cid,
int cpid, int uarfcn, @Nullable String alphal, @Nullable String alphas,
- @NonNull List<String> additionalPlmns, @Nullable ClosedSubscriberGroupInfo csgInfo) {
+ @NonNull Collection<String> additionalPlmns,
+ @Nullable ClosedSubscriberGroupInfo csgInfo) {
super(TAG, CellInfo.TYPE_TDSCDMA, mcc, mnc, alphal, alphas);
mLac = inRangeOrUnavailable(lac, 0, MAX_LAC);
mCid = inRangeOrUnavailable(cid, 0, MAX_CID);
mCpid = inRangeOrUnavailable(cpid, 0, MAX_CPID);
mUarfcn = inRangeOrUnavailable(uarfcn, 0, MAX_UARFCN);
- mAdditionalPlmns = new ArrayList<>(additionalPlmns.size());
+ mAdditionalPlmns = new ArraySet<>(additionalPlmns.size());
for (String plmn : additionalPlmns) {
if (isValidPlmn(plmn)) {
mAdditionalPlmns.add(plmn);
@@ -208,8 +210,8 @@
* @return a list of additional PLMN IDs supported by this cell.
*/
@NonNull
- public List<String> getAdditionalPlmns() {
- return mAdditionalPlmns;
+ public Set<String> getAdditionalPlmns() {
+ return Collections.unmodifiableSet(mAdditionalPlmns);
}
/**
@@ -289,7 +291,7 @@
dest.writeInt(mCid);
dest.writeInt(mCpid);
dest.writeInt(mUarfcn);
- dest.writeList(mAdditionalPlmns);
+ dest.writeArraySet(mAdditionalPlmns);
dest.writeParcelable(mCsgInfo, flags);
}
@@ -300,7 +302,7 @@
mCid = in.readInt();
mCpid = in.readInt();
mUarfcn = in.readInt();
- mAdditionalPlmns = in.readArrayList(null);
+ mAdditionalPlmns = (ArraySet<String>) in.readArraySet(null);
mCsgInfo = in.readParcelable(null);
if (DBG) log(toString());
}
diff --git a/telephony/java/android/telephony/CellIdentityWcdma.java b/telephony/java/android/telephony/CellIdentityWcdma.java
index 15e491b..9d2cb74 100644
--- a/telephony/java/android/telephony/CellIdentityWcdma.java
+++ b/telephony/java/android/telephony/CellIdentityWcdma.java
@@ -22,11 +22,12 @@
import android.os.Parcel;
import android.telephony.gsm.GsmCellLocation;
import android.text.TextUtils;
+import android.util.ArraySet;
-import java.util.ArrayList;
+import java.util.Collection;
import java.util.Collections;
-import java.util.List;
import java.util.Objects;
+import java.util.Set;
/**
* CellIdentity to represent a unique UMTS cell
@@ -51,7 +52,7 @@
private final int mUarfcn;
// a list of additional PLMN-IDs reported for this cell
- private final List<String> mAdditionalPlmns;
+ private final ArraySet<String> mAdditionalPlmns;
@Nullable
private final ClosedSubscriberGroupInfo mCsgInfo;
@@ -65,7 +66,7 @@
mCid = CellInfo.UNAVAILABLE;
mPsc = CellInfo.UNAVAILABLE;
mUarfcn = CellInfo.UNAVAILABLE;
- mAdditionalPlmns = Collections.emptyList();
+ mAdditionalPlmns = new ArraySet<>();
mCsgInfo = null;
}
@@ -86,13 +87,14 @@
*/
public CellIdentityWcdma(int lac, int cid, int psc, int uarfcn, @Nullable String mccStr,
@Nullable String mncStr, @Nullable String alphal, @Nullable String alphas,
- @NonNull List<String> additionalPlmns, @Nullable ClosedSubscriberGroupInfo csgInfo) {
+ @NonNull Collection<String> additionalPlmns,
+ @Nullable ClosedSubscriberGroupInfo csgInfo) {
super(TAG, CellInfo.TYPE_WCDMA, mccStr, mncStr, alphal, alphas);
mLac = inRangeOrUnavailable(lac, 0, MAX_LAC);
mCid = inRangeOrUnavailable(cid, 0, MAX_CID);
mPsc = inRangeOrUnavailable(psc, 0, MAX_PSC);
mUarfcn = inRangeOrUnavailable(uarfcn, 0, MAX_UARFCN);
- mAdditionalPlmns = new ArrayList<>(additionalPlmns.size());
+ mAdditionalPlmns = new ArraySet<>(additionalPlmns.size());
for (String plmn : additionalPlmns) {
if (isValidPlmn(plmn)) {
mAdditionalPlmns.add(plmn);
@@ -104,14 +106,14 @@
/** @hide */
public CellIdentityWcdma(@NonNull android.hardware.radio.V1_0.CellIdentityWcdma cid) {
this(cid.lac, cid.cid, cid.psc, cid.uarfcn, cid.mcc, cid.mnc, "", "",
- Collections.emptyList(), null);
+ new ArraySet<>(), null);
}
/** @hide */
public CellIdentityWcdma(@NonNull android.hardware.radio.V1_2.CellIdentityWcdma cid) {
this(cid.base.lac, cid.base.cid, cid.base.psc, cid.base.uarfcn,
cid.base.mcc, cid.base.mnc, cid.operatorNames.alphaLong,
- cid.operatorNames.alphaShort, Collections.emptyList(), null);
+ cid.operatorNames.alphaShort, new ArraySet<>(), null);
}
/** @hide */
@@ -232,8 +234,8 @@
* @return a list of additional PLMN IDs supported by this cell.
*/
@NonNull
- public List<String> getAdditionalPlmns() {
- return mAdditionalPlmns;
+ public Set<String> getAdditionalPlmns() {
+ return Collections.unmodifiableSet(mAdditionalPlmns);
}
/**
@@ -305,7 +307,7 @@
dest.writeInt(mCid);
dest.writeInt(mPsc);
dest.writeInt(mUarfcn);
- dest.writeList(mAdditionalPlmns);
+ dest.writeArraySet(mAdditionalPlmns);
dest.writeParcelable(mCsgInfo, flags);
}
@@ -316,7 +318,7 @@
mCid = in.readInt();
mPsc = in.readInt();
mUarfcn = in.readInt();
- mAdditionalPlmns = in.readArrayList(null);
+ mAdditionalPlmns = (ArraySet<String>) in.readArraySet(null);
mCsgInfo = in.readParcelable(null);
if (DBG) log(toString());
}
diff --git a/telephony/java/android/telephony/NetworkRegistrationInfo.java b/telephony/java/android/telephony/NetworkRegistrationInfo.java
index f9de47d..c74e17f 100644
--- a/telephony/java/android/telephony/NetworkRegistrationInfo.java
+++ b/telephony/java/android/telephony/NetworkRegistrationInfo.java
@@ -258,7 +258,7 @@
mCellIdentity = cellIdentity;
mEmergencyOnly = emergencyOnly;
mNrState = NR_STATE_NONE;
- mRplmn = (rplmn == null) ? "" : rplmn;
+ mRplmn = rplmn;
}
/**
@@ -408,13 +408,13 @@
* <p>If the device is registered, this will return the registered PLMN-ID. If registration
* has failed, then this will return the PLMN ID of the last attempted registration. If the
* device is not registered, or if is registered to a non-3GPP radio technology, then this
- * will return an empty string.
+ * will return null.
*
* <p>See 3GPP TS 23.122 for further information about the Registered PLMN.
*
- * @return the registered PLMN-ID or an empty string.
+ * @return the registered PLMN-ID or null.
*/
- @NonNull public String getRegisteredPlmn() {
+ @Nullable public String getRegisteredPlmn() {
return mRplmn;
}
@@ -892,7 +892,7 @@
* @return The same instance of the builder.
*/
public @NonNull Builder setRegisteredPlmn(@Nullable String rplmn) {
- mRplmn = (rplmn == null) ? "" : rplmn;
+ mRplmn = rplmn;
return this;
}
diff --git a/telephony/java/android/telephony/TelephonyManager.java b/telephony/java/android/telephony/TelephonyManager.java
index 15103bf..68b6683 100644
--- a/telephony/java/android/telephony/TelephonyManager.java
+++ b/telephony/java/android/telephony/TelephonyManager.java
@@ -13135,7 +13135,7 @@
*/
static IPhoneSubInfo getSubscriberInfoService() {
// Keeps cache disabled until test fixes are checked into AOSP.
- if (true) {
+ if (!sServiceHandleCacheEnabled) {
return IPhoneSubInfo.Stub.asInterface(
TelephonyFrameworkInitializer
.getTelephonyServiceManager()
@@ -13169,7 +13169,7 @@
*/
static ISub getSubscriptionService() {
// Keeps cache disabled until test fixes are checked into AOSP.
- if (true) {
+ if (!sServiceHandleCacheEnabled) {
return ISub.Stub.asInterface(
TelephonyFrameworkInitializer
.getTelephonyServiceManager()
@@ -13203,7 +13203,7 @@
*/
static ISms getSmsService() {
// Keeps cache disabled until test fixes are checked into AOSP.
- if (true) {
+ if (!sServiceHandleCacheEnabled) {
return ISms.Stub.asInterface(
TelephonyFrameworkInitializer
.getTelephonyServiceManager()
diff --git a/tests/RollbackTest/RollbackTest/AndroidManifest.xml b/tests/RollbackTest/RollbackTest/AndroidManifest.xml
index 2b8c964..9274da2 100644
--- a/tests/RollbackTest/RollbackTest/AndroidManifest.xml
+++ b/tests/RollbackTest/RollbackTest/AndroidManifest.xml
@@ -17,6 +17,7 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.android.tests.rollback" >
+ <uses-permission android:name="android.permission.QUERY_ALL_PACKAGES" />
<application>
<receiver android:name="com.android.cts.install.lib.LocalIntentSender"
android:exported="true" />