Android examples for android.os:Bundle
intercept Boolean Param from Bundle
import android.content.Intent; import android.os.Bundle; public class Main { public static boolean interceptBooleanParam(Bundle savedInstanceState, Intent intent, String paramName) { boolean ret = false; if (savedInstanceState != null) { ret = savedInstanceState.getBoolean(paramName, false); } else {//from w w w.ja va 2 s. c om if (intent != null) { Bundle incomming = intent.getExtras(); if (incomming != null) { ret = incomming.getBoolean(paramName, false); } } } return ret; } }