OmniLib: Set package SystemUI for ACTION_DISMISS_KEYGUARD in OmniUtils
Change-Id: Id7071108ad8039be79f41ea0c1afbca0d9bb4c69
diff --git a/AndroidManifest.xml b/AndroidManifest.xml
index bf8ef7d..1f24002 100644
--- a/AndroidManifest.xml
+++ b/AndroidManifest.xml
@@ -24,4 +24,6 @@
coreApp="true"
android:sharedUserLabel="@string/omni_system_label">
+ <protected-broadcast android:name="com.android.systemui.ACTION_DISMISS_KEYGUARD" />
+
</manifest>
diff --git a/src/org/omnirom/omnilib/utils/OmniUtils.java b/src/org/omnirom/omnilib/utils/OmniUtils.java
index 9c40a68..3d4f50f 100644
--- a/src/org/omnirom/omnilib/utils/OmniUtils.java
+++ b/src/org/omnirom/omnilib/utils/OmniUtils.java
@@ -42,15 +42,15 @@
public class OmniUtils {
- public static final String OMNILIB_PACKAGE_NAME = "org.omnirom.omnilib";
+ public static final String SYSTEMUI_PACKAGE_NAME = "com.android.systemui";
- public static final String ACTION_DISMISS_KEYGUARD = OMNILIB_PACKAGE_NAME +".ACTION_DISMISS_KEYGUARD";
+ public static final String ACTION_DISMISS_KEYGUARD = SYSTEMUI_PACKAGE_NAME +".ACTION_DISMISS_KEYGUARD";
public static final String DISMISS_KEYGUARD_EXTRA_INTENT = "launch";
public static void launchKeyguardDismissIntent(Context context, UserHandle user, Intent launchIntent) {
Intent keyguardIntent = new Intent(ACTION_DISMISS_KEYGUARD);
- keyguardIntent.setPackage(OMNILIB_PACKAGE_NAME);
+ keyguardIntent.setPackage(SYSTEMUI_PACKAGE_NAME);
keyguardIntent.putExtra(DISMISS_KEYGUARD_EXTRA_INTENT, launchIntent);
context.sendBroadcastAsUser(keyguardIntent, user);
}