Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 108cdc4b authored by tibbi's avatar tibbi
Browse files

add support for Contacts being Pro

parent aa274b72
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -7,7 +7,7 @@ buildscript {
        propMinSdkVersion = 21
        propTargetSdkVersion = propCompileSdkVersion
        propVersionCode = 1
        propVersionName = '5.3.10'
        propVersionName = '5.3.11'
        kotlin_version = '1.3.0'
    }

+6 −0
Original line number Diff line number Diff line
@@ -14,11 +14,17 @@ class UpgradeToProDialog(val activity: Activity) {
    private val FIRST_APPS_FREE_TILL = 1541980800000L     // November 12
    private val NOV_12 = "Nov 12 2018"

    private val CONTACTS_FREE_TILL = 1542067200000L     // November 13
    private val NOV_13 = "Nov 13 2018"

    init {
        var text = activity.getString(R.string.upgrade_to_pro_long)
        if ((packageName.endsWith("draw") || packageName.endsWith("gallery") || packageName.endsWith("filemanager")) && System.currentTimeMillis() < FIRST_APPS_FREE_TILL) {
            val freeTill = String.format(activity.getString(R.string.it_is_free), NOV_12)
            text += "\n$freeTill"
        } else if (packageName.endsWith("contacts") && System.currentTimeMillis() < CONTACTS_FREE_TILL) {
            val freeTill = String.format(activity.getString(R.string.it_is_free), NOV_13)
            text += "\n$freeTill"
        }

        val view = activity.layoutInflater.inflate(R.layout.dialog_upgrade_to_pro, null).apply {
+1 −1
Original line number Diff line number Diff line
@@ -250,4 +250,4 @@ fun getConflictResolution(resolutions: LinkedHashMap<String, Int>, path: String)
    }
}

val proPackages = arrayListOf("draw", "gallery", "filemanager")
val proPackages = arrayListOf("draw", "gallery", "filemanager", "contacts")