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

Commit e2733482 authored by Treehugger Robot's avatar Treehugger Robot Committed by Automerger Merge Worker
Browse files

Merge "Replace ConnectivityManager hidden symbols on BT" am: 3df1e20f

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

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ib94780b6b192fb8c851f8080f009a25f4ff2dd8a
parents 602b0236 3df1e20f
Loading
Loading
Loading
Loading
+5 −5
Original line number Diff line number Diff line
@@ -31,6 +31,7 @@ import android.net.ConnectivityManager;
import android.net.InetAddresses;
import android.net.InterfaceConfiguration;
import android.net.LinkAddress;
import android.net.TetheringManager;
import android.os.Handler;
import android.os.IBinder;
import android.os.INetworkManagementService;
@@ -641,9 +642,8 @@ public class PanService extends ProfileService {

        IBinder b = ServiceManager.getService(Context.NETWORKMANAGEMENT_SERVICE);
        INetworkManagementService service = INetworkManagementService.Stub.asInterface(b);
        ConnectivityManager cm =
                (ConnectivityManager) getSystemService(Context.CONNECTIVITY_SERVICE);
        String[] bluetoothRegexs = cm.getTetherableBluetoothRegexs();
        TetheringManager tm = getBaseContext().getSystemService(TetheringManager.class);
        String[] bluetoothRegexs = tm.getTetherableBluetoothRegexs();

        // bring toggle the interfaces
        String[] currentIfaces = new String[0];
@@ -689,13 +689,13 @@ public class PanService extends ProfileService {
                service.setInterfaceConfig(iface, ifcg);

                if (enable) {
                    int tetherStatus = cm.tether(iface);
                    int tetherStatus = tm.tether(iface);
                    if (tetherStatus != ConnectivityManager.TETHER_ERROR_NO_ERROR) {
                        Log.e(TAG, "Error tethering " + iface + " tetherStatus: " + tetherStatus);
                        return null;
                    }
                } else {
                    int untetherStatus = cm.untether(iface);
                    int untetherStatus = tm.untether(iface);
                    Log.i(TAG, "Untethered: " + iface + " untetherStatus: " + untetherStatus);
                }
            }