Skip to content

Commit

Permalink
[Refactor] Fix blocking components in Android 14
Browse files Browse the repository at this point in the history
Signed-off-by: Muntashir Al-Islam <[email protected]>
  • Loading branch information
MuntashirAkon committed Mar 18, 2024
1 parent fdf23e2 commit 730213c
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,7 @@ public static void setComponentEnabledSetting(ComponentName componentName,
@UserIdInt int userId)
throws RemoteException {
IPackageManager pm = getPackageManager();
if (BuildCompat.isAtLeastU()) {
if (Build.VERSION.SDK_INT >= 34 || BuildCompat.isAtLeastU()) {
String callingPackage = ActivityManagerCompat.SHELL_PACKAGE_NAME;
pm.setComponentEnabledSetting(componentName, newState, flags, userId, callingPackage);
} else pm.setComponentEnabledSetting(componentName, newState, flags, userId);
Expand Down

0 comments on commit 730213c

Please sign in to comment.