docs: public static boolean isRegisteredOnServer(Context context) {
          final SharedPreferences prefs = getGCMPreferences(context);
          boolean isRegistered = prefs.getBoolean(PROPERTY_ON_SERVER, false);
          Log.v(TAG, "Is registered on server: " + isRegistered);
          if (isRegistered) {
              // checks if the information is not stale
              long expirationTime =
                      prefs.getLong(PROPERTY_ON_SERVER_EXPIRATION_TIME, -1);
              if (System.currentTimeMillis() > expirationTime) {
                  Log.v(TAG, "flag expired on: " + new Timestamp(expirationTime));
                  return false;
              }
          }
          return isRegistered;
      }