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

Commit f0d36b80 authored by Philip P. Moltmann's avatar Philip P. Moltmann
Browse files

Rename featureId -> attributionTag

In the core functionality this changes everything including aidl's and
field names:
- Context
- ContentProvider
- AppOps*
- Package parsing

For the rest, this is a shallow change to only change to the changed
APIs. This keeps the change small-ish

Exempt-From-Owner-Approval: Rename
Fixes: 148792795
Test: TH
Change-Id: I2a2245fe76e09e62cb13d5785d2efb4a304ba54a
Merged-In: I2a2245fe76e09e62cb13d5785d2efb4a304ba54a
parent e18a9090
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -849,7 +849,7 @@ public final class BluetoothAdapter {
        synchronized (mLock) {
            if (sBluetoothLeScanner == null) {
                sBluetoothLeScanner = new BluetoothLeScanner(mManagerService, getOpPackageName(),
                        getFeatureId());
                        getAttributionTag());
            }
        }
        return sBluetoothLeScanner;
@@ -1663,11 +1663,11 @@ public final class BluetoothAdapter {
        return ActivityThread.currentOpPackageName();
    }

    private String getFeatureId() {
    private String getAttributionTag() {
        // Workaround for legacy API for getting a BluetoothAdapter not
        // passing a context
        if (mContext != null) {
            return mContext.getFeatureId();
            return mContext.getAttributionTag();
        }
        return null;
    }
@@ -1709,7 +1709,7 @@ public final class BluetoothAdapter {
        try {
            mServiceLock.readLock().lock();
            if (mService != null) {
                return mService.startDiscovery(getOpPackageName(), getFeatureId());
                return mService.startDiscovery(getOpPackageName(), getAttributionTag());
            }
        } catch (RemoteException e) {
            Log.e(TAG, "", e);
+1 −1
Original line number Diff line number Diff line
@@ -62,7 +62,7 @@ public final class BluetoothManager {
     * @hide
     */
    public BluetoothManager(Context context) {
        if (context.getFeatureId() == null) {
        if (context.getAttributionTag() == null) {
            context = context.getApplicationContext();
            if (context == null) {
                throw new IllegalArgumentException(