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

Commit fd7f71ca authored by Chienyuan's avatar Chienyuan Committed by Jack He
Browse files

SettingsLib: Add API to get identity address

Bug: 197044261
Test: build pass
Change-Id: Idd03d7777c8257986b03dd1ba19aac5514f4f18d
Merged-In: Idd03d7777c8257986b03dd1ba19aac5514f4f18d
(cherry picked from commit a393bf9d)
parent 853b6f6e
Loading
Loading
Loading
Loading
+11 −0
Original line number Diff line number Diff line
@@ -499,6 +499,17 @@ public class CachedBluetoothDevice implements Comparable<CachedBluetoothDevice>
        return mDevice.getAddress();
    }

    /**
     * Get identity address from remote device
     * @return {@link BluetoothDevice#getIdentityAddress()} if
     * {@link BluetoothDevice#getIdentityAddress()} is not null otherwise return
     * {@link BluetoothDevice#getAddress()}
     */
    public String getIdentityAddress() {
        final String identityAddress = mDevice.getIdentityAddress();
        return TextUtils.isEmpty(identityAddress) ? getAddress() : identityAddress;
    }

    /**
     * Get name from remote device
     * @return {@link BluetoothDevice#getAlias()} if