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:
parent
c3bbd71469
commit
090f8d3a40
1 changed files with 2 additions and 2 deletions
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue