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

Commit 6d4c6cf5 authored by Aayush Gupta's avatar Aayush Gupta
Browse files

Apps: Drop commented out code from everywhere

parent cbf14cfc
Loading
Loading
Loading
Loading
Loading
+0 −2
Original line number Diff line number Diff line
@@ -17,7 +17,6 @@

package foundation.e.apps

//import androidx.fragment.app.ListFragment


import android.annotation.SuppressLint
@@ -94,7 +93,6 @@ class MainActivity : AppCompatActivity(), BottomNavigationView.OnNavigationItemS

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        //ThemeColors(this);
        setContentView(R.layout.activity_main)
        mActivity = this
        disableCategoryIfOpenSource()
+0 −10
Original line number Diff line number Diff line
@@ -54,7 +54,6 @@ class InstallSplitApksActivity : BaseActivity() {
        if (apksBean == null
            || apksBean!!.splitApkPaths.isNullOrEmpty()
            || apksBean!!.packageName.isEmpty()) {
//            SimpleToast.defaultShow(mContext, R.string.install_failed)
            finish()
            return
        }
@@ -124,7 +123,6 @@ class InstallSplitApksActivity : BaseActivity() {
                    startActivity(confirmIntent)
                }
                PackageInstaller.STATUS_SUCCESS -> {
//                    SimpleToast.defaultShow(this, R.string.install_success)
                    finish()
                }
                PackageInstaller.STATUS_FAILURE,
@@ -134,7 +132,6 @@ class InstallSplitApksActivity : BaseActivity() {
                PackageInstaller.STATUS_FAILURE_INCOMPATIBLE,
                PackageInstaller.STATUS_FAILURE_INVALID,
                PackageInstaller.STATUS_FAILURE_STORAGE -> {
//                    SimpleToast.defaultShow(this, R.string.install_failed)
                    finish()
                }
                else -> {}
@@ -157,13 +154,6 @@ class InstallSplitApksActivity : BaseActivity() {
        }
    }

//    override fun onKeyDown(keyCode: Int, event: KeyEvent): Boolean {
//        return if (keyCode == KeyEvent.KEYCODE_BACK) {
//            true
//        } else {
//            super.onKeyDown(keyCode, event)
//        }
//    }

}

+0 −13
Original line number Diff line number Diff line
@@ -24,15 +24,6 @@ import java.util.*

class LocaleUtils {

//    val appLocal: Locale
//        get() {
//            val localValue = Settings.languageValue
//            return if (TextUtils.equals(localValue, MainActivity.mActivity.getString(R.string.language_auto_value))) {
//                systemLocal
//            } else {
//                forLanguageTag(localValue)
//            }
//        }

    val systemLocal: Locale
        get() {
@@ -41,10 +32,6 @@ class LocaleUtils {



//    val appLocalTag: String
//        get() {
//            return toLanguageTag(appLocal)
//        }

    private fun forLanguageTag(languageTag: String): Locale {
        return Locale.forLanguageTag(languageTag)
+0 −6
Original line number Diff line number Diff line
@@ -85,12 +85,6 @@ object ViewUtils {
                        this.dismiss()
                    }
                }
//                when (installError) {
//                    XApkInstallUtils.InstallError.ObbError -> SimpleToast.defaultShow(mContext, R.string.install_obb_failed)
//                    XApkInstallUtils.InstallError.LowerVersionError -> SimpleToast.defaultShow(mContext, R.string.xapk_lower_version_error)
//                    XApkInstallUtils.InstallError.LowerSdkError -> SimpleToast.defaultShow(mContext, R.string.part_xapk_sdk_lower_version_error)
//                    else -> SimpleToast.defaultShow(mContext, R.string.install_failed)
//                }
            }
        })
    }
+0 −33
Original line number Diff line number Diff line
@@ -62,9 +62,6 @@ object XApkInstallUtils {
                        if (this.useSplitApks()) {
                            installSplitApks(xApkFile, zipFile!!,callback, this, xApkInstallProgressCallback)
                        }
//                        else {
//                            installApk(zipFile!!, this, xApkInstallProgressCallback)
//                        }
                    }
                }
            } catch (e: Exception) {
@@ -215,36 +212,6 @@ object XApkInstallUtils {
        }
    }

//    private fun installApk(zipFile: ZipFile, xApkManifest: XApkManifest,
//                           xApkInstallProgressCallback: XApkInstallProgressCallback?){
//        val apkFileName = "${xApkManifest.packageName}.apk"
//        var isApkSuccess = false
//        val tempApk = File(AppFolder.tempFolder, apkFileName)
//        val totalLength = getXApkTotalSize(zipFile, xApkManifest)
//        getZipFileInputStream(zipFile, apkFileName)?.apply {
//            isApkSuccess = FileWriterUtils.writeFileFromIS(tempApk, this, object : FileWriterUtils.FileWriterProgressCallback {
//                var percent = 0
//                override fun onProgress(currentOffset: Long) {
//                    val percent1 = FormatUtils.formatPercent(currentOffset, totalLength)
//                    if (percent1 > percent) {
//                        percent = percent1
//                        handler.post {
//                            xApkInstallProgressCallback?.onApkProgress(currentOffset, totalLength,percent)
//                        }
//                    }
//                }
//            })
//        }
//        if (isApkSuccess) {
//            handler.post {
//                xApkInstallProgressCallback?.onCompedApk(tempApk)
//            }
//        } else {
//            handler.post {
//                xApkInstallProgressCallback?.onError(InstallError.ApkError)
//            }
//        }
//    }

    @WorkerThread
    private fun getZipFileInputStream(zipFile: ZipFile, inputName: String, isRaw: Boolean = false): InputStream? {
Loading