diff options
15 files changed, 79 insertions, 38 deletions
diff --git a/core/java/android/app/OWNERS b/core/java/android/app/OWNERS index 5e5461b27211..eea607bb0362 100644 --- a/core/java/android/app/OWNERS +++ b/core/java/android/app/OWNERS @@ -4,7 +4,7 @@ per-file ContextImpl.java = * # ActivityManager per-file ActivityManager* = file:/services/core/java/com/android/server/am/OWNERS -per-file ApplicationStartInfo* = file:/services/core/java/com/android/server/am/OWNERS +per-file *ApplicationStartInfo* = file:/services/core/java/com/android/server/am/OWNERS per-file ApplicationErrorReport* = file:/services/core/java/com/android/server/am/OWNERS per-file ApplicationExitInfo* = file:/services/core/java/com/android/server/am/OWNERS per-file Application.java = file:/services/core/java/com/android/server/am/OWNERS diff --git a/core/java/android/hardware/camera2/CameraCharacteristics.java b/core/java/android/hardware/camera2/CameraCharacteristics.java index 861a8502c44d..331a5abdc3b3 100644 --- a/core/java/android/hardware/camera2/CameraCharacteristics.java +++ b/core/java/android/hardware/camera2/CameraCharacteristics.java @@ -3467,7 +3467,7 @@ public final class CameraCharacteristics extends CameraMetadata<CameraCharacteri * <p>An array of mandatory stream combinations which are applicable when device support the * 10-bit output capability * {@link android.hardware.camera2.CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES_DYNAMIC_RANGE_TEN_BIT } - * This is an app-readable conversion of the maximum resolution mandatory stream combination + * This is an app-readable conversion of the 10 bit output mandatory stream combination * {@link android.hardware.camera2.CameraDevice#createCaptureSession tables}.</p> * <p>The array of * {@link android.hardware.camera2.params.MandatoryStreamCombination combinations} is @@ -3492,7 +3492,7 @@ public final class CameraCharacteristics extends CameraMetadata<CameraCharacteri /** * <p>An array of mandatory stream combinations which are applicable when device lists * {@code PREVIEW_STABILIZATION} in {@link CameraCharacteristics#CONTROL_AVAILABLE_VIDEO_STABILIZATION_MODES android.control.availableVideoStabilizationModes}. - * This is an app-readable conversion of the maximum resolution mandatory stream combination + * This is an app-readable conversion of the preview stabilization mandatory stream combination * {@link android.hardware.camera2.CameraDevice#createCaptureSession tables}.</p> * <p>The array of * {@link android.hardware.camera2.params.MandatoryStreamCombination combinations} is diff --git a/core/java/android/hardware/camera2/impl/CameraAdvancedExtensionSessionImpl.java b/core/java/android/hardware/camera2/impl/CameraAdvancedExtensionSessionImpl.java index c8dc2d0b0b91..b52daab284b5 100644 --- a/core/java/android/hardware/camera2/impl/CameraAdvancedExtensionSessionImpl.java +++ b/core/java/android/hardware/camera2/impl/CameraAdvancedExtensionSessionImpl.java @@ -528,8 +528,15 @@ public final class CameraAdvancedExtensionSessionImpl extends CameraExtensionSes boolean status = true; synchronized (mInterfaceLock) { try { - mSessionProcessor.onCaptureSessionStart(mRequestProcessor); - mInitialized = true; + if (mSessionProcessor != null) { + mSessionProcessor.onCaptureSessionStart(mRequestProcessor); + mInitialized = true; + } else { + Log.v(TAG, "Failed to start capture session, session released before " + + "extension start!"); + status = false; + mCaptureSession.close(); + } } catch (RemoteException e) { Log.e(TAG, "Failed to start capture session," + " extension service does not respond!"); diff --git a/core/java/android/nfc/cardemulation/CardEmulation.java b/core/java/android/nfc/cardemulation/CardEmulation.java index 6a4209135c66..ac3344e91c06 100644 --- a/core/java/android/nfc/cardemulation/CardEmulation.java +++ b/core/java/android/nfc/cardemulation/CardEmulation.java @@ -265,12 +265,16 @@ public final class CardEmulation { * @return whether AIDs in the category can be handled by a service * specified by the foreground app. */ + @SuppressWarnings("NonUserGetterCalled") public boolean categoryAllowsForegroundPreference(String category) { if (CATEGORY_PAYMENT.equals(category)) { boolean preferForeground = false; + Context contextAsUser = mContext.createContextAsUser( + UserHandle.of(UserHandle.myUserId()), 0); try { - preferForeground = Settings.Secure.getIntForUser(mContext.getContentResolver(), - Settings.Secure.NFC_PAYMENT_FOREGROUND, UserHandle.myUserId()) != 0; + preferForeground = Settings.Secure.getInt( + contextAsUser.getContentResolver(), + Settings.Secure.NFC_PAYMENT_FOREGROUND) != 0; } catch (SettingNotFoundException e) { } return preferForeground; diff --git a/core/java/com/android/internal/app/OWNERS b/core/java/com/android/internal/app/OWNERS index 69660ae7121d..0d02683868c5 100644 --- a/core/java/com/android/internal/app/OWNERS +++ b/core/java/com/android/internal/app/OWNERS @@ -6,6 +6,8 @@ per-file AbstractMultiProfilePagerAdapter.java = file:/packages/SystemUI/OWNERS per-file *EmptyStateProvider.java = file:/packages/SystemUI/OWNERS per-file NetInitiatedActivity.java = file:/location/java/android/location/OWNERS per-file *BatteryStats* = file:/BATTERY_STATS_OWNERS +per-file *SoundTrigger* = file:/media/java/android/media/soundtrigger/OWNERS + # Voice Interaction per-file *Assist* = file:/core/java/android/service/voice/OWNERS diff --git a/core/jni/com_android_internal_os_Zygote.cpp b/core/jni/com_android_internal_os_Zygote.cpp index 963a83e5d3ee..fad9e0e79899 100644 --- a/core/jni/com_android_internal_os_Zygote.cpp +++ b/core/jni/com_android_internal_os_Zygote.cpp @@ -1923,15 +1923,16 @@ static void SpecializeCommon(JNIEnv* env, uid_t uid, gid_t gid, jintArray gids, const char* nice_name_ptr = nice_name.has_value() ? nice_name.value().c_str() : nullptr; android_mallopt_gwp_asan_options_t gwp_asan_options; + const char* kGwpAsanAppRecoverableSysprop = + "persist.device_config.memory_safety_native.gwp_asan_recoverable_apps"; // The system server doesn't have its nice name set by the time SpecializeCommon is called. gwp_asan_options.program_name = nice_name_ptr ?: process_name; switch (runtime_flags & RuntimeFlags::GWP_ASAN_LEVEL_MASK) { default: case RuntimeFlags::GWP_ASAN_LEVEL_DEFAULT: - // TODO(b/247012630): Switch this to Action::TURN_ON_FOR_APP_SAMPLED_NON_CRASHING once - // performance and syshealth testing is completed, making the default for non-system - // apps that don't specify a `gwpAsanMode` in their manifest to be sampled-recoverable. - gwp_asan_options.desire = Action::DONT_TURN_ON_UNLESS_OVERRIDDEN; + gwp_asan_options.desire = GetBoolProperty(kGwpAsanAppRecoverableSysprop, true) + ? Action::TURN_ON_FOR_APP_SAMPLED_NON_CRASHING + : Action::DONT_TURN_ON_UNLESS_OVERRIDDEN; android_mallopt(M_INITIALIZE_GWP_ASAN, &gwp_asan_options, sizeof(gwp_asan_options)); break; case RuntimeFlags::GWP_ASAN_LEVEL_NEVER: diff --git a/core/proto/android/app/OWNERS b/core/proto/android/app/OWNERS index 4d76aee9d722..a137ea97b3a4 100644 --- a/core/proto/android/app/OWNERS +++ b/core/proto/android/app/OWNERS @@ -1,2 +1,3 @@ +per-file appstartinfo.proto = file:/services/core/java/com/android/server/am/OWNERS per-file location_time_zone_manager.proto = file:platform/frameworks/base:/services/core/java/com/android/server/timezonedetector/OWNERS per-file time_zone_detector.proto = file:platform/frameworks/base:/services/core/java/com/android/server/timezonedetector/OWNERS diff --git a/core/proto/android/server/OWNERS b/core/proto/android/server/OWNERS index 72d39bfb3cd6..c6d3cda1eaf5 100644 --- a/core/proto/android/server/OWNERS +++ b/core/proto/android/server/OWNERS @@ -1 +1,2 @@ +per-file activitymanagerservice.proto = file:/services/core/java/com/android/server/am/OWNERS per-file window*.proto = file:/services/core/java/com/android/server/wm/OWNERS diff --git a/packages/SettingsLib/res/values/arrays.xml b/packages/SettingsLib/res/values/arrays.xml index 663e8e4b14d8..9108449bd8d8 100644 --- a/packages/SettingsLib/res/values/arrays.xml +++ b/packages/SettingsLib/res/values/arrays.xml @@ -116,6 +116,36 @@ <item>full</item> </string-array> + <!-- Titles for Bluetooth HCI Snoop Filtered Logging --> + <string-array name="bt_hci_snoop_log_filters_entries"> + <item>Headers Filtered</item> + <item>A2DP Media Packets Filtered</item> + <item>RFCOMM Channel Filtered</item> + </string-array> + + <!-- Values for Bluetooth HCI Snoop Filtered Logging --> + <string-array name="bt_hci_snoop_log_filters_values" translatable="false"> + <item>headers</item> + <item>profiles.a2dp</item> + <item>profiles.rfcomm</item> + </string-array> + + <!-- Titles for Bluetooth HCI Snoop Filtered Logging --> + <string-array name="bt_hci_snoop_log_profile_filter_entries"> + <item>Disabled</item> + <item>Magic</item> + <item>Header</item> + <item>Full Filter</item> + </string-array> + + <!-- Values for Bluetooth HCI Snoop Filtered Logging --> + <string-array name="bt_hci_snoop_log_profile_filter_values" translatable="false"> + <item>disabled</item> + <item>magic</item> + <item>header</item> + <item>fullfilter</item> + </string-array> + <!-- Titles for Bluetooth AVRCP Versions --> <string-array name="bluetooth_avrcp_versions"> <item>AVRCP 1.5 (Default)</item> diff --git a/packages/SettingsLib/src/com/android/settingslib/bluetooth/A2dpProfile.java b/packages/SettingsLib/src/com/android/settingslib/bluetooth/A2dpProfile.java index 1a65717e73f9..19409865284c 100644 --- a/packages/SettingsLib/src/com/android/settingslib/bluetooth/A2dpProfile.java +++ b/packages/SettingsLib/src/com/android/settingslib/bluetooth/A2dpProfile.java @@ -236,7 +236,7 @@ public class A2dpProfile implements LocalBluetoothProfile { /** * @return whether high quality audio is enabled or not */ - @RequiresApi(Build.VERSION_CODES.UPSIDE_DOWN_CAKE) + @RequiresApi(Build.VERSION_CODES.TIRAMISU) public boolean isHighQualityAudioEnabled(BluetoothDevice device) { BluetoothDevice bluetoothDevice = (device != null) ? device : getActiveDevice(); if (bluetoothDevice == null) { @@ -288,7 +288,7 @@ public class A2dpProfile implements LocalBluetoothProfile { * @param device to get codec label from * @return the label associated with the device codec */ - @RequiresApi(Build.VERSION_CODES.UPSIDE_DOWN_CAKE) + @RequiresApi(Build.VERSION_CODES.TIRAMISU) public String getHighQualityAudioOptionLabel(BluetoothDevice device) { BluetoothDevice bluetoothDevice = (device != null) ? device : getActiveDevice(); int unknownCodecId = R.string.bluetooth_profile_a2dp_high_quality_unknown_codec; diff --git a/services/core/java/com/android/server/DropBoxManagerService.java b/services/core/java/com/android/server/DropBoxManagerService.java index 1d457aa933d7..2fa18af82fc3 100644 --- a/services/core/java/com/android/server/DropBoxManagerService.java +++ b/services/core/java/com/android/server/DropBoxManagerService.java @@ -693,7 +693,7 @@ public final class DropBoxManagerService extends SystemService { out.append(file.getPath()).append("\n"); } - if ((entry.flags & DropBoxManager.IS_TEXT) != 0 && (doPrint || !doFile)) { + if ((entry.flags & DropBoxManager.IS_TEXT) != 0 && doPrint) { DropBoxManager.Entry dbe = null; InputStreamReader isr = null; try { @@ -717,17 +717,6 @@ public final class DropBoxManagerService extends SystemService { } } if (!newline) out.append("\n"); - } else { - String text = dbe.getText(70); - out.append(" "); - if (text == null) { - out.append("[null]"); - } else { - boolean truncated = (text.length() == 70); - out.append(text.trim().replace('\n', '/')); - if (truncated) out.append(" ..."); - } - out.append("\n"); } } catch (IOException e) { out.append("*** ").append(e.toString()).append("\n"); diff --git a/services/core/java/com/android/server/Watchdog.java b/services/core/java/com/android/server/Watchdog.java index 1fab28efb1ac..c7d8ab24322e 100644 --- a/services/core/java/com/android/server/Watchdog.java +++ b/services/core/java/com/android/server/Watchdog.java @@ -160,13 +160,21 @@ public class Watchdog implements Dumpable { public static final String[] AIDL_INTERFACE_PREFIXES_OF_INTEREST = new String[] { "android.hardware.biometrics.face.IFace/", "android.hardware.biometrics.fingerprint.IFingerprint/", + "android.hardware.bluetooth.IBluetoothHci/", + "android.hardware.camera.provider.ICameraProvider/", + "android.hardware.gnss.IGnss/", + "android.hardware.graphics.allocator.IAllocator/", "android.hardware.graphics.composer3.IComposer/", + "android.hardware.health.IHealth/", "android.hardware.input.processor.IInputProcessor/", "android.hardware.light.ILights/", + "android.hardware.neuralnetworks.IDevice/", "android.hardware.power.IPower/", "android.hardware.power.stats.IPowerStats/", + "android.hardware.sensors.ISensors/", "android.hardware.vibrator.IVibrator/", - "android.hardware.vibrator.IVibratorManager/" + "android.hardware.vibrator.IVibratorManager/", + "android.system.suspend.ISystemSuspend/", }; private static Watchdog sWatchdog; diff --git a/services/core/java/com/android/server/audio/AudioService.java b/services/core/java/com/android/server/audio/AudioService.java index e0d324a448ba..05915d964eb7 100644 --- a/services/core/java/com/android/server/audio/AudioService.java +++ b/services/core/java/com/android/server/audio/AudioService.java @@ -2329,10 +2329,6 @@ public class AudioService extends IAudioService.Stub Log.w(TAG, "audioFormat to enable is not a surround format."); return false; } - if (mContext.checkCallingOrSelfPermission(android.Manifest.permission.WRITE_SETTINGS) - != PackageManager.PERMISSION_GRANTED) { - throw new SecurityException("Missing WRITE_SETTINGS permission"); - } final long token = Binder.clearCallingIdentity(); try { @@ -2400,11 +2396,6 @@ public class AudioService extends IAudioService.Stub /** @see AudioManager#getEncodedSurroundMode() */ @Override public int getEncodedSurroundMode(int targetSdkVersion) { - if (mContext.checkCallingOrSelfPermission(android.Manifest.permission.WRITE_SETTINGS) - != PackageManager.PERMISSION_GRANTED) { - throw new SecurityException("Missing WRITE_SETTINGS permission"); - } - final long token = Binder.clearCallingIdentity(); try { synchronized (mSettingsLock) { diff --git a/telecomm/java/android/telecom/Call.java b/telecomm/java/android/telecom/Call.java index 432af3aa1aa0..9c1e8dd25a0e 100644 --- a/telecomm/java/android/telecom/Call.java +++ b/telecomm/java/android/telecom/Call.java @@ -1839,8 +1839,15 @@ public final class Call { /** * Instructs this {@code Call} to play a dual-tone multi-frequency signaling (DTMF) tone. - * - * Any other currently playing DTMF tone in the specified call is immediately stopped. + * <p> + * Tones are both played locally for the user to hear and sent to the network to be relayed + * to the remote device. + * <p> + * You must ensure that any call to {@link #playDtmfTone(char}) is followed by a matching + * call to {@link #stopDtmfTone()} and that each tone is stopped before a new one is started. + * The play and stop commands are relayed to the underlying + * {@link android.telecom.ConnectionService} as executed; implementations may not correctly + * handle out of order commands. * * @param digit A character representing the DTMF digit for which to play the tone. This * value must be one of {@code '0'} through {@code '9'}, {@code '*'} or {@code '#'}. diff --git a/telecomm/java/android/telecom/ConnectionService.java b/telecomm/java/android/telecom/ConnectionService.java index bce6809ef32d..6afc40064961 100755 --- a/telecomm/java/android/telecom/ConnectionService.java +++ b/telecomm/java/android/telecom/ConnectionService.java @@ -2330,7 +2330,7 @@ public abstract class ConnectionService extends Service { } private void playDtmfTone(String callId, char digit) { - Log.i(this, "playDtmfTone %s %c", callId, digit); + Log.i(this, "playDtmfTone %s %s", callId, Log.pii(digit)); if (mConnectionById.containsKey(callId)) { findConnectionForAction(callId, "playDtmfTone").onPlayDtmfTone(digit); } else { |