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

Commit e0c686ee authored by Aayush Gupta's avatar Aayush Gupta
Browse files

Merge branch 'v1.3.0' into 'master'

Bump to v1.3.0

See merge request e/apps/apps!66

- Complete view binding migration
- Resolve multiple compile-time warnings
- Upstream deprecated code and dependencies
- Resolve some open backlog issues
- Refactor current updates and accent color implementation
parents 6374a3af 24107a8d
Loading
Loading
Loading
Loading
Loading
+10 −29
Original line number Diff line number Diff line
plugins {
    id 'com.android.application'
    id 'kotlin-android'
    id 'kotlin-android-extensions'
    id 'kotlin-kapt'
    id 'kotlin-parcelize'
}

android {
    compileSdkVersion 29
    buildToolsVersion '29.0.2'
    compileSdkVersion 30
    buildToolsVersion '30.0.3'

    defaultConfig {
        applicationId "foundation.e.apps"
        minSdkVersion 25
        targetSdkVersion 29
        versionCode 10
        versionName "1.2.0"
        versionName "1.3.0"

        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
        vectorDrawables.useSupportLibrary = true
    }

    signingConfigs {
@@ -47,9 +46,7 @@ android {
    lintOptions {
        lintConfig file("lint.xml")
        disable 'MissingTranslation'
    }
    androidExtensions {
        experimental = true
        disable 'NullSafeMutableLiveData'
    }
    aaptOptions {
        additionalParameters '-I', 'app/e-ui-sdk.jar'
@@ -81,41 +78,25 @@ dependencies {
    // Preference
    implementation "androidx.preference:preference-ktx:1.1.1"

    // Lifecycle
    implementation "androidx.lifecycle:lifecycle-viewmodel-ktx:2.3.1"

    // Bouncy Castle
    implementation 'org.bouncycastle:bcpg-jdk15on:1.60'

    // GSON
    implementation 'com.google.code.gson:gson:2.8.6'

    // EventBus
    implementation 'org.greenrobot:eventbus:3.2.0'

    // Volley
    implementation "com.android.volley:volley:1.2.0"

    // PhotoView
    implementation "com.github.chrisbanes:PhotoView:2.3.0"

    // RoundedImageView
    implementation "com.makeramen:roundedimageview:2.3.0"

    // RecyclerView
    implementation 'androidx.recyclerview:recyclerview:1.2.0'

    // WorkManager
    implementation 'androidx.work:work-runtime:2.5.0'
    implementation 'androidx.work:work-runtime-ktx:2.5.0'

    // Android-Iconics
    implementation 'com.mikepenz:iconics-core:3.1.0@aar'
    implementation 'com.mikepenz:google-material-typeface:3.0.1.2.original@aar'

    // Vectordrawable
    def vector_version = "1.1.0"
    implementation "androidx.vectordrawable:vectordrawable:$vector_version"
    implementation "androidx.vectordrawable:vectordrawable-animated:$vector_version"
    // Lifecycle
    def lifecycle_version = "2.3.1"
    implementation "androidx.lifecycle:lifecycle-viewmodel-ktx:$lifecycle_version"
    implementation "androidx.lifecycle:lifecycle-livedata-ktx:$lifecycle_version"

    // Navigation component
    def nav_version = "2.3.5"
+7 −0
Original line number Diff line number Diff line
@@ -75,6 +75,13 @@
            android:launchMode="singleInstance"
            android:theme="@style/AppTheme1"
            android:windowSoftInputMode="adjustResize" />

        <receiver android:name=".updates.UpdatesManager">
            <intent-filter>
                <action android:name="android.intent.action.BOOT_COMPLETED"/>
            </intent-filter>
        </receiver>

    </application>

</manifest>
 No newline at end of file
+5 −25
Original line number Diff line number Diff line
@@ -52,7 +52,7 @@ import foundation.e.apps.updates.UpdatesManager
import foundation.e.apps.utils.Common
import foundation.e.apps.utils.Constants
import foundation.e.apps.utils.Constants.CURRENTLY_SELECTED_FRAGMENT_KEY

import kotlin.properties.Delegates

class MainActivity : AppCompatActivity(), BottomNavigationView.OnNavigationItemSelectedListener,
        ApplicationManagerServiceConnectionCallback {
@@ -67,7 +67,7 @@ class MainActivity : AppCompatActivity(), BottomNavigationView.OnNavigationItemS
    private val codeRequestPermissions = 9527
    var doubleBackToExitPressedOnce = false;
    private var isReceiverRegistered = false
    var accentColorOS = 0
    private var accentColorOS by Delegates.notNull<Int>()

    init {
        instance = this
@@ -96,6 +96,9 @@ class MainActivity : AppCompatActivity(), BottomNavigationView.OnNavigationItemS

        super.onCreate(savedInstanceState)
        setContentView(binding.root)

        accentColorOS = Common.getAccentColor(this)

        mActivity = this
        disableCategoryIfOpenSource()

@@ -114,9 +117,6 @@ class MainActivity : AppCompatActivity(), BottomNavigationView.OnNavigationItemS

        Common.updateMicroGStatus(this)

        initialiseUpdatesWorker()


        // Show the home fragment by default
        currentFragmentId = if (savedInstanceState != null &&
                savedInstanceState.containsKey(CURRENTLY_SELECTED_FRAGMENT_KEY)) {
@@ -129,7 +129,6 @@ class MainActivity : AppCompatActivity(), BottomNavigationView.OnNavigationItemS
        setupLangReceiver()
        applicationManagerServiceConnection.bindService(this)

        getAccentColor();
        bottom_navigation_view_color()
        openSearchFragment()
    }
@@ -168,12 +167,6 @@ class MainActivity : AppCompatActivity(), BottomNavigationView.OnNavigationItemS

    }

    private fun initialiseUpdatesWorker() {
        UpdatesManager(applicationContext).startWorker()


    }

    override fun onServiceBind(applicationManager: ApplicationManager) {
        initialiseFragments(applicationManager)
        selectFragment(currentFragmentId, null)
@@ -341,17 +334,4 @@ class MainActivity : AppCompatActivity(), BottomNavigationView.OnNavigationItemS
            }
        }, 2000)
    }

    /*
    * get Accent color from OS
    *
    *  */
    private fun getAccentColor() {

        accentColorOS = this.getColor(R.color.colorAccent);



    }

}
+1 −1
Original line number Diff line number Diff line
@@ -19,7 +19,7 @@ package foundation.e.apps.XAPK

import android.annotation.SuppressLint
import android.os.Parcelable
import kotlinx.android.parcel.Parcelize
import kotlinx.parcelize.Parcelize

@SuppressLint("ParcelCreator")
@Parcelize
+0 −1
Original line number Diff line number Diff line
@@ -17,7 +17,6 @@

package foundation.e.apps.XAPK

import android.os.Environment
import foundation.e.apps.BuildConfig
import foundation.e.apps.MainActivity
import java.io.File
Loading