diff --git a/app/cronet-proguard-rules.pro b/app/cronet-proguard-rules.pro index f2737579a..4bd3e4aa0 100644 --- a/app/cronet-proguard-rules.pro +++ b/app/cronet-proguard-rules.pro @@ -1,20 +1,19 @@ -# -------- Config Path: base/android/proguard/chromium_code.flags -------- +# -------- Config Path: base/android/proguard/shared_with_cronet.flags -------- # Copyright 2016 The Chromium Authors # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. -# Contains flags that can be safely shared with Cronet, and thus would be -# appropriate for third-party apps to include. +# Contains flags that we want to apply not only to Chromium APKs, but also to +# third-party apps that bundle the Cronet library. -# Allow unused native methods to be removed, but prevent renaming on those that are kept. --keepclasseswithmembernames,includedescriptorclasses,allowaccessmodification class !cr_allowunused,** { - native ; -} +# WARNING: rules in this file are applied to entire third-party APKs, not just +# Chromium code. They MUST be scoped appropriately to avoid side effects on app +# code that we do not own. -# Use assumevalues block instead of assumenosideeffects block because Google3 proguard cannot parse -# assumenosideeffects blocks which overwrite return value. -# chromium_code.flags rather than remove_logging.flags so that it's included -# in cronet. +# Use assumevalues block instead of assumenosideeffects block because Google3 +# proguard cannot parse assumenosideeffects blocks which overwrite return +# value. Keep this in shared_with_cronet.flags rather than remove_logging.flags +# so that it's included in cronet. -assumevalues class org.chromium.base.Log { static boolean isDebug() return false; } @@ -37,21 +36,10 @@ public static **[] values(); } -# -identifiernamestring doesn't keep the module impl around, we have to -# explicitly keep it. --if @org.chromium.components.module_installer.builder.ModuleInterface interface * --keep,allowobfuscation,allowaccessmodification class !cr_allowunused,** extends <1> { - (); -} - # Required to remove fields until b/274802355 is resolved. -assumevalues class !cr_allowunused,** { final org.chromium.base.ThreadUtils$ThreadChecker * return _NONNULL_; } - -# TODO(agrieve): Remove once we start to use Android U SDK. --dontwarn android.window.BackEvent --dontwarn android.window.OnBackAnimationCallback # -------- Config Path: build/android/chromium_annotations.flags -------- # Copyright 2022 The Chromium Authors # Use of this source code is governed by a BSD-style license that can be @@ -113,6 +101,22 @@ -identifiernamestring class * { @org.chromium.build.annotations.IdentifierNameString *; } + +# Mark fields with this to help R8 figure out that they cannot be null. +# Use assumevalues in addition to assumenosideeffects block because Google3 proguard cannot parse +# assumenosideeffects blocks which overwrite return value. +-assumevalues class ** { + @org.chromium.build.annotations.AssumeNonNull *** *(...) return _NONNULL_; +} +-assumenosideeffects class ** { + @org.chromium.build.annotations.AssumeNonNull *** *(...); +} +-assumevalues class ** { + @org.chromium.build.annotations.AssumeNonNull *** * return _NONNULL_; +} +-assumenosideeffects class ** { + @org.chromium.build.annotations.AssumeNonNull *** *; +} # -------- Config Path: components/cronet/android/cronet_impl_common_proguard.cfg -------- # Proguard config for apps that depend on cronet_impl_common_java.jar. @@ -227,3 +231,10 @@ -keepclasseswithmembers,includedescriptorclasses,allowaccessmodification class ** { @org.jni_zero.CalledByNativeUnchecked ; } + +# Allow unused native methods to be removed, but prevent renaming on those that +# are kept. +# TODO(crbug.com/315973491): Restrict the broad scope of this rule. +-keepclasseswithmembernames,includedescriptorclasses,allowaccessmodification class ** { + native ; +} \ No newline at end of file diff --git a/app/cronetlib/cronet_api.jar b/app/cronetlib/cronet_api.jar index b7a63bbca..2fd3b157c 100644 Binary files a/app/cronetlib/cronet_api.jar and b/app/cronetlib/cronet_api.jar differ diff --git a/app/cronetlib/cronet_impl_common_java.jar b/app/cronetlib/cronet_impl_common_java.jar index 4bbe0a8d9..41b8cebd9 100644 Binary files a/app/cronetlib/cronet_impl_common_java.jar and b/app/cronetlib/cronet_impl_common_java.jar differ diff --git a/app/cronetlib/cronet_impl_native_java.jar b/app/cronetlib/cronet_impl_native_java.jar index 842cdea6f..f7ddbdb8a 100644 Binary files a/app/cronetlib/cronet_impl_native_java.jar and b/app/cronetlib/cronet_impl_native_java.jar differ diff --git a/app/cronetlib/cronet_impl_platform_java.jar b/app/cronetlib/cronet_impl_platform_java.jar index 05468748d..1352e7f14 100644 Binary files a/app/cronetlib/cronet_impl_platform_java.jar and b/app/cronetlib/cronet_impl_platform_java.jar differ diff --git a/app/cronetlib/cronet_shared_java.jar b/app/cronetlib/cronet_shared_java.jar index 2700521b4..8189ca19d 100644 Binary files a/app/cronetlib/cronet_shared_java.jar and b/app/cronetlib/cronet_shared_java.jar differ diff --git a/app/src/main/assets/cronet.json b/app/src/main/assets/cronet.json index 412a3d89c..cc5de6987 100644 --- a/app/src/main/assets/cronet.json +++ b/app/src/main/assets/cronet.json @@ -1 +1 @@ -{"arm64-v8a":"bbf2c50d1ebf0763d451b08e290a3244","armeabi-v7a":"ecb872f7b1b5342f4d7c36262bec0600","x86":"4da4832b89e2412d808c5b1ecdc24e3d","x86_64":"62080f051db02ed0e939affb39ce67fb","version":"123.0.6312.80"} \ No newline at end of file +{"x86":"4d5fe1bc02fc4fb6665f67432cc73fbd","arm64-v8a":"f2c2fce1963d94a69a94df6fd1192516","armeabi-v7a":"159a459afb43d5673797fcf56a25bcfe","x86_64":"bccadd9e510731eb5256234707df67ea","version":"126.0.6478.71"} \ No newline at end of file diff --git a/app/src/main/assets/updateLog.md b/app/src/main/assets/updateLog.md index bc4983fe8..98d1400a6 100644 --- a/app/src/main/assets/updateLog.md +++ b/app/src/main/assets/updateLog.md @@ -13,6 +13,7 @@ * 漫画源看书显示乱码,**阅读与其他软件的源并不通用**,请导入阅读的支持的漫画源! **2024/02/27** +* 更新cronet: 126.0.6478.71 * 更新cronet: 123.0.6312.80 * 更新cronet: 123.0.6312.40 diff --git a/gradle.properties b/gradle.properties index 908bccc9f..0149e48eb 100644 --- a/gradle.properties +++ b/gradle.properties @@ -42,7 +42,7 @@ android.defaults.buildfeatures.shaders=false # and none from the library's dependencies, thereby reducing the size of the R class for that library. android.nonTransitiveRClass=true # https://chromiumdash.appspot.com/releases?platform=Android -CronetVersion=123.0.6312.80 -CronetMainVersion=123.0.0.0 +CronetVersion=126.0.6478.71 +CronetMainVersion=126.0.0.0 android.injected.testOnly=false android.nonFinalResIds=true \ No newline at end of file