Skip to content

Commit

Permalink
I/O '19 updates
Browse files Browse the repository at this point in the history
- Upgrade a ton of deps and use new alpha features
- Get rid of billing crap since no one donates and Patreon seems better
- Use version codes instead of code names since that's clearer

Signed-off-by: Alex Saveau <[email protected]>
  • Loading branch information
SUPERCILEX committed May 9, 2019
1 parent d07547a commit c845795
Show file tree
Hide file tree
Showing 28 changed files with 69 additions and 395 deletions.
1 change: 0 additions & 1 deletion app/android-base/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,6 @@ dependencies {
implementation(Config.Libs.Jetpack.multidex)
implementation(Config.Libs.Jetpack.work)
implementation(Config.Libs.PlayServices.playCore)
implementation(Config.Libs.Misc.billing)

implementation(Config.Libs.Firebase.perf)
implementation(Config.Libs.Firebase.invites)
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import android.view.MenuItem
import android.view.View
import android.view.ViewOutlineProvider
import androidx.appcompat.app.ActionBarDrawerToggle
import androidx.appcompat.app.AppCompatDelegate
import androidx.core.net.toUri
import androidx.core.view.GravityCompat
import androidx.core.view.children
Expand Down Expand Up @@ -164,10 +163,9 @@ internal class HomeActivity : ActivityBase(), NavigationView.OnNavigationItemSel
}
prefs.asLiveData().observe(this) {
bottomNavigation.menu.findItem(R.id.templates).isEnabled = isTemplateEditingAllowed
if (isSignedIn) delegate.setLocalNightMode(AppCompatDelegate.getDefaultNightMode())
}

if (isInTabletMode() && Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
if (isInTabletMode() && Build.VERSION.SDK_INT >= 21) {
scoutList.outlineProvider = object : ViewOutlineProvider() {
private val padding = resources.getDimensionPixelSize(R.dimen.spacing_mini)

Expand Down Expand Up @@ -250,7 +248,6 @@ internal class HomeActivity : ActivityBase(), NavigationView.OnNavigationItemSel

override fun onNavigationItemSelected(item: MenuItem): Boolean {
when (val id = item.itemId) {
R.id.action_donate -> DonateDialog.show(supportFragmentManager)
R.id.action_donate_patreon ->
launchUrl(this, "https://www.patreon.com/SUPERCILEX".toUri())
else -> runIfSignedIn {
Expand Down Expand Up @@ -320,7 +317,7 @@ internal class HomeActivity : ActivityBase(), NavigationView.OnNavigationItemSel
setReorderingAllowed(false)
} else if (
transitionView != null &&
Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP
Build.VERSION.SDK_INT >= 21
) {
addSharedElement(transitionView, "media")
fragment.sharedElementEnterTransition = fragmentTransition.clone()
Expand Down Expand Up @@ -412,7 +409,8 @@ internal class HomeActivity : ActivityBase(), NavigationView.OnNavigationItemSel
bottomNavigation.selectedItemId = R.id.templates
}
}
containsKey(DONATE_EXTRA) -> DonateDialog.show(supportFragmentManager)
containsKey(DONATE_EXTRA) ->
launchUrl(this@HomeActivity, "https://www.patreon.com/SUPERCILEX".toUri())
containsKey(UPDATE_EXTRA) -> showStoreListing()
}
}
Expand Down Expand Up @@ -458,7 +456,7 @@ internal class HomeActivity : ActivityBase(), NavigationView.OnNavigationItemSel
}

init {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
if (Build.VERSION.SDK_INT >= 21) {
GlobalScope.launch { fragmentTransition }
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ internal class RobotScouter : MultiDexApplication(), Configuration.Provider {
if (BuildConfig.DEBUG) {
// Purposefully put this after initialization since Google is terrible with disk I/O.
val vmBuilder = StrictMode.VmPolicy.Builder().detectAll()
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.P) {
if (Build.VERSION.SDK_INT >= 28) {
vmBuilder.penaltyListener(mainExecutor, StrictMode.OnVmViolationListener {
if (
it !is UntaggedSocketViolation
Expand Down
58 changes: 0 additions & 58 deletions app/android-base/src/main/res/layout/dialog_donate.xml

This file was deleted.

7 changes: 1 addition & 6 deletions app/android-base/src/main/res/menu/home_drawer.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,9 @@
</group>

<group android:id="@+id/three">
<item
android:id="@+id/action_donate"
android:icon="@drawable/ic_donate_grey_24dp"
android:title="@string/donate_title" />

<item
android:id="@+id/action_donate_patreon"
android:icon="@drawable/ic_launch_accent_24dp"
android:icon="@drawable/ic_donate_grey_24dp"
android:title="@string/donate_patreon_title" />

<item
Expand Down
7 changes: 0 additions & 7 deletions app/android-base/src/main/res/values-fr/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,6 @@

<string name="installing_module">Installation du module…</string>

<!-- Donate dialog -->
<string name="donate_title">Faites un don</string>
<string name="donate_amount">%d€</string>
<string name="donate_monthly_message">Faire un don automatiquement chaque mois</string>
<string name="donate_cancel_message">Êtes-vous certains de ne pas vouloir faire de don ? Nous apprécions toute contribution, peu importe la taille !</string>
<string name="donate_thanks_message">Merci beaucoup ! Toute aide possible est grandement appréciée !</string>

<!-- Link activity -->
<string name="link_teams_imported_message">Équipes importées avec succès</string>
<string name="link_uri_parse_error">Erreur : analyse de l\'URL impossible</string>
Expand Down
9 changes: 0 additions & 9 deletions app/android-base/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,7 @@
<string name="sign_in_try_again_title">Try again</string>

<string name="installing_module">Installing module…</string>

<!-- Donate dialog -->
<string name="donate_title">Donate</string>
<string name="donate_patreon_title">Support development</string>
<string name="donate_amount">$%d</string>
<string name="donate_monthly_message">Automatically donate each month</string>
<string name="donate_cancel_message">
Are you sure you don’t want to donate? We appreciate any donation no matter how small!
</string>
<string name="donate_thanks_message">Thank you!!! Any and all help is greatly appreciated!</string>

<!-- Link activity -->
<string name="link_teams_imported_message">Teams successfully imported</string>
Expand Down
Loading

0 comments on commit c845795

Please sign in to comment.