@Override
 public void onReceive(Context arg0, Intent intent) {
   if (Intent.ACTION_MEDIA_SCANNER_FINISHED.equals(intent.getAction())) {
     // 获取媒体库信息
     ArrayList<Music> musics = Musicdata.getMultiDatas(context);
     // 更新listview
     MyApplication.getInstance().setMusics(musics);
     localLayout.Refresh(LocalLayout.CHANGE_LIST, musics);
     progressDialog.cancel();
     context.sendBroadcast(new Intent(Constant.ACTION_LISTCHANGED));
   } else if (Intent.ACTION_MEDIA_SCANNER_STARTED.equals(intent.getAction())) {
     // 显示对话框
     progressDialog = new ProgressDialog(context);
     progressDialog.setMessage("列表正在刷新中,请等待......");
     progressDialog.show();
   }
 }
 @Override
 public void onReceive(Context context, Intent intent) {
   String action = intent.getAction();
   if (Intent.ACTION_MEDIA_SCANNER_STARTED.equals(action)
       || Intent.ACTION_MEDIA_SCANNER_FINISHED.equals(action)) {
     MusicUtils.setSpinnerState(SelectFolderActivity.this);
     mReScanHandler.sendEmptyMessage(0);
   }
   if (Intent.ACTION_MEDIA_UNMOUNTED.equals(action)) {
     mReScanHandler.sendEmptyMessage(1);
   }
 }
        @Override
        public void onReceive(Context context, Intent intent) {

          String action = intent.getAction();
          String status = Environment.getExternalStorageState();

          MusicLogUtils.d(TAG, "mScanListener.onReceive:" + action + ", status = " + status);
          if (Intent.ACTION_MEDIA_SCANNER_STARTED.equals(action)
              || Intent.ACTION_MEDIA_SCANNER_FINISHED.equals(action)) {
            MusicUtils.setSpinnerState(MusicPicker.this);
          }
          doQuery(false, null);
        }