Don't resume activity if user is locked and encryption is unsupported

Previously we were not checking if to see if this condition was met
when determining the top running activity. As a result we could get
in a loop where we force stop the process since the app doesn't
support encryption yet try to start it again due to the
ActivityRecord being on top.

This changelist addresses the issue by checking this condition when
determining whether it is okay to show.

Change-Id: I868f97ce8b3ea4220019b8570407e33f27ea88bc
Fixes: 64259425
Test: go/wm-smoke
diff --git a/core/java/android/content/pm/ApplicationInfo.java b/core/java/android/content/pm/ApplicationInfo.java
index 72075a5..2aa3d09 100644
--- a/core/java/android/content/pm/ApplicationInfo.java
+++ b/core/java/android/content/pm/ApplicationInfo.java
@@ -1508,6 +1508,11 @@
         return (privateFlags & ApplicationInfo.PRIVATE_FLAG_PARTIALLY_DIRECT_BOOT_AWARE) != 0;
     }
 
+    /** @hide */
+    public boolean isEncryptionAware() {
+        return isDirectBootAware() || isPartiallyDirectBootAware();
+    }
+
     /**
      * @hide
      */