adding some app sideloading checks

This commit is contained in:
tibbi 2019-08-03 18:38:03 +02:00
parent bf2e666e0f
commit 031217c463
5 changed files with 25 additions and 4 deletions

View file

@ -36,6 +36,10 @@ class DialpadActivity : SimpleActivity() {
super.onCreate(savedInstanceState) super.onCreate(savedInstanceState)
setContentView(R.layout.activity_dialpad) setContentView(R.layout.activity_dialpad)
if (checkAppSideloading()) {
return
}
dialpad_0_holder.setOnClickListener { dialpadPressed("0", it) } dialpad_0_holder.setOnClickListener { dialpadPressed("0", it) }
dialpad_1.setOnClickListener { dialpadPressed("1", it) } dialpad_1.setOnClickListener { dialpadPressed("1", it) }
dialpad_2.setOnClickListener { dialpadPressed("2", it) } dialpad_2.setOnClickListener { dialpadPressed("2", it) }

View file

@ -59,6 +59,11 @@ class EditContactActivity : ContactActivity() {
override fun onCreate(savedInstanceState: Bundle?) { override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState) super.onCreate(savedInstanceState)
setContentView(R.layout.activity_edit_contact) setContentView(R.layout.activity_edit_contact)
if (checkAppSideloading()) {
return
}
supportActionBar?.setHomeAsUpIndicator(R.drawable.ic_cross) supportActionBar?.setHomeAsUpIndicator(R.drawable.ic_cross)
val action = intent.action val action = intent.action

View file

@ -4,10 +4,7 @@ import android.app.Activity
import android.content.Intent import android.content.Intent
import android.os.Bundle import android.os.Bundle
import android.provider.ContactsContract import android.provider.ContactsContract
import com.simplemobiletools.commons.extensions.getAdjustedPrimaryColor import com.simplemobiletools.commons.extensions.*
import com.simplemobiletools.commons.extensions.getColoredDrawableWithColor
import com.simplemobiletools.commons.extensions.toast
import com.simplemobiletools.commons.extensions.updateTextColors
import com.simplemobiletools.commons.helpers.PERMISSION_READ_CONTACTS import com.simplemobiletools.commons.helpers.PERMISSION_READ_CONTACTS
import com.simplemobiletools.contacts.pro.R import com.simplemobiletools.contacts.pro.R
import com.simplemobiletools.contacts.pro.adapters.ContactsAdapter import com.simplemobiletools.contacts.pro.adapters.ContactsAdapter
@ -24,6 +21,11 @@ class InsertOrEditContactActivity : SimpleActivity() {
override fun onCreate(savedInstanceState: Bundle?) { override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState) super.onCreate(savedInstanceState)
setContentView(R.layout.activity_insert_edit_contact) setContentView(R.layout.activity_insert_edit_contact)
if (checkAppSideloading()) {
return
}
title = getString(R.string.select_contact) title = getString(R.string.select_contact)
setupViews() setupViews()

View file

@ -26,6 +26,11 @@ class SelectContactActivity : SimpleActivity() {
override fun onCreate(savedInstanceState: Bundle?) { override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState) super.onCreate(savedInstanceState)
setContentView(R.layout.activity_select_contact) setContentView(R.layout.activity_select_contact)
if (checkAppSideloading()) {
return
}
setupPlaceholders() setupPlaceholders()
handlePermission(PERMISSION_READ_CONTACTS) { handlePermission(PERMISSION_READ_CONTACTS) {

View file

@ -31,6 +31,11 @@ class ViewContactActivity : ContactActivity() {
override fun onCreate(savedInstanceState: Bundle?) { override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState) super.onCreate(savedInstanceState)
setContentView(R.layout.activity_view_contact) setContentView(R.layout.activity_view_contact)
if (checkAppSideloading()) {
return
}
showFields = config.showContactFields showFields = config.showContactFields
} }