Updated AndroidX

pull/210/head
M66B 2 years ago
parent a6f39a1fac
commit 39eb835d73

@ -2937,9 +2937,9 @@ You'll likely want to disabled [browse on server](#user-content-faq24) too.
The original message view will use a dark background when using a dark theme for Android version 10 and later. The original message view will use a dark background when using a dark theme for Android version 10 and later.
For Android before version 10 Google removed this feature from the [Android System WebView](https://play.google.com/store/apps/details?id=com.google.android.webview), ~~For Android before version 10 Google removed this feature from the [Android System WebView](https://play.google.com/store/apps/details?id=com.google.android.webview),~~
even though it worked fine in most cases. ~~even though it worked fine in most cases.~~
Please see [this issue](https://issuetracker.google.com/issues/237785596) (requires a Google account login) requesting to restore this feature again for more information. ~~Please see [this issue](https://issuetracker.google.com/issues/237785596) (requires a Google account login) requesting to restore this feature again for more information.~~
<br /> <br />

@ -352,8 +352,8 @@ dependencies {
def emoji_version = "1.2.0" def emoji_version = "1.2.0"
def activity_version = "1.6.1" // 1.7.0-alpha01 def activity_version = "1.6.1" // 1.7.0-alpha01
def fragment_version = "1.5.4" // 1.6.0-alpha03 def fragment_version = "1.5.4" // 1.6.0-alpha03
def windows_version = "1.0.0" // 1.1.0-alpha03 def windows_version = "1.0.0" // 1.1.0-alpha04
def webkit_version = "1.5.0" // 1.6.0-alpha02 def webkit_version = "1.6.0-alpha03"
def recyclerview_version = "1.3.0-rc01" def recyclerview_version = "1.3.0-rc01"
def coordinatorlayout_version = "1.2.0" def coordinatorlayout_version = "1.2.0"
def constraintlayout_version = "2.1.4" // 2.2.0-alpha01 def constraintlayout_version = "2.1.4" // 2.2.0-alpha01
@ -364,12 +364,12 @@ dependencies {
def documentfile_version = "1.1.0-alpha01" def documentfile_version = "1.1.0-alpha01"
def lifecycle_version = "2.5.1" // 2.6.0-alpha03 def lifecycle_version = "2.5.1" // 2.6.0-alpha03
def lifecycle_extensions_version = "2.2.0" def lifecycle_extensions_version = "2.2.0"
def room_version = "2.4.3" // 2.5.0-beta01 def room_version = "2.4.3" // 2.5.0-beta02
def sqlite_version = "2.3.0-beta01" def sqlite_version = "2.3.0-beta02"
def requery_version = "3.39.2" def requery_version = "3.39.2"
def paging_version = "2.1.2" // 3.2.0-alpha03 def paging_version = "2.1.2" // 3.2.0-alpha03
def preference_version = "1.2.0" def preference_version = "1.2.0"
def work_version = "2.8.0-beta01" def work_version = "2.8.0-beta02"
def exif_version = "1.3.5" def exif_version = "1.3.5"
def biometric_version = "1.2.0-alpha05" def biometric_version = "1.2.0-alpha05"
def billingclient_version = "4.1.0" def billingclient_version = "4.1.0"

@ -162,7 +162,7 @@ public class ActivityAMP extends ActivityBase {
WebSettings settings = wvAmp.getSettings(); WebSettings settings = wvAmp.getSettings();
boolean dark = (Helper.isDarkTheme(this) && !force_light); boolean dark = (Helper.isDarkTheme(this) && !force_light);
boolean canDarken = WebViewEx.isFeatureSupported(this, WebViewFeature.ALGORITHMIC_DARKENING); boolean canDarken = WebViewEx.isFeatureSupported(this, WebViewFeature.ALGORITHMIC_DARKENING);
if (canDarken && Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q) if (canDarken)
WebSettingsCompat.setAlgorithmicDarkeningAllowed(settings, dark); WebSettingsCompat.setAlgorithmicDarkeningAllowed(settings, dark);
} }

@ -6508,7 +6508,7 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
ibForceLight.setImageLevel(force_light ? 1 : 0); ibForceLight.setImageLevel(force_light ? 1 : 0);
bindBody(message, false); bindBody(message, false);
} else { } else {
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.Q) { if (Build.VERSION.SDK_INT < Build.VERSION_CODES.Q && false) {
View view = LayoutInflater.from(context).inflate(R.layout.dialog_dark, null); View view = LayoutInflater.from(context).inflate(R.layout.dialog_dark, null);
final Button btnIssue = view.findViewById(R.id.btnIssue); final Button btnIssue = view.findViewById(R.id.btnIssue);

@ -85,7 +85,7 @@ public class FragmentDialogOpenFull extends FragmentDialogBase {
boolean dark = (Helper.isDarkTheme(context) && !force_light); boolean dark = (Helper.isDarkTheme(context) && !force_light);
boolean canDarken = WebViewEx.isFeatureSupported(context, WebViewFeature.ALGORITHMIC_DARKENING); boolean canDarken = WebViewEx.isFeatureSupported(context, WebViewFeature.ALGORITHMIC_DARKENING);
if (canDarken && Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q) if (canDarken)
WebSettingsCompat.setAlgorithmicDarkeningAllowed(settings, dark); WebSettingsCompat.setAlgorithmicDarkeningAllowed(settings, dark);
settings.setLoadsImagesAutomatically(true); settings.setLoadsImagesAutomatically(true);

@ -124,7 +124,7 @@ public class WebViewEx extends WebView implements DownloadListener, View.OnLongC
// https://developer.android.com/reference/android/webkit/WebSettings#setAlgorithmicDarkeningAllowed(boolean) // https://developer.android.com/reference/android/webkit/WebSettings#setAlgorithmicDarkeningAllowed(boolean)
// https://developer.mozilla.org/en-US/docs/Web/CSS/@media/prefers-color-scheme // https://developer.mozilla.org/en-US/docs/Web/CSS/@media/prefers-color-scheme
boolean canDarken = WebViewEx.isFeatureSupported(context, WebViewFeature.ALGORITHMIC_DARKENING); boolean canDarken = WebViewEx.isFeatureSupported(context, WebViewFeature.ALGORITHMIC_DARKENING);
if (canDarken && Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q) if (canDarken)
WebSettingsCompat.setAlgorithmicDarkeningAllowed(settings, dark && !force_light); WebSettingsCompat.setAlgorithmicDarkeningAllowed(settings, dark && !force_light);
setBackgroundColor(canDarken && dark && !force_light ? Color.TRANSPARENT : Color.WHITE); setBackgroundColor(canDarken && dark && !force_light ? Color.TRANSPARENT : Color.WHITE);

Loading…
Cancel
Save