The first is to allow whether apps can query installed apps or see what apps are installed or to deny it.

The second is putting background usage and battery optimization in special app access to sort by apps with and without background usage.

    Alltern The second is putting background usage and battery optimization in special app access to sort by apps with and without background usage.

    Already implemented in AOSP Settings app. It's just that you need a third-party app to start the com.android.settings.Settings$AppBatteryUsageActivity activity.