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.devicelockcontroller.activities; 18 19 import androidx.annotation.VisibleForTesting; 20 21 import com.android.devicelockcontroller.R; 22 import com.android.devicelockcontroller.activities.ProvisionInfo.ProvisionInfoType; 23 24 import java.util.List; 25 26 /** 27 * This class provides resources and data used for the device financing use case. 28 */ 29 public class DeviceFinancingProvisionInfoViewModel extends ProvisionInfoViewModel { 30 31 private static final int MANDATORY_HEADER_TEXT_ID = R.string.device_provided_by_provider; 32 private static final int SUB_HEADER_TEXT_ID = R.string.enroll_your_device_financing_subheader; 33 34 @VisibleForTesting 35 static final ProvisionInfo[] PROVISION_INFOS = new ProvisionInfo[]{ 36 new ProvisionInfo(R.drawable.ic_file_download_24px, 37 R.string.download_kiosk_app, 38 ProvisionInfoType.REGULAR), 39 new ProvisionInfo(R.drawable.ic_lock_outline_24px, 40 R.string.restrict_device_if_missing_payment, 41 ProvisionInfoType.TERMS_AND_CONDITIONS), 42 new ProvisionInfo(R.drawable.ic_help_24px, 43 R.string.contact_provider_for_help, 44 ProvisionInfoType.SUPPORT)}; 45 DeviceFinancingProvisionInfoViewModel()46 public DeviceFinancingProvisionInfoViewModel() { 47 mMandatoryHeaderTextId = MANDATORY_HEADER_TEXT_ID; 48 mSubHeaderTextId = SUB_HEADER_TEXT_ID; 49 mProvisionInfoList = List.of(PROVISION_INFOS); 50 retrieveData(); 51 } 52 } 53