title: Android SharedPreferences after reboot device
body: <p>My English very very BAD cause i'm Russian. :)</p>
  
  <p>In my application I use <code>SharedPreferences</code> to store my values.
  The data has stored in the <code>SharedPreferences</code>, when application is running, and after exit from it. And everything works fine until I reboot my device. After reboot I can't use <code>SharedPreferences</code>, and the application doesn't read and write the data from there.
  I use the function <code>getPreferences(0)</code> to get preferences from application data folder. 
  I also tried to use the <code>getSharedPreferences(myPref, MODE_PRIVATE)</code>, but the effect is the same. Saves only one solution - data cleaning application after reboot device.</p>
  
  <pre><code>    favoriteButton = (ImageView) findViewById(R.id.favorite_button);
      SharedPreferences favorite = getSharedPreferences("Favorites", MODE_PRIVATE);
      if(favorite.getString(""+Loader.currentVideo.getTitle()+"", "") == "true") {
          favoriteButton.setImageDrawable(getResources().getDrawable(R.drawable.fav_selected));
      } else {
          favoriteButton.setImageDrawable(getResources().getDrawable(R.drawable.fav_empty));
      }
      favoriteButton.setOnClickListener(new OnClickListener() {
          public void onClick(View v) {
              SharedPreferences favorite = getSharedPreferences("Favorites", MODE_PRIVATE);
              SharedPreferences.Editor editor = favorite.edit();
              if(favorite.getString(""+Loader.currentVideo.getTitle()+"", "") == "true") {
                  favoriteButton.setImageDrawable(getResources().getDrawable(R.drawable.fav_empty));
                  Loader.favoriteVideos.remove(Loader.currentVideo);
                  editor.remove(""+Loader.currentVideo.getTitle()+"");
              } else {
                  favoriteButton.setImageDrawable(getResources().getDrawable(R.drawable.fav_selected));
                  Loader.favoriteVideos.add(Loader.currentVideo);
                  editor.putString(""+Loader.currentVideo.getTitle()+"", "true");
              }
              editor.commit();
          }
      });
  </code></pre>