diff --git a/build.gradle b/build.gradle index 512fdbfac..65226215b 100644 --- a/build.gradle +++ b/build.gradle @@ -13,7 +13,7 @@ project.ext { preDexLibs = !project.hasProperty('disablePreDex') testCoverage = project.hasProperty('testCoverage') - compileSdkVersion = 22 + compileSdkVersion = 23 buildToolsVersion = '23.0.1' } diff --git a/k9mail-library/build.gradle b/k9mail-library/build.gradle index f3550c278..d002e67a0 100644 --- a/k9mail-library/build.gradle +++ b/k9mail-library/build.gradle @@ -31,6 +31,9 @@ android { testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" } + // for using Apache HTTP Client + useLibrary 'org.apache.http.legacy' + buildTypes { debug { testCoverageEnabled rootProject.testCoverage diff --git a/k9mail/src/main/java/com/fsck/k9/helper/MergeCursor.java b/k9mail/src/main/java/com/fsck/k9/helper/MergeCursor.java index a69ebf5bc..96dff9ccb 100644 --- a/k9mail/src/main/java/com/fsck/k9/helper/MergeCursor.java +++ b/k9mail/src/main/java/com/fsck/k9/helper/MergeCursor.java @@ -19,12 +19,14 @@ package com.fsck.k9.helper; import java.util.Comparator; +import android.annotation.TargetApi; import android.content.ContentResolver; import android.database.CharArrayBuffer; import android.database.ContentObserver; import android.database.Cursor; import android.database.DataSetObserver; import android.net.Uri; +import android.os.Build; import android.os.Bundle; @@ -213,6 +215,12 @@ public class MergeCursor implements Cursor { return mActiveCursor.getWantsAllOnMoveCalls(); } + @TargetApi(Build.VERSION_CODES.M) + @Override + public void setExtras(Bundle extras) { + mActiveCursor.setExtras(extras); + } + @Override public boolean isAfterLast() { int count = getCount(); diff --git a/k9mail/src/main/java/com/fsck/k9/provider/MessageProvider.java b/k9mail/src/main/java/com/fsck/k9/provider/MessageProvider.java index fec2b4f5f..b54abf98c 100644 --- a/k9mail/src/main/java/com/fsck/k9/provider/MessageProvider.java +++ b/k9mail/src/main/java/com/fsck/k9/provider/MessageProvider.java @@ -1,5 +1,6 @@ package com.fsck.k9.provider; +import android.annotation.TargetApi; import android.app.Application; import android.content.ContentProvider; import android.content.ContentResolver; @@ -15,6 +16,7 @@ import android.database.DataSetObserver; import android.database.MatrixCursor; import android.net.Uri; import android.os.Binder; +import android.os.Build; import android.os.Bundle; import android.provider.BaseColumns; import android.util.Log; @@ -715,6 +717,12 @@ public class MessageProvider extends ContentProvider { return mCursor.getWantsAllOnMoveCalls(); } + @TargetApi(Build.VERSION_CODES.M) + @Override + public void setExtras(Bundle extras) { + mCursor.setExtras(extras); + } + @Override public boolean isAfterLast() { checkClosed(); diff --git a/plugins/Android-PullToRefresh/library/src/com/handmark/pulltorefresh/library/PullToRefreshWebView.java b/plugins/Android-PullToRefresh/library/src/com/handmark/pulltorefresh/library/PullToRefreshWebView.java index 3f873de08..d1abc5423 100644 --- a/plugins/Android-PullToRefresh/library/src/com/handmark/pulltorefresh/library/PullToRefreshWebView.java +++ b/plugins/Android-PullToRefresh/library/src/com/handmark/pulltorefresh/library/PullToRefreshWebView.java @@ -112,7 +112,7 @@ public class PullToRefreshWebView extends PullToRefreshBase { @Override protected boolean isReadyForPullEnd() { - float exactContentHeight = FloatMath.floor(mRefreshableView.getContentHeight() * mRefreshableView.getScale()); + double exactContentHeight = Math.floor(mRefreshableView.getContentHeight() * mRefreshableView.getScale()); return mRefreshableView.getScrollY() >= (exactContentHeight - mRefreshableView.getHeight()); } @@ -158,7 +158,7 @@ public class PullToRefreshWebView extends PullToRefreshBase { } private int getScrollRange() { - return (int) Math.max(0, FloatMath.floor(mRefreshableView.getContentHeight() * mRefreshableView.getScale()) + return (int) Math.max(0, Math.floor(mRefreshableView.getContentHeight() * mRefreshableView.getScale()) - (getHeight() - getPaddingBottom() - getPaddingTop())); } }