app/src/main/java/org/andstatus/app/context/StorageSwitch.java
// This is in the UI thread, so we can mess with the UI
This is in the UI thread, so we can mess with the UI
This is in the UI thread so we can mess with the UI
@Override
        protected void onFinish(TaskResult result, boolean success) {
            DialogFactory.dismissSafely(dlg);
            if (result == null) {
                MyLog.w(this, "Result is Null");
                Toast.makeText(mContext, mContext.getString(R.string.error), Toast.LENGTH_LONG).show();
                return;
            }
            MyLog.d(this, this.getClass().getSimpleName() + " ended, "
                    + (result.success ? (result.moved ? "moved" : "didn't move") : "failed"));
            if (!result.success) {
                result.messageBuilder.insert(0, mContext.getString(R.string.error) + ": ");
            }
            Toast.makeText(mContext, result.getMessage(), Toast.LENGTH_LONG).show();
            parentFragment.showUseExternalStorage();
        }
@ Override protected void onFinish ( TaskResult result , boolean success ) { DialogFactory . dismissSafely ( dlg ) ; if ( result == null ) { MyLog . w ( this , "Result is Null" ) ; Toast . makeText ( mContext , mContext . getString ( R . string . error ) , Toast . LENGTH_LONG ) . show ( ) ; return ; } MyLog . d ( this , this . getClass ( ) . getSimpleName ( ) + " ended, " + ( result . success ? ( result . moved ? "moved" : "didn't move" ) : "failed" ) ) ; if ( ! result . success ) { result . messageBuilder . insert ( 0 , mContext . getString ( R . string . error ) + ": " ) ; } Toast . makeText ( mContext , result . getMessage ( ) , Toast . LENGTH_LONG ) . show ( ) ; parentFragment . showUseExternalStorage ( ) ; }
This is in the UI thread, so we can mess with the UI
This is in the UI thread so we can mess with the UI