fix: remove duplicate else branches in when expressions
This commit is contained in:
@@ -326,12 +326,6 @@ class CameraActivity : AppCompatActivity() {
|
|||||||
Toast.makeText(baseContext, "拍照失败: ${exception.message}", Toast.LENGTH_LONG).show()
|
Toast.makeText(baseContext, "拍照失败: ${exception.message}", Toast.LENGTH_LONG).show()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else -> {
|
|
||||||
Log.e(TAG, "其他错误: ${exception.imageCaptureError}")
|
|
||||||
runOnUiThread {
|
|
||||||
Toast.makeText(baseContext, "拍照失败: ${exception.message}", Toast.LENGTH_LONG).show()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -296,12 +296,6 @@ class SimpleCameraActivity : AppCompatActivity() {
|
|||||||
Toast.makeText(baseContext, "拍照失败: ${exception.message}", Toast.LENGTH_LONG).show()
|
Toast.makeText(baseContext, "拍照失败: ${exception.message}", Toast.LENGTH_LONG).show()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else -> {
|
|
||||||
Log.e(TAG, "其他错误: ${exception.imageCaptureError}")
|
|
||||||
runOnUiThread {
|
|
||||||
Toast.makeText(baseContext, "拍照失败: ${exception.message}", Toast.LENGTH_LONG).show()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -304,12 +304,6 @@ class WatermarkCameraActivity : AppCompatActivity() {
|
|||||||
Toast.makeText(baseContext, "拍照失败: ${exception.message}", Toast.LENGTH_LONG).show()
|
Toast.makeText(baseContext, "拍照失败: ${exception.message}", Toast.LENGTH_LONG).show()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else -> {
|
|
||||||
Log.e(TAG, "其他错误: ${exception.imageCaptureError}")
|
|
||||||
runOnUiThread {
|
|
||||||
Toast.makeText(baseContext, "拍照失败: ${exception.message}", Toast.LENGTH_LONG).show()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user