Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit fb5e2c51 authored by android-build-team Robot's avatar android-build-team Robot
Browse files

Snap for 5087486 from bd1a7fa5 to pi-qpr2-release

Change-Id: I87f6e9e0a1821eea5e2326c2e3d0bb59ae0236ff
parents b0d865cc bd1a7fa5
Loading
Loading
Loading
Loading
+21 −0
Original line number Diff line number Diff line
@@ -32,6 +32,8 @@ import android.os.ServiceManager;
import android.provider.Settings;
import android.util.Log;

import com.android.internal.R;

/**
 * Utility method for dealing with the assistant aspects of
 * {@link com.android.internal.app.IVoiceInteractionManagerService IVoiceInteractionManagerService}.
@@ -40,6 +42,14 @@ public class AssistUtils {

    private static final String TAG = "AssistUtils";

    /**
     * Sentinel value for "no default assistant specified."
     *
     * Empty string is already used to represent an explicit setting of No Assistant. null cannot
     * be used because we can't represent a null value in XML.
     */
    private static final String UNSET = "#+UNSET";

    private final Context mContext;
    private final IVoiceInteractionManagerService mVoiceInteractionManagerService;

@@ -152,10 +162,21 @@ public class AssistUtils {
            return ComponentName.unflattenFromString(setting);
        }

        final String defaultSetting = mContext.getResources().getString(
                R.string.config_defaultAssistantComponentName);
        if (defaultSetting != null && !defaultSetting.equals(UNSET)) {
            return ComponentName.unflattenFromString(defaultSetting);
        }

        // Fallback to keep backward compatible behavior when there is no user setting.
        if (activeServiceSupportsAssistGesture()) {
            return getActiveServiceComponentName();
        }

        if (UNSET.equals(defaultSetting)) {
            return null;
        }

        final SearchManager searchManager =
            (SearchManager) mContext.getSystemService(Context.SEARCH_SERVICE);
        if (searchManager == null) {
+4 −0
Original line number Diff line number Diff line
@@ -3521,4 +3521,8 @@

    <!-- Brand value for attestation of misprovisioned device. -->
    <string name="config_misprovisionedBrandValue" translatable="false"></string>

    <!-- Component name for default assistant on this device -->
    <string name="config_defaultAssistantComponentName"></string>

</resources>
+2 −0
Original line number Diff line number Diff line
@@ -3417,4 +3417,6 @@
  <java-symbol type="string" name="config_misprovisionedBrandValue" />

  <java-symbol type="integer" name="db_wal_truncate_size" />

  <java-symbol type="string" name="config_defaultAssistantComponentName" />
</resources>
+1 −1
Original line number Diff line number Diff line
@@ -223,6 +223,7 @@ Bitmap::~Bitmap() {
            break;
        case PixelStorageType::Heap:
            free(mPixelStorage.heap.address);
            mallopt(M_PURGE, 0);
            break;
        case PixelStorageType::Hardware:
            auto buffer = mPixelStorage.hardware.buffer;
@@ -230,7 +231,6 @@ Bitmap::~Bitmap() {
            mPixelStorage.hardware.buffer = nullptr;
            break;
    }

    android::uirenderer::renderthread::RenderProxy::onBitmapDestroyed(getStableID());
}

+16 −3
Original line number Diff line number Diff line
@@ -3896,18 +3896,31 @@ public class AudioManager {
    }

     /**
     * Indicate Hearing Aid connection state change.
     * Indicate Hearing Aid connection state change and eventually suppress
     * the {@link AudioManager.ACTION_AUDIO_BECOMING_NOISY} intent.
     * @param device Bluetooth device connected/disconnected
     * @param state new connection state (BluetoothProfile.STATE_xxx)
     * @param musicDevice Default get system volume for the connecting device.
     * (either {@link android.bluetooth.BluetoothProfile.hearingaid} or
     * {@link android.bluetooth.BluetoothProfile.HEARING_AID})
     * @param suppressNoisyIntent if true the
     * {@link AudioManager.ACTION_AUDIO_BECOMING_NOISY} intent will not be sent.
     * @return a delay in ms that the caller should wait before broadcasting
     * BluetoothHearingAid.ACTION_CONNECTION_STATE_CHANGED intent.
     * {@hide}
     */
    public void setHearingAidDeviceConnectionState(BluetoothDevice device, int state) {
    public int setBluetoothHearingAidDeviceConnectionState(
                BluetoothDevice device, int state, boolean suppressNoisyIntent,
                int musicDevice) {
        final IAudioService service = getService();
        int delay = 0;
        try {
            service.setHearingAidDeviceConnectionState(device, state);
            delay = service.setBluetoothHearingAidDeviceConnectionState(device,
                state, suppressNoisyIntent, musicDevice);
        } catch (RemoteException e) {
            throw e.rethrowFromSystemServer();
        }
        return delay;
    }

     /**
Loading