diff options
author | 2024-06-05 09:36:49 +0000 | |
---|---|---|
committer | 2024-06-05 09:55:36 +0000 | |
commit | d6eae13b5238ce6dc05a2054facc0b95c9965461 (patch) | |
tree | 62ea26893ce547780e0e03d1ce8b0113af549bd1 | |
parent | 674ace67fcad7e28ea8e8923e988907ea5c9a911 (diff) |
Add SdkLevel V check in onProfileActionStatusChange.
Bug: 344827852
Test: Manual
Change-Id: Idbd7ec7edb516c2c11d255f35579d0760ba9a496
-rw-r--r-- | src/com/android/documentsui/DocumentsApplication.java | 2 | ||||
-rw-r--r-- | src/com/android/documentsui/UserManagerState.java | 1 |
2 files changed, 2 insertions, 1 deletions
diff --git a/src/com/android/documentsui/DocumentsApplication.java b/src/com/android/documentsui/DocumentsApplication.java index 809ef9876..f006e0334 100644 --- a/src/com/android/documentsui/DocumentsApplication.java +++ b/src/com/android/documentsui/DocumentsApplication.java @@ -265,7 +265,7 @@ public class DocumentsApplication extends Application { } else if (PROFILE_FILTER_ACTIONS.contains(action)) { // Make the changes to UserManagerState object before calling providers updateAsync // so that providers for all the users are loaded - if (getConfigStore().isPrivateSpaceInDocsUIEnabled() && SdkLevel.isAtLeastS()) { + if (getConfigStore().isPrivateSpaceInDocsUIEnabled() && SdkLevel.isAtLeastV()) { UserHandle userHandle = intent.getParcelableExtra(Intent.EXTRA_USER); UserId userId = UserId.of(userHandle); getUserManagerState(context).onProfileActionStatusChange(action, userId); diff --git a/src/com/android/documentsui/UserManagerState.java b/src/com/android/documentsui/UserManagerState.java index 9bb9ee92a..b1c1a0d59 100644 --- a/src/com/android/documentsui/UserManagerState.java +++ b/src/com/android/documentsui/UserManagerState.java @@ -235,6 +235,7 @@ public interface UserManagerState { @Override @SuppressLint("NewApi") public void onProfileActionStatusChange(String action, UserId userId) { + if (!SdkLevel.isAtLeastV()) return; UserProperties userProperties = mUserManager.getUserProperties( UserHandle.of(userId.getIdentifier())); if (userProperties.getShowInQuietMode() != UserProperties.SHOW_IN_QUIET_MODE_HIDDEN) { |