cleanup util classes
- make util classes final and disable public constructor
bug: 31489695
Change-Id: Iacfd807bd2a30336fe0865f9f1acc25dd8353609
diff --git a/car-lib/api/system-current.txt b/car-lib/api/system-current.txt
index b0807bf..b2607df 100644
--- a/car-lib/api/system-current.txt
+++ b/car-lib/api/system-current.txt
@@ -98,8 +98,7 @@
method public abstract void onVoiceAssistantRequest(boolean);
}
- public class VehicleAreaType {
- ctor public VehicleAreaType();
+ public final class VehicleAreaType {
field public static final int VEHICLE_AREA_TYPE_DOOR = 4; // 0x4
field public static final int VEHICLE_AREA_TYPE_NONE = 0; // 0x0
field public static final int VEHICLE_AREA_TYPE_SEAT = 3; // 0x3
@@ -107,8 +106,7 @@
field public static final int VEHICLE_AREA_TYPE_ZONE = 1; // 0x1
}
- public class VehicleDoor {
- ctor public VehicleDoor();
+ public final class VehicleDoor {
field public static final int DOOR_HOOD = 268435456; // 0x10000000
field public static final int DOOR_REAR = 536870912; // 0x20000000
field public static final int DOOR_ROW_1_LEFT = 1; // 0x1
@@ -119,15 +117,13 @@
field public static final int DOOR_ROW_3_RIGHT = 1024; // 0x400
}
- public class VehicleMirror {
- ctor public VehicleMirror();
+ public final class VehicleMirror {
field public static final int MIRROR_DRIVER_CENTER = 4; // 0x4
field public static final int MIRROR_DRIVER_LEFT = 1; // 0x1
field public static final int MIRROR_DRIVER_RIGHT = 2; // 0x2
}
- public class VehicleSeat {
- ctor public VehicleSeat();
+ public final class VehicleSeat {
field public static final int SEAT_DRIVER_LHD = 1; // 0x1
field public static final int SEAT_DRIVER_RHD = 2; // 0x2
field public static final int SEAT_ROW_1_PASSENGER_CENTER = 32; // 0x20
@@ -141,8 +137,7 @@
field public static final int SEAT_ROW_3_PASSENGER_RIGHT = 16384; // 0x4000
}
- public class VehicleWindow {
- ctor public VehicleWindow();
+ public final class VehicleWindow {
field public static final int WINDOW_FRONT_WINDSHIELD = 1; // 0x1
field public static final int WINDOW_REAR_WINDSHIELD = 2; // 0x2
field public static final int WINDOW_ROOF_TOP = 4; // 0x4
@@ -154,8 +149,7 @@
field public static final int WINDOW_ROW_3_RIGHT = 8192; // 0x2000
}
- public class VehicleZone {
- ctor public VehicleZone();
+ public final class VehicleZone {
field public static final int ZONE_ALL = -2147483648; // 0x80000000
field public static final int ZONE_ROW_1_ALL = 8; // 0x8
field public static final int ZONE_ROW_1_CENTER = 2; // 0x2
@@ -175,8 +169,7 @@
field public static final int ZONE_ROW_4_RIGHT = 16384; // 0x4000
}
- public class VehicleZoneUtil {
- ctor public VehicleZoneUtil();
+ public final class VehicleZoneUtil {
method public static int getFirstZone(int);
method public static int getNextZone(int, int) throws java.lang.IllegalArgumentException;
method public static int getNumberOfZones(int);
diff --git a/car-lib/src/android/car/VehicleAreaType.java b/car-lib/src/android/car/VehicleAreaType.java
index e517f83..1cc25a1 100644
--- a/car-lib/src/android/car/VehicleAreaType.java
+++ b/car-lib/src/android/car/VehicleAreaType.java
@@ -25,7 +25,7 @@
* @hide
*/
@SystemApi
-public class VehicleAreaType {
+public final class VehicleAreaType {
/** Used for global properties */
public static final int VEHICLE_AREA_TYPE_NONE = 0;
@@ -33,4 +33,6 @@
public static final int VEHICLE_AREA_TYPE_WINDOW = 2;
public static final int VEHICLE_AREA_TYPE_SEAT = 3;
public static final int VEHICLE_AREA_TYPE_DOOR = 4;
+
+ private VehicleAreaType() {}
}
diff --git a/car-lib/src/android/car/VehicleDoor.java b/car-lib/src/android/car/VehicleDoor.java
index f5a63d0..69c445d 100644
--- a/car-lib/src/android/car/VehicleDoor.java
+++ b/car-lib/src/android/car/VehicleDoor.java
@@ -23,7 +23,7 @@
* @hide
*/
@SystemApi
-public class VehicleDoor {
+public final class VehicleDoor {
public static final int DOOR_ROW_1_LEFT = 0x00000001;
public static final int DOOR_ROW_1_RIGHT = 0x00000004;
public static final int DOOR_ROW_2_LEFT = 0x00000010;
@@ -32,4 +32,6 @@
public static final int DOOR_ROW_3_RIGHT = 0x00000400;
public static final int DOOR_HOOD = 0x10000000;
public static final int DOOR_REAR = 0x20000000;
+
+ private VehicleDoor() {}
}
diff --git a/car-lib/src/android/car/VehicleMirror.java b/car-lib/src/android/car/VehicleMirror.java
index 354966e..21feb7a 100644
--- a/car-lib/src/android/car/VehicleMirror.java
+++ b/car-lib/src/android/car/VehicleMirror.java
@@ -23,8 +23,10 @@
* @hide
*/
@SystemApi
-public class VehicleMirror {
+public final class VehicleMirror {
public static final int MIRROR_DRIVER_LEFT = 0x00000001;
public static final int MIRROR_DRIVER_RIGHT = 0x00000002;
public static final int MIRROR_DRIVER_CENTER = 0x00000004;
+
+ private VehicleMirror() {}
}
diff --git a/car-lib/src/android/car/VehicleSeat.java b/car-lib/src/android/car/VehicleSeat.java
index aa3f463..9953159 100644
--- a/car-lib/src/android/car/VehicleSeat.java
+++ b/car-lib/src/android/car/VehicleSeat.java
@@ -25,7 +25,7 @@
* @hide
*/
@SystemApi
-public class VehicleSeat {
+public final class VehicleSeat {
public static final int SEAT_DRIVER_LHD = 0x0001;
public static final int SEAT_DRIVER_RHD = 0x0002;
public static final int SEAT_ROW_1_PASSENGER_LEFT = 0x0010;
@@ -37,4 +37,6 @@
public static final int SEAT_ROW_3_PASSENGER_LEFT = 0x1000;
public static final int SEAT_ROW_3_PASSENGER_CENTER = 0x2000;
public static final int SEAT_ROW_3_PASSENGER_RIGHT = 0x4000;
+
+ private VehicleSeat() {}
}
diff --git a/car-lib/src/android/car/VehicleWindow.java b/car-lib/src/android/car/VehicleWindow.java
index 1afa68c..8c147d9 100644
--- a/car-lib/src/android/car/VehicleWindow.java
+++ b/car-lib/src/android/car/VehicleWindow.java
@@ -23,7 +23,7 @@
* @hide
*/
@SystemApi
-public class VehicleWindow {
+public final class VehicleWindow {
public static final int WINDOW_FRONT_WINDSHIELD = 0x0001;
public static final int WINDOW_REAR_WINDSHIELD = 0x0002;
public static final int WINDOW_ROOF_TOP = 0x0004;
@@ -33,5 +33,7 @@
public static final int WINDOW_ROW_2_RIGHT = 0x0200;
public static final int WINDOW_ROW_3_LEFT = 0x1000;
public static final int WINDOW_ROW_3_RIGHT = 0x2000;
+
+ private VehicleWindow() {}
}
diff --git a/car-lib/src/android/car/VehicleZone.java b/car-lib/src/android/car/VehicleZone.java
index 2f648b7..780d827 100644
--- a/car-lib/src/android/car/VehicleZone.java
+++ b/car-lib/src/android/car/VehicleZone.java
@@ -25,7 +25,7 @@
* @hide
*/
@SystemApi
-public class VehicleZone {
+public final class VehicleZone {
public static final int ZONE_ROW_1_LEFT = 0x00000001;
public static final int ZONE_ROW_1_CENTER = 0x00000002;
public static final int ZONE_ROW_1_RIGHT = 0x00000004;
@@ -43,4 +43,6 @@
public static final int ZONE_ROW_4_RIGHT = 0x00004000;
public static final int ZONE_ROW_4_ALL = 0x00008000;
public static final int ZONE_ALL = 0x80000000;
+
+ private VehicleZone() {}
}
diff --git a/car-lib/src/android/car/VehicleZoneUtil.java b/car-lib/src/android/car/VehicleZoneUtil.java
index 9e7decc..ebcfadf 100644
--- a/car-lib/src/android/car/VehicleZoneUtil.java
+++ b/car-lib/src/android/car/VehicleZoneUtil.java
@@ -22,7 +22,7 @@
* @hide
*/
@SystemApi
-public class VehicleZoneUtil {
+public final class VehicleZoneUtil {
/**
* Change zone flag into index with available zones.
@@ -129,4 +129,6 @@
}
return list;
}
+
+ private VehicleZoneUtil() {}
}