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

Commit d99faa25 authored by Adrian Roos's avatar Adrian Roos
Browse files

Revert "Merge "Update Utils#getTetheringLabel usage on Settings" am:...

Revert "Merge "Update Utils#getTetheringLabel usage on Settings" am: 2b1e3a97 am: ddf3efb0 am: 8c38e954"

This reverts commit 0df55e1e.

Reason for revert: Other CLs in topic were skipped, but this one wasn't, which broke sc-dev.

Change-Id: Icf61dae071416381ea11cbe74cd92ae934c3047e
parent 0df55e1e
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -27,6 +27,7 @@ import android.content.Context;
import android.content.Intent;
import android.content.IntentFilter;
import android.database.ContentObserver;
import android.net.ConnectivityManager;
import android.net.TetheringManager;
import android.net.Uri;
import android.os.Bundle;
@@ -60,6 +61,7 @@ public class TetherPreferenceController extends AbstractPreferenceController imp

    private final boolean mAdminDisallowedTetherConfig;
    private final AtomicReference<BluetoothPan> mBluetoothPan;
    private final ConnectivityManager mConnectivityManager;
    private final BluetoothAdapter mBluetoothAdapter;
    private final TetheringManager mTetheringManager;
    @VisibleForTesting
@@ -84,6 +86,7 @@ public class TetherPreferenceController extends AbstractPreferenceController imp
        super(null);
        mAdminDisallowedTetherConfig = false;
        mBluetoothPan = new AtomicReference<>();
        mConnectivityManager = null;
        mBluetoothAdapter = BluetoothAdapter.getDefaultAdapter();
        mTetheringManager = null;
    }
@@ -92,6 +95,8 @@ public class TetherPreferenceController extends AbstractPreferenceController imp
        super(context);
        mBluetoothPan = new AtomicReference<>();
        mAdminDisallowedTetherConfig = isTetherConfigDisallowed(context);
        mConnectivityManager =
                (ConnectivityManager) context.getSystemService(Context.CONNECTIVITY_SERVICE);
        mBluetoothAdapter = BluetoothAdapter.getDefaultAdapter();
        mTetheringManager = context.getSystemService(TetheringManager.class);
        if (lifecycle != null) {
@@ -105,7 +110,7 @@ public class TetherPreferenceController extends AbstractPreferenceController imp
        mPreference = screen.findPreference(KEY_TETHER_SETTINGS);
        if (mPreference != null && !mAdminDisallowedTetherConfig) {
            mPreference.setTitle(
                    com.android.settingslib.Utils.getTetheringLabel(mTetheringManager));
                    com.android.settingslib.Utils.getTetheringLabel(mConnectivityManager));
        }
    }