1
0
mirror of https://github.com/etesync/android synced 2024-12-22 06:38:09 +00:00

Enable R8 and fix errors.

This commit is contained in:
Tom Hacohen 2020-09-06 11:51:22 +03:00
parent cf2198b1b8
commit c90bf78dc5
6 changed files with 7 additions and 8 deletions

View File

@ -47,7 +47,7 @@ class AccountListFragment : ListFragment(), LoaderManager.LoaderCallbacks<Array<
}
override fun onItemClick(parent: AdapterView<*>, view: View, position: Int, id: Long) {
val account = listAdapter.getItem(position) as Account
val account = listAdapter?.getItem(position) as Account
val intent = Intent(context, AccountActivity::class.java)
intent.putExtra(AccountActivity.EXTRA_ACCOUNT, account)

View File

@ -104,7 +104,7 @@ class CollectionMembersListFragment : ListFragment(), AdapterView.OnItemClickLis
}
override fun onItemClick(parent: AdapterView<*>, view: View, position: Int, id: Long) {
val member = listAdapter.getItem(position) as JournalManager.Member
val member = listAdapter?.getItem(position) as JournalManager.Member
AlertDialog.Builder(activity!!)
.setIcon(R.drawable.ic_info_dark)

View File

@ -103,7 +103,7 @@ class ImportActivity : BaseActivity(), SelectImportMethod, ResultFragment.OnImpo
private var mSelectImportMethod: SelectImportMethod? = null
override fun onAttach(context: Context?) {
override fun onAttach(context: Context) {
super.onAttach(context)
// This makes sure that the container activity has implemented
// the callback interface. If not, it throws an exception
@ -115,14 +115,14 @@ class ImportActivity : BaseActivity(), SelectImportMethod, ResultFragment.OnImpo
}
override fun onAttach(activity: Activity?) {
override fun onAttach(activity: Activity) {
super.onAttach(activity)
// This makes sure that the container activity has implemented
// the callback interface. If not, it throws an exception
try {
mSelectImportMethod = activity as SelectImportMethod?
} catch (e: ClassCastException) {
throw ClassCastException(activity!!.toString() + " must implement MyInterface ")
throw ClassCastException(activity.toString() + " must implement MyInterface ")
}
}

View File

@ -22,7 +22,7 @@ class ResultFragment : DialogFragment() {
result = arguments!!.getSerializable(KEY_RESULT) as ImportResult
}
override fun onDismiss(dialog: DialogInterface?) {
override fun onDismiss(dialog: DialogInterface) {
super.onDismiss(dialog)
val activity = activity
if (activity is DialogInterface) {

View File

@ -87,7 +87,7 @@ class ListEntriesFragment : ListFragment(), AdapterView.OnItemClickListener {
}
override fun onItemClick(parent: AdapterView<*>, view: View, position: Int, id: Long) {
val entry = listAdapter.getItem(position) as EntryEntity
val entry = listAdapter?.getItem(position) as EntryEntity
startActivity(JournalItemActivity.newIntent(context!!, account, info, entry.content))
}

View File

@ -1,4 +1,3 @@
android.enableJetifier=true
android.useAndroidX=true
android.enableR8 = false
org.gradle.jvmargs=-Xmx2048M