Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion SettingsLib/ButtonPreference/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ android {
namespace 'com.android.settingslib.widget.preference.button'

defaultConfig {
minSdk 21
minSdk 23
versionCode 1
versionName "1.0"
}
Expand Down
1 change: 1 addition & 0 deletions SettingsLib/CollapsingToolbarBaseActivity/build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
plugins {
id 'com.android.library'
id 'org.jetbrains.kotlin.android'
}

def SettingsLibCollapsingToolbarBaseActivity = '../fwb/packages/SettingsLib/CollapsingToolbarBaseActivity'
Expand Down
2 changes: 1 addition & 1 deletion SettingsLib/LayoutPreference/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ android {
namespace 'com.android.settingslib.widget.preference.layout'

defaultConfig {
minSdk 21
minSdk 23
versionCode 1
versionName "1.0"
}
Expand Down
2 changes: 1 addition & 1 deletion SettingsLib/SettingsTheme/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ android {
namespace 'com.android.settingslib.widget.theme'

defaultConfig {
minSdk 21
minSdk 23
versionCode 1
versionName "1.0"
}
Expand Down
2 changes: 1 addition & 1 deletion SettingsLib/SettingsThemeFlags/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ android {
namespace 'com.android.settingslib.widget.theme.flags'

defaultConfig {
minSdk 21
minSdk 23
}

sourceSets {
Expand Down
2 changes: 1 addition & 1 deletion SettingsLib/TwoTargetPreference/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ android {
namespace 'com.android.settingslib.widget.preference.twotarget'

defaultConfig {
minSdk 21
minSdk 23
versionCode 1
versionName "1.0"
}
Expand Down
2 changes: 1 addition & 1 deletion SettingsLib/fetch.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ declare -r SHORT_OPTS=u:,t:
declare -r LONG_OPTS=set-repo-url:,set-repo-tag:,get-repo-url,get-repo-tag,apply-patches-only
declare -r FWB_DIR='fwb'
declare REPO_URL='https://android.googlesource.com/platform/frameworks/base.git'
declare REPO_TAG='android-16.0.0_r1'
declare REPO_TAG='android-16.0.0_r4'
declare -a LIBS=(
'BannerMessagePreference'
'ButtonPreference'
Expand Down
2 changes: 2 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,7 @@ android {
// Instead of failing the build due to missing translations, just inform us to avoid
// mistakes during manual import
informational 'MissingTranslation'
disable 'GradlePluginVersion'
}

dependenciesInfo {
Expand Down Expand Up @@ -267,6 +268,7 @@ dependencies {
exclude group: 'org.hamcrest', module: 'hamcrest-core'
}

implementation libs.errorprone.annotations
errorprone libs.errorprone
annotationProcessor libs.errorprone
testAnnotationProcessor libs.errorprone
Expand Down
37 changes: 19 additions & 18 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@
# https://mvnrepository.com/artifact/androidx.room/room-runtime
# https://android.googlesource.com/platform/prebuilts/sdk/+/refs/heads/main/current/androidx/m2repository/androidx/room/room-compiler/
# https://android.googlesource.com/platform/prebuilts/sdk/+/refs/heads/main/current/androidx/m2repository/androidx/room/room-runtime/
room = "2.7.0-beta01"
room = "2.8.0-alpha01"
# https://mvnrepository.com/artifact/com.google.dagger/hilt-android
# https://mvnrepository.com/artifact/com.google.dagger/hilt-compiler
# https://android.googlesource.com/platform/external/dagger2
hilt = "2.55"
# https://mvnrepository.com/artifact/io.github.takahirom.roborazzi/roborazzi
roborazzi = "1.50.0"
roborazzi = "1.54.0"
# https://mvnrepository.com/artifact/androidx.test.espresso/espresso-core
# https://mvnrepository.com/artifact/androidx.test.espresso/espresso-contrib
espresso = "3.7.0"
Expand All @@ -22,21 +22,21 @@ espresso = "3.7.0"
# ========================================
# https://mvnrepository.com/artifact/com.android.application/com.android.application.gradle.plugin
# https://mvnrepository.com/artifact/com.android.library/com.android.library.gradle.plugin
agp = "8.10.1"
agp = "8.11.2"
# https://plugins.gradle.org/plugin/org.jetbrains.kotlin.android
kotlin = "2.1.10"
# https://mvnrepository.com/artifact/net.ltgt.errorprone/net.ltgt.errorprone.gradle.plugin
errorprone = "4.2.0"
# https://mvnrepository.com/artifact/com.google.errorprone/error_prone_core
errorprone = "2.45.0"
# https://mvnrepository.com/artifact/org.jetbrains.kotlinx/kover-gradle-plugin
kover = "0.9.1"
kover = "0.9.4"

[libraries]
# https://mvnrepository.com/artifact/androidx.activity/activity
# https://android.googlesource.com/platform/prebuilts/sdk/+/refs/heads/main/current/androidx/m2repository/androidx/activity/activity/
activity = { module = "androidx.activity:activity", version = "1.11.0-alpha01" }
activity = { module = "androidx.activity:activity", version = "1.12.0-alpha08" }
# https://mvnrepository.com/artifact/androidx.annotation/annotation
# https://android.googlesource.com/platform/prebuilts/sdk/+/refs/heads/main/current/androidx/m2repository/androidx/annotation/annotation-jvm/
annotation = { module = "androidx.annotation:annotation", version = "1.9.0-rc01" }
annotation = { module = "androidx.annotation:annotation", version = "1.9.1" } # TODO: AOSP sources use 1.11.0-alpha01; upgrade when available in Maven Central
# https://mvnrepository.com/artifact/androidx.appcompat/appcompat
# https://android.googlesource.com/platform/prebuilts/sdk/+/refs/heads/main/current/androidx/m2repository/androidx/appcompat/appcompat/
appcompat = { module = "androidx.appcompat:appcompat", version = "1.7.1" } # TODO: AOSP sources use 1.8.0-alpha01; upgrade when available in Maven Central }
Expand All @@ -46,18 +46,18 @@ arch-core-testing = { module = "androidx.arch.core:core-testing", version = "2.2
awaitility = { module = "org.awaitility:awaitility", version = "4.3.0" }
# https://mvnrepository.com/artifact/androidx.biometric/biometric
# https://android.googlesource.com/platform/prebuilts/sdk/+/refs/heads/main/current/androidx/m2repository/androidx/biometric/biometric/
biometric = { module = "androidx.biometric:biometric", version = "1.4.0-alpha02" }
biometric = { module = "androidx.biometric:biometric", version = "1.4.0-alpha04" }
# https://mvnrepository.com/artifact/androidx.collection/collection
# https://android.googlesource.com/platform/prebuilts/sdk/+/refs/heads/main/current/androidx/m2repository/androidx/collection/collection-jvm/
collection = { module = "androidx.collection:collection", version = "1.5.0-beta03" }
collection = { module = "androidx.collection:collection", version = "1.5.0" }
# https://mvnrepository.com/artifact/androidx.coordinatorlayout/coordinatorlayout
# https://android.googlesource.com/platform/prebuilts/sdk/+/refs/heads/main/current/androidx/m2repository/androidx/coordinatorlayout/coordinatorlayout/
coordinatorlayout = { module = "androidx.coordinatorlayout:coordinatorlayout", version = "1.3.0-alpha02" }
# https://mvnrepository.com/artifact/androidx.core/core
# https://android.googlesource.com/platform/prebuilts/sdk/+/refs/heads/main/current/androidx/m2repository/androidx/core/core/
core = { module = "androidx.core:core", version = "1.16.0-beta01" }
# https://mvnrepository.com/artifact/com.google.errorprone/error_prone_core
errorprone = { module = "com.google.errorprone:error_prone_core", version = "2.42.0" }
core = { module = "androidx.core:core", version = "1.17.0" } # TODO: AOSP sources use 1.19.0-alpha01; upgrade when available in Maven Central }
errorprone = { module = "com.google.errorprone:error_prone_core", version.ref = "errorprone" }
errorprone-annotations = { module = "com.google.errorprone:error_prone_annotations", version.ref = "errorprone" }
# https://mvnrepository.com/artifact/androidx.test.espresso/espresso-core
espresso = { module = "androidx.test.espresso:espresso-core", version.ref = "espresso" }
espresso-contrib = { module = "androidx.test.espresso:espresso-contrib", version.ref = "espresso" }
Expand All @@ -70,12 +70,12 @@ hilt-compiler = { module = "com.google.dagger:hilt-compiler", version.ref = "hil
junit = { module = "junit:junit", version = "4.13.2" }
# https://mvnrepository.com/artifact/androidx.lifecycle/lifecycle-livedata
# https://android.googlesource.com/platform/prebuilts/sdk/+/refs/heads/main/current/androidx/m2repository/androidx/lifecycle/lifecycle-livedata/
livedata = { module = "androidx.lifecycle:lifecycle-livedata", version = "2.9.0-alpha12" }
livedata = { module = "androidx.lifecycle:lifecycle-livedata", version = "2.10.0-alpha04" }
# https://mvnrepository.com/artifact/com.google.android.material/material
# https://android.googlesource.com/platform/prebuilts/sdk/+/refs/heads/main/current/extras/material-design-x/com/google/android/material/material/
material = { module = "com.google.android.material:material", version = "1.13.0-alpha08" }
material = { module = "com.google.android.material:material", version = "1.14.0-alpha02" }
# https://mvnrepository.com/artifact/org.mockito/mockito-core
mockito = { module = "org.mockito:mockito-core", version = "5.20.0" }
mockito = { module = "org.mockito:mockito-core", version = "5.21.0" }
# https://mvnrepository.com/artifact/androidx.preference/preference
# https://android.googlesource.com/platform/prebuilts/sdk/+/refs/heads/main/current/androidx/m2repository/androidx/preference/preference/
preference = { module = "androidx.preference:preference", version = "1.2.1" } # TODO AOSP sources use 1.3.0-alpha01; upgrade when available in Maven Central }
Expand All @@ -101,12 +101,13 @@ test-rules = { module = "androidx.test:rules", version = "1.7.0" }
test-runner = { module = "androidx.test:runner", version = "1.7.0" }
# https://mvnrepository.com/artifact/androidx.lifecycle/lifecycle-viewmodel
# https://android.googlesource.com/platform/prebuilts/sdk/+/refs/heads/main/current/androidx/m2repository/androidx/lifecycle/lifecycle-viewmodel-android/
viewmodel = { module = "androidx.lifecycle:lifecycle-viewmodel", version = "2.9.0-alpha12" }
viewmodel = { module = "androidx.lifecycle:lifecycle-viewmodel", version = "2.10.0-alpha04" }

[plugins]
android-application = { id = "com.android.application", version.ref = "agp" }
android-library = { id = "com.android.library", version.ref = "agp" }
kotlin-android = { id = "org.jetbrains.kotlin.android", version.ref = "kotlin" }
errorprone = { id = "net.ltgt.errorprone", version.ref = "errorprone" }
# https://mvnrepository.com/artifact/net.ltgt.errorprone/net.ltgt.errorprone.gradle.plugin
errorprone = { id = "net.ltgt.errorprone", version = "4.2.0" }
kover = { id = "org.jetbrains.kotlinx.kover", version.ref = "kover" }
roborazzi = { id = "io.github.takahirom.roborazzi", version.ref = "roborazzi" }
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.11.1-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.3-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
Expand Down
4 changes: 2 additions & 2 deletions res/values-ko-rKR/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@
<string name="scheduler_delete_message">"이 작업은 되돌릴 수 없습니다. 계속 하시겠습니까?"</string>
<string name="scheduler_days_of_week_none">"차단하지 않음"</string>
<string name="scheduler_days_of_week_all">"매일"</string>
<string name="scheduler_start_time_custom_summary">"<![CDATA[<b><xliff:g name="date_time" example="today, 6 AM">%1$s</xliff:g></b>]]>에 자동으로 켜짐"</string>
<string name="scheduler_end_time_custom_summary">"<![CDATA[<b><xliff:g name="date_time" example="today, 10 PM">%1$s</xliff:g></b>]]>에 자동으로 꺼짐"</string>
<string name="scheduler_start_time_custom_summary">"<![CDATA[<b><xliff:g name="date_time" example="today, 6 AM">%1$s</xliff:g></b><xliff:g name="date_time_separator">%2$1s</xliff:g>]]>에 자동으로 켜짐"</string>
<string name="scheduler_end_time_custom_summary">"<![CDATA[<b><xliff:g name="date_time" example="today, 10 PM">%1$s</xliff:g></b><xliff:g name="date_time_separator">%2$1s</xliff:g>]]>에 자동으로 꺼짐"</string>
<string name="scheduler_start_time_none_summary">"자동으로 켜지지 <b>않음</b>"</string>
<string name="scheduler_end_time_none_summary">"자동으로 끄지 <b>않음</b>"</string>
<string name="scheduler_no_schedule_summary">"일정 없음"</string>
Expand Down
11 changes: 11 additions & 0 deletions res/values-v36/themes_expressive.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,16 @@

<item name="scheduleCardCollapsedBackgroundColor">@color/settingslib_materialColorSurfaceBright</item>
<item name="scheduleCardExpandedBackgroundColor">@color/settingslib_materialColorSurfaceDim</item>

<item name="expressiveTwoTargetPreferenceTheme">@style/ExpressiveTwoTargetPreferenceTheme.Custom</item>
</style>

<style name="ExpressiveTwoTargetPreferenceTheme.Custom" parent="ExpressiveTwoTargetPreferenceTheme">
<item name="expressiveTwoTargetDividerStyle">@style/ExpressiveTwoTargetDividerStyle.Custom</item>
</style>

<style name="ExpressiveTwoTargetDividerStyle.Custom" parent="ExpressiveTwoTargetDividerStyle">
<!-- Remove unnecessary padding at the start of the divider in the expressive theme. -->
<item name="android:paddingStart">0dip</item>
</style>
</resources>
14 changes: 13 additions & 1 deletion settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,20 @@ pluginManagement {
}
}

buildscript {
ext {
agpVersion = new File(rootProject.projectDir.absoluteFile, "gradle/libs.versions.toml")
.readLines()
.stream()
.filter((line) -> line.startsWith("agp ="))
.map((line) -> line.split('"')[1])
.findFirst()
.get()
}
}

plugins {
id 'com.android.settings' version '8.10.1'
id 'com.android.settings' version "${agpVersion}"
}

dependencyResolutionManagement {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public void onReceive(final Context context, final Intent intent) {

mLogger = mLoggerFactory.create(getClass().getSimpleName());

mLogger.d("onReceive() : intent=" + intent);
mLogger.d("onReceive() : intent=%s", intent);

final LocalDateTime now = LocalDateTime.now(ZoneId.systemDefault());
final String action = intent.getAction() != null ? intent.getAction() : "";
Expand Down
24 changes: 17 additions & 7 deletions src/com/github/iusmac/sevensim/Logger.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@

import androidx.annotation.VisibleForTesting;

import com.google.errorprone.annotations.FormatMethod;
import com.google.errorprone.annotations.FormatString;

import dagger.assisted.Assisted;
import dagger.assisted.AssistedFactory;
import dagger.assisted.AssistedInject;
Expand Down Expand Up @@ -51,31 +54,36 @@ public Logger(final Runtime javaRuntime, final @Named("Debug") boolean debug,
public boolean isErrorLoggable() { return Log.isLoggable(mTag, Log.ERROR); }
public boolean isWtfLoggable() { return Log.isLoggable(mTag, Log.ASSERT); }

public void v(String message, Object... args) {
@FormatMethod
public void v(@FormatString String message, Object... args) {
if (mIsDebuggable || isVerboseLoggable()) {
Log.v(mTag, format(message, args));
}
}

public void d(String message, Object... args) {
@FormatMethod
public void d(@FormatString String message, Object... args) {
if (mIsDebuggable || isDebugLoggable()) {
Log.d(mTag, format(message, args));
}
}

public void i(String message, Object... args) {
@FormatMethod
public void i(@FormatString String message, Object... args) {
if (mIsDebuggable || isInfoLoggable()) {
Log.i(mTag, format(message, args));
}
}

public void w(String message, Object... args) {
@FormatMethod
public void w(@FormatString String message, Object... args) {
if (mIsDebuggable || isWarnLoggable()) {
Log.w(mTag, format(message, args));
}
}

public void e(String message, Object... args) {
@FormatMethod
public void e(@FormatString String message, Object... args) {
if (mIsDebuggable || isErrorLoggable()) {
Log.e(mTag, format(message, args));
}
Expand All @@ -87,7 +95,8 @@ public void e(String message, Throwable e) {
}
}

public void wtf(String message, Object... args) {
@FormatMethod
public void wtf(@FormatString String message, Object... args) {
if (mIsDebuggable || isWtfLoggable()) {
Log.wtf(mTag, format(message, args));
}
Expand All @@ -108,7 +117,8 @@ public interface Factory {
Logger create(String tag);
}

private static String format(String message, Object... args) {
@FormatMethod
private static String format(@FormatString String message, Object... args) {
return args == null || args.length == 0 ? message : String.format(Locale.US, message, args);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public void onReceive(final Context context, final Intent intent) {

mLogger = mLoggerFactory.create(getClass().getSimpleName());

mLogger.d("onReceive() : intent=" + intent);
mLogger.d("onReceive() : intent=%s", intent);

final LocalDateTime now = LocalDateTime.now(ZoneId.systemDefault());
final String action = intent.getAction() != null ? intent.getAction() : "";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,12 +61,12 @@ public void setUiccApplicationsEnabled(final int subId, final boolean enabled) {
final String logPrefix = String.format(Locale.getDefault(), "setUiccApplicationsEnabled(" +
"subId=%d,enabled=%s)", subId, enabled);

mLogger.d(logPrefix);
mLogger.d("%s", logPrefix);

final Subscription sub = mSubscriptions.getSubscriptionForSubId(subId).orElse(null);

if (sub == null) {
mLogger.e(logPrefix + " Aborting due to missing subscription.");
mLogger.e("%s Aborting due to missing subscription.", logPrefix);
mSubscriptions.notifyAllListeners();
return;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ public abstract class Subscriptions implements Iterable<Subscription> {
private final BroadcastReceiver mCarrierConfigChangedReceiver = new BroadcastReceiver() {
@Override
public void onReceive(final Context context, final Intent intent) {
mLogger.v("onReceive() : intent=" + intent);
mLogger.v("onReceive() : intent=%s", intent);

switch (Objects.toString(intent.getAction(), "")) {
case TelephonyManager.ACTION_SIM_CARD_STATE_CHANGED,
Expand Down
Loading