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

Commit 259a5b23 authored by android-build-team Robot's avatar android-build-team Robot
Browse files

Snap for 5838830 from 13b0504c4b47c5dd195f8c96bfc9e6206b737668 to rvc-release

Change-Id: Id4eb1ab71fe32cd53db5c1d2309a8afc74aedced
parents e3442ff7 dd4d2005
Loading
Loading
Loading
Loading
+6 −2
Original line number Diff line number Diff line
@@ -118,6 +118,8 @@ public final class BluetoothPan implements BluetoothProfile {
     */
    public static final int PAN_OPERATION_SUCCESS = 1004;

    private final Context mContext;

    private BluetoothAdapter mAdapter;
    private final BluetoothProfileConnector<IBluetoothPan> mProfileConnector =
            new BluetoothProfileConnector(this, BluetoothProfile.PAN,
@@ -136,6 +138,7 @@ public final class BluetoothPan implements BluetoothProfile {
    @UnsupportedAppUsage
    /*package*/ BluetoothPan(Context context, ServiceListener listener) {
        mAdapter = BluetoothAdapter.getDefaultAdapter();
        mContext = context;
        mProfileConnector.connect(context, listener);
    }

@@ -287,11 +290,12 @@ public final class BluetoothPan implements BluetoothProfile {

    @UnsupportedAppUsage
    public void setBluetoothTethering(boolean value) {
        if (DBG) log("setBluetoothTethering(" + value + ")");
        String pkgName = mContext.getOpPackageName();
        if (DBG) log("setBluetoothTethering(" + value + "), calling package:" + pkgName);
        final IBluetoothPan service = getService();
        if (service != null && isEnabled()) {
            try {
                service.setBluetoothTethering(value);
                service.setBluetoothTethering(value, pkgName);
            } catch (RemoteException e) {
                Log.e(TAG, "Stack:" + Log.getStackTraceString(new Throwable()));
            }