android/src/com/mapswithme/maps/settings/StoragePathManager.java
public void startExternalStorageWatching(Activity activity, @Nullable BroadcastReceiver receiver, @Nullable MoveFilesListener listener)
  {
    mActivity = activity;
    mStorageListener = listener;
    mExternalReceiver = receiver;
    mInternalReceiver = new BroadcastReceiver()
    {
      @Override
      public void onReceive(Context context, Intent intent)
      {
        if (mExternalReceiver != null)
          mExternalReceiver.onReceive(context, intent);

        updateExternalStorages();
      }
    };

    mActivity.registerReceiver(mInternalReceiver, getMediaChangesIntentFilter());
    updateExternalStorages();
  }
/**
   * Observes status of connected media and retrieves list of available external storages.
   */
Observes status of connected media and retrieves list of available external storages.
Observes status of connected media and retrieves list of available external storages .
public void startExternalStorageWatching(Activity activity, @Nullable BroadcastReceiver receiver, @Nullable MoveFilesListener listener)
  {
    mActivity = activity;
    mStorageListener = listener;
    mExternalReceiver = receiver;
    mInternalReceiver = new BroadcastReceiver()
    {
      @Override
      public void onReceive(Context context, Intent intent)
      {
        if (mExternalReceiver != null)
          mExternalReceiver.onReceive(context, intent);
        updateExternalStorages();
      }
    };
    mActivity.registerReceiver(mInternalReceiver, getMediaChangesIntentFilter());
    updateExternalStorages();
  }
public void startExternalStorageWatching ( Activity activity , @ Nullable BroadcastReceiver receiver , @ Nullable MoveFilesListener listener ) { mActivity = activity ; mStorageListener = listener ; mExternalReceiver = receiver ; mInternalReceiver = new BroadcastReceiver ( ) { @ Override public void onReceive ( Context context , Intent intent ) { if ( mExternalReceiver != null ) mExternalReceiver . onReceive ( context , intent ) ; updateExternalStorages ( ) ; } } ; mActivity . registerReceiver ( mInternalReceiver , getMediaChangesIntentFilter ( ) ) ; updateExternalStorages ( ) ; }
Observes status of connected media and retrieves list of available external storages.
Observes status of connected media and retrieves list of available external storages .