Removed debug method calls

This commit is contained in:
Akash Yadav
2022-06-26 09:30:39 +05:30
parent 8260a0bff4
commit 5115acc0d3
4 changed files with 0 additions and 21 deletions
-2
View File
@@ -26,8 +26,6 @@
android:supportsRtl="true"
android:theme="@style/AppTheme"
tools:ignore="UnusedAttribute,MediaCapabilities">
<profileable android:shell="true" />
<activity
android:name=".CrashHandlerActivity"
android:exported="true"
@@ -241,7 +241,6 @@ public class EditorActivity extends StudioActivity
@Override
public boolean onPrepareOptionsMenu(Menu menu) {
LOG.debug("Prepare options menu");
ensureToolbarMenu(menu);
return true;
}
@@ -160,7 +160,6 @@ public class IDELanguageClientImpl implements ILanguageClient {
File file = result.getFile().toFile();
if (!file.exists() || !file.isFile()) return;
Trace.beginSection("publishDiagnostics");
final var editorView = activity().getEditorForFile(file);
if (editorView != null) {
final var editor = editorView.getEditor();
@@ -180,7 +179,6 @@ public class IDELanguageClientImpl implements ILanguageClient {
diagnostics.put(file, result.getDiagnostics());
activity().setDiagnosticsAdapter(newDiagnosticsAdapter());
Trace.endSection();
}
@Nullable
@@ -17,8 +17,6 @@
package com.itsaky.lsp.java;
import android.os.Looper;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.annotation.RestrictTo;
@@ -92,12 +90,7 @@ public class JavaLanguageServer implements ILanguageServer, IDocumentHandler {
applySettings(getSettings());
}
private void logIfMainThread(String methodName) {
LOG.debug(methodName, ": Is main thread?", Looper.myLooper() == Looper.getMainLooper());
}
private void analyzeSelected() {
logIfMainThread("analyzeSelected");
if (this.selectedFile == null) {
return;
}
@@ -136,7 +129,6 @@ public class JavaLanguageServer implements ILanguageServer, IDocumentHandler {
@NonNull
private JavaCompilerService createCompiler() {
logIfMainThread("createCompiler");
return new JavaCompilerService(configuration.getClassPaths(), Collections.emptySet());
}
@@ -205,7 +197,6 @@ public class JavaLanguageServer implements ILanguageServer, IDocumentHandler {
@Override
public void configurationChanged(Object newConfiguration) {
logIfMainThread("configurationChanged");
if (!(newConfiguration instanceof JavaServerConfiguration)) {
LOG.error("Invalid configuration passed to server.", newConfiguration);
LOG.error("Configuration change event will be ignored.");
@@ -228,7 +219,6 @@ public class JavaLanguageServer implements ILanguageServer, IDocumentHandler {
@NonNull
@Override
public ICompletionProvider getCompletionProvider() {
logIfMainThread("completionProvider");
if (!settings.completionsEnabled()) {
return new NoCompletionsProvider();
}
@@ -270,7 +260,6 @@ public class JavaLanguageServer implements ILanguageServer, IDocumentHandler {
@NonNull
@Override
public SignatureHelp signatureHelp(@NonNull SignatureHelpParams params) {
logIfMainThread("signatureHelp");
if (!settings.signatureHelpEnabled()) {
return new SignatureHelp(Collections.emptyList(), -1, -1);
}
@@ -281,7 +270,6 @@ public class JavaLanguageServer implements ILanguageServer, IDocumentHandler {
@NonNull
@Override
public List<DiagnosticItem> analyze(@NonNull Path file) {
logIfMainThread("analyze file:" + file);
if (!settings.codeAnalysisEnabled()) {
return Collections.emptyList();
}
@@ -313,7 +301,6 @@ public class JavaLanguageServer implements ILanguageServer, IDocumentHandler {
@Override
public void onFileOpened(DocumentOpenEvent event) {
logIfMainThread("onFileOpened");
onFileSelected(event.getOpenedFile());
ensureAnalyzeTimerStarted();
FileStore.open(event);
@@ -321,7 +308,6 @@ public class JavaLanguageServer implements ILanguageServer, IDocumentHandler {
@Override
public void onContentChange(@NonNull DocumentChangeEvent event) {
logIfMainThread("onContentChanged");
// If a file's content is changed, it is definitely visible to user.
onFileSelected(event.getChangedFile());
ensureAnalyzeTimerStarted();
@@ -335,7 +321,6 @@ public class JavaLanguageServer implements ILanguageServer, IDocumentHandler {
@Override
public void onFileClosed(DocumentCloseEvent event) {
logIfMainThread("onFileClosed");
FileStore.close(event);
}
@@ -345,7 +330,6 @@ public class JavaLanguageServer implements ILanguageServer, IDocumentHandler {
}
private void ensureAnalyzeTimerStarted() {
logIfMainThread("ensureAnalyzeTimerStarted");
if (!this.analyzeTimer.isStarted()) {
this.analyzeTimer.start();
} else {