Java Code Examples for com.android.internal.util.ArrayUtils#removeInt()

The following examples show how to use com.android.internal.util.ArrayUtils#removeInt() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: StorageManagerService.java    From android_9.0.0_r45 with Apache License 2.0 5 votes vote down vote up
private void onCleanupUser(int userId) {
    Slog.d(TAG, "onCleanupUser " + userId);

    try {
        mVold.onUserStopped(userId);
        mStoraged.onUserStopped(userId);
    } catch (Exception e) {
        Slog.wtf(TAG, e);
    }

    synchronized (mLock) {
        mSystemUnlockedUsers = ArrayUtils.removeInt(mSystemUnlockedUsers, userId);
    }
}
 
Example 2
Source File: StorageManagerService.java    From android_9.0.0_r45 with Apache License 2.0 5 votes vote down vote up
@Override
public void lockUserKey(int userId) {
    enforcePermission(android.Manifest.permission.STORAGE_INTERNAL);

    try {
        mVold.lockUserKey(userId);
    } catch (Exception e) {
        Slog.wtf(TAG, e);
        return;
    }

    synchronized (mLock) {
        mLocalUnlockedUsers = ArrayUtils.removeInt(mLocalUnlockedUsers, userId);
    }
}
 
Example 3
Source File: UserController.java    From android_9.0.0_r45 with Apache License 2.0 5 votes vote down vote up
void onUserRemoved(int userId) {
    synchronized (mLock) {
        int size = mUserProfileGroupIds.size();
        for (int i = size - 1; i >= 0; i--) {
            if (mUserProfileGroupIds.keyAt(i) == userId
                    || mUserProfileGroupIds.valueAt(i) == userId) {
                mUserProfileGroupIds.removeAt(i);

            }
        }
        mCurrentProfileIds = ArrayUtils.removeInt(mCurrentProfileIds, userId);
    }
}
 
Example 4
Source File: JobSchedulerService.java    From android_9.0.0_r45 with Apache License 2.0 4 votes vote down vote up
@Override
public void onStopUser(int userHandle) {
    mStartedUsers = ArrayUtils.removeInt(mStartedUsers, userHandle);
}