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

Commit 199a385e authored by William Escande's avatar William Escande
Browse files

Use AttributionSource Builder

Attribution source constructor are hidden api
Add a Builder option to take a AttributionSource as parameter

Test: atest BluetoothInstrumentationTests
Bug: 195144968
Tag: #refactor
Ignore-AOSP-First: No such thing on aosp
Change-Id: I901c8afff6a40bd8484fd8e10baf290aa483c280
parent 6b8043e8
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -88,8 +88,9 @@ public final class BluetoothManager {
                uid = android.os.Process.SYSTEM_UID;
            }
            try {
                res = new AttributionSource(uid,
                        AppGlobals.getPackageManager().getPackagesForUid(uid)[0], null);
                res = new AttributionSource.Builder(uid)
                    .setPackageName(AppGlobals.getPackageManager().getPackagesForUid(uid)[0])
                    .build();
            } catch (RemoteException ignored) {
            }
        }