Skip to content

Commit

Permalink
Fix String comparison as if Java were Dart. (flutter#6781)
Browse files Browse the repository at this point in the history
This also removes unused imports and sorts imports correctly
  • Loading branch information
tvolkert authored Nov 7, 2018
1 parent 2494abd commit 4cdddba
Showing 1 changed file with 5 additions and 12 deletions.
17 changes: 5 additions & 12 deletions shell/platform/android/io/flutter/view/FlutterView.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,25 +5,20 @@
package io.flutter.view;

import android.app.Activity;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.content.IntentFilter;
import android.content.pm.ApplicationInfo;
import android.content.res.Configuration;
import android.database.ContentObserver;
import android.graphics.PixelFormat;
import android.provider.Settings;
import android.net.Uri;
import android.os.Handler;
import android.graphics.Bitmap;
import android.graphics.PixelFormat;
import android.graphics.Rect;
import android.graphics.SurfaceTexture;
import android.net.Uri;
import android.os.Build;
import android.os.Handler;
import android.provider.Settings;
import android.text.format.DateFormat;
import android.util.AttributeSet;
import android.util.Log;
import android.util.TypedValue;
import android.view.*;
import android.view.accessibility.AccessibilityManager;
import android.view.accessibility.AccessibilityNodeProvider;
Expand All @@ -35,10 +30,8 @@
import io.flutter.plugin.editing.TextInputPlugin;
import io.flutter.plugin.platform.PlatformPlugin;
import org.json.JSONException;
import org.json.JSONObject;

import java.lang.reflect.Method;
import java.net.URI;
import java.nio.ByteBuffer;
import java.nio.ByteOrder;
import java.util.*;
Expand Down Expand Up @@ -972,7 +965,7 @@ public void onChange(boolean selfChange) {
public void onChange(boolean selfChange, Uri uri) {
String value = Settings.Global.getString(getContext().getContentResolver(),
Settings.Global.TRANSITION_ANIMATION_SCALE);
if (value == "0") {
if (value != null && value.equals("0")) {
mAccessibilityFeatureFlags ^= AccessibilityFeature.DISABLE_ANIMATIONS.value;
} else {
mAccessibilityFeatureFlags &= ~AccessibilityFeature.DISABLE_ANIMATIONS.value;
Expand Down

0 comments on commit 4cdddba

Please sign in to comment.