Skip to content

Commit

Permalink
Merge pull request #757 from mayank-kgp/crash_kitkat
Browse files Browse the repository at this point in the history
Fix: crashing on sdk level below 18
  • Loading branch information
therajanmaurya authored Aug 23, 2017
2 parents 2f729a1 + 6683a68 commit 4974cdb
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions mifosng-android/src/main/java/com/mifos/App.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@

package com.mifos;

import android.annotation.TargetApi;
import android.content.Context;
import android.graphics.Typeface;
import android.os.Build;
Expand Down Expand Up @@ -51,7 +50,6 @@ public static App get(Context context) {
return (App) context.getApplicationContext();
}

@TargetApi(Build.VERSION_CODES.JELLY_BEAN_MR2)
@Override
public void onCreate() {
super.onCreate();
Expand All @@ -62,10 +60,12 @@ public void onCreate() {
//Initializing the DBFlow and SQL Cipher Encryption
FlowManager.init(new FlowConfig.Builder(this).build());
Stetho.initializeWithDefaults(this);
StrictMode.VmPolicy policy = new StrictMode.VmPolicy.Builder()
.detectFileUriExposure()
.build();
StrictMode.setVmPolicy(policy);
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR2) {
StrictMode.VmPolicy policy = new StrictMode.VmPolicy.Builder()
.detectFileUriExposure()
.build();
StrictMode.setVmPolicy(policy);
}
ForegroundChecker.init();
}

Expand Down

0 comments on commit 4974cdb

Please sign in to comment.