Android-x86
Fork
Faire un don

  • R/O
  • HTTP
  • SSH
  • HTTPS

packages-apps-FileManager: Commit

packages/apps/FileManager


Commit MetaInfo

Révision119ce1ef21e3065e2fb51de288885bdbda087325 (tree)
l'heure2011-07-01 09:04:58
AuteurJoe Berria <nexesdevelopment@gmai...>
CommiterJoe Berria

Message de Log

fixed force close when leaving folder before thumbnail icons are done loading

Change Summary

Modification

Binary files a/bin/Tablet_File_Manager.apk and b/bin/Tablet_File_Manager.apk differ
Binary files a/bin/classes.dex and b/bin/classes.dex differ
Binary files a/bin/resources.ap_ and b/bin/resources.ap_ differ
--- a/res/layout/info_layout.xml
+++ b/res/layout/info_layout.xml
@@ -189,7 +189,7 @@
189189 android:textColor="@color/white"
190190 android:gravity="left"
191191 android:textAppearance="?android:attr/textAppearanceMedium"
192- android:text="Excecute: "/>
192+ android:text="Execute: "/>
193193 <TextView
194194 android:id="@+id/info_execute_perm"
195195 android:layout_width="match_parent"
--- a/src/com/nexes/manager/tablet/DialogHandler.java
+++ b/src/com/nexes/manager/tablet/DialogHandler.java
@@ -36,7 +36,6 @@ import android.widget.ListView;
3636 import android.widget.ImageView;
3737 import android.widget.TextView;
3838 import android.widget.Toast;
39-import android.util.Log;
4039
4140 import java.util.ArrayList;
4241 import java.util.Date;
--- a/src/com/nexes/manager/tablet/DirContentActivity.java
+++ b/src/com/nexes/manager/tablet/DirContentActivity.java
@@ -30,6 +30,8 @@ import android.app.Fragment;
3030 import android.os.Bundle;
3131 import android.os.Handler;
3232 import android.os.Message;
33+import android.content.ClipData;
34+import android.content.ClipDescription;
3335 import android.content.Context;
3436 import android.content.Intent;
3537 import android.content.ActivityNotFoundException;
@@ -41,7 +43,6 @@ import android.view.Menu;
4143 import android.view.MenuItem;
4244 import android.view.View;
4345 import android.view.ViewGroup;
44-import android.widget.ImageView.ScaleType;
4546 import android.widget.Toast;
4647 import android.widget.ArrayAdapter;
4748 import android.widget.LinearLayout;
@@ -54,7 +55,6 @@ import android.widget.AdapterView;
5455 import android.widget.AdapterView.OnItemClickListener;
5556 import android.widget.AdapterView.OnItemLongClickListener;
5657 import android.net.Uri;
57-import android.util.Log;
5858
5959 public class DirContentActivity extends Fragment implements OnItemClickListener,
6060 OnSetingsChangeListener,
@@ -411,8 +411,8 @@ public class DirContentActivity extends Fragment implements OnItemClickListener,
411411 } else if(!mShowGrid) {
412412 mDelegate = new DataAdapter(mContext, R.layout.list_content_layout, mData);
413413 mList.setVisibility(View.VISIBLE);
414- mList.setOnItemClickListener(this);
415414 mList.setAdapter(mDelegate);
415+ mList.setOnItemClickListener(this);
416416 mList.setOnItemLongClickListener(new OnItemLongClickListener() {
417417
418418 @Override
@@ -457,7 +457,7 @@ public class DirContentActivity extends Fragment implements OnItemClickListener,
457457
458458 v.setOnClickListener(new View.OnClickListener() {
459459 @Override
460- public void onClick(View v) {
460+ public void onClick(View v) {
461461 int ret = mMultiSelect.clearFileEntry(file.getPath());
462462 mMultiSelectView.removeViewAt(ret);
463463 }
@@ -468,8 +468,10 @@ public class DirContentActivity extends Fragment implements OnItemClickListener,
468468 }
469469
470470 if(file.isDirectory() && !mActionModeSelected ) {
471- if (mThumbnail != null)
471+ if (mThumbnail != null) {
472+ mThumbnail.setCancelThumbnails(true);
472473 mThumbnail = null;
474+ }
473475
474476 addBackButton(name, true);
475477
@@ -620,8 +622,10 @@ public class DirContentActivity extends Fragment implements OnItemClickListener,
620622 if(mActionModeSelected || mMultiSelectOn)
621623 return;
622624
623- if (mThumbnail != null)
625+ if (mThumbnail != null) {
626+ mThumbnail.setCancelThumbnails(true);
624627 mThumbnail = null;
628+ }
625629
626630 mData = mFileMang.setHomeDir(name);
627631 mDelegate.notifyDataSetChanged();
@@ -846,6 +850,11 @@ public class DirContentActivity extends Fragment implements OnItemClickListener,
846850 if(mActionModeSelected || mMultiSelectOn)
847851 return;
848852
853+ if (mThumbnail != null) {
854+ mThumbnail.setCancelThumbnails(true);
855+ mThumbnail = null;
856+ }
857+
849858 if(index != (mPathView.getChildCount() - 1)) {
850859 while(index < mPathView.getChildCount() - 1)
851860 mPathView.removeViewAt(mPathView.getChildCount() - 1);
--- a/src/com/nexes/manager/tablet/DirListActivity.java
+++ b/src/com/nexes/manager/tablet/DirListActivity.java
@@ -41,7 +41,6 @@ import android.widget.EditText;
4141 import android.widget.ArrayAdapter;
4242 import android.widget.AdapterView.AdapterContextMenuInfo;
4343 import android.widget.Toast;
44-import android.util.Log;
4544
4645 import java.util.ArrayList;
4746 import java.io.File;
--- a/src/com/nexes/manager/tablet/EventHandler.java
+++ b/src/com/nexes/manager/tablet/EventHandler.java
@@ -30,7 +30,6 @@ import android.widget.Toast;
3030 import android.widget.EditText;
3131 import android.widget.TextView;
3232 import android.net.Uri;
33-import android.util.Log;
3433
3534 import java.util.ArrayList;
3635 import java.io.File;
--- a/src/com/nexes/manager/tablet/MainActivity.java
+++ b/src/com/nexes/manager/tablet/MainActivity.java
@@ -30,7 +30,6 @@ import android.view.Menu;
3030 import android.view.MenuItem;
3131 import android.widget.SearchView;
3232 import android.widget.Toast;
33-import android.util.Log;
3433
3534 import java.io.File;
3635 import java.util.ArrayList;
--- a/src/com/nexes/manager/tablet/MultiSelectHandler.java
+++ b/src/com/nexes/manager/tablet/MultiSelectHandler.java
@@ -2,11 +2,9 @@ package com.nexes.manager.tablet;
22
33 import android.content.Context;
44 import android.view.View;
5-import android.graphics.Bitmap;
65 import android.view.LayoutInflater;
76 import android.widget.ImageView;
87 import android.widget.TextView;
9-import android.util.Log;
108
119 import java.util.ArrayList;
1210 import java.io.File;
@@ -71,9 +69,7 @@ public class MultiSelectHandler {
7169 public void cancelMultiSelect() {
7270 mFileList.clear();
7371 mFileList = null;
74- mInstance = null;
75-
76- Log.e("MULTISELECT", "cancel called");
72+ mInstance = null;
7773 }
7874
7975 private void setImage(String extension, ImageView image) {
--- a/src/com/nexes/manager/tablet/ThumbnailCreator.java
+++ b/src/com/nexes/manager/tablet/ThumbnailCreator.java
@@ -38,6 +38,7 @@ public class ThumbnailCreator extends Thread {
3838 private ArrayList<String> mFiles;
3939 private String mDir;
4040 private Handler mHandler;
41+ private boolean mStop = false;
4142
4243 public ThumbnailCreator(int width, int height) {
4344 mHeight = height;
@@ -50,12 +51,28 @@ public class ThumbnailCreator extends Thread {
5051 public BitmapDrawable isBitmapCached(String name) {
5152 return mCacheMap.get(name);
5253 }
54+
55+ public void createNewThumbnail(ArrayList<String> files, String dir, Handler handler) {
56+ this.mFiles = files;
57+ this.mDir = dir;
58+ this.mHandler = handler;
59+ }
60+
61+ public void setCancelThumbnails(boolean stop) {
62+ mStop = stop;
63+ }
5364
5465 @Override
5566 public void run() {
5667 int len = mFiles.size();
5768
58- for (int i = 0; i < len; i++) {
69+ for (int i = 0; i < len; i++) {
70+ if (mStop) {
71+ mStop = false;
72+ mFiles = null;
73+ return;
74+ }
75+
5976 final File file = new File(mDir + "/" + mFiles.get(i));
6077
6178 if (isImageFile(file.getName())) {
@@ -103,12 +120,6 @@ public class ThumbnailCreator extends Thread {
103120 }
104121 }
105122
106- public void createNewThumbnail(ArrayList<String> files, String dir, Handler handler) {
107- this.mFiles = files;
108- this.mDir = dir;
109- this.mHandler = handler;
110- }
111-
112123 private boolean isImageFile(String file) {
113124 String ext = file.substring(file.lastIndexOf(".") + 1);
114125
Afficher sur ancien navigateur de dépôt.