File tree Expand file tree Collapse file tree
src/main/java/app/grapheneos/pdfviewer Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -32,7 +32,7 @@ android {
3232 }
3333 }
3434
35- compileSdk = 32
35+ compileSdk = 33
3636 buildToolsVersion = " 33.0.0"
3737
3838 defaultConfig {
Original file line number Diff line number Diff line change 66import android .content .res .ColorStateList ;
77import android .graphics .Color ;
88import android .net .Uri ;
9+ import android .os .Build ;
910import android .os .Bundle ;
1011import android .util .Log ;
1112import android .view .Gravity ;
@@ -376,7 +377,11 @@ public void onZoomEnd() {
376377 }
377378
378379 if (savedInstanceState != null ) {
379- mUri = savedInstanceState .getParcelable (STATE_URI );
380+ if (Build .VERSION .SDK_INT < Build .VERSION_CODES .TIRAMISU ) {
381+ mUri = savedInstanceState .getParcelable (STATE_URI );
382+ } else {
383+ mUri = savedInstanceState .getParcelable (STATE_URI , Uri .class );
384+ }
380385 mPage = savedInstanceState .getInt (STATE_PAGE );
381386 mZoomRatio = savedInstanceState .getFloat (STATE_ZOOM_RATIO );
382387 mDocumentOrientationDegrees = savedInstanceState .getInt (STATE_DOCUMENT_ORIENTATION_DEGREES );
You can’t perform that action at this time.
0 commit comments