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