title: getting false even after setting true in sharedpreferences android
body: <pre><code> public void inValidMobileNumber() {
  
      if (TokenUtils.isInvalidDob() ) {
          startActivity(new Intent(PersonalInfo.this,PassTwo.class));
          overridePendingTransition(R.anim.dashboard_right_from,R.anim.dashboard_right_to);
          TokenUtils.setisInvalidDob(false);
      }
      else {
          TokenUtils.setisInvalidDob(true);
          Intent intent = new Intent(PersonalInfo.this, MobileNumber.class);
          intent.putExtra("reportId", reportId);
          intent.putExtra("activityCode", CreditMantriConstants.TELL_US_MORE_ACTIVITY);
          startActivity(intent);
          overridePendingTransition(R.anim.dashboard_right_from, R.anim.dashboard_right_to);
      }
  
  }
  </code></pre>
  
  <p>public static void setisInvalidDob(Boolean dob){
          SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(CreditMantriApplication.getCreditMantri());
          final SharedPreferences.Editor edit = preferences.edit();
          edit.putBoolean("dob",dob);
          edit.apply();
      }</p>
  
  <pre><code>public static Boolean isInvalidDob()
  {
      SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(CreditMantriApplication.getCreditMantri());
      return preferences.getBoolean("dob",false);
  }
  </code></pre>
  
  <p>here is my code for getting a second time true for invalidDob</p>