summaryrefslogtreecommitdiffstats
path: root/services
diff options
context:
space:
mode:
authorBryce Lee <brycelee@google.com>2015-03-09 15:49:23 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2015-03-09 15:49:23 +0000
commit2a18cbcffaa7e8e34f7cd8b91e930eb2c08a6ef6 (patch)
tree185b1e30aa0b03b50f33e475c2c094226bc65275 /services
parentd3b28408d1b9d36c27e4d1cfafe8c3097579961b (diff)
parent1b8df04b8d754f68dc6bfa6caa9e0a2666d16933 (diff)
downloadframeworks_base-2a18cbcffaa7e8e34f7cd8b91e930eb2c08a6ef6.zip
frameworks_base-2a18cbcffaa7e8e34f7cd8b91e930eb2c08a6ef6.tar.gz
frameworks_base-2a18cbcffaa7e8e34f7cd8b91e930eb2c08a6ef6.tar.bz2
am 1b8df04b: am 8aeab6c8: Allow the keyguard service to be configurable.
* commit '1b8df04b8d754f68dc6bfa6caa9e0a2666d16933': Allow the keyguard service to be configurable.
Diffstat (limited to 'services')
-rw-r--r--services/core/java/com/android/server/policy/keyguard/KeyguardServiceDelegate.java13
1 files changed, 8 insertions, 5 deletions
diff --git a/services/core/java/com/android/server/policy/keyguard/KeyguardServiceDelegate.java b/services/core/java/com/android/server/policy/keyguard/KeyguardServiceDelegate.java
index c3fc195..75c33af 100644
--- a/services/core/java/com/android/server/policy/keyguard/KeyguardServiceDelegate.java
+++ b/services/core/java/com/android/server/policy/keyguard/KeyguardServiceDelegate.java
@@ -5,6 +5,7 @@ import android.content.Context;
import android.content.Intent;
import android.content.ServiceConnection;
import android.content.pm.ActivityInfo;
+import android.content.res.Resources;
import android.graphics.PixelFormat;
import android.os.Bundle;
import android.os.IBinder;
@@ -27,9 +28,6 @@ import com.android.internal.policy.IKeyguardShowCallback;
* local or remote instances of keyguard.
*/
public class KeyguardServiceDelegate {
- public static final String KEYGUARD_PACKAGE = "com.android.systemui";
- public static final String KEYGUARD_CLASS = "com.android.systemui.keyguard.KeyguardService";
-
private static final String TAG = "KeyguardServiceDelegate";
private static final boolean DEBUG = true;
@@ -111,10 +109,15 @@ public class KeyguardServiceDelegate {
public void bindService(Context context) {
Intent intent = new Intent();
- intent.setClassName(KEYGUARD_PACKAGE, KEYGUARD_CLASS);
+ final Resources resources = context.getApplicationContext().getResources();
+
+ final ComponentName keyguardComponent = ComponentName.unflattenFromString(
+ resources.getString(com.android.internal.R.string.config_keyguardComponent));
+ intent.setComponent(keyguardComponent);
+
if (!context.bindServiceAsUser(intent, mKeyguardConnection,
Context.BIND_AUTO_CREATE, UserHandle.OWNER)) {
- Log.v(TAG, "*** Keyguard: can't bind to " + KEYGUARD_CLASS);
+ Log.v(TAG, "*** Keyguard: can't bind to " + keyguardComponent);
mKeyguardState.showing = false;
mKeyguardState.showingAndNotOccluded = false;
mKeyguardState.secure = false;