Loading src/com/cyanogenmod/filemanager/commands/shell/AsyncResultProgram.java +5 −18 Original line number Original line Diff line number Diff line Loading @@ -53,10 +53,6 @@ public abstract class AsyncResultProgram */ */ final List<Byte> mPartialDataType; final List<Byte> mPartialDataType; final Object mSync = new Object(); final Object mSync = new Object(); /** * @hide */ final Object mTerminateSync = new Object(); private boolean mCancelled; private boolean mCancelled; private OnCancelListener mOnCancelListener; private OnCancelListener mOnCancelListener; Loading Loading @@ -134,14 +130,11 @@ public abstract class AsyncResultProgram this.mWorkerThread.mAlive = false; this.mWorkerThread.mAlive = false; this.mSync.notify(); this.mSync.notify(); } } synchronized (this.mTerminateSync) { if (this.mWorkerThread.isAlive()) { try { try { this.mTerminateSync.wait(); this.mWorkerThread.join(); } catch (Exception e) { } catch (InterruptedException e) { /**NON BLOCK**/ // Ignore this. } } } } //Notify end to command class //Notify end to command class Loading Loading @@ -395,12 +388,6 @@ public abstract class AsyncResultProgram } } } catch (Exception e) { } catch (Exception e) { /**NON BLOCK**/ /**NON BLOCK**/ } finally { this.mAlive = false; synchronized (AsyncResultProgram.this.mTerminateSync) { AsyncResultProgram.this.mTerminateSync.notify(); } } } } } } } Loading Loading
src/com/cyanogenmod/filemanager/commands/shell/AsyncResultProgram.java +5 −18 Original line number Original line Diff line number Diff line Loading @@ -53,10 +53,6 @@ public abstract class AsyncResultProgram */ */ final List<Byte> mPartialDataType; final List<Byte> mPartialDataType; final Object mSync = new Object(); final Object mSync = new Object(); /** * @hide */ final Object mTerminateSync = new Object(); private boolean mCancelled; private boolean mCancelled; private OnCancelListener mOnCancelListener; private OnCancelListener mOnCancelListener; Loading Loading @@ -134,14 +130,11 @@ public abstract class AsyncResultProgram this.mWorkerThread.mAlive = false; this.mWorkerThread.mAlive = false; this.mSync.notify(); this.mSync.notify(); } } synchronized (this.mTerminateSync) { if (this.mWorkerThread.isAlive()) { try { try { this.mTerminateSync.wait(); this.mWorkerThread.join(); } catch (Exception e) { } catch (InterruptedException e) { /**NON BLOCK**/ // Ignore this. } } } } //Notify end to command class //Notify end to command class Loading Loading @@ -395,12 +388,6 @@ public abstract class AsyncResultProgram } } } catch (Exception e) { } catch (Exception e) { /**NON BLOCK**/ /**NON BLOCK**/ } finally { this.mAlive = false; synchronized (AsyncResultProgram.this.mTerminateSync) { AsyncResultProgram.this.mTerminateSync.notify(); } } } } } } } Loading