1
0
Fork 0
mirror of https://github.com/M66B/FairEmail.git synced 2024-12-28 02:37:16 +00:00

Fixed external search setting

This commit is contained in:
M66B 2021-01-07 08:05:47 +01:00
parent c3bbd71469
commit 090f8d3a40

View file

@ -485,7 +485,7 @@ public class Helper {
static boolean isComponentEnabled(Context context, Class<?> clazz) {
PackageManager pm = context.getPackageManager();
int state = pm.getComponentEnabledSetting(new ComponentName(context, clazz));
return (state != PackageManager.COMPONENT_ENABLED_STATE_DISABLED);
return (state == PackageManager.COMPONENT_ENABLED_STATE_ENABLED);
}
static void enableComponent(Context context, Class<?> clazz, boolean whether) {
@ -497,7 +497,7 @@ public class Helper {
pm.setComponentEnabledSetting(
new ComponentName(context, name),
whether
? PackageManager.COMPONENT_ENABLED_STATE_DEFAULT
? PackageManager.COMPONENT_ENABLED_STATE_ENABLED
: PackageManager.COMPONENT_ENABLED_STATE_DISABLED,
PackageManager.DONT_KILL_APP);
}