Skip to content

Commit 9deacbc

Browse files
committed
main: use real application enabled option for filtering
When the free_unfreeze filtering option is enabled with the flag "disabled", it listed all the frozen apps instead of only the disabled apps. Signed-off-by: Muntashir Al-Islam <muntashirakon@riseup.net>
1 parent 9165120 commit 9deacbc

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

app/src/main/java/io/github/muntashirakon/AppManager/main/ApplicationItem.java

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -756,15 +756,20 @@ public boolean isHidden() {
756756

757757
@Override
758758
public boolean isSuspended() {
759-
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {
760-
return (flags & ApplicationInfo.FLAG_SUSPENDED) != 0;
759+
fetchPackageInfo();
760+
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N && mApplicationInfo != null) {
761+
return ApplicationInfoCompat.isSuspended(mApplicationInfo);
761762
}
762763
// Not supported
763764
return false;
764765
}
765766

766767
@Override
767768
public boolean isEnabled() {
769+
fetchPackageInfo();
770+
if (mApplicationInfo != null) {
771+
return mApplicationInfo.enabled;
772+
}
768773
return !isDisabled;
769774
}
770775

0 commit comments

Comments
 (0)