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