public static void restore(final Context context){
  SharedPreferences prefs=PreferenceManager.getDefaultSharedPreferences(context);
  if (LongTermOrbits.isSupported() && prefs.getBoolean(KEY_LOCATION_TOGGLE,false)) {
    saveDownloadDataWifiOnlyPref(context);
    AlarmManager am=(AlarmManager)context.getSystemService(Context.ALARM_SERVICE);
    Intent intent=new Intent(context,LtoService.class);
    PendingIntent pi=PendingIntent.getService(context,0,intent,PendingIntent.FLAG_UPDATE_CURRENT | PendingIntent.FLAG_ONE_SHOT);
    long nextLtoDownload=System.currentTimeMillis() + (1000 * 60 * 2L);
    am.set(AlarmManager.RTC,nextLtoDownload,pi);
  }
}

public static void restore ( final Context context ) { SharedPreferences prefs = PreferenceManager . getDefaultSharedPreferences ( context ) ; if ( LongTermOrbits . isSupported ( ) && prefs . getBoolean ( KEY_LOCATION_TOGGLE , false ) ) { saveDownloadDataWifiOnlyPref ( context ) ; AlarmManager am = ( AlarmManager ) context . getSystemService ( Context . ALARM_SERVICE ) ; Intent intent = new Intent ( context , LtoService . class ) ; PendingIntent pi = PendingIntent . getService ( context , 0 , intent , PendingIntent . FLAG_UPDATE_CURRENT | PendingIntent . FLAG_ONE_SHOT ) ; long nextLtoDownload = System . currentTimeMillis ( ) + ( 1000 * 60 * 2L ) ; am . set ( AlarmManager . RTC , nextLtoDownload , pi ) ; } }
restore the properties associated with this preference on boot
