code: public static long getRegisterOnServerLifespan(Context context) {
          final SharedPreferences prefs = getGCMPreferences(context);
          long lifespan = prefs.getLong(PROPERTY_ON_SERVER_LIFESPAN,
                  DEFAULT_ON_SERVER_LIFESPAN_MS);
          return lifespan;
      }
docs: Gets how long (in milliseconds) the {@link #isRegistered(Context)}
  property is valid.
  
  @return value set by {@link #setRegisteredOnServer(Context, boolean)} or
  {@link #DEFAULT_ON_SERVER_LIFESPAN_MS} if not set.