diff --git a/.devcontainer/android/devcontainer.json b/.devcontainer/android/devcontainer.json index aab6180910..89129ab4b6 100644 --- a/.devcontainer/android/devcontainer.json +++ b/.devcontainer/android/devcontainer.json @@ -4,5 +4,6 @@ "vscode": { "extensions": ["ms-vscode.cpptools-themes", "ms-vscode.cmake-tools", "vscjava.vscode-java-pack"] } - } + }, + "runArgs": ["--privileged", "--network=host"] } diff --git a/app/android/src/com/introlab/rtabmap/RTABMapActivity.java b/app/android/src/com/introlab/rtabmap/RTABMapActivity.java index 8184bfdeca..3a6b74b0bc 100644 --- a/app/android/src/com/introlab/rtabmap/RTABMapActivity.java +++ b/app/android/src/com/introlab/rtabmap/RTABMapActivity.java @@ -1775,19 +1775,19 @@ public void onClick(DialogInterface dialog, int which) { long currentTime = System.currentTimeMillis()/1000; if(loopClosureId > 0) { - if (mToast != null && mToast.getView().isShown()) mToast.cancel(); + if (mToast != null) mToast.cancel(); mToast.setText(String.format("Loop closure detected! (%d/%d inliers)", inliers, matches)); mToast.show(); } else if(landmarkDetected != 0) { - if (mToast != null && mToast.getView().isShown()) mToast.cancel(); + if (mToast != null) mToast.cancel(); mToast.setText(String.format("Marker %d detected!", landmarkDetected)); mToast.show(); } else if(rejected > 0) { - if (mToast != null && mToast.getView().isShown()) mToast.cancel(); + if (mToast != null) mToast.cancel(); if(inliers >= Integer.parseInt(mMinInliers)) { if(optimizationMaxError > 0.0f) @@ -1809,7 +1809,7 @@ else if(fastMovement) { if(currentTime - mLastFastMovementNotificationStamp > 3) { - if (mToast != null && mToast.getView().isShown()) mToast.cancel(); + if (mToast != null) mToast.cancel(); mToast.setText("Move slower... blurry images are not added to map (\"Settings->Mapping...->Maximum Motion Speed\" is enabled)."); mToast.show(); }