diff --git a/extphone/src/com/qti/extphone/NrUwbIconMode.aidl b/extphone/src/com/qti/extphone/NrUwbIconMode.aidl
deleted file mode 100644
index 16d8e0c..0000000
--- a/extphone/src/com/qti/extphone/NrUwbIconMode.aidl
+++ /dev/null
@@ -1,8 +0,0 @@
-/*
- * Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
- * SPDX-License-Identifier: BSD-3-Clause-Clear
- */
-
-package com.qti.extphone;
-
-parcelable NrUwbIconMode;
diff --git a/extphone/src/com/qti/extphone/NrUwbIconMode.java b/extphone/src/com/qti/extphone/NrUwbIconMode.java
deleted file mode 100644
index 2077680..0000000
--- a/extphone/src/com/qti/extphone/NrUwbIconMode.java
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
- * Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
- * SPDX-License-Identifier: BSD-3-Clause-Clear
- */
-
-package com.qti.extphone;
-
-import android.os.Parcel;
-import android.os.Parcelable;
-
-public class NrUwbIconMode implements Parcelable {
-
-    private static final String TAG = "NrUwbIconMode";
-
-    public static final int NONE = 0;
-    public static final int CONNECTED = 1;
-    public static final int IDLE = 2;
-    public static final int CONNECTED_AND_IDLE = 3;
-
-    private int mNrUwbIconMode;
-
-    public NrUwbIconMode(int mode) {
-        mNrUwbIconMode = mode;
-    }
-
-    public NrUwbIconMode(Parcel in) {
-        mNrUwbIconMode = in.readInt();
-    }
-
-    public int get() {
-        return mNrUwbIconMode;
-    }
-
-    public static boolean isValid(int mode) {
-        switch (mode) {
-            case NONE:
-            case CONNECTED:
-            case IDLE:
-            case CONNECTED_AND_IDLE:
-                return true;
-            default:
-                return false;
-        }
-    }
-
-    @Override
-    public int describeContents() {
-        return 0;
-    }
-
-    public void writeToParcel(Parcel out, int flags) {
-        out.writeInt(mNrUwbIconMode);
-    }
-
-    public static final Parcelable.Creator<NrUwbIconMode> CREATOR = new Parcelable.Creator() {
-        public NrUwbIconMode createFromParcel(Parcel in) {
-            return new NrUwbIconMode(in);
-        }
-
-        public NrUwbIconMode[] newArray(int size) {
-            return new NrUwbIconMode[size];
-        }
-    };
-
-    public void readFromParcel(Parcel in) {
-        mNrUwbIconMode = in.readInt();
-    }
-
-    @Override
-    public String toString() {
-        return TAG + ": " + get();
-    }
-}
diff --git a/extphone/src/com/qti/extphone/NrUwbIconRefreshTimerType.aidl b/extphone/src/com/qti/extphone/NrUwbIconRefreshTimerType.aidl
deleted file mode 100644
index 84438f6..0000000
--- a/extphone/src/com/qti/extphone/NrUwbIconRefreshTimerType.aidl
+++ /dev/null
@@ -1,8 +0,0 @@
-/*
- * Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
- * SPDX-License-Identifier: BSD-3-Clause-Clear
- */
-
-package com.qti.extphone;
-
-parcelable NrUwbIconRefreshTimerType;
diff --git a/extphone/src/com/qti/extphone/NrUwbIconRefreshTimerType.java b/extphone/src/com/qti/extphone/NrUwbIconRefreshTimerType.java
deleted file mode 100644
index ec084dc..0000000
--- a/extphone/src/com/qti/extphone/NrUwbIconRefreshTimerType.java
+++ /dev/null
@@ -1,72 +0,0 @@
-/*
- * Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
- * SPDX-License-Identifier: BSD-3-Clause-Clear
- */
-
-package com.qti.extphone;
-
-import android.os.Parcel;
-import android.os.Parcelable;
-
-public class NrUwbIconRefreshTimerType implements Parcelable {
-
-    private static final String TAG = "NrUwbIconRefreshTimerType";
-
-    public static final int SCG_TO_MCG = 0;
-    public static final int IDLE_TO_CONNECT = 1;
-    public static final int IDLE = 2;
-
-    private int mNrUwbIconRefreshTimerType;
-
-    public NrUwbIconRefreshTimerType(int type) {
-        mNrUwbIconRefreshTimerType = type;
-    }
-
-    public NrUwbIconRefreshTimerType(Parcel in) {
-        mNrUwbIconRefreshTimerType = in.readInt();
-    }
-
-    public int get() {
-        return mNrUwbIconRefreshTimerType;
-    }
-
-    public static boolean isValid(int mode) {
-        switch (mode) {
-            case SCG_TO_MCG:
-            case IDLE_TO_CONNECT:
-            case IDLE:
-                return true;
-            default:
-                return false;
-        }
-    }
-
-    @Override
-    public int describeContents() {
-        return 0;
-    }
-
-    public void writeToParcel(Parcel out, int flags) {
-        out.writeInt(mNrUwbIconRefreshTimerType);
-    }
-
-    public static final Parcelable.Creator<NrUwbIconRefreshTimerType> CREATOR =
-            new Parcelable.Creator() {
-        public NrUwbIconRefreshTimerType createFromParcel(Parcel in) {
-            return new NrUwbIconRefreshTimerType(in);
-        }
-
-        public NrUwbIconRefreshTimerType[] newArray(int size) {
-            return new NrUwbIconRefreshTimerType[size];
-        }
-    };
-
-    public void readFromParcel(Parcel in) {
-        mNrUwbIconRefreshTimerType = in.readInt();
-    }
-
-    @Override
-    public String toString() {
-        return TAG + ": " + get();
-    }
-}
