Skip to content

Commit

Permalink
CHANGELOG: A14: Fixed lockscreen "toggle" shortcuts not changing colors
Browse files Browse the repository at this point in the history
  • Loading branch information
siavash79 committed Jan 15, 2024
1 parent 02b02fd commit 2f2e8ec
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .github/edit2MakeNewCanary
Original file line number Diff line number Diff line change
@@ -1 +1 @@
Editing this file will trigger the build script for a new canary.
Editing this file will trigger the build script for a new canary..
Original file line number Diff line number Diff line change
Expand Up @@ -311,13 +311,13 @@ protected void afterHookedMethod(MethodHookParam param) throws Throwable {
try {
v.getDrawable().setTintList(ColorStateList.valueOf(wallpaperTextColorAccent));
v.setBackgroundTintList(ColorStateList.valueOf(Color.TRANSPARENT));
} catch (Throwable ignored) {
}
} else {
@SuppressLint("DiscouragedApi") int mTextColorPrimary = SettingsLibUtilsProvider.getColorAttrDefaultColor(
} catch (Throwable ignored) {}
} else if (Build.VERSION.SDK_INT < Build.VERSION_CODES.UPSIDE_DOWN_CAKE){
int mTextColorPrimary = SettingsLibUtilsProvider.getColorAttrDefaultColor(
mContext.getResources().getIdentifier("textColorPrimary", "attr", "android"), mContext);

@SuppressLint("DiscouragedApi") ColorStateList colorSurface = SettingsLibUtilsProvider.getColorAttr(
@SuppressLint("DiscouragedApi")
ColorStateList colorSurface = SettingsLibUtilsProvider.getColorAttr(
mContext.getResources().getIdentifier("colorSurface", "attr", "android"), mContext);

v.getDrawable().setTint(mTextColorPrimary);
Expand Down Expand Up @@ -657,6 +657,12 @@ private void setMiddleText() {

public static String getPowerIndicationString()
{
return (String) callMethod(instance.KeyguardIndicationController, "computePowerIndication");
try {
return (String) callMethod(instance.KeyguardIndicationController, "computePowerIndication");
}
catch (Throwable ignored)
{
return ResourceManager.modRes.getString(R.string.power_indication_error);
}
}
}
1 change: 1 addition & 0 deletions app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -345,6 +345,7 @@

<!-- SystemUI hook -->
<string name="battery_info_button_title">Battery info…</string>
<string name="power_indication_error">Error fetching charging data</string>

<!-- Call section -->
<string name="vibrate_on_call_active_title">Vibrate on outgoing call answered</string>
Expand Down

0 comments on commit 2f2e8ec

Please sign in to comment.