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

Apps: Drop commented out code from everywhere


Signed-off-by: Aayush Gupta's avatarAayush Gupta <theimpulson@e.email>
parent cbf14cfc
Pipeline #109778 passed with stage
in 2 minutes and 50 seconds
......@@ -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()
......
......@@ -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)
// }
// }
}
......
......@@ -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)
......
......@@ -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)
// }
}
})
}
......
......@@ -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? {
......
......@@ -73,18 +73,6 @@ data class XApkManifest (@Expose
fun useObbs() = !this.expansionList.isNullOrEmpty()
// fun getLocalLabel(): String {
// val localeTag = LocaleUtils().appLocalTag
// var label1 = this.label
// localesLabel?.let {
// if (it.containsKey(localeTag)) {
// it[localeTag]?.let { it2 ->
// label1 = it2
// }
// }
// }
// return label1
// }
}
......@@ -172,16 +172,6 @@ class ApplicationActivity :
override fun onOptionsItemSelected(item: MenuItem?): Boolean {
when (item?.itemId) {
/*R.id.action_share -> {
if (::application.isInitialized) {
val shareIntent = Intent().apply {
action = Intent.ACTION_SEND
putExtra(Intent.EXTRA_TEXT, WEB_STORE_URL + application.basicData!!.id)
type = "text/plain"
}
startActivity(shareIntent)
}
}*/
android.R.id.home -> {
finish()
}
......
......@@ -152,7 +152,6 @@ class ApplicationViewHolder(private val activity: Activity, private val view: Vi
override fun stateChanged(state: State) {
Execute({}, {
// installButton.setBackgroundResource(R.drawable.app_install_border_simple)
installButton.text = activity.getString(state.installButtonTextId)
when (state) {
......
......@@ -79,12 +79,10 @@ class Application(val packageName: String, private val applicationManager: Appli
stateManager.find(context, basicData!!)
} else if (searchAppsBasicData != null) {
if (searchAppsBasicData!!.is_pwa) {
// stateManager.pwaFind()
} else {
stateManager.searchAppsFind(context, searchAppsBasicData!!)
}
} else if (pwabasicdata != null) {
// stateManager.pwaFind()
}
}
......
......@@ -65,7 +65,6 @@ class CategoriesListAdapter(private val context: Context, private var categories
holder.categoryIcon.setImageDrawable(AppCompatResources.getDrawable(context, categories[position].getIconResource()))
//holder.categoryIcon.setColorFilter(Color.parseColor("#0088ED"))
if (color != null) {
holder.categoryIcon.setColorFilter(color)
}
......
......@@ -17,8 +17,6 @@
package foundation.e.apps.home
//import java.awt.font.ShapeGraphicAttribute.STROKE
//import java.awt.AlphaComposite.SRC_IN
import android.graphics.Color
import android.os.Bundle
import android.view.LayoutInflater
......@@ -62,10 +60,6 @@ class HomeFragment : Fragment() {
}
val view = inflater.inflate(R.layout.fragment_home, container, false)
/* if(accentColorOS!=0){
view.findViewById<TextView>(R.id.tv_featured).setTextColor(accentColorOS);
}*/
homeViewModel = ViewModelProvider(this).get(HomeViewModel::class.java)
imageCarousel = view.findViewById(R.id.image_carousel)
......
......@@ -50,7 +50,6 @@ class ImageCarouselAdapter(context: Context, private val bannerApplications: Arr
val view = layoutInflater.inflate(R.layout.image_carousel_item, container, false)
val wideImage = view.image
val image = getRoundedCornerBitmap(bannerApplications[position].image,mActivity)
// val resizedImage=reSizeImage(image)
wideImage.setImageBitmap(image)
wideImage.setOnClickListener {
if(mActivity.showApplicationTypePreference()=="open" || mActivity.showApplicationTypePreference()=="pwa"){
......
......@@ -92,12 +92,10 @@ class PwaInstaller : AppCompatActivity() {
urlConnection.connectTimeout = Constants.CONNECT_TIMEOUT
urlConnection.readTimeout = Constants.READ_TIMEOUT
icon = BitmapFactory.decodeStream(urlConnection.inputStream)
//scaledBitmap = Bitmap.createScaledBitmap(icon, 128, 128, true)
} catch (e: FileNotFoundException) {
val x = R.drawable.pwa_default_icon
icon = BitmapFactory.decodeResource(mActivity.getResources(),
x)
//scaledBitmap = Bitmap.createScaledBitmap(icon, 128, 128, true)
}
val intent = Intent()
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK)
......
......@@ -36,7 +36,6 @@ class RadioButtonPreference : CheckBoxPreference {
override fun onClick() {
if (this.isChecked)
return
// mActivity.recreate()
super.onClick()
}
......
......@@ -71,7 +71,6 @@ class UpdatesFragment() : Fragment() {
val progressBar = view.findViewById<ProgressBar>(R.id.progress_bar)
progressBar.indeterminateDrawable.colorFilter = PorterDuffColorFilter(accentColorOS, PorterDuff.Mode.MULTIPLY)
val reloadProgressBar = view.findViewById<ProgressBar>(R.id.progress_bar2)
//progressBar.setProgressTintList(ColorStateList.valueOf(accentColorOS));
reloadProgressBar.indeterminateDrawable.colorFilter = PorterDuffColorFilter(accentColorOS, PorterDuff.Mode.MULTIPLY)
val errorContainer = view.findViewById<LinearLayout>(R.id.error_container)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment