refactor
This commit is contained in:
@@ -19,7 +19,6 @@ import org.solovyev.android.calculator.model.CalculatorEngine;
|
||||
import org.solovyev.android.calculator.model.CalculatorParseException;
|
||||
import org.solovyev.android.calculator.model.TextProcessor;
|
||||
import org.solovyev.android.calculator.view.TextHighlighter;
|
||||
import org.solovyev.common.utils.CollectionsUtils;
|
||||
|
||||
/**
|
||||
* User: serso
|
||||
@@ -52,17 +51,9 @@ public class CalculatorEditor extends EditText implements SharedPreferences.OnSh
|
||||
public boolean onCheckIsTextEditor() {
|
||||
// Main goal of this implementation is to hide android soft keyboard from appearing when working with text input
|
||||
|
||||
// todo serso: refactor
|
||||
// NOTE: do not copy or reuse code below, it's completely SHIT!!!
|
||||
|
||||
if ( Build.VERSION.SDK_INT >= 11 ) {
|
||||
// fix for missing cursor in android 3 and higher
|
||||
for (StackTraceElement stackTraceElement : CollectionsUtils.asList(Thread.currentThread().getStackTrace())) {
|
||||
if ( "isCursorVisible".equals(stackTraceElement.getMethodName()) ) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
|
Reference in New Issue
Block a user