Fix package visibility issue and code tweak
This commit is contained in:
@@ -509,6 +509,9 @@
|
|||||||
</application>
|
</application>
|
||||||
|
|
||||||
<queries>
|
<queries>
|
||||||
|
<intent>
|
||||||
|
<action android:name="android.intent.action.VIEW" />
|
||||||
|
</intent>
|
||||||
<intent>
|
<intent>
|
||||||
<action android:name="android.intent.action.TTS_SERVICE" />
|
<action android:name="android.intent.action.TTS_SERVICE" />
|
||||||
</intent>
|
</intent>
|
||||||
|
|||||||
@@ -120,13 +120,10 @@ class PermissionActivity : AppCompatActivity() {
|
|||||||
intent,
|
intent,
|
||||||
PackageManager.MATCH_DEFAULT_ONLY
|
PackageManager.MATCH_DEFAULT_ONLY
|
||||||
)
|
)
|
||||||
if (activities.indexOfFirst { it.activityInfo.name == className } > -1) {
|
if (activities.any { it.activityInfo.name == className }) {
|
||||||
val component = intent.resolveActivity(packageManager)
|
val component = intent.resolveActivity(packageManager)
|
||||||
if (component.className != className) {
|
if (component.className != className) {
|
||||||
intent.setClassName(
|
intent.setClassName("com.android.settings", className)
|
||||||
"com.android.settings",
|
|
||||||
className
|
|
||||||
)
|
|
||||||
settingActivityResultAwait.launch(intent)
|
settingActivityResultAwait.launch(intent)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user