Exemple #1
0
 private void myUnregisterReceiver() {
   LocalBroadcastManager.getInstance(YWChannel.getApplication())
       .unregisterReceiver(mAutoLoginStateReceiver);
 }
Exemple #2
0
 /** 根据状态改变ui */
 private void myRegisterReceiver() {
   IntentFilter filter = new IntentFilter();
   filter.addAction(AUTO_LOGIN_STATE_ACTION);
   LocalBroadcastManager.getInstance(YWChannel.getApplication())
       .registerReceiver(mAutoLoginStateReceiver, filter);
 }