private void cleanUpRemovedUsersLocked() { final List<UserInfo> users = mUserManager.getUsers(true); if (users == null || users.size() == 0) { throw new IllegalStateException("There can't be no users"); } ArraySet<String> toDelete = new ArraySet<>(); String[] fileNames = mUsageStatsDir.list(); if (fileNames == null) { // No users to delete. return; } toDelete.addAll(Arrays.asList(fileNames)); final int userCount = users.size(); for (int i = 0; i < userCount; i++) { final UserInfo userInfo = users.get(i); toDelete.remove(Integer.toString(userInfo.id)); } final int deleteCount = toDelete.size(); for (int i = 0; i < deleteCount; i++) { deleteRecursively(new File(mUsageStatsDir, toDelete.valueAt(i))); } }
@Override public void endTransition( LayoutTransition transition, ViewGroup container, View view, int transitionType) { mTransitioningViews.remove(view); updateTransitioning(); }