From 63f6b70cc81ec9dc6e92b6521dfd78fa72fe70a5 Mon Sep 17 00:00:00 2001 From: Allan Wang Date: Sat, 27 Jul 2019 18:59:14 -0700 Subject: Fix compile errors --- core/src/main/kotlin/ca/allanwang/kau/permissions/Permissions.kt | 3 +++ core/src/main/kotlin/ca/allanwang/kau/utils/Kotterknife.kt | 6 +++--- 2 files changed, 6 insertions(+), 3 deletions(-) (limited to 'core') diff --git a/core/src/main/kotlin/ca/allanwang/kau/permissions/Permissions.kt b/core/src/main/kotlin/ca/allanwang/kau/permissions/Permissions.kt index 3c90b05..f649cc6 100644 --- a/core/src/main/kotlin/ca/allanwang/kau/permissions/Permissions.kt +++ b/core/src/main/kotlin/ca/allanwang/kau/permissions/Permissions.kt @@ -13,6 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + package ca.allanwang.kau.permissions import android.Manifest @@ -76,6 +77,8 @@ const val PERMISSION_READ_CALL_LOG = Manifest.permission.READ_CALL_LOG const val PERMISSION_WRITE_CALL_LOG = Manifest.permission.WRITE_CALL_LOG const val PERMISSION_ADD_VOICEMAIL = Manifest.permission.ADD_VOICEMAIL const val PERMISSION_USE_SIP = Manifest.permission.USE_SIP +@Deprecated(level = DeprecationLevel.WARNING, message = "Permission is deprecated") +@Suppress("DEPRECATION") const val PERMISSION_PROCESS_OUTGOING_CALLS = Manifest.permission.PROCESS_OUTGOING_CALLS @RequiresApi(Build.VERSION_CODES.KITKAT_WATCH) diff --git a/core/src/main/kotlin/ca/allanwang/kau/utils/Kotterknife.kt b/core/src/main/kotlin/ca/allanwang/kau/utils/Kotterknife.kt index 8765c69..aaef160 100644 --- a/core/src/main/kotlin/ca/allanwang/kau/utils/Kotterknife.kt +++ b/core/src/main/kotlin/ca/allanwang/kau/utils/Kotterknife.kt @@ -116,11 +116,11 @@ private inline val Dialog.viewFinder: Dialog.(Int) -> View? private inline val DialogFragment.viewFinder: DialogFragment.(Int) -> View? get() = { dialog.findViewById(it) } private inline val SupportDialogFragment.viewFinder: SupportDialogFragment.(Int) -> View? - get() = { dialog.findViewById(it) } + get() = { dialog?.findViewById(it) } private inline val Fragment.viewFinder: Fragment.(Int) -> View? - get() = { view!!.findViewById(it) } + get() = { view?.findViewById(it) } private inline val SupportFragment.viewFinder: SupportFragment.(Int) -> View? - get() = { view!!.findViewById(it) } + get() = { view?.findViewById(it) } private inline val ViewHolder.viewFinder: ViewHolder.(Int) -> View? get() = { itemView.findViewById(it) } -- cgit v1.2.3