コード例 #1
0
 @Override
 public void setListening(boolean listening) {
   if (listening) {
     mController.addSignalCallback(mSignalCallback);
   } else {
     mController.removeSignalCallback(mSignalCallback);
   }
 }
コード例 #2
0
 @Override
 protected void handleSecondaryClick() {
   if (!mWifiController.canConfigWifi()) {
     mHost.startActivityDismissingKeyguard(new Intent(Settings.ACTION_WIFI_SETTINGS));
     return;
   }
   if (!mState.enabled) {
     mController.setWifiEnabled(true);
     mState.enabled = true;
   }
   showDetail(true);
 }
コード例 #3
0
 @Override
 protected void handleClick() {
   mState.copyTo(mStateBeforeClick);
   MetricsLogger.action(mContext, getMetricsCategory(), !mState.enabled);
   mController.setWifiEnabled(!mState.enabled);
 }
コード例 #4
0
 public WifiTile(Host host) {
   super(host);
   mController = host.getNetworkController();
   mWifiController = mController.getAccessPointController();
   mDetailAdapter = new WifiDetailAdapter();
 }