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

Commit 8689ea3b authored by Android Build Coastguard Worker's avatar Android Build Coastguard Worker
Browse files

Snap for 10817717 from 007e73d0 to udc-qpr1-release

Change-Id: I65fad8c869b6ef0fbf76bfa2cff1dd44ccfa183c
parents 157e8d3f 007e73d0
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -2151,6 +2151,7 @@ package android.net.wifi.sharedconnectivity.app {

  public class SharedConnectivityManager {
    method @Nullable public static android.net.wifi.sharedconnectivity.app.SharedConnectivityManager create(@NonNull android.content.Context, @NonNull String, @NonNull String);
    method @NonNull public android.content.BroadcastReceiver getBroadcastReceiver();
    method @Nullable public android.content.ServiceConnection getServiceConnection();
    method public void setService(@Nullable android.os.IInterface);
  }
+35 −1
Original line number Diff line number Diff line
@@ -36,6 +36,7 @@ import android.app.NotificationManager;
import android.app.PendingIntent;
import android.bluetooth.BluetoothAdapter;
import android.bluetooth.BluetoothDevice;
import android.companion.datatransfer.PermissionSyncRequest;
import android.content.ComponentName;
import android.content.Context;
import android.content.Intent;
@@ -177,7 +178,7 @@ public final class CompanionDeviceManager {
    public @interface DataSyncTypes {}

    /**
     * Used by {@link #enableSystemDataSync(int, int)}}.
     * Used by {@link #enableSystemDataSyncForTypes(int, int)}}.
     * Sync call metadata like muting, ending and silencing a call.
     *
     */
@@ -528,6 +529,39 @@ public final class CompanionDeviceManager {
        }
    }

    /**
     * @hide
     */
    public void enablePermissionsSync(int associationId) {
        try {
            mService.enablePermissionsSync(associationId);
        } catch (RemoteException e) {
            throw e.rethrowFromSystemServer();
        }
    }

    /**
     * @hide
     */
    public void disablePermissionsSync(int associationId) {
        try {
            mService.disablePermissionsSync(associationId);
        } catch (RemoteException e) {
            throw e.rethrowFromSystemServer();
        }
    }

    /**
     * @hide
     */
    public PermissionSyncRequest getPermissionSyncRequest(int associationId) {
        try {
            return mService.getPermissionSyncRequest(associationId);
        } catch (RemoteException e) {
            throw e.rethrowFromSystemServer();
        }
    }

    /**
     * <p>Calling this API requires a uses-feature
     * {@link PackageManager#FEATURE_COMPANION_DEVICE_SETUP} declaration in the manifest</p>
+7 −0
Original line number Diff line number Diff line
@@ -24,6 +24,7 @@ import android.companion.IOnTransportsChangedListener;
import android.companion.ISystemDataTransferCallback;
import android.companion.AssociationInfo;
import android.companion.AssociationRequest;
import android.companion.datatransfer.PermissionSyncRequest;
import android.content.ComponentName;

/**
@@ -101,5 +102,11 @@ interface ICompanionDeviceManager {

    void disableSystemDataSync(int associationId, int flags);

    void enablePermissionsSync(int associationId);

    void disablePermissionsSync(int associationId);

    PermissionSyncRequest getPermissionSyncRequest(int associationId);

    void enableSecureTransport(boolean enabled);
}
+23 −5
Original line number Diff line number Diff line
@@ -1655,6 +1655,8 @@ public abstract class BatteryStats {
    public abstract long[] getCpuFreqs();

    public final static class HistoryTag {
        public static final int HISTORY_TAG_POOL_OVERFLOW = -1;

        public String string;
        public int uid;

@@ -6786,10 +6788,11 @@ public abstract class BatteryStats {
                    if (bd.mask == HistoryItem.STATE_WAKE_LOCK_FLAG && wakelockTag != null) {
                        didWake = true;
                        sb.append("=");
                        if (longNames) {
                        if (longNames
                                || wakelockTag.poolIdx == HistoryTag.HISTORY_TAG_POOL_OVERFLOW) {
                            UserHandle.formatUid(sb, wakelockTag.uid);
                            sb.append(":\"");
                            sb.append(wakelockTag.string);
                            sb.append(wakelockTag.string.replace("\"", "\"\""));
                            sb.append("\"");
                        } else {
                            sb.append(wakelockTag.poolIdx);
@@ -6809,7 +6812,7 @@ public abstract class BatteryStats {
        }
        if (!didWake && wakelockTag != null) {
            sb.append(longNames ? " wake_lock=" : ",w=");
            if (longNames) {
            if (longNames || wakelockTag.poolIdx == HistoryTag.HISTORY_TAG_POOL_OVERFLOW) {
                UserHandle.formatUid(sb, wakelockTag.uid);
                sb.append(":\"");
                sb.append(wakelockTag.string);
@@ -7070,7 +7073,14 @@ public abstract class BatteryStats {
                if (rec.wakeReasonTag != null) {
                    if (checkin) {
                        item.append(",wr=");
                        if (rec.wakeReasonTag.poolIdx == HistoryTag.HISTORY_TAG_POOL_OVERFLOW) {
                            item.append(sUidToString.applyAsString(rec.wakeReasonTag.uid));
                            item.append(":\"");
                            item.append(rec.wakeReasonTag.string.replace("\"", "\"\""));
                            item.append("\"");
                        } else {
                            item.append(rec.wakeReasonTag.poolIdx);
                        }
                    } else {
                        item.append(" wake_reason=");
                        item.append(rec.wakeReasonTag.uid);
@@ -7098,7 +7108,15 @@ public abstract class BatteryStats {
                    }
                    item.append("=");
                    if (checkin) {
                        if (rec.eventTag.poolIdx == HistoryTag.HISTORY_TAG_POOL_OVERFLOW) {
                            item.append(HISTORY_EVENT_INT_FORMATTERS[idx]
                                    .applyAsString(rec.eventTag.uid));
                            item.append(":\"");
                            item.append(rec.eventTag.string.replace("\"", "\"\""));
                            item.append("\"");
                        } else {
                            item.append(rec.eventTag.poolIdx);
                        }
                    } else {
                        item.append(HISTORY_EVENT_INT_FORMATTERS[idx]
                                .applyAsString(rec.eventTag.uid));
+8 −0
Original line number Diff line number Diff line
@@ -46,6 +46,7 @@ import android.os.PersistableBundle;
import android.os.RemoteException;
import android.os.ServiceManager;
import android.os.SharedMemory;
import android.os.SystemProperties;
import android.provider.Settings;
import android.util.ArraySet;
import android.util.Log;
@@ -131,6 +132,9 @@ public class VoiceInteractionService extends Service {
    @EnabledSince(targetSdkVersion = Build.VERSION_CODES.UPSIDE_DOWN_CAKE)
    static final long MULTIPLE_ACTIVE_HOTWORD_DETECTORS = 193232191L;

    private static final boolean SYSPROP_VISUAL_QUERY_SERVICE_ENABLED =
            SystemProperties.getBoolean("ro.hotword.visual_query_service_enabled", false);

    IVoiceInteractionService mInterface = new IVoiceInteractionService.Stub() {
        @Override
        public void ready() {
@@ -947,6 +951,10 @@ public class VoiceInteractionService extends Service {
        Objects.requireNonNull(executor);
        Objects.requireNonNull(callback);

        if (!SYSPROP_VISUAL_QUERY_SERVICE_ENABLED) {
            throw new IllegalStateException("VisualQueryDetectionService is not enabled on this "
                    + "system. Please set ro.hotword.visual_query_service_enabled to true.");
        }
        if (mSystemService == null) {
            throw new IllegalStateException("Not available until onReady() is called");
        }
Loading