Build against android 13, resolve new deprecated APIs
This commit is contained in:
parent
fa2db54804
commit
ff11df007f
@ -32,7 +32,7 @@ android {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
compileSdk = 32
|
compileSdk = 33
|
||||||
buildToolsVersion = "33.0.0"
|
buildToolsVersion = "33.0.0"
|
||||||
|
|
||||||
defaultConfig {
|
defaultConfig {
|
||||||
|
@ -6,6 +6,7 @@ import android.content.pm.PackageInfo;
|
|||||||
import android.content.res.ColorStateList;
|
import android.content.res.ColorStateList;
|
||||||
import android.graphics.Color;
|
import android.graphics.Color;
|
||||||
import android.net.Uri;
|
import android.net.Uri;
|
||||||
|
import android.os.Build;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
import android.view.Gravity;
|
import android.view.Gravity;
|
||||||
@ -376,7 +377,11 @@ public class PdfViewer extends AppCompatActivity implements LoaderManager.Loader
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (savedInstanceState != null) {
|
if (savedInstanceState != null) {
|
||||||
mUri = savedInstanceState.getParcelable(STATE_URI);
|
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.TIRAMISU) {
|
||||||
|
mUri = savedInstanceState.getParcelable(STATE_URI);
|
||||||
|
} else {
|
||||||
|
mUri = savedInstanceState.getParcelable(STATE_URI, Uri.class);
|
||||||
|
}
|
||||||
mPage = savedInstanceState.getInt(STATE_PAGE);
|
mPage = savedInstanceState.getInt(STATE_PAGE);
|
||||||
mZoomRatio = savedInstanceState.getFloat(STATE_ZOOM_RATIO);
|
mZoomRatio = savedInstanceState.getFloat(STATE_ZOOM_RATIO);
|
||||||
mDocumentOrientationDegrees = savedInstanceState.getInt(STATE_DOCUMENT_ORIENTATION_DEGREES);
|
mDocumentOrientationDegrees = savedInstanceState.getInt(STATE_DOCUMENT_ORIENTATION_DEGREES);
|
||||||
|
Loading…
Reference in New Issue
Block a user