@Override
 public void onReceive(Context context, Intent intent) {
   String action = intent.getAction();
   logd("onReceive " + action);
   if (TelephonyIntents.ACTION_SIM_STATE_CHANGED.equals(action)
       || Intent.ACTION_AIRPLANE_MODE_CHANGED.equals(action)) {
     setScreenState();
   }
 }
Example #2
0
        @Override
        public void onReceive(Context context, Intent intent) {
          if (Intent.ACTION_AIRPLANE_MODE_CHANGED.equals(intent.getAction())
              && !intent.getBooleanExtra("state", false)) {
            // Airplane mode is now off!
            mLocationHandler.requestLocationUpdate();
            return;
          }

          // Time zone has changed or alarm expired.
          mLocationHandler.requestTwilightUpdate();
        }
 @Override
 public void onReceive(Context context, Intent intent) {
   if (Intent.ACTION_AIRPLANE_MODE_CHANGED.equals(intent.getAction())) {
     refreshState();
   }
 }