Browse Source

Setting compat vector usage for all versions <= KitKat

master
anthony restaino 8 years ago
parent
commit
f47ecf2bad
  1. 7
      app/src/main/java/acr/browser/lightning/activity/BrowserActivity.java
  2. 6
      app/src/main/java/acr/browser/lightning/app/BrowserApp.java

7
app/src/main/java/acr/browser/lightning/activity/BrowserActivity.java

@ -37,7 +37,6 @@ import android.support.v4.widget.DrawerLayout;
import android.support.v4.widget.DrawerLayout.DrawerListener; import android.support.v4.widget.DrawerLayout.DrawerListener;
import android.support.v7.app.ActionBar; import android.support.v7.app.ActionBar;
import android.support.v7.app.AlertDialog; import android.support.v7.app.AlertDialog;
import android.support.v7.app.AppCompatDelegate;
import android.support.v7.graphics.Palette; import android.support.v7.graphics.Palette;
import android.support.v7.widget.Toolbar; import android.support.v7.widget.Toolbar;
import android.text.TextUtils; import android.text.TextUtils;
@ -126,12 +125,6 @@ import butterknife.ButterKnife;
public abstract class BrowserActivity extends ThemableBrowserActivity implements BrowserView, UIController, OnClickListener { public abstract class BrowserActivity extends ThemableBrowserActivity implements BrowserView, UIController, OnClickListener {
static {
if(Build.VERSION.SDK_INT==19){
AppCompatDelegate.setCompatVectorFromResourcesEnabled(true);
}
}
private static final String TAG = "BrowserActivity"; private static final String TAG = "BrowserActivity";
private static final String INTENT_PANIC_TRIGGER = "info.guardianproject.panic.action.TRIGGER"; private static final String INTENT_PANIC_TRIGGER = "info.guardianproject.panic.action.TRIGGER";

6
app/src/main/java/acr/browser/lightning/app/BrowserApp.java

@ -9,6 +9,7 @@ import android.os.Build;
import android.os.StrictMode; import android.os.StrictMode;
import android.support.annotation.NonNull; import android.support.annotation.NonNull;
import android.support.annotation.Nullable; import android.support.annotation.Nullable;
import android.support.v7.app.AppCompatDelegate;
import android.util.Log; import android.util.Log;
import android.webkit.WebView; import android.webkit.WebView;
@ -35,6 +36,11 @@ public class BrowserApp extends Application {
private static final String TAG = "BrowserApp"; private static final String TAG = "BrowserApp";
static {
AppCompatDelegate.setCompatVectorFromResourcesEnabled(Build.VERSION.SDK_INT <= Build.VERSION_CODES.KITKAT);
}
@Nullable private static AppComponent sAppComponent; @Nullable private static AppComponent sAppComponent;
private static final Executor mIOThread = Executors.newSingleThreadExecutor(); private static final Executor mIOThread = Executors.newSingleThreadExecutor();

Loading…
Cancel
Save