hotfix: Do not access cross-profile interaction APIs below R

This commit is contained in:
Peter Cai 2023-12-06 15:46:28 -05:00
parent 401cc49ac5
commit 3f71a44617
2 changed files with 9 additions and 2 deletions

View file

@ -1,5 +1,10 @@
1.9.1 (445)
===
- Hotfix crashes below Android 11.
1.9 1.9
== ===
- Updated targetSDK to 34 (Android 14) with compatibility fixes. - Updated targetSDK to 34 (Android 14) with compatibility fixes.
- More reliable delayed freezing using AlarmManager (thanks parmaster84). - More reliable delayed freezing using AlarmManager (thanks parmaster84).

View file

@ -211,6 +211,8 @@ public class AppListFragment extends BaseFragment {
// Update the cross-profile packages / widget providers list // Update the cross-profile packages / widget providers list
try { try {
mCrossProfileWidgetProviders.addAll(mService.getCrossProfileWidgetProviders()); mCrossProfileWidgetProviders.addAll(mService.getCrossProfileWidgetProviders());
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.R)
mCrossProfilePackages.addAll(mService.getCrossProfilePackages()); mCrossProfilePackages.addAll(mService.getCrossProfilePackages());
} catch (RemoteException ignored) { } catch (RemoteException ignored) {