1 /* 2 * Copyright (C) 2023 The Android Open Source Project 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 17 package com.android.providers.media.photopicker.ui.settings; 18 19 import static java.util.Objects.requireNonNull; 20 21 import androidx.annotation.NonNull; 22 import androidx.annotation.Nullable; 23 24 /* POJO for encapsulating cloud provider authority and it's linked account name. */ 25 class CloudMediaProviderAccount { 26 @NonNull 27 private final String mCloudProviderAuthority; 28 @Nullable 29 private final String mCloudProviderAccountName; 30 CloudMediaProviderAccount( @onNull String cloudProviderAuthority, @Nullable String cloudProviderAccountName)31 CloudMediaProviderAccount( 32 @NonNull String cloudProviderAuthority, 33 @Nullable String cloudProviderAccountName) { 34 mCloudProviderAuthority = requireNonNull(cloudProviderAuthority); 35 mCloudProviderAccountName = cloudProviderAccountName; 36 } 37 38 @NonNull getCloudProviderAuthority()39 String getCloudProviderAuthority() { 40 return mCloudProviderAuthority; 41 } 42 43 @Nullable getCloudProviderAccountName()44 String getCloudProviderAccountName() { 45 return mCloudProviderAccountName; 46 } 47 } 48