Cleanup API checks for P, Q, and R.
Test: Build with gradle Flag: NA Change-Id: I3ef17090741d14bebd76cf09cf3dc5ac4f11e686
This commit is contained in:
1 parent
a601341ff5
commit
b922dccbf5
67 files changed
+117
-382
No files matched your search
@@ -23,7 +23,6 @@ import android.os.UserManager;
|
||||
|
||||
import androidx.annotation.IntDef;
|
||||
|
||||
import com.android.launcher3.Utilities;
|
||||
import com.android.launcher3.logging.StatsLogManager;
|
||||
import com.android.launcher3.model.data.ItemInfo;
|
||||
import com.android.launcher3.pm.UserCache;
|
||||
@@ -70,16 +69,13 @@ public abstract class UserProfileManager {
|
||||
|
||||
/** Sets quiet mode as enabled/disabled for the profile type. */
|
||||
protected void setQuietMode(boolean enabled) {
|
||||
if (Utilities.ATLEAST_P) {
|
||||
UI_HELPER_EXECUTOR.post(() -> {
|
||||
UI_HELPER_EXECUTOR.post(() ->
|
||||
mUserCache.getUserProfiles()
|
||||
.stream()
|
||||
.filter(getUserMatcher())
|
||||
.findFirst()
|
||||
.ifPresent(userHandle ->
|
||||
mUserManager.requestQuietModeEnabled(enabled, userHandle));
|
||||
});
|
||||
}
|
||||
mUserManager.requestQuietModeEnabled(enabled, userHandle)));
|
||||
}
|
||||
|
||||
/** Sets current state for the profile type. */
|
||||
|
||||
Reference in new issue
Block a user