public boolean setBranchKey ( String key ) { Branch_Key = key ; String currentBranchKey = getString ( KEY_BRANCH_KEY ) ; if ( key == null || currentBranchKey == null || ! currentBranchKey . equals ( key ) ) { clearPrefOnBranchKeyChange ( ) ; setString ( KEY_BRANCH_KEY , key ) ; return true ; } return false ; }
Set the given Branch Key to preference . Clears the preference data if the key is a new key .