do not show shortcuts until implemented properley

This commit is contained in:
tibbi 2022-10-06 14:18:59 +02:00
parent aafff99c12
commit 385a7c6c86
2 changed files with 3 additions and 3 deletions

View File

@ -63,7 +63,7 @@ android {
} }
dependencies { dependencies {
implementation 'com.github.SimpleMobileTools:Simple-Commons:f74a128e2e' implementation 'com.github.SimpleMobileTools:Simple-Commons:1d9fc3fd29'
kapt "androidx.room:room-compiler:2.4.3" kapt "androidx.room:room-compiler:2.4.3"
implementation "androidx.room:room-runtime:2.4.3" implementation "androidx.room:room-runtime:2.4.3"

View File

@ -106,7 +106,7 @@ class WidgetsFragment(context: Context, attributeSet: AttributeSet) : MyFragment
} }
// show also the widgets that are technically shortcuts // show also the widgets that are technically shortcuts
val intent = Intent(Intent.ACTION_CREATE_SHORTCUT, null) /*val intent = Intent(Intent.ACTION_CREATE_SHORTCUT, null)
val list = packageManager.queryIntentActivities(intent, PackageManager.PERMISSION_GRANTED) val list = packageManager.queryIntentActivities(intent, PackageManager.PERMISSION_GRANTED)
for (info in list) { for (info in list) {
val componentInfo = info.activityInfo.applicationInfo val componentInfo = info.activityInfo.applicationInfo
@ -118,7 +118,7 @@ class WidgetsFragment(context: Context, attributeSet: AttributeSet) : MyFragment
val widgetPreviewImage = packageManager.getDrawable(componentInfo.packageName, info.iconResource, componentInfo) val widgetPreviewImage = packageManager.getDrawable(componentInfo.packageName, info.iconResource, componentInfo)
val widget = AppWidget(appPackageName, appTitle, appIcon, widgetTitle, widgetPreviewImage, 0, 0, true, "", null) val widget = AppWidget(appPackageName, appTitle, appIcon, widgetTitle, widgetPreviewImage, 0, 0, true, "", null)
appWidgets.add(widget) appWidgets.add(widget)
} }*/
appWidgets = appWidgets.sortedWith(compareBy({ it.appTitle }, { it.appPackageName }, { it.widgetTitle })).toMutableList() as ArrayList<AppWidget> appWidgets = appWidgets.sortedWith(compareBy({ it.appTitle }, { it.appPackageName }, { it.widgetTitle })).toMutableList() as ArrayList<AppWidget>
splitWidgetsByApps(appWidgets) splitWidgetsByApps(appWidgets)