summaryrefslogtreecommitdiffstats
path: root/src/com/android/launcher3/LauncherAppState.java
diff options
context:
space:
mode:
authorTony <twickham@google.com>2019-02-22 13:10:59 -0800
committerTony Wickham <twickham@google.com>2019-02-28 14:39:27 -0800
commit573c3e1712b35ff92b0a272a4c4de6f88a8b0cc0 (patch)
treea21d9d74fd5ee5e3a2c148b6410db5e3edaa2225 /src/com/android/launcher3/LauncherAppState.java
parent7ceb6f358aae69e69705408e2d35774afdd33a0e (diff)
downloadandroid_packages_apps_Trebuchet-573c3e1712b35ff92b0a272a4c4de6f88a8b0cc0.tar.gz
android_packages_apps_Trebuchet-573c3e1712b35ff92b0a272a4c4de6f88a8b0cc0.tar.bz2
android_packages_apps_Trebuchet-573c3e1712b35ff92b0a272a4c4de6f88a8b0cc0.zip
Make TouchInteractionService direct boot aware
- Add directBootAware="true" to TouchInteractionService manifest component - Add DeviceLockedInputConsumer which just sends a home intent on touch down Test: - Reboot - Swipe up anywhere to get to bouncer (pin/password/pattern) - Click "Emergency" to launch dialer while still in direct boot - Swipe up from the nav bar to exit/bring up bouncer Test: - Lock screen - Double press power to launch camera - Swipe up from nav bar to exit/bring up bouncer Bug: 125364936 Change-Id: I7a4cd2dc3a635daf4bb9a643a1e5251ca4e91e33
Diffstat (limited to 'src/com/android/launcher3/LauncherAppState.java')
-rw-r--r--src/com/android/launcher3/LauncherAppState.java5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/com/android/launcher3/LauncherAppState.java b/src/com/android/launcher3/LauncherAppState.java
index 74fa447d1..7bb60714f 100644
--- a/src/com/android/launcher3/LauncherAppState.java
+++ b/src/com/android/launcher3/LauncherAppState.java
@@ -19,12 +19,14 @@ package com.android.launcher3;
import static com.android.launcher3.InvariantDeviceProfile.CHANGE_FLAG_ICON_PARAMS;
import static com.android.launcher3.util.SecureSettingsObserver.newNotificationSettingsObserver;
+import android.app.KeyguardManager;
import android.content.ComponentName;
import android.content.ContentProviderClient;
import android.content.Context;
import android.content.Intent;
import android.content.IntentFilter;
import android.os.Handler;
+import android.os.Process;
import android.util.Log;
import com.android.launcher3.compat.LauncherAppsCompat;
@@ -66,6 +68,9 @@ public class LauncherAppState {
}
private LauncherAppState(Context context) {
+ if (!UserManagerCompat.getInstance(context).isUserUnlocked(Process.myUserHandle())) {
+ throw new RuntimeException("LauncherAppState should not start in direct boot mode");
+ }
if (getLocalProvider(context) == null) {
throw new RuntimeException(
"Initializing LauncherAppState in the absence of LauncherProvider");