Delay touching disks when secure keyguard showing.

We've tried our best to protect against malicious storage devices
with limited SELinux domains, but let's be even more paranoid and
refuse to look at disks inserted while a secure keyguard is
showing.  We'll gladly scan them right away once the user confirms
their credentials.

Test: builds, boots, manual testing
Bug: 68054513
Change-Id: I19b7446e855176921ed477ef6d07bc9a2cc0ef9a
This commit is contained in:
Jeff Sharkey
2017-12-14 22:15:14 -07:00
parent b8ae316fc1
commit 9765e446d3
5 changed files with 73 additions and 65 deletions

View File

@@ -309,4 +309,11 @@ public abstract class ActivityManagerInternal {
* Returns {@code true} if {@code uid} is running an activity from {@code packageName}.
*/
public abstract boolean hasRunningActivity(int uid, @Nullable String packageName);
public interface ScreenObserver {
public void onAwakeStateChanged(boolean isAwake);
public void onKeyguardStateChanged(boolean isShowing);
}
public abstract void registerScreenObserver(ScreenObserver observer);
}