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

Commit 8aaf9cde authored by Garfield Tan's avatar Garfield Tan
Browse files

Correct the serial flag's namespace

We also need to rename this flag according to go/aconfig-namespace.

NO_EXPORTED_FLAG_DELETION_CHECK=This feature isn't completed so the flag
is never enabled.

Bug: 398768875
Bug: 369155426
Test: atest SerialTests
Flag: android.hardware.serial.flags.enable_wired_serial_api
Change-Id: Iee17aaa692f7a20ed8d0f87cb48c6a8cc4377141
parent 83c614ab
Loading
Loading
Loading
Loading
+5 −5
Original line number Diff line number Diff line
@@ -11385,7 +11385,7 @@ package android.content {
    field public static final String SEARCH_SERVICE = "search";
    field @FlaggedApi("android.os.security_state_service") public static final String SECURITY_STATE_SERVICE = "security_state";
    field public static final String SENSOR_SERVICE = "sensor";
    field @FlaggedApi("android.hardware.serial.flags.enable_serial_api") public static final String SERIAL_SERVICE = "serial";
    field @FlaggedApi("android.hardware.serial.flags.enable_wired_serial_api") public static final String SERIAL_SERVICE = "serial";
    field public static final String SHORTCUT_SERVICE = "shortcut";
    field public static final String STATUS_BAR_SERVICE = "statusbar";
    field public static final String STORAGE_SERVICE = "storage";
@@ -21333,13 +21333,13 @@ package android.hardware.lights {
package android.hardware.serial {
  @FlaggedApi("android.hardware.serial.flags.enable_serial_api") public final class SerialManager {
  @FlaggedApi("android.hardware.serial.flags.enable_wired_serial_api") public final class SerialManager {
    method @NonNull public java.util.List<android.hardware.serial.SerialPort> getSerialPorts();
    method public void registerSerialPortListener(@NonNull java.util.concurrent.Executor, @NonNull android.hardware.serial.SerialPortListener);
    method public void unregisterSerialPortListener(@NonNull android.hardware.serial.SerialPortListener);
  }
  @FlaggedApi("android.hardware.serial.flags.enable_serial_api") public final class SerialPort {
  @FlaggedApi("android.hardware.serial.flags.enable_wired_serial_api") public final class SerialPort {
    method @NonNull public String getName();
    method public int getProductId();
    method public int getVendorId();
@@ -21353,12 +21353,12 @@ package android.hardware.serial {
    field public static final int OPEN_FLAG_WRITE_ONLY = 1; // 0x1
  }
  @FlaggedApi("android.hardware.serial.flags.enable_serial_api") public interface SerialPortListener {
  @FlaggedApi("android.hardware.serial.flags.enable_wired_serial_api") public interface SerialPortListener {
    method public void onSerialPortConnected(@NonNull android.hardware.serial.SerialPort);
    method public void onSerialPortDisconnected(@NonNull android.hardware.serial.SerialPort);
  }
  @FlaggedApi("android.hardware.serial.flags.enable_serial_api") public final class SerialPortResponse {
  @FlaggedApi("android.hardware.serial.flags.enable_wired_serial_api") public final class SerialPortResponse {
    method @NonNull public android.os.ParcelFileDescriptor getFileDescriptor();
    method @NonNull public android.hardware.serial.SerialPort getPort();
  }
+2 −2
Original line number Diff line number Diff line
@@ -18,7 +18,7 @@ package android.app;

import static android.app.appfunctions.flags.Flags.enableAppFunctionManager;
import static android.app.userrecovery.flags.Flags.enableUserRecoveryManager;
import static android.hardware.serial.flags.Flags.enableSerialApi;
import static android.hardware.serial.flags.Flags.enableWiredSerialApi;
import static android.provider.flags.Flags.newStoragePublicApi;
import static android.server.Flags.removeGameManagerServiceFromWear;
import static android.service.chooser.Flags.interactiveChooser;
@@ -825,7 +825,7 @@ public final class SystemServiceRegistry {
                        return new AdbManager(ctx, IAdbManager.Stub.asInterface(b));
                    }});

        if (enableSerialApi()) {
        if (enableWiredSerialApi()) {
            registerService(Context.SERIAL_SERVICE, android.hardware.serial.SerialManager.class,
                    new CachedServiceFetcher<android.hardware.serial.SerialManager>() {
                        @Override
+1 −1
Original line number Diff line number Diff line
@@ -5982,7 +5982,7 @@ public abstract class Context {
     * @see #getSystemService(String)
     * @see android.hardware.serial.SerialManager
     */
    @FlaggedApi(android.hardware.serial.flags.Flags.FLAG_ENABLE_SERIAL_API)
    @FlaggedApi(android.hardware.serial.flags.Flags.FLAG_ENABLE_WIRED_SERIAL_API)
    public static final String SERIAL_SERVICE = "serial";

    /**
+1 −1
Original line number Diff line number Diff line
@@ -37,7 +37,7 @@ import java.util.concurrent.Executor;
 * This class allows you to communicate with Serial ports.
 */
@SystemService(Context.SERIAL_SERVICE)
@FlaggedApi(android.hardware.serial.flags.Flags.FLAG_ENABLE_SERIAL_API)
@FlaggedApi(android.hardware.serial.flags.Flags.FLAG_ENABLE_WIRED_SERIAL_API)
public final class SerialManager {
    private static final String TAG = "SerialManager";

+1 −1
Original line number Diff line number Diff line
@@ -38,7 +38,7 @@ import java.util.concurrent.Executor;
/**
 * A class representing a Serial port.
 */
@FlaggedApi(android.hardware.serial.flags.Flags.FLAG_ENABLE_SERIAL_API)
@FlaggedApi(android.hardware.serial.flags.Flags.FLAG_ENABLE_WIRED_SERIAL_API)
public final class SerialPort {
    /**
     * Value returned by {@link #getVendorId()} and {@link #getProductId()} if this
Loading