Skip to content

Commit

Permalink
Set rounded corners diameter automatically for Vsmart Live.
Browse files Browse the repository at this point in the history
(set sysui_rounded_content_padding)
  • Loading branch information
aljjo committed Jun 16, 2020
1 parent c330aca commit 4f7d3c6
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
2 changes: 1 addition & 1 deletion app/src/main/java/me/phh/treble/app/EntryService.kt
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ class EntryService: Service() {
tryC { Lenovo.startup(this) }
tryC { OnePlus.startup(this) }
tryC { Oppo.startup(this) }
tryC { OverlayPicker.startup(this) }
tryC { Doze.startup(this) }
tryC { Huawei.startup(this) }
tryC { Misc.startup(this) }
Expand All @@ -42,6 +41,7 @@ class EntryService: Service() {
tryC { Xiaomi.startup(this) }
tryC { Qualcomm.startup(this) }
tryC { Vsmart.startup(this) }
tryC { OverlayPicker.startup(this) }
}
}

Expand Down
11 changes: 11 additions & 0 deletions app/src/main/java/me/phh/treble/app/OverlayPicker.kt
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,16 @@ object OverlayPicker: EntryStartup {
}
}

fun handleVsmart(ctxt: Context) {
if(vendorFp == null) return

if(vendorFp.matches(Regex("vsmart/V620A_open.*"))) {
val sp = PreferenceManager.getDefaultSharedPreferences(ctxt)
if(sp.getString(MiscSettings.roundedCorners, "-1").toInt() == -1)
sp.edit().putString(MiscSettings.roundedCorners, "12").commit()
}
}

fun handleXiaomi(ctxt: Context) {
if(vendorFp == null) return

Expand All @@ -62,6 +72,7 @@ object OverlayPicker: EntryStartup {
enableLte(ctxt)
handleNokia(ctxt)
handleSamsung(ctxt)
handleVsmart(ctxt)
handleXiaomi(ctxt)

setOverlayEnabled("me.phh.treble.overlay.systemui.falselocks", true)
Expand Down

0 comments on commit 4f7d3c6

Please sign in to comment.