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

Commit a43f22ee authored by Hansong Zhang's avatar Hansong Zhang Committed by Automerger Merge Worker
Browse files

Merge "getPanLocalRoleNative is unused" am: 32804986

Original change: https://android-review.googlesource.com/c/platform/packages/apps/Bluetooth/+/1563254

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ica2f9c3ef70ca80ed95e7e9729143eea62a0549d
parents e00056f4 32804986
Loading
Loading
Loading
Loading
+0 −9
Original line number Diff line number Diff line
@@ -171,14 +171,6 @@ static void cleanupNative(JNIEnv* env, jobject object) {
  btIf = NULL;
}

static jint getPanLocalRoleNative(JNIEnv* env, jobject object) {
  debug("in");
  int local_role = 0;
  if (sPanIf) local_role = sPanIf->get_local_role();
  debug("out");
  return (jint)local_role;
}

static jboolean connectPanNative(JNIEnv* env, jobject object,
                                 jbyteArray address, jint src_role,
                                 jint dest_role) {
@@ -228,7 +220,6 @@ static JNINativeMethod sMethods[] = {
    {"initializeNative", "()V", (void*)initializeNative},
    {"cleanupNative", "()V", (void*)cleanupNative},
    {"connectPanNative", "([BII)Z", (void*)connectPanNative},
    {"getPanLocalRoleNative", "()I", (void*)getPanLocalRoleNative},
    {"disconnectPanNative", "([B)Z", (void*)disconnectPanNative},
    // TBD cleanup
};
+0 −35
Original line number Diff line number Diff line
@@ -289,25 +289,6 @@ public class PanService extends ProfileService {
            return service.getConnectionState(device);
        }

        private boolean isPanNapOn() {
            PanService service = getService();
            if (service == null) {
                return false;
            }
            return service.isPanNapOn();
        }

        private boolean isPanUOn() {
            if (DBG) {
                Log.d(TAG, "isTetheringOn call getPanLocalRoleNative");
            }
            PanService service = getService();
            if (service == null) {
                return false;
            }
            return service.isPanUOn();
        }

        @Override
        public boolean isTetheringOn() {
            // TODO(BT) have a variable marking the on/off state
@@ -382,20 +363,6 @@ public class PanService extends ProfileService {
        return panDevice.mState;
    }

    boolean isPanNapOn() {
        if (DBG) {
            Log.d(TAG, "isTetheringOn call getPanLocalRoleNative");
        }
        return (getPanLocalRoleNative() & BluetoothPan.LOCAL_NAP_ROLE) != 0;
    }

    boolean isPanUOn() {
        if (DBG) {
            Log.d(TAG, "isTetheringOn call getPanLocalRoleNative");
        }
        return (getPanLocalRoleNative() & BluetoothPan.LOCAL_PANU_ROLE) != 0;
    }

    public boolean isTetheringOn() {
        // TODO(BT) have a variable marking the on/off state
        enforceCallingOrSelfPermission(BLUETOOTH_PERM, "Need BLUETOOTH permission");
@@ -801,6 +768,4 @@ public class PanService extends ProfileService {

    private native boolean disconnectPanNative(byte[] btAddress);

    private native int getPanLocalRoleNative();

}