diff options
| author | 2020-08-11 21:44:37 +0000 | |
|---|---|---|
| committer | 2020-08-11 21:44:37 +0000 | |
| commit | 501e75e878f91413f828f19a362e68d84ccc7e7e (patch) | |
| tree | 2e81ae4ed13583d998eb2f9be90f59a4d0a644e0 | |
| parent | 84604b06ff19c5db29522a1b4296167085e8c199 (diff) | |
| parent | 24725c475980e264bdc7f7c0ad8d5f04926b5cfc (diff) | |
Merge "Adding a util to extract Context.getUserId()"
| -rw-r--r-- | packages/SystemUI/shared/src/com/android/systemui/shared/system/ContextUtils.java | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/packages/SystemUI/shared/src/com/android/systemui/shared/system/ContextUtils.java b/packages/SystemUI/shared/src/com/android/systemui/shared/system/ContextUtils.java new file mode 100644 index 000000000000..1de740a083c2 --- /dev/null +++ b/packages/SystemUI/shared/src/com/android/systemui/shared/system/ContextUtils.java @@ -0,0 +1,28 @@ +/* + * Copyright (C) 2020 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.android.systemui.shared.system; + +import android.annotation.UserIdInt; +import android.content.Context; + +public class ContextUtils { + + /** Get the user associated with this context */ + public static @UserIdInt int getUserId(Context context) { + return context.getUserId(); + } +} |