Change app target API level to 26
MODIFY
android-charts/src/net/bither/charts/view/LineChart.java
android-charts/src/net/bither/charts/view/LineChart.java
@@ -439,7 +439,7 @@ public class LineChart extends GridChart {
private float calcDistance(MotionEvent event) {
float x = event.getX(0) - event.getX(1);
float y = event.getY(0) - event.getY(1);
- return FloatMath.sqrt(x * x + y * y);
+ return (float) Math.sqrt(x * x + y * y);
}
protected void zoomIn() {

MODIFY
android-charts/src/net/bither/charts/view/SlipLineChart.java
android-charts/src/net/bither/charts/view/SlipLineChart.java
@@ -457,7 +457,7 @@ public class SlipLineChart extends GridChart {
protected float calcDistance(MotionEvent event) {
float x = event.getX(0) - event.getX(1);
float y = event.getY(0) - event.getY(1);
- return FloatMath.sqrt(x * x + y * y);
+ return (float) Math.sqrt(x * x + y * y);
}
protected void zoomIn() {

MODIFY
android-charts/src/net/bither/charts/view/SlipStickChart.java
android-charts/src/net/bither/charts/view/SlipStickChart.java
@@ -459,7 +459,7 @@ public class SlipStickChart extends GridChart {
protected float calcDistance(MotionEvent event) {
float x = event.getX(0) - event.getX(1);
float y = event.getY(0) - event.getY(1);
- return FloatMath.sqrt(x * x + y * y);
+ return (float) Math.sqrt(x * x + y * y);
}
protected void zoomIn() {

MODIFY
android-charts/src/net/bither/charts/view/StickChart.java
android-charts/src/net/bither/charts/view/StickChart.java
@@ -456,7 +456,7 @@ public class StickChart extends GridChart {
private float calcDistance(MotionEvent event) {
float x = event.getX(0) - event.getX(1);
float y = event.getY(0) - event.getY(1);
- return FloatMath.sqrt(x * x + y * y);
+ return (float) Math.sqrt(x * x + y * y);
}
protected void zoomIn() {

MODIFY
bither-android/build.gradle
bither-android/build.gradle
//}
android {
-// useLibrary 'org.apache.http.legacy'
+ useLibrary 'org.apache.http.legacy'
buildTypes {
release {
minifyEnabled true

MODIFY
bither-android/src/net/bither/BitherApplication.java
bither-android/src/net/bither/BitherApplication.java
@@ -79,6 +79,9 @@ public class BitherApplication extends Application {
new LinuxSecureRandom();
super.onCreate();
mContext = getApplicationContext();
+ ueHandler = new UEHandler();
+ Thread.setDefaultUncaughtExceptionHandler(ueHandler);
+ activityManager = (ActivityManager) getSystemService(Context.ACTIVITY_SERVICE);
mAddressDbHelper = new AddressDatabaseHelper(mContext);
mTxDbHelper = new TxDatabaseHelper(mContext);
AndroidDbImpl androidDb = new AndroidDbImpl();
@@ -91,10 +94,6 @@ public class BitherApplication extends Application {
Threading.throwOnLockCycles();
initApp();
mBitherApplication = this;
- ueHandler = new UEHandler();
- Thread.setDefaultUncaughtExceptionHandler(ueHandler);
- activityManager = (ActivityManager) getSystemService(Context.ACTIVITY_SERVICE);
-
upgrade();
}
@@ -123,7 +122,7 @@ public class BitherApplication extends Application {
}
public static File getLogDir() {
- final File logDir = mContext.getDir("log", Context.MODE_WORLD_READABLE);
+ final File logDir = mContext.getDir("log", Context.MODE_PRIVATE);
return logDir;
}

MODIFY
build.gradle
build.gradle
@@ -28,11 +28,12 @@ project(':bitherj') {
subprojects {
android {
- compileSdkVersion 22
+ compileSdkVersion 26
buildToolsVersion '26.0.2'
+
defaultConfig {
minSdkVersion 9
- targetSdkVersion 22
+ targetSdkVersion 26
multiDexEnabled true
}

Change app target API level to 26