-
Notifications
You must be signed in to change notification settings - Fork 3
feat: merge December 2025 QPR2 Patches (android-16.0.0_r4) #97
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
iusmac
wants to merge
4
commits into
16.0-dev
Choose a base branch
from
16.0-qpr2-dev
base: 16.0-dev
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
* SettingsLib: bump to `android-16.0.0_r4` tag * SettingsLib: bump `minSdk` version to 23 https://android.googlesource.com/platform/frameworks/base/+/40ba4786d08b0618fe77ce7435116dbd41f2fb12 ("Update SettingsLib/DataStore min_sdk_version to 23.") * CollapsingToolbarBaseActivity: add APIs for action button https://android.googlesource.com/platform/frameworks/base/+/7e207744232a1a9f22ba6edafe26d0e575290090 ("Added button in CollapsingToolbar") * CollapsingToolbarBaseActivity: add APIs for trailing buttons (primary/secondary/action) https://android.googlesource.com/platform/frameworks/base/+/5deb69739d62f225dd8ba15f0987250d107a1145 ("[Expressive design] Add trailing buttons to CollapsingToolbar") * CollapsingToolbarBaseActivity: add API to toggle Toolbar trailing buttons Now we have a trailing buttons view holding the action, primary & secondary buttons not just the action button, so refactoring is needed. * CollapsingToolbarBaseActivity: collapse toolbar when hosting multiple fragments https://android.googlesource.com/platform/frameworks/base/+/e0bf8cb02e2bbab0dea2ec1d1153b1b8818b6677 ("Collapse toolbar when hosting multiple fragments") * SettingsLib/CollapsingToolbarBaseActivity: fix compilation issues * ScrollableToolbarItemLayout is a Kotlin class. --- /home/runner/work/7SIM/7SIM/SettingsLib/fwb/packages/SettingsLib/CollapsingToolbarBaseActivity/src/com/android/settingslib/collapsingtoolbar/CollapsingToolbarBaseActivity.java:34: error: cannot find symbol import com.android.settingslib.collapsingtoolbar.widget.ScrollableToolbarItemLayout; ^ symbol: class ScrollableToolbarItemLayout location: package com.android.settingslib.collapsingtoolbar.widget * Bump `Room` to `v2.8.0-alpha01` (`android-16.0.0_r4` tag) * Bump `Material3` to `v1.14.0-alpha02` (`android-16.0.0_r4` tag) * Bump AndroidX deps to `android-16.0.0_r4` tag * CollapsingToolbarBaseActivity: fix compilations errors /home/runner/work/7SIM/7SIM/src/com/github/iusmac/sevensim/ui/components/CollapsingToolbarBaseActivity.java:87: error: cannot find symbol .map((v) -> (View) v.getParent()); ^ symbol: method getParent() location: variable v of type Object * SimPinFeederTest: increase task timeout in CI environment to 5 seconds GitHub Actions runners are very slow sometimes, which timeouts our tests, probably due to JVM waiting for resources from the OS such as processor. We already faced a similar issue in 1b353b0 and 6946b97, so increasing timeout a bit should resolve the issue. To maintain speed when testing locally, we still want to timeout after 3 seconds. org.awaitility.core.ConditionTimeoutException: Condition with Lambda expression in com.github.iusmac.sevensim.telephony.SimPinFeederTest was not fulfilled within 3 seconds. at org.awaitility.core.ConditionAwaiter.await(ConditionAwaiter.java:167) at org.awaitility.core.CallableCondition.await(CallableCondition.java:78) at org.awaitility.core.CallableCondition.await(CallableCondition.java:26) at org.awaitility.core.ConditionFactory.until(ConditionFactory.java:1160) at org.awaitility.core.ConditionFactory.until(ConditionFactory.java:1129) at com.github.iusmac.sevensim.telephony.SimPinFeederTest.assertTaskInState(SimPinFeederTest.java:879) at com.github.iusmac.sevensim.telephony.SimPinFeederTest.test_ShouldUnlockWhenAttemptsRemainingIsAtLeastThree_SinceS(SimPinFeederTest.java:274) --- Another symptom that GitHub Actions runners are very slow, is that we even got a NPE in the SimPinFeeder thread that runs in parallel, because the main/test thread already terminated (due to a fixed timeout), and recycled objects that aren't reachable anymore. Exception in thread "Thread-71" java.lang.NullPointerException: Cannot invoke "android.telephony.TelephonyManager.getSimState()" because "this.mTelephonyManager" is null at com.github.iusmac.sevensim.telephony.SimPinFeeder$SimCard.toString(SimPinFeeder.java:325) at java.base/java.util.Formatter$FormatSpecifier.printString(Formatter.java:3158) at java.base/java.util.Formatter$FormatSpecifier.print(Formatter.java:3036) at java.base/java.util.Formatter.format(Formatter.java:2791) at java.base/java.util.Formatter.format(Formatter.java:2728) at java.base/java.lang.String.format(String.java:4431) at com.github.iusmac.sevensim.Logger.format(Logger.java:112) at com.github.iusmac.sevensim.Logger.v(Logger.java:56) at com.github.iusmac.sevensim.telephony.SimPinFeeder.run(SimPinFeeder.java:99) * SimPinFeederTest: fix compilation errors /home/runner/work/7SIM/7SIM/tests/test/java/com/github/iusmac/sevensim/telephony/SimPinFeederTest.java:120: error: element value must be a constant expression @test(timeout = TASK_WAIT_TIMEOUT_MILLIS) * Revert "fix(ui/PrimarySwitchPreference): address extra divider empty space [Expressive Design] (#79)" This reverts commit 60c5164. * fix(ui/PrimarySwitchPreference): address extra divider empty space [Expressive Design] In the expressive theme introduced in Android 16 (Baklava), the switch preference used in the SIM list activity contains additional space at the beginning of the parent layout causing the title (e.g., SIM name) and summary (e.g., next upcoming schedule) text views that precede it to wrap earlier. * Update golden screenshots for Roborazzi tests
…nner visible (#94) We make the "Background usage required" banner preference visible in SimListFragment's onResume() method, but *sometimes* we get an ArrayIndexOutOfBoundsException from SettingsPreferenceGroupAdapter, which serves as a preferences decorator that updates their drawable's background round corners radius when expressive theme in enabled. The exception raises because the update preference list runnable is posted on the main thread, so that RecyclerView runs first. This is right to do and this issue cannot be reproduced when running on a real device, but it happens only in Robolectric tests, probably due to the paused looper and how Activity lifecycle chain is processed. (Could this be a bug in Robolectric?) As a workaround, we'll preemptively make the banner visible during setup in SimListFragment's onViewCreated() method, so that it's present in the preference's adapter upon binding its view holder, which will pass through the SettingsPreferenceGroupAdapter decorator first and avoid the ArrayIndexOutOfBoundsException. --- java.lang.ArrayIndexOutOfBoundsException: Index 6 out of bounds for length 6 at com.android.settingslib.widget.SettingsPreferenceGroupAdapter.updateBackground(SettingsPreferenceGroupAdapter.kt:185) at com.android.settingslib.widget.SettingsPreferenceGroupAdapter.onBindViewHolder(SettingsPreferenceGroupAdapter.kt:96) at com.android.settingslib.widget.SettingsPreferenceGroupAdapter.onBindViewHolder(SettingsPreferenceGroupAdapter.kt:46) at androidx.recyclerview.widget.RecyclerView$Adapter.onBindViewHolder(RecyclerView.java:7846) at androidx.recyclerview.widget.RecyclerView$Adapter.bindViewHolder(RecyclerView.java:7953) at androidx.recyclerview.widget.RecyclerView$Recycler.tryBindViewHolderByDeadline(RecyclerView.java:6742) at androidx.recyclerview.widget.RecyclerView$Recycler.tryGetViewHolderForPositionByDeadline(RecyclerView.java:7013) at androidx.recyclerview.widget.RecyclerView$Recycler.getViewForPosition(RecyclerView.java:6853) at androidx.recyclerview.widget.RecyclerView$Recycler.getViewForPosition(RecyclerView.java:6849) at androidx.recyclerview.widget.LinearLayoutManager$LayoutState.next(LinearLayoutManager.java:2422) at androidx.recyclerview.widget.LinearLayoutManager.layoutChunk(LinearLayoutManager.java:1722) at androidx.recyclerview.widget.LinearLayoutManager.fill(LinearLayoutManager.java:1682) at androidx.recyclerview.widget.LinearLayoutManager.onLayoutChildren(LinearLayoutManager.java:747) at androidx.recyclerview.widget.RecyclerView.dispatchLayoutStep2(RecyclerView.java:4737) at androidx.recyclerview.widget.RecyclerView.dispatchLayout(RecyclerView.java:4459) at androidx.recyclerview.widget.RecyclerView.onLayout(RecyclerView.java:5011) [...] at org.robolectric.shadows.ShadowPausedLooper$IdlingRunnable.doRun(ShadowPausedLooper.java:677) at org.robolectric.shadows.ShadowPausedLooper$ControlRunnable.run(ShadowPausedLooper.java:599) at org.robolectric.shadows.ShadowPausedLooper$HandlerExecutor.execute(ShadowPausedLooper.java:849) at org.robolectric.shadows.ShadowPausedLooper.executeOnLooper(ShadowPausedLooper.java:765) at org.robolectric.shadows.ShadowPausedLooper.idle(ShadowPausedLooper.java:109) at org.robolectric.shadows.ShadowPausedLooper.idleIfPaused(ShadowPausedLooper.java:193) at org.robolectric.android.controller.ActivityController.visible(ActivityController.java:233) at org.robolectric.android.internal.RoboMonitoringInstrumentation.lambda$startActivitySyncInternal$0(RoboMonitoringInstrumentation.java:143) at org.robolectric.shadows.ShadowInstrumentation.runOnMainSyncNoIdle(ShadowInstrumentation.java:1183) at org.robolectric.android.internal.RoboMonitoringInstrumentation.startActivitySyncInternal(RoboMonitoringInstrumentation.java:125) at org.robolectric.android.internal.LocalActivityInvoker.startActivity(LocalActivityInvoker.java:38) at org.robolectric.android.internal.LocalActivityInvoker.startActivity(LocalActivityInvoker.java:43) at androidx.test.core.app.ActivityScenario.launchInternal(ActivityScenario.java:367) at androidx.test.core.app.ActivityScenario.launch(ActivityScenario.java:237) at com.github.iusmac.sevensim.ui.sim.SimListActivityTestKt.onActivity(SimListActivityTest.kt:992) at com.github.iusmac.sevensim.ui.sim.SimListActivityTestKt.onActivity$default(SimListActivityTest.kt:942) at com.github.iusmac.sevensim.ui.sim.SimListActivityTest$BackgroundRestrictedBanner.test full view when background usage restricted(SimListActivityTest.kt:218)
…t lint warning (#95) Addressing the incomplete commit 0419351 ("chore(SubscriptionSchedulerSummaryBuilder): add support for custom date-time separator"). --- /home/runner/work/7SIM/7SIM/res/values-ko-rKR/strings.xml:28: Warning: Inconsistent number of arguments in formatting string scheduler_start_time_custom_summary; found both 1 here and 2 in values/strings.xml [StringFormatCount] <string name="scheduler_start_time_custom_summary">"<![CDATA[<b><xliff:g name="date_time" example="today, 6 AM">%1$s</xliff:g></b>]]>에 자동으로 켜짐"</string> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /home/runner/work/7SIM/7SIM/res/values/strings.xml:54: Conflicting number of arguments (2) here /home/runner/work/7SIM/7SIM/res/values-ko-rKR/strings.xml:29: Warning: Inconsistent number of arguments in formatting string scheduler_end_time_custom_summary; found both 1 here and 2 in values/strings.xml [StringFormatCount] <string name="scheduler_end_time_custom_summary">"<![CDATA[<b><xliff:g name="date_time" example="today, 10 PM">%1$s</xliff:g></b>]]>에 자동으로 꺼짐"</string> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /home/runner/work/7SIM/7SIM/res/values/strings.xml:55: Conflicting number of arguments (2) here Explanation for issues of type "StringFormatCount": When a formatted string takes arguments, it usually needs to reference the same arguments in all translations (or all arguments if there are no translations. There are cases where this is not the case, so this issue is a warning rather than an error by default. However, this usually happens when a language is not translated or updated correctly. Signed-off-by: iusmac <iusico.maxim@libero.it>
* Bump Gradle to `v8.14.3`
* Bump AGP plugin to `v8.13.2`
* Extract AGP version from Toml file for `com.android.settings` plugin
Unfortunately, we cannot use "alias()" in the "plugins {}" block to
reuse the AGP version from gradle/libs.versions.toml file. Getting an
error instead (happens only in settings.gradle script):
only alias(libs.plugins.someAlias) plugin identifiers where libs is a valid version catalog
* Suppress false positive `GradlePluginVersion` lint check
/home/runner/work/7SIM/7SIM/settings.gradle:22: Error: You must use a newer version of the Android Gradle plugin. The minimum supported version is 4.0.0 and the recommended version is 8.13.2 [GradlePluginVersion]
id 'com.android.settings' version "${apgVersion}"
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Explanation for issues of type "GradlePluginVersion":
Not all versions of the Android Gradle plugin are compatible with all
versions of the SDK. If you update your tools, or if you are trying to open
a project that was built with an old version of the tools, you may need to
update your plugin version number.
* Bump Roborazzi to `v1.54.0`
* Downgrade AGP to `v8.11.2`
The tests fail because our static BroadcastReceiver (AlarmReceiver)
is not listed anymore in ShadowApplication.getRegisteredReceivers().
java.util.NoSuchElementException: No value present
at java.base/java.util.Optional.get(Optional.java:143)
at com.github.iusmac.sevensim.scheduler.AlarmReceiverTest.setUp(AlarmReceiverTest.java:97)
After manual investigation, it seems that Robolectric can't load static
<receiver> components from our AndroidManifest.xml file starting from
AGP 8.12 or newer.
* Fix typo in `settings.gradle`
* Bump Mockito to `v5.21.0`
* Bump Kover coverage library to `v0.9.4`
* Bump `Error Prone` library to `v2.45.0`
* Resolve `Error Prone` warnings/errors
/home/runner/work/7SIM/7SIM/src/com/github/iusmac/sevensim/Logger.java:111: warning: [AnnotateFormatMethod] This method uses a pair of parameters as a format string and its arguments, but the enclosing method wasn't annotated. Doing so gives compile-time rather than run-time protection against malformed format strings.
private static String format(String message, Object... args) {
^
(see https://errorprone.info/bugpattern/AnnotateFormatMethod)
/home/runner/work/7SIM/7SIM/src/com/github/iusmac/sevensim/SystemBroadcastReceiver.java:51: warning: [FormatStringShouldUsePlaceholders] Using a format string avoids string concatenation in the common case.
mLogger.d("onReceive() : intent=" + intent);
^
(see https://errorprone.info/bugpattern/FormatStringShouldUsePlaceholders)
Did you mean 'mLogger.d("onReceive() : intent=%s", intent);'?
/home/runner/work/7SIM/7SIM/src/com/github/iusmac/sevensim/DirectBootAwareBroadcastReceiver.java:46: warning: [FormatStringShouldUsePlaceholders] Using a format string avoids string concatenation in the common case.
mLogger.d("onReceive() : intent=" + intent);
^
(see https://errorprone.info/bugpattern/FormatStringShouldUsePlaceholders)
Did you mean 'mLogger.d("onReceive() : intent=%s", intent);'?
/home/runner/work/7SIM/7SIM/src/com/github/iusmac/sevensim/telephony/Subscriptions.java:76: warning: [FormatStringShouldUsePlaceholders] Using a format string avoids string concatenation in the common case.
mLogger.v("onReceive() : intent=" + intent);
^
(see https://errorprone.info/bugpattern/FormatStringShouldUsePlaceholders)
Did you mean 'mLogger.v("onReceive() : intent=%s", intent);'?
/home/runner/work/7SIM/7SIM/src/com/github/iusmac/sevensim/telephony/SubscriptionController.java:64: error: [FormatStringAnnotation] Local format string variables must only be assigned to compile time constant values. Invalid format string assignment: final String logPrefix = String.format(Locale.getDefault(), "setUiccApplicationsEnabled(subId=%d,enabled=%s)", subId, enabled)
mLogger.d(logPrefix);
^
(see https://errorprone.info/bugpattern/FormatStringAnnotation)
/home/runner/work/7SIM/7SIM/src/com/github/iusmac/sevensim/telephony/SubscriptionController.java:69: warning: [FormatStringShouldUsePlaceholders] Using a format string avoids string concatenation in the common case.
mLogger.e(logPrefix + " Aborting due to missing subscription.");
^
(see https://errorprone.info/bugpattern/FormatStringShouldUsePlaceholders)
Did you mean 'mLogger.e("%s Aborting due to missing subscription.", logPrefix);'?
/home/runner/work/7SIM/7SIM/src/com/github/iusmac/sevensim/telephony/TelephonyController.java:116: warning: [FormatStringShouldUsePlaceholders] Using a format string avoids string concatenation in the common case.
mLogger.w(logPrefix + "Aborting due to Airplane mode.");
^
(see https://errorprone.info/bugpattern/FormatStringShouldUsePlaceholders)
Did you mean 'mLogger.w("%sAborting due to Airplane mode.", logPrefix);'?
/home/runner/work/7SIM/7SIM/src/com/github/iusmac/sevensim/telephony/TelephonyController.java:125: warning: [FormatStringShouldUsePlaceholders] Using a format string avoids string concatenation in the common case.
mLogger.d(logPrefix + "In sync block.");
^
(see https://errorprone.info/bugpattern/FormatStringShouldUsePlaceholders)
Did you mean 'mLogger.d("%sIn sync block.", logPrefix);'?
/home/runner/work/7SIM/7SIM/src/com/github/iusmac/sevensim/telephony/TelephonyController.java:131: warning: [FormatStringShouldUsePlaceholders] Using a format string avoids string concatenation in the common case.
mLogger.e(logPrefix + "Aborting due to missing subscription.");
^
(see https://errorprone.info/bugpattern/FormatStringShouldUsePlaceholders)
Did you mean 'mLogger.e("%sAborting due to missing subscription.", logPrefix);'?
/home/runner/work/7SIM/7SIM/src/com/github/iusmac/sevensim/telephony/TelephonyController.java:137: warning: [FormatStringShouldUsePlaceholders] Using a format string avoids string concatenation in the common case.
mLogger.w(logPrefix + "Already in state.");
^
(see https://errorprone.info/bugpattern/FormatStringShouldUsePlaceholders)
Did you mean 'mLogger.w("%sAlready in state.", logPrefix);'?
/home/runner/work/7SIM/7SIM/src/com/github/iusmac/sevensim/telephony/TelephonyController.java:202: warning: [FormatStringShouldUsePlaceholders] Using a format string avoids string concatenation in the common case.
mLogger.w(logPrefix + "Acquire wait interrupted.");
^
(see https://errorprone.info/bugpattern/FormatStringShouldUsePlaceholders)
Did you mean 'mLogger.w("%sAcquire wait interrupted.", logPrefix);'?
/home/runner/work/7SIM/7SIM/src/com/github/iusmac/sevensim/telephony/TelephonyController.java:297: warning: [FormatStringShouldUsePlaceholders] Using a format string avoids string concatenation in the common case.
default -> mLogger.e(logPrefix + ". Unexpected resCode.");
^
(see https://errorprone.info/bugpattern/FormatStringShouldUsePlaceholders)
Did you mean 'default -> mLogger.e("%s. Unexpected resCode.", logPrefix);'?
/home/runner/work/7SIM/7SIM/src/com/github/iusmac/sevensim/telephony/TelephonyController.java:359: warning: [FormatStringShouldUsePlaceholders] Using a format string avoids string concatenation in the common case.
mLogger.d(logPrefix + ", requestFailed=%s,shouldNotifyAllListeners=%s", requestFailed,
^
(see https://errorprone.info/bugpattern/FormatStringShouldUsePlaceholders)
Did you mean 'mLogger.d("%s, requestFailed=%s,shouldNotifyAllListeners=%s", logPrefix, requestFailed, shouldNotifyAllListeners);'?
/home/runner/work/7SIM/7SIM/src/com/github/iusmac/sevensim/ui/scheduler/SchedulerViewModel.java:428: warning: [FormatStringShouldUsePlaceholders] Using a format string avoids string concatenation in the common case.
mLogger.d("onReceive() : intent=" + intent);
^
(see https://errorprone.info/bugpattern/FormatStringShouldUsePlaceholders)
Did you mean 'mLogger.d("onReceive() : intent=%s", intent);'?
/home/runner/work/7SIM/7SIM/src/com/github/iusmac/sevensim/ui/sim/SimListActivity.java:154: warning: [FormatStringShouldUsePlaceholders] Using a format string avoids string concatenation in the common case.
mLogger.d("onReceive() : intent=" + intent);
^
(see https://errorprone.info/bugpattern/FormatStringShouldUsePlaceholders)
Did you mean 'mLogger.d("onReceive() : intent=%s", intent);'?
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.