Fix lint errors to prepare for building Android files in Google (flutter/engine#5440)

This commit is contained in:
Mehmet Fidanboylu
2018-06-01 10:16:50 -07:00
committed by GitHub
parent 2778eea662
commit 4d4a42b63c
4 changed files with 5 additions and 4 deletions

View File

@@ -205,7 +205,7 @@ public final class FlutterActivityDelegate
Application app = (Application) activity.getApplicationContext();
if (app instanceof FlutterApplication) {
FlutterApplication flutterApp = (FlutterApplication) app;
if (this.equals(flutterApp.getCurrentActivity())) {
if (activity.equals(flutterApp.getCurrentActivity())) {
Log.i(TAG, "onPause setting current activity to null");
flutterApp.setCurrentActivity(null);
}
@@ -251,7 +251,7 @@ public final class FlutterActivityDelegate
Application app = (Application) activity.getApplicationContext();
if (app instanceof FlutterApplication) {
FlutterApplication flutterApp = (FlutterApplication) app;
if (this.equals(flutterApp.getCurrentActivity())) {
if (activity.equals(flutterApp.getCurrentActivity())) {
Log.i(TAG, "onDestroy setting current activity to null");
flutterApp.setCurrentActivity(null);
}

View File

@@ -84,6 +84,7 @@ public final class StandardMethodCodec implements MethodCodec {
return result;
}
}
// Falls through intentionally.
case 1: {
final Object code = messageCodec.readValue(envelope);
final Object message = messageCodec.readValue(envelope);

View File

@@ -91,8 +91,7 @@ class InputConnectionAdaptor extends BaseInputConnection {
@Override
public boolean deleteSurroundingText(int beforeLength, int afterLength) {
if (Selection.getSelectionStart(mEditable) == -1 ||
Selection.getSelectionStart(mEditable) == -1)
if (Selection.getSelectionStart(mEditable) == -1)
return true;
boolean result = super.deleteSurroundingText(beforeLength, afterLength);

View File

@@ -424,6 +424,7 @@ class AccessibilityBridge extends AccessibilityNodeProvider implements BasicMess
if (mInputFocusedObject != null)
return createAccessibilityNodeInfo(mInputFocusedObject.id);
}
// Fall through to check FOCUS_ACCESSIBILITY
case AccessibilityNodeInfo.FOCUS_ACCESSIBILITY: {
if (mA11yFocusedObject != null)
return createAccessibilityNodeInfo(mA11yFocusedObject.id);