update to API 23
This commit is contained in:
parent
ac131a2919
commit
deff0ce80d
5 changed files with 22 additions and 3 deletions
|
@ -13,7 +13,7 @@ project.ext {
|
|||
preDexLibs = !project.hasProperty('disablePreDex')
|
||||
testCoverage = project.hasProperty('testCoverage')
|
||||
|
||||
compileSdkVersion = 22
|
||||
compileSdkVersion = 23
|
||||
buildToolsVersion = '23.0.1'
|
||||
}
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -112,7 +112,7 @@ public class PullToRefreshWebView extends PullToRefreshBase<WebView> {
|
|||
|
||||
@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<WebView> {
|
|||
}
|
||||
|
||||
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()));
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue