1 /* 2 * Copyright (C) 2018 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.car.dialer; 18 19 import android.app.Application; 20 import android.bluetooth.BluetoothDevice; 21 22 import androidx.lifecycle.LiveData; 23 24 import com.android.car.dialer.bluetooth.CallHistoryManager; 25 import com.android.car.dialer.bluetooth.UiBluetoothMonitor; 26 import com.android.car.dialer.framework.AndroidFramework; 27 import com.android.car.dialer.notification.MissedCallNotificationController; 28 import com.android.car.dialer.telecom.UiCallManager; 29 import com.android.car.telephony.common.InMemoryPhoneBook; 30 31 import javax.inject.Inject; 32 import javax.inject.Named; 33 34 import dagger.hilt.android.HiltAndroidApp; 35 36 /** Application for Dialer app. */ 37 @HiltAndroidApp(Application.class) 38 public final class DialerApplication extends Hilt_DialerApplication { 39 // Explicit injection for components that need to init on application create. 40 @Inject 41 UiCallManager mUiCallManager; 42 @Inject 43 UiBluetoothMonitor mUiBluetoothMonitor; 44 @Inject @Named("Hfp") 45 LiveData<BluetoothDevice> mCurrentHfpDeviceLiveData; 46 @Inject 47 CallHistoryManager mCallHistoryManager; 48 @Inject 49 MissedCallNotificationController mMissedCallNotificationController; 50 51 @Inject 52 AndroidFramework mAndroidFramework; 53 54 @Override onCreate()55 public void onCreate() { 56 super.onCreate(); 57 mAndroidFramework.start(); 58 InMemoryPhoneBook.init(this); 59 } 60 } 61