work/workmanager/src/main/java/androidx/work/impl/utils/IdGenerator.java
private int nextId(String key) {
        int id = mSharedPrefs.getInt(key, INITIAL_ID);
        int nextId = (id == Integer.MAX_VALUE) ? INITIAL_ID : id + 1;
        update(key, nextId);
        return id;
    }
/**
     * Returns the next available ID based on a persisted counter.
     * Resets ID counter to 0 when the ID exceeded {@link Integer#MAX_VALUE}.
     * @param key String matching the particular counter to retrieve
     * @return next available id
     */
Returns the next available ID based on a persisted counter.
Resets ID counter to 0 when the ID exceeded  Integer#MAX_VALUE.
@param key String matching the particular counter to retrieve
@return next available id
Returns the next available ID based on a persisted counter . Resets ID counter to 0 when the ID exceeded Integer#MAX_VALUE . @param key String matching the particular counter to retrieve @return next available id
private int nextId(String key) {
        int id = mSharedPrefs.getInt(key, INITIAL_ID);
        int nextId = (id == Integer.MAX_VALUE) ? INITIAL_ID : id + 1;
        update(key, nextId);
        return id;
    }
private int nextId ( String key ) { int id = mSharedPrefs . getInt ( key , INITIAL_ID ) ; int nextId = ( id == Integer . MAX_VALUE ) ? INITIAL_ID : id + 1 ; update ( key , nextId ) ; return id ; }
Returns the next available ID based on a persisted counter.
Returns the next available ID based on a persisted counter .