Example usage for android.os Bundle clone

List of usage examples for android.os Bundle clone

Introduction

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

Prototype

@Override
public Object clone() 

Source Link

Document

Clones the current Bundle.

Usage

From source file:com.ptapp.activity.SessionsFragment.java

void reloadFromArguments(Bundle arguments) {
    // Load new arguments
    if (arguments == null) {
        arguments = new Bundle();
    } else {/* w w w  .  j  a va2  s  .c o m*/
        // since we might make changes, don't meddle with caller's copy
        arguments = (Bundle) arguments.clone();
    }

    // save arguments so we can reuse it when reloading from content observer events
    mArguments = arguments;

    LOGD(TAG, "SessionsFragment reloading from arguments: " + arguments);
    mCurrentUri = arguments.getParcelable("_uri");
    if (mCurrentUri == null) {
        // if no URI, default to all sessions URI
        /*LOGD(TAG, "SessionsFragment did not get a URL, defaulting to all sessions.");*/
        LOGD(TAG, "Setting uri to teacher's all groups...");
        arguments.putParcelable("_uri", PTAppContract.StaffEngagement.CONTENT_STAFF_GROUPS_URI);
        mCurrentUri = PTAppContract.StaffEngagement.CONTENT_STAFF_GROUPS_URI;
    }

    /*if (ScheduleContract.Sessions.isSearchUri(mCurrentUri)) {
    mSessionQueryToken = SessionsQuery.SEARCH_TOKEN;
    } else {*/
    mSessionQueryToken = SessionsQuery.NORMAL_TOKEN;
    /*}*/

    //LOGD(TAG, "SessionsFragment reloading, uri=" + mCurrentUri + ", expanded=" + useExpandedMode());

    reloadSessionData(true); // full reload
}