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

Commit 7d950c46 authored by Peter Carney's avatar Peter Carney Committed by rmcc@arcee-kang1
Browse files

Fix possible null-pointer exception

Change-Id: I0d0b91804ac588efaeb95bbed49328ffa46f8acb
parent 6d0ad4ea
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -171,8 +171,8 @@ public class BluetoothMasAppIf {
    public boolean checkPath(boolean up, String name, boolean setPathFlag) {
        Log.d(TAG, "setPath called");
        /*
         * /* Up and empty string – cd .. Up and name - cd ../name Down and name
         * - cd name Down and empty string – cd to root
         * /* Up and empty string cd .. Up and name - cd ../name Down and name
         * - cd name Down and empty string cd to root
         */

        List<String> completeFolderList = new ArrayList<String>();
+7 −3
Original line number Diff line number Diff line
@@ -414,7 +414,11 @@ public class BluetoothMns {
            File fileR = new File(mContext.getFilesDir() + "/" + FILENAME);
            if (fileR.exists() == true) {
                Log.d(TAG, " Sending event report file ");
                if (mSession != null) {
                    mSession.sendEvent(fileR, (byte) 0);
                } else {
                    Log.d(TAG, " Unable to send report file: mSession == null");
                }
            } else {
                Log.d(TAG, " ERROR IN CREATING SEND EVENT OBJ FILE");
            }
@@ -2846,7 +2850,7 @@ public class BluetoothMns {
                mSessionHandler.obtainMessage(RFCOMM_CONNECTED, transport)
                        .sendToTarget();
            } catch (IOException e) {
                Log.e(TAG, "Rfcomm socket connect exception ");
                Log.e(TAG, "Rfcomm socket connect exception with error: " + e.getMessage());
                BluetoothMnsPreference.getInstance(mContext).removeChannel(
                        device, MNS_UUID16);
                markConnectionFailed(btSocket);