Revert "solve API 30 deprecation with getSystemWindowInsetTop"

This reverts commit 851dd55d43.
This commit is contained in:
Daniel Micay 2022-02-07 00:30:41 -05:00
parent 17db928149
commit 993923ff92

View File

@ -6,7 +6,6 @@ import android.content.Intent;
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;
@ -165,9 +164,6 @@ public class PdfViewer extends AppCompatActivity implements LoaderManager.Loader
} }
mWebView.setOnApplyWindowInsetsListener((view, insets) -> { mWebView.setOnApplyWindowInsetsListener((view, insets) -> {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.R)
insets.getInsets(windowInsetTop);
else
windowInsetTop = insets.getSystemWindowInsetTop(); windowInsetTop = insets.getSystemWindowInsetTop();
mWebView.evaluateJavascript("updateInset()", null); mWebView.evaluateJavascript("updateInset()", null);
return insets; return insets;