Commit 70e22125 authored by Aayush Gupta's avatar Aayush Gupta
Browse files

Apps: Remove unused variables, parameters and functions



Observed several warnings in compilation otherwise
Signed-off-by: Aayush Gupta's avatarAayush Gupta <theimpulson@e.email>
parent 1be86552
Pipeline #109469 passed with stage
in 2 minutes and 35 seconds
......@@ -117,7 +117,6 @@ class InstallSplitApksActivity : BaseActivity() {
val extras = intent.extras
if (PACKAGE_INSTALLED_ACTION == intent.action) {
val status = extras!!.getInt(PackageInstaller.EXTRA_STATUS)
val message = extras.getString(PackageInstaller.EXTRA_STATUS_MESSAGE)
when (status) {
PackageInstaller.STATUS_PENDING_USER_ACTION -> {
// This test app isn't privileged, so the user has to confirm the install.
......@@ -168,6 +167,4 @@ class InstallSplitApksActivity : BaseActivity() {
}
private fun Intent.putExtra(keY_PARAM: String, apksBean: ApksBean) {
}
......@@ -128,7 +128,7 @@ class ApplicationActivity :
} else {
toolbar.elevation = defaultElevation
}
scroll_view.setOnScrollChangeListener { view, ia, ib, ic, id ->
scroll_view.setOnScrollChangeListener { view, _, _, _, _ ->
if (view.scrollY == 0) {
toolbar.elevation = 0f
} else {
......@@ -278,7 +278,6 @@ class ApplicationActivity :
setRatingBorder(basicData.ratings.rating)
app_rating_container.setOnClickListener {
val text = R.string.ok
val alertDialog = AlertDialog.Builder(this).create()
alertDialog.setIcon(R.drawable.ic_app_rating)
......
......@@ -209,7 +209,7 @@ class Application(val packageName: String, private val applicationManager: Appli
Execute({
AppDownloadedRequest(basicData!!.id,fullData!!.getLastVersion()?.apkArchitecture).request()
}, {})
if(info.isXapk(fullData!!,basicData)){
if(info.isXapk(fullData!!)){
isInstalling=true
XAPKFile(info.getxApkFile(context,basicData!!),this)
}
......
......@@ -111,19 +111,19 @@ class ApplicationInfo(private val packageName: String) {
Installer(data.packageName, getApkFile(context, data), callback).install(context)
}
fun isXapk(fullData: FullData, basicData: BasicData?): Boolean {
fun isXapk(fullData: FullData): Boolean {
return fullData.getLastVersion()!!.is_xapk && fullData.getLastVersion()?.downloadLink!!.endsWith(".xapk")
}
fun getApkOrXapkFileName(fullData: FullData, basicData: BasicData): String? {
if (isXapk(fullData, basicData)) {
if (isXapk(fullData)) {
return getxApkFilename(basicData)
} else
return getApkFilename(basicData)
}
fun getApkOrXapkFile(context: Context, fullData: FullData, basicData: BasicData): File {
if (isXapk(fullData, basicData)) {
if (isXapk(fullData)) {
return getxApkFile(context, basicData)
} else
return getApkFile(context, basicData)
......
......@@ -67,7 +67,6 @@ class CategoryActivity : AppCompatActivity(), ApplicationManagerServiceConnectio
val toolbar = findViewById<Toolbar>(R.id.toolbar)
setSupportActionBar(toolbar)
supportActionBar?.setDisplayHomeAsUpEnabled(true)
val extras = intent.extras
category = intent.getSerializableExtra(CATEGORY_KEY) as Category
supportActionBar?.title = category.getTitle()
......
......@@ -84,21 +84,21 @@ class SettingsFragment : PreferenceFragmentCompat() {
//Show only pwas when checked
var z = preferenceManager.findPreference<RadioButtonPreference>(getString(R.string.show_only_pwa_apps_key)) as RadioButtonPreference
x.setOnPreferenceChangeListener { _, newValue ->
x.setOnPreferenceChangeListener { _, _ ->
y.isChecked = false
z.isChecked = false
backToMainActivity()
true
}
y.setOnPreferenceChangeListener { _, newValue ->
y.setOnPreferenceChangeListener { _, _ ->
x.isChecked = false
z.isChecked = false
backToMainActivity()
true
}
z.setOnPreferenceChangeListener { _, newValue ->
z.setOnPreferenceChangeListener { _, _ ->
y.isChecked = false
x.isChecked = false
backToMainActivity()
......
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