Merge "Remove the owner"
diff --git a/core/java/android/database/sqlite/package.html b/core/java/android/database/sqlite/package.html
index 6ececa2..71b8f3f 100644
--- a/core/java/android/database/sqlite/package.html
+++ b/core/java/android/database/sqlite/package.html
@@ -20,6 +20,9 @@
<p>The version of SQLite depends on the version of Android. See the following table:
<table style="width:auto;">
<tr><th>Android API</th><th>SQLite Version</th></tr>
+ <tr><td>API 34</td><td>3.39</td></tr>
+ <tr><td>API 33</td><td>3.32</td></tr>
+ <tr><td>API 32</td><td>3.32</td></tr>
<tr><td>API 31</td><td>3.32</td></tr>
<tr><td>API 30</td><td>3.28</td></tr>
<tr><td>API 28</td><td>3.22</td></tr>
diff --git a/core/java/android/text/style/URLSpan.java b/core/java/android/text/style/URLSpan.java
index eab1ef4..5bd52dd 100644
--- a/core/java/android/text/style/URLSpan.java
+++ b/core/java/android/text/style/URLSpan.java
@@ -106,7 +106,7 @@
try {
context.startActivity(intent);
} catch (ActivityNotFoundException e) {
- Log.w("URLSpan", "Actvity was not found for intent, " + intent.toString());
+ Log.w("URLSpan", "Activity was not found for intent, " + intent.toString());
}
}
}
diff --git a/core/java/android/view/accessibility/AccessibilityEvent.java b/core/java/android/view/accessibility/AccessibilityEvent.java
index cd0dd1d..662550b 100644
--- a/core/java/android/view/accessibility/AccessibilityEvent.java
+++ b/core/java/android/view/accessibility/AccessibilityEvent.java
@@ -440,12 +440,16 @@
/**
* Represents the event of clicking on a {@link android.view.View} like
* {@link android.widget.Button}, {@link android.widget.CompoundButton}, etc.
+ * <p>See {@link AccessibilityNodeInfo.AccessibilityAction#ACTION_CLICK} for more
+ * details.
*/
public static final int TYPE_VIEW_CLICKED = 0x00000001;
/**
* Represents the event of long clicking on a {@link android.view.View} like
* {@link android.widget.Button}, {@link android.widget.CompoundButton}, etc.
+ * <p>See {@link AccessibilityNodeInfo.AccessibilityAction#ACTION_LONG_CLICK} for more
+ * details.
*/
public static final int TYPE_VIEW_LONG_CLICKED = 0x00000002;
@@ -563,6 +567,8 @@
/**
* Represents the event of a context click on a {@link android.view.View}.
+ * <p>See {@link AccessibilityNodeInfo.AccessibilityAction#ACTION_CONTEXT_CLICK} for more
+ * details.
*/
public static final int TYPE_VIEW_CONTEXT_CLICKED = 0x00800000;
diff --git a/core/java/android/view/accessibility/AccessibilityNodeInfo.java b/core/java/android/view/accessibility/AccessibilityNodeInfo.java
index a20b2b2..0d49772 100644
--- a/core/java/android/view/accessibility/AccessibilityNodeInfo.java
+++ b/core/java/android/view/accessibility/AccessibilityNodeInfo.java
@@ -251,7 +251,7 @@
/**
* Action that clicks on the node info.
*
- * See {@link AccessibilityAction#ACTION_CLICK}
+ * @see AccessibilityAction#ACTION_CLICK
*/
public static final int ACTION_CLICK = 0x00000010;
@@ -259,6 +259,7 @@
* Action that long clicks on the node.
*
* <p>It does not support coordinate information for anchoring.</p>
+ * @see AccessibilityAction#ACTION_LONG_CLICK
*/
public static final int ACTION_LONG_CLICK = 0x00000020;
@@ -4679,7 +4680,7 @@
* and handled by custom widgets. i.e. ones that are not part of the UI toolkit. For
* example, an application may define a custom action for clearing the user history.
* </li>
- * <li><strong>Overriden standard actions</strong> - These are actions that override
+ * <li><strong>Overridden standard actions</strong> - These are actions that override
* standard actions to customize them. For example, an app may add a label to the
* standard {@link #ACTION_CLICK} action to indicate to the user that this action clears
* browsing history.
@@ -4729,12 +4730,29 @@
/**
* Action that clicks on the node info.
+ *
+ * <p>The UI element that implements this should send a
+ * {@link AccessibilityEvent#TYPE_VIEW_CLICKED} event. In the View system,
+ * the default handling of this action when performed by a service is to call
+ * {@link View#performClick()}, and setting a
+ * {@link View#setOnClickListener(View.OnClickListener)} automatically adds this action.
+ *
+ * <p>{@link #isClickable()} should return true if this action is available.
*/
public static final AccessibilityAction ACTION_CLICK =
new AccessibilityAction(AccessibilityNodeInfo.ACTION_CLICK);
/**
* Action that long clicks on the node.
+ *
+ * <p>The UI element that implements this should send a
+ * {@link AccessibilityEvent#TYPE_VIEW_LONG_CLICKED} event. In the View system,
+ * the default handling of this action when performed by a service is to call
+ * {@link View#performLongClick()}, and setting a
+ * {@link View#setOnLongClickListener(View.OnLongClickListener)} automatically adds this
+ * action.
+ *
+ * <p>{@link #isLongClickable()} should return true if this action is available.
*/
public static final AccessibilityAction ACTION_LONG_CLICK =
new AccessibilityAction(AccessibilityNodeInfo.ACTION_LONG_CLICK);
@@ -5047,6 +5065,18 @@
/**
* Action that context clicks the node.
+ *
+ * <p>The UI element that implements this should send a
+ * {@link AccessibilityEvent#TYPE_VIEW_CONTEXT_CLICKED} event. In the View system,
+ * the default handling of this action when performed by a service is to call
+ * {@link View#performContextClick()}, and setting a
+ * {@link View#setOnContextClickListener(View.OnContextClickListener)} automatically adds
+ * this action.
+ *
+ * <p>A context click usually occurs from a mouse pointer right-click or a stylus button
+ * press.
+ *
+ * <p>{@link #isContextClickable()} should return true if this action is available.
*/
public static final AccessibilityAction ACTION_CONTEXT_CLICK =
new AccessibilityAction(R.id.accessibilityActionContextClick);
diff --git a/packages/SettingsLib/src/com/android/settingslib/wifi/AccessPointPreference.java b/packages/SettingsLib/src/com/android/settingslib/wifi/AccessPointPreference.java
index fd986e5..21eb35a 100644
--- a/packages/SettingsLib/src/com/android/settingslib/wifi/AccessPointPreference.java
+++ b/packages/SettingsLib/src/com/android/settingslib/wifi/AccessPointPreference.java
@@ -87,7 +87,13 @@
// Fallback for platforms that do not need friction icon resources.
frictionSld = null;
}
- return frictionSld != null ? (StateListDrawable) frictionSld.getDrawable(0) : null;
+ if (frictionSld != null) {
+ StateListDrawable val = (StateListDrawable) frictionSld.getDrawable(0);
+ frictionSld.recycle();
+ return val;
+ } else {
+ return null;
+ }
}
// Used for fake pref.
diff --git a/services/core/java/com/android/server/VcnManagementService.java b/services/core/java/com/android/server/VcnManagementService.java
index 3efb6c3..c6e9a7d 100644
--- a/services/core/java/com/android/server/VcnManagementService.java
+++ b/services/core/java/com/android/server/VcnManagementService.java
@@ -162,6 +162,8 @@
// TODO(b/180451994): ensure all incoming + outgoing calls have a cleared calling identity
public class VcnManagementService extends IVcnManagementService.Stub {
@NonNull private static final String TAG = VcnManagementService.class.getSimpleName();
+ @NonNull private static final String CONTEXT_ATTRIBUTION_TAG = "VCN";
+
private static final long DUMP_TIMEOUT_MILLIS = TimeUnit.SECONDS.toMillis(5);
private static final int LOCAL_LOG_LINE_COUNT = 512;
@@ -223,7 +225,9 @@
@VisibleForTesting(visibility = Visibility.PRIVATE)
VcnManagementService(@NonNull Context context, @NonNull Dependencies deps) {
- mContext = requireNonNull(context, "Missing context");
+ mContext =
+ requireNonNull(context, "Missing context")
+ .createAttributionContext(CONTEXT_ATTRIBUTION_TAG);
mDeps = requireNonNull(deps, "Missing dependencies");
mLooper = mDeps.getLooper();
diff --git a/services/core/java/com/android/server/VpnManagerService.java b/services/core/java/com/android/server/VpnManagerService.java
index 9b4f968..0d423d8 100644
--- a/services/core/java/com/android/server/VpnManagerService.java
+++ b/services/core/java/com/android/server/VpnManagerService.java
@@ -80,6 +80,7 @@
*/
public class VpnManagerService extends IVpnManager.Stub {
private static final String TAG = VpnManagerService.class.getSimpleName();
+ private static final String CONTEXT_ATTRIBUTION_TAG = "VPN_MANAGER";
@VisibleForTesting
protected final HandlerThread mHandlerThread;
@@ -157,7 +158,7 @@
}
public VpnManagerService(Context context, Dependencies deps) {
- mContext = context;
+ mContext = context.createAttributionContext(CONTEXT_ATTRIBUTION_TAG);
mDeps = deps;
mHandlerThread = mDeps.makeHandlerThread();
mHandlerThread.start();
diff --git a/services/core/java/com/android/server/wm/DisplayPolicy.java b/services/core/java/com/android/server/wm/DisplayPolicy.java
index 6084ead..e0008b0 100644
--- a/services/core/java/com/android/server/wm/DisplayPolicy.java
+++ b/services/core/java/com/android/server/wm/DisplayPolicy.java
@@ -2313,8 +2313,8 @@
&& Arrays.equals(mLastLetterboxDetails, letterboxDetails)) {
return;
}
- if (mDisplayContent.isDefaultDisplay && mLastFocusIsFullscreen != isFullscreen
- && ((mLastAppearance ^ appearance) & APPEARANCE_LOW_PROFILE_BARS) != 0) {
+ if (mDisplayContent.isDefaultDisplay && (mLastFocusIsFullscreen != isFullscreen
+ || ((mLastAppearance ^ appearance) & APPEARANCE_LOW_PROFILE_BARS) != 0)) {
mService.mInputManager.setSystemUiLightsOut(
isFullscreen || (appearance & APPEARANCE_LOW_PROFILE_BARS) != 0);
}
diff --git a/tests/vcn/java/com/android/server/VcnManagementServiceTest.java b/tests/vcn/java/com/android/server/VcnManagementServiceTest.java
index 4123f80..960b57c 100644
--- a/tests/vcn/java/com/android/server/VcnManagementServiceTest.java
+++ b/tests/vcn/java/com/android/server/VcnManagementServiceTest.java
@@ -118,6 +118,7 @@
@RunWith(AndroidJUnit4.class)
@SmallTest
public class VcnManagementServiceTest {
+ private static final String CONTEXT_ATTRIBUTION_TAG = "VCN";
private static final String TEST_PACKAGE_NAME =
VcnManagementServiceTest.class.getPackage().getName();
private static final String TEST_PACKAGE_NAME_2 = "TEST_PKG_2";
@@ -177,6 +178,7 @@
0 /* carrierId */,
0 /* profileClass */);
+ private final Context mMockContextWithoutAttributionTag = mock(Context.class);
private final Context mMockContext = mock(Context.class);
private final VcnManagementService.Dependencies mMockDeps =
mock(VcnManagementService.Dependencies.class);
@@ -202,6 +204,10 @@
private final IBinder mMockIBinder = mock(IBinder.class);
public VcnManagementServiceTest() throws Exception {
+ doReturn(mMockContext)
+ .when(mMockContextWithoutAttributionTag)
+ .createAttributionContext(CONTEXT_ATTRIBUTION_TAG);
+
setupSystemService(
mMockContext, mConnMgr, Context.CONNECTIVITY_SERVICE, ConnectivityManager.class);
setupSystemService(
@@ -249,7 +255,7 @@
doReturn(bundle).when(mConfigReadWriteHelper).readFromDisk();
setupMockedCarrierPrivilege(true);
- mVcnMgmtSvc = new VcnManagementService(mMockContext, mMockDeps);
+ mVcnMgmtSvc = new VcnManagementService(mMockContextWithoutAttributionTag, mMockDeps);
setupActiveSubscription(TEST_UUID_1);
doReturn(mMockIBinder).when(mMockPolicyListener).asBinder();