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

Commit 11e00678 authored by Peter Wang's avatar Peter Wang
Browse files

[Telephony Mainline] Change usages of hidden APIs

bindServiceAsUser to registerReceiver

Bug: 146526761
Test: Build, CarrierServiceBindHelperTest
Change-Id: Ib1c28e3bce9b5b5173278770a1d1e4857aa61aa2
Merged-In: Ib1c28e3bce9b5b5173278770a1d1e4857aa61aa2
parent 00b85827
Loading
Loading
Loading
Loading
+5 −3
Original line number Diff line number Diff line
@@ -272,9 +272,11 @@ public class CarrierServiceBindHelper {

            String error;
            try {
                if (mContext.bindServiceAsUser(carrierService, connection,
                if (mContext.createContextAsUser(Process.myUserHandle(), 0)
                        .bindService(carrierService,
                                Context.BIND_AUTO_CREATE | Context.BIND_FOREGROUND_SERVICE,
                        mHandler, Process.myUserHandle())) {
                                (r) -> mHandler.post(r),
                                connection)) {
                    return;
                }