Click on pause can‘t get respond when download
<p>When I download,click on pause,but there isn't respond.
I don't konw how to description specific,in fact it is meaning stop,but really can't realize.
the code</p>

<pre><code>public void onClick(View v) {

                      [color=#FF0000]if (flag == 0){//click mark[/color]
</code></pre>

<p>can't display,the red is only a mark.
code as follows</p>

<pre><code>holder.btns .setOnClickListener(new OnClickListener(){
                @Override
                public void onClick(View v) {

                  [color=#FF0000]if (flag == 0){//judge the click mark[/color] 

                    holder.ratingBarScore.setVisibility(View.GONE);
                    holder.pro.setVisibility(View.VISIBLE);
                    holder.textView.setVisibility(View.VISIBLE);
                    if(Environment.getExternalStorageState().equals(Environment.MEDIA_MOUNTED)){
                    }else {
//                        Toast.makeText(this, "there is no SD card", 1000).show();
                        Log.v("wjp", "7889900");
                    }
                    final String downloadUrl =(String)v.getTag();
                    Thread thread = new Thread(){
                        int count = 0;
                        public void run(){
                          Log.v("ccf", "onClick");
                          try {
                              downLoadFile(context, downloadUrl, gameName, holder);    
                              openFile(context, new File("/sdcard/9twan/"+ gameName +".apk"));
                              if(!WebHelper.REGISTER_FLAG){
                                  Log.v("GamesInfoListAdapter", "WebHelper.REGISTER_FLAG == false");
                                  String imei, mac, mobile_number, model, brand;
                                  boolean flag;
                                  TelephonyManager tm = (TelephonyManager) context.getSystemService(Context.TELEPHONY_SERVICE);
                                  imei = tm.getDeviceId();
                                  if(imei == null){
                                      imei = "CUSTOM" + WebHelper.generateRandomIMEIString(15);
                                  }
                                  mac = null;
//                                  mac = tm.getDeviceId(); 
                                  if(mac == null){
                                      mac = "CUSTOM" + WebHelper.generateRandomMacString(17);
                                  }
                                  mobile_number = tm.getLine1Number();
                                  model = tm.getLine1Number();
                                  brand = tm.getLine1Number();
                                  flag = WebHelper.regDevice(context, "install", imei, mac, mobile_number, model, brand);
                                  if(flag){
                                      WebHelper.REGISTER_FLAG = true;
                                      Log.v("GamesInfoListAdapter", "WebHelper.REGISTER_FLAG == true");
                                  }
                              }

                          }catch (Exception e){
                              e.printStackTrace();
                          }
                        }
                    };
                    Log.v("wjp", "running"+thread.getName());
                    thread.start();
                    Toast.makeText(context, "begin to download" + gameName, 0).show();
                    holder.btns.setBackgroundResource(R.drawable.tab_out);

                    [color=#FF0000]flag =1;[/color]//here is need to pause,how to write?
                    }else {
                          if(Thread.currentThread() !=null){
                              Thread.interrupted();
//                              Thread = null;
                          }
//                        thread.
//                        Thread.interrupted();//pause return boolean
//                        Thread.sleep(3000);
//                          Thread.

                        holder.btns.setBackgroundResource(R.drawable.tab_install);
                        flag =0;

                    }
                }

            });
        }
        return convertView;
</code></pre>
