fixed broken Manifest and bug when launching apps

This commit is contained in:
Josia Pietsch 2024-08-02 23:51:39 +02:00
parent 3e4ab2ee97
commit 70db5d5476
Signed by: jrpie
GPG key ID: E70B571D66986A2D
2 changed files with 2 additions and 8 deletions

View file

@ -9,11 +9,6 @@
<uses-permission android:name="android.permission.ACCESS_HIDDEN_PROFILES" /> <uses-permission android:name="android.permission.ACCESS_HIDDEN_PROFILES" />
<queries>
<intent>
<category android:name="android.intent.category.HOME"/>
</intent>
</queries>
<application <application
android:allowBackup="true" android:allowBackup="true"
android:icon="@mipmap/ic_launcher" android:icon="@mipmap/ic_launcher"

View file

@ -59,9 +59,7 @@ class AppsRecyclerAdapter(val activity: Activity,
when (intention){ when (intention){
ListActivity.ListActivityIntention.VIEW -> { ListActivity.ListActivityIntention.VIEW -> {
launchApp(appPackageName, appUser, activity) launchApp(appPackageName, appUser, activity)
val launchIntent: Intent = context.packageManager
.getLaunchIntentForPackage(appPackageName)!!
context.startActivity(launchIntent)
} }
ListActivity.ListActivityIntention.PICK -> { ListActivity.ListActivityIntention.PICK -> {
val returnIntent = Intent() val returnIntent = Intent()
@ -108,6 +106,7 @@ class AppsRecyclerAdapter(val activity: Activity,
} }
} }
// TODO fixme: handle work profile apps
@Suppress("SameReturnValue") @Suppress("SameReturnValue")
private fun showOptionsPopup(viewHolder: ViewHolder, appPackageName: String): Boolean { private fun showOptionsPopup(viewHolder: ViewHolder, appPackageName: String): Boolean {
//create the popup menu //create the popup menu