Inline return statements for cleaner code (#3460)
Refactored conditional return statements to be inline. - Simplified code readability by inlining return statements. - Maintained functionality while improving code clarity.
This commit is contained in:
@@ -248,9 +248,7 @@ class PerAppProxyActivity : BaseActivity() {
|
||||
|
||||
private fun importProxyApp() {
|
||||
val content = Utils.getClipboard(applicationContext)
|
||||
if (TextUtils.isEmpty(content)) {
|
||||
return
|
||||
}
|
||||
if (TextUtils.isEmpty(content)) return
|
||||
selectProxyApp(content, false)
|
||||
toast(R.string.toast_success)
|
||||
}
|
||||
@@ -272,9 +270,7 @@ class PerAppProxyActivity : BaseActivity() {
|
||||
} else {
|
||||
content
|
||||
}
|
||||
if (TextUtils.isEmpty(proxyApps)) {
|
||||
return false
|
||||
}
|
||||
if (TextUtils.isEmpty(proxyApps)) return false
|
||||
|
||||
adapter?.blacklist?.clear()
|
||||
|
||||
@@ -314,12 +310,8 @@ class PerAppProxyActivity : BaseActivity() {
|
||||
|
||||
private fun inProxyApps(proxyApps: String, packageName: String, force: Boolean): Boolean {
|
||||
if (force) {
|
||||
if (packageName == "com.google.android.webview") {
|
||||
return false
|
||||
}
|
||||
if (packageName.startsWith("com.google")) {
|
||||
return true
|
||||
}
|
||||
if (packageName == "com.google.android.webview") return false
|
||||
if (packageName.startsWith("com.google")) return true
|
||||
}
|
||||
|
||||
return proxyApps.indexOf(packageName) >= 0
|
||||
|
||||
Reference in New Issue
Block a user