Example usage for android.os Bundle putBoolean

List of usage examples for android.os Bundle putBoolean

Introduction

In this page you can find the example usage for android.os Bundle putBoolean.

Prototype

public void putBoolean(@Nullable String key, boolean value) 

Source Link

Document

Inserts a Boolean value into the mapping of this Bundle, replacing any existing value for the given key.

Usage

From source file:com.markupartist.sthlmtraveling.RoutesActivity.java

/**
 * If there is any running search for routes, save it and process it later 
 * on./*from w w w .j  ava2 s. c om*/
 * @param outState the out state
 */
private void saveSearchRoutesTask(Bundle outState) {
    final SearchRoutesTask task = mSearchRoutesTask;
    if (task != null && task.getStatus() != AsyncTask.Status.FINISHED) {
        Log.d(TAG, "saving SearchRoutesTask");
        task.cancel(true);
        mSearchRoutesTask = null;
        outState.putBoolean(STATE_SEARCH_ROUTES_IN_PROGRESS, true);
    }
}

From source file:com.markupartist.sthlmtraveling.RoutesActivity.java

/**
 * Save the state for the task for getting earlier routes.
 * @param outState the out state// w  w w  . j a  v  a2  s. c  om
 */
private void saveGetLaterRoutesTask(Bundle outState) {
    final GetLaterRoutesTask task = mGetLaterRoutesTask;
    if (task != null && task.getStatus() != AsyncTask.Status.FINISHED) {
        Log.d(TAG, "saving GetLaterRoutesTas");
        task.cancel(true);
        mGetLaterRoutesTask = null;
        outState.putBoolean(STATE_GET_LATER_ROUTES_IN_PROGRESS, true);
    }
}

From source file:com.markupartist.sthlmtraveling.RoutesActivity.java

/**
 * Save the state for the task for getting earlier routes.
 * @param outState the out state//from  ww  w . j a  v a  2 s  .  c  om
 */
private void saveGetEarlierRoutesTask(Bundle outState) {
    final GetEarlierRoutesTask task = mGetEarlierRoutesTask;
    if (task != null && task.getStatus() != AsyncTask.Status.FINISHED) {
        Log.d(TAG, "saving GetEarlierRoutesTas");
        task.cancel(true);
        mGetEarlierRoutesTask = null;
        outState.putBoolean(STATE_GET_EARLIER_ROUTES_IN_PROGRESS, true);
    }
}

From source file:co.taqat.call.CallActivity.java

@Override
protected void onSaveInstanceState(Bundle outState) {
    outState.putBoolean("Speaker", LinphoneManager.getLc().isSpeakerEnabled());
    outState.putBoolean("Mic", LinphoneManager.getLc().isMicMuted());
    outState.putBoolean("VideoCallPaused", isVideoCallPaused);

    super.onSaveInstanceState(outState);
}

From source file:cc.mintcoin.wallet.ui.SendCoinsFragment.java

private void saveInstanceState(final Bundle outState) {
    outState.putParcelable("payment_intent", paymentIntent);

    outState.putSerializable("state", state);

    if (validatedAddress != null)
        outState.putParcelable("validated_address", validatedAddress);

    if (sentTransaction != null)
        outState.putSerializable("sent_transaction_hash", sentTransaction.getHash());

    if (directPaymentAck != null)
        outState.putBoolean("direct_payment_ack", directPaymentAck);
}

From source file:github.popeen.dsub.activity.SubsonicFragmentActivity.java

@Override
public void onResume() {
    super.onResume();

    if (getIntent().hasExtra(Constants.INTENT_EXTRA_VIEW_ALBUM)) {
        SubsonicFragment fragment = new SelectDirectoryFragment();
        Bundle args = new Bundle();
        args.putString(Constants.INTENT_EXTRA_NAME_ID,
                getIntent().getStringExtra(Constants.INTENT_EXTRA_NAME_ID));
        args.putString(Constants.INTENT_EXTRA_NAME_NAME,
                getIntent().getStringExtra(Constants.INTENT_EXTRA_NAME_NAME));
        args.putString(Constants.INTENT_EXTRA_SEARCH_SONG,
                getIntent().getStringExtra(Constants.INTENT_EXTRA_SEARCH_SONG));
        if (getIntent().hasExtra(Constants.INTENT_EXTRA_NAME_ARTIST)) {
            args.putBoolean(Constants.INTENT_EXTRA_NAME_ARTIST, true);
        }//w w  w.  jav  a  2 s . c o  m
        if (getIntent().hasExtra(Constants.INTENT_EXTRA_NAME_CHILD_ID)) {
            args.putString(Constants.INTENT_EXTRA_NAME_CHILD_ID,
                    getIntent().getStringExtra(Constants.INTENT_EXTRA_NAME_CHILD_ID));
        }
        fragment.setArguments(args);

        replaceFragment(fragment, fragment.getSupportTag());
        getIntent().removeExtra(Constants.INTENT_EXTRA_VIEW_ALBUM);
    }

    UserUtil.seedCurrentUser(this);
    createAccount();
    runWhenServiceAvailable(new Runnable() {
        @Override
        public void run() {
            getDownloadService().addOnSongChangedListener(SubsonicFragmentActivity.this, true);
        }
    });
}

From source file:com.github.chenxiaolong.dualbootpatcher.switcher.InAppFlashingFragment.java

@Override
public void onSaveInstanceState(Bundle outState) {
    super.onSaveInstanceState(outState);

    outState.putParcelableArrayList(EXTRA_PENDING_ACTIONS, mPendingActions);

    outState.putParcelable(EXTRA_SELECTED_URI, mSelectedUri);
    outState.putString(EXTRA_SELECTED_URI_FILE_NAME, mSelectedUriFileName);
    outState.putParcelable(EXTRA_SELECTED_BACKUP_DIR_URI, mSelectedBackupDirUri);
    outState.putString(EXTRA_SELECTED_BACKUP_NAME, mSelectedBackupName);
    outState.putStringArray(EXTRA_SELECTED_BACKUP_TARGETS, mSelectedBackupTargets);
    outState.putString(EXTRA_SELECTED_ROM_ID, mSelectedRomId);
    outState.putString(EXTRA_ZIP_ROM_ID, mZipRomId);
    outState.putSerializable(EXTRA_ADD_TYPE, mAddType);
    outState.putInt(EXTRA_TASK_ID_VERIFY_ZIP, mTaskIdVerifyZip);
    outState.putBoolean(EXTRA_QUERYING_METADATA, mQueryingMetadata);
}

From source file:net.networksaremadeofstring.rhybudd.ViewZenossEventFragment.java

@Override
public void onSaveInstanceState(Bundle outState) {
    super.onSaveInstanceState(outState);

    try {//w w w  .ja va  2s.  c  om
        outState.putString("Title", Title.getText().toString());
        outState.putString("Component", Component.getText().toString());
        outState.putString("EventClass", EventClass.getText().toString());
        outState.putString("Summary", Summary.getText().toString());
        outState.putString("FirstTime", FirstTime.getText().toString());
        outState.putString("LastTime", LastTime.getText().toString());
        outState.putString("EventCount", EventCount.getText().toString());
        outState.putString("agent", agent.getText().toString());
    } catch (Exception e) {
        BugSenseHandler.sendExceptionMessage("ViewZenossEventFragmentUpdate", "onSaveInstanceState", e);
    }

    outState.putStringArray("LogEntries", LogEntries);

    try {
        if (isAcknowledged) {
            outState.putBoolean("eventStateAcknowledged", true);
        } else {
            outState.putBoolean("eventStateAcknowledged", false);
        }
    } catch (Exception e) {
        BugSenseHandler.sendExceptionMessage("ViewZenossEventFragment", "onsaveinstance", e);
    }

    try {
        if (img.getDrawable() instanceof android.graphics.drawable.BitmapDrawable) {
            outState.putParcelable("img", ((BitmapDrawable) img.getDrawable()).getBitmap());
        }
    } catch (ClassCastException cce) {
        //Don't care
    } catch (Exception e) {
        BugSenseHandler.sendExceptionMessage("ViewZenossEventFragment", "onsaveinstance", e);
    }
}

From source file:com.hichinaschool.flashcards.anki.CardEditor.java

@Override
protected void onSaveInstanceState(Bundle outState) {
    // TODO//  w  w w . j av  a  2s . co  m
    // // Log.i(AnkiDroidApp.TAG, "onSaveInstanceState: " + path);
    // outState.putString("deckFilename", path);
    outState.putBoolean("addFact", mAddNote);
    outState.putInt("caller", mCaller);
    // Log.i(AnkiDroidApp.TAG, "onSaveInstanceState - Ending");
}