QS: Fix crash switching users.

Bug:16375449
Change-Id: I971c5b043edcffe669c29bbc566b80696b6251b2
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/policy/ZenModeControllerImpl.java b/packages/SystemUI/src/com/android/systemui/statusbar/policy/ZenModeControllerImpl.java
index ae037f9..a3cdd41 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/policy/ZenModeControllerImpl.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/ZenModeControllerImpl.java
@@ -55,6 +55,7 @@
 
     private int mUserId;
     private boolean mRequesting;
+    private boolean mRegistered;
 
     public ZenModeControllerImpl(Context context, Handler handler) {
         mContext = context;
@@ -141,8 +142,12 @@
     @Override
     public void setUserId(int userId) {
         mUserId = userId;
+        if (mRegistered) {
+            mContext.unregisterReceiver(mReceiver);
+        }
         mContext.registerReceiverAsUser(mReceiver, new UserHandle(mUserId),
                 new IntentFilter(AlarmManager.ACTION_NEXT_ALARM_CLOCK_CHANGED), null, null);
+        mRegistered = true;
     }
 
     private void fireNextAlarmChanged() {