Fix folder toolbar and folder icon background

This commit is contained in:
h4h13 2019-07-30 09:32:56 +05:30
parent 33ed4fe4c3
commit 310cfe8491
3 changed files with 22 additions and 25 deletions

View file

@ -18,7 +18,6 @@ import android.annotation.SuppressLint;
import android.app.Activity;
import android.media.MediaScannerConnection;
import android.net.Uri;
import android.os.Build;
import android.widget.Toast;
import java.lang.ref.WeakReference;
@ -58,18 +57,8 @@ public class UpdateToastMediaScannerCompletionListener implements MediaScannerCo
}
String text = " " + String.format(scannedFiles, scanned, toBeScanned.length) + (failed > 0 ? " " + String.format(couldNotScanFiles, failed) : "");
toast.setText(text);
try {
if (toast.getView().isShown()) {
toast.cancel();
}
if (Build.VERSION.SDK_INT < 28 && toast.getView().isShown()) {
toast.cancel();
}
toast.show();
} catch (Exception e) {
e.printStackTrace();
}
toast.show();
});
}
}
}
}