diff options
14 files changed, 70 insertions, 14 deletions
diff --git a/core/java/android/database/sqlite/package.html b/core/java/android/database/sqlite/package.html index 6ececa2e1416..71b8f3f8e17a 100644 --- a/core/java/android/database/sqlite/package.html +++ b/core/java/android/database/sqlite/package.html @@ -20,6 +20,9 @@ with adb shell, for example, <code>adb -e shell sqlite3</code>. <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 eab1ef4f6afd..5bd52dd330de 100644 --- a/core/java/android/text/style/URLSpan.java +++ b/core/java/android/text/style/URLSpan.java @@ -106,7 +106,7 @@ public class URLSpan extends ClickableSpan implements ParcelableSpan { 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 cd0dd1df1249..662550b296f9 100644 --- a/core/java/android/view/accessibility/AccessibilityEvent.java +++ b/core/java/android/view/accessibility/AccessibilityEvent.java @@ -440,12 +440,16 @@ public final class AccessibilityEvent extends AccessibilityRecord implements Par /** * 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 @@ public final class AccessibilityEvent extends AccessibilityRecord implements Par /** * 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 a20b2b2f79a4..0d4977211d11 100644 --- a/core/java/android/view/accessibility/AccessibilityNodeInfo.java +++ b/core/java/android/view/accessibility/AccessibilityNodeInfo.java @@ -251,7 +251,7 @@ public class AccessibilityNodeInfo implements Parcelable { /** * 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 @@ public class AccessibilityNodeInfo implements Parcelable { * 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 @@ public class AccessibilityNodeInfo implements Parcelable { * 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 @@ public class AccessibilityNodeInfo implements Parcelable { /** * 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 @@ public class AccessibilityNodeInfo implements Parcelable { /** * 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/connectivity/OWNERS b/packages/SettingsLib/src/com/android/settingslib/connectivity/OWNERS index c88ed8e96f99..9f15c1bb5081 100644 --- a/packages/SettingsLib/src/com/android/settingslib/connectivity/OWNERS +++ b/packages/SettingsLib/src/com/android/settingslib/connectivity/OWNERS @@ -2,7 +2,6 @@ andychou@google.com arcwang@google.com changbetty@google.com -goldmanj@google.com qal@google.com wengsu@google.com diff --git a/packages/SettingsLib/src/com/android/settingslib/qrcode/OWNERS b/packages/SettingsLib/src/com/android/settingslib/qrcode/OWNERS index 61c73fb733a9..372eb81fdee2 100644 --- a/packages/SettingsLib/src/com/android/settingslib/qrcode/OWNERS +++ b/packages/SettingsLib/src/com/android/settingslib/qrcode/OWNERS @@ -1,7 +1,6 @@ # Default reviewers for this and subdirectories. bonianchen@google.com changbetty@google.com -goldmanj@google.com wengsu@google.com zoeychen@google.com diff --git a/packages/SettingsLib/src/com/android/settingslib/wifi/AccessPointPreference.java b/packages/SettingsLib/src/com/android/settingslib/wifi/AccessPointPreference.java index fd986e5d13fd..21eb35abe32c 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 @@ public class AccessPointPreference extends Preference { // 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/packages/SettingsLib/src/com/android/settingslib/wifi/OWNERS b/packages/SettingsLib/src/com/android/settingslib/wifi/OWNERS index f3b600c8e9c1..b9449acc6f7d 100644 --- a/packages/SettingsLib/src/com/android/settingslib/wifi/OWNERS +++ b/packages/SettingsLib/src/com/android/settingslib/wifi/OWNERS @@ -3,7 +3,6 @@ andychou@google.com arcwang@google.com asapperstein@google.com changbetty@google.com -goldmanj@google.com qal@google.com wengsu@google.com diff --git a/services/core/java/com/android/server/VcnManagementService.java b/services/core/java/com/android/server/VcnManagementService.java index 3efb6c304bec..c6e9a7d5e2e5 100644 --- a/services/core/java/com/android/server/VcnManagementService.java +++ b/services/core/java/com/android/server/VcnManagementService.java @@ -162,6 +162,8 @@ import java.util.concurrent.TimeUnit; // 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 @@ public class VcnManagementService extends IVcnManagementService.Stub { @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 9b4f9683d550..0d423d8a0a62 100644 --- a/services/core/java/com/android/server/VpnManagerService.java +++ b/services/core/java/com/android/server/VpnManagerService.java @@ -80,6 +80,7 @@ import java.util.List; */ 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 class VpnManagerService extends IVpnManager.Stub { } 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/hdmi/HdmiCecLocalDevicePlayback.java b/services/core/java/com/android/server/hdmi/HdmiCecLocalDevicePlayback.java index 576a5ff4305e..72895e338de6 100644 --- a/services/core/java/com/android/server/hdmi/HdmiCecLocalDevicePlayback.java +++ b/services/core/java/com/android/server/hdmi/HdmiCecLocalDevicePlayback.java @@ -110,7 +110,8 @@ public class HdmiCecLocalDevicePlayback extends HdmiCecLocalDeviceSource { new SendMessageCallback() { @Override public void onSendCompleted(int error) { - if (error != SendMessageResult.SUCCESS) { + // In consideration of occasional transmission failures. + if (error == SendMessageResult.NACK) { HdmiLogger.debug( "AVR did not respond to <Give System Audio Mode Status>"); mService.setSystemAudioActivated(false); diff --git a/services/core/java/com/android/server/pm/PackageManagerShellCommand.java b/services/core/java/com/android/server/pm/PackageManagerShellCommand.java index 958eb64b833b..be842b96843c 100644 --- a/services/core/java/com/android/server/pm/PackageManagerShellCommand.java +++ b/services/core/java/com/android/server/pm/PackageManagerShellCommand.java @@ -3978,7 +3978,7 @@ class PackageManagerShellCommand extends ShellCommand { pw.println(" [--preload] [--instant] [--full] [--dont-kill]"); pw.println(" [--enable-rollback]"); pw.println(" [--force-uuid internal|UUID] [--pkg PACKAGE] [-S BYTES]"); - pw.println(" [--apex] [--staged-ready-timeout TIMEOUT]"); + pw.println(" [--apex] [--force-non-staged] [--staged-ready-timeout TIMEOUT]"); pw.println(" [PATH [SPLIT...]|-]"); pw.println(" Install an application. Must provide the apk data to install, either as"); pw.println(" file path(s) or '-' to read from stdin. Options are:"); @@ -4006,6 +4006,8 @@ class PackageManagerShellCommand extends ShellCommand { pw.println(" 3=device setup, 4=user request"); pw.println(" --force-uuid: force install on to disk volume with given UUID"); pw.println(" --apex: install an .apex file, not an .apk"); + pw.println(" --force-non-staged: force the installation to run under a non-staged"); + pw.println(" session, which may complete without requiring a reboot"); pw.println(" --staged-ready-timeout: By default, staged sessions wait " + DEFAULT_STAGED_READY_TIMEOUT_MS); pw.println(" milliseconds for pre-reboot verification to complete when"); diff --git a/services/core/java/com/android/server/wm/DisplayPolicy.java b/services/core/java/com/android/server/wm/DisplayPolicy.java index 6084ead7748d..e0008b000b97 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 @@ public class DisplayPolicy { && 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 4123f8070e36..960b57cb632a 100644 --- a/tests/vcn/java/com/android/server/VcnManagementServiceTest.java +++ b/tests/vcn/java/com/android/server/VcnManagementServiceTest.java @@ -118,6 +118,7 @@ import java.util.UUID; @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 @@ public class VcnManagementServiceTest { 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 @@ public class VcnManagementServiceTest { 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 @@ public class VcnManagementServiceTest { 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(); |