lkorth/pebble-locker — pull request #2 by aripollak (2013-12-08 21:33:07+00:00)
Title: Crash with device encryption?

I tried to set up Pebble Locker on my phone that has device encryption set up, and it doesn't seem to work properly. With my Pebble connected, the lock screen doesn't go away, but it's replaced with an empty PIN (I have to press the Enter button to unlock my phone). After I unlock my screen, I get a message that Pebble Locker has crashed:

```
E/AndroidRuntime( 1061): java.lang.RuntimeException: Unable to start receiver com.lukekorth.pebblelocker.ConnectionReceiver: java.lang.IllegalArgumentException: password cannot be empty
E/AndroidRuntime( 1061): at android.app.ActivityThread.handleReceiver(ActivityThread.java:2410)
E/AndroidRuntime( 1061): at android.app.ActivityThread.access$1600(ActivityThread.java:138)
E/AndroidRuntime( 1061): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1476)
E/AndroidRuntime( 1061): at android.os.Handler.dispatchMessage(Handler.java:102)
E/AndroidRuntime( 1061): at android.os.Looper.loop(Looper.java:137)
E/AndroidRuntime( 1061): at android.app.ActivityThread.main(ActivityThread.java:5031)
E/AndroidRuntime( 1061): at java.lang.reflect.Method.invokeNative(Native Method)
E/AndroidRuntime( 1061): at java.lang.reflect.Method.invoke(Method.java:515)
E/AndroidRuntime( 1061): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1256)
E/AndroidRuntime( 1061): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1072)
E/AndroidRuntime( 1061): at dalvik.system.NativeStart.main(Native Method)
E/AndroidRuntime( 1061): Caused by: java.lang.IllegalArgumentException: password cannot be empty
E/AndroidRuntime( 1061): at android.os.Parcel.readException(Parcel.java:1465)
E/AndroidRuntime( 1061): at android.os.Parcel.readException(Parcel.java:1415)
E/AndroidRuntime( 1061): at android.app.admin.IDevicePolicyManager$Stub$Proxy.resetPassword(IDevicePolicyManager.java:1530)
E/AndroidRuntime( 1061): at android.app.admin.DevicePolicyManager.resetPassword(DevicePolicyManager.java:1006)
E/AndroidRuntime( 1061): at com.lukekorth.pebblelocker.Locker.unlockIfEnabled(Locker.java:72)
E/AndroidRuntime( 1061): at com.lukekorth.pebblelocker.ConnectionReceiver.onReceive(ConnectionReceiver.java:48)
E/AndroidRuntime( 1061): at android.app.ActivityThread.handleReceiver(ActivityThread.java:2403)
E/AndroidRuntime( 1061): ... 10 more
```