Skip to content

Commit

Permalink
feat: DEGGAND-86 Added Android 13 Easter Egg
Browse files Browse the repository at this point in the history
  • Loading branch information
itachi1706 committed May 17, 2024
1 parent 2fe0ccd commit 2b70054
Show file tree
Hide file tree
Showing 6 changed files with 504 additions and 4 deletions.
7 changes: 7 additions & 0 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,13 @@
android:label="@string/title_activity_main_settings" />
<activity android:name=".CurrentEgg" />

<!-- T/Tiramisu (13) Egg Activities -->
<activity android:name=".tiramisu_egg.PlatLogoActivityTiramisu"
android:theme="@style/AppTheme.Wallpaper.NoActionBar.FullScreen"
android:configChanges="orientation|screenSize|screenLayout|keyboardHidden"
android:icon="@drawable/tiramisu_platlogo"
android:process=":ui" />

<!-- S (12) Egg Activities -->
<activity android:name=".snow_cone_egg.PlatLogoActivitySnowCone"
android:theme="@style/AppTheme.Wallpaper.NoActionBar"
Expand Down
2 changes: 2 additions & 0 deletions app/src/main/java/com/itachi1706/droideggs/CurrentEgg.kt
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ import com.itachi1706.droideggs.PieEgg.PlatLogoActivityPie
import com.itachi1706.droideggs.quince_tart_egg.PlatLogoActivityQuinceTart
import com.itachi1706.droideggs.red_velvet_cake_egg.PlatLogoActivityRedVelvetCake
import com.itachi1706.droideggs.snow_cone_egg.PlatLogoActivitySnowCone
import com.itachi1706.droideggs.tiramisu_egg.PlatLogoActivityTiramisu

/**
* Created by Kenneth on 20/4/2018.
Expand Down Expand Up @@ -64,6 +65,7 @@ class CurrentEgg : AppCompatActivity() {
Q -> PlatLogoActivityQuinceTart::class.java // Android 10 (Q)
R -> PlatLogoActivityRedVelvetCake::class.java // Android 11 (R)
S -> PlatLogoActivitySnowCone::class.java // Android 12 (S)
TIRAMISU -> PlatLogoActivityTiramisu::class.java // Android 13 (Tiramisu)
else -> null // Future Android Versions (As minSDK is way above GB, it does not matter to do a check before)
}

Expand Down
2 changes: 2 additions & 0 deletions app/src/main/java/com/itachi1706/droideggs/SelectorOnClick.kt
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ import com.itachi1706.droideggs.PieEgg.PlatLogoActivityPie
import com.itachi1706.droideggs.quince_tart_egg.PlatLogoActivityQuinceTart
import com.itachi1706.droideggs.red_velvet_cake_egg.PlatLogoActivityRedVelvetCake
import com.itachi1706.droideggs.snow_cone_egg.PlatLogoActivitySnowCone
import com.itachi1706.droideggs.tiramisu_egg.PlatLogoActivityTiramisu
import com.itachi1706.helperlib.helpers.PrefHelper
import java.util.*

Expand Down Expand Up @@ -84,6 +85,7 @@ class SelectorOnClick(val act: MainScreen) : AdapterView.OnItemClickListener {
else act.unableToAccessEasterEgg("MARSHMALLOW")
"R" -> if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) selectedEgg = Intent(view.context, PlatLogoActivityRedVelvetCake::class.java) else act.unableToAccessEasterEgg("R")
"S" -> if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q) selectedEgg = Intent(view.context, PlatLogoActivitySnowCone::class.java) else act.unableToAccessEasterEgg("Q")
"T" -> if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q) selectedEgg = Intent(view.context, PlatLogoActivityTiramisu::class.java) else act.unableToAccessEasterEgg("Q")
}
if (selectedEgg != null) {
view.context.startActivity(selectedEgg)
Expand Down
Loading

0 comments on commit 2b70054

Please sign in to comment.