Home
last modified time | relevance | path

Searched refs:viewModel (Results 1 – 12 of 12) sorted by relevance

/packages/apps/ManagedProvisioning/tests/instrumentation/src/com/android/managedprovisioning/preprovisioning/terms/
DTermsViewModelTest.java90 TermsViewModel viewModel = createViewModel(PARAMS_MANAGED_DEVICE_WITH_DISCLAIMERS); in getTerms_hasExpectedResults() local
92 final List<TermsDocument> terms = viewModel.getTerms(); in getTerms_hasExpectedResults()
101 TermsViewModel viewModel = createViewModel(PARAMS_MANAGED_DEVICE); in getGeneralDisclaimer_deviceOwner_hasExpectedContent() local
103 final TermsDocument generalDisclaimer = viewModel.getGeneralDisclaimer(); in getGeneralDisclaimer_deviceOwner_hasExpectedContent()
113 TermsViewModel viewModel = createViewModel(PARAMS_MANAGED_PROFILE); in getGeneralDisclaimer_workProfile_hasExpectedContent() local
115 final TermsDocument generalDisclaimer = viewModel.getGeneralDisclaimer(); in getGeneralDisclaimer_workProfile_hasExpectedContent()
125 TermsViewModel viewModel = createViewModel(PARAMS_MANAGED_DEVICE_WITH_DISCLAIMERS); in setTermExpanded_works() local
127 viewModel.setTermExpanded(TERM_POSITION, /* expanded= */ true); in setTermExpanded_works()
129 assertThat(viewModel.isTermExpanded(TERM_POSITION)).isTrue(); in setTermExpanded_works()
134 TermsViewModel viewModel = createViewModel(PARAMS_MANAGED_DEVICE_WITH_DISCLAIMERS); in setTermExpanded_invalidPosition_throwsException() local
[all …]
/packages/modules/Permission/PermissionController/src/com/android/permissioncontroller/permission/ui/
DUnusedAppsFragment.kt61 private lateinit var viewModel: UnusedAppsViewModel in <lambda>() variable in com.android.permissioncontroller.permission.ui.UnusedAppsFragment
107 viewModel = ViewModelProvider(this, factory).get(UnusedAppsViewModel::class.java) in <lambda>()
108 viewModel.unusedPackageCategoriesLiveData.observe(this, Observer { in <lambda>()
117 if (!viewModel.areUnusedPackagesLoaded()) { in <lambda>()
120 if (!viewModel.areUnusedPackagesLoaded()) { in <lambda>()
225 viewModel.requestUninstallApp(this, pkgName, user) in <lambda>()
230 viewModel.navigateToAppInfo(pkgName, user, sessionId) in <lambda>()
272 viewModel.logAppView(revokedPackageInfo.packageName, in <lambda>()
327 fragment.viewModel.disableApp(packageName, user) in <lambda>()
/packages/modules/Permission/PermissionController/src/com/android/permissioncontroller/permission/ui/television/
DManagePermissionsOtherFragment.java65 final ManagePermissionsViewModel viewModel = new ViewModelProvider(activity, factory) in onCreate() local
68 Log.d(TAG, "ManagePermissionsOtherFragment.onCreate()\n viewModel=" + viewModel); in onCreate()
70 viewModel.getUnusedPermissionGroups().observe(this, this::onUnusedPermissionGroupsChanged); in onCreate()
71 viewModel.getAdditionalPermissionGroups().observe(this, in onCreate()
73 viewModel.hasUnusedOrAdditionalPermissionGroups().observe(this, in onCreate()
/packages/apps/Car/Dialer/src/com/android/car/dialer/ui/calllog/
DCallHistoryFragment.java49 CallHistoryViewModel viewModel = new ViewModelProvider(this).get( in onViewCreated() local
52 viewModel.getCallHistory().observe(this, uiCallLogs -> { in onViewCreated()
63 viewModel.getSortOrderLiveData().observe(this, in onViewCreated()
/packages/apps/Car/Dialer/src/com/android/car/dialer/ui/
DTelecomActivity.java91 TelecomActivityViewModel viewModel = new ViewModelProvider(this).get( in onCreate() local
94 mRefreshUiLiveData = viewModel.getRefreshTabsLiveData(); in onCreate()
97 LiveData<Boolean> hasHfpDeviceConnectedLiveData = viewModel.hasHfpDeviceConnected(); in onCreate()
104 MutableLiveData<Integer> toolbarTitleMode = viewModel.getToolbarTitleMode(); in onCreate()
107 mOngoingCallListLiveData = viewModel.getOngoingCallListLiveData(); in onCreate()
/packages/apps/Car/Dialer/src/com/android/car/dialer/ui/dialpad/
DInCallDialpadFragment.java65 InCallViewModel viewModel = new ViewModelProvider(getActivity()).get(InCallViewModel.class); in onCreateView() local
66 viewModel.getCallStateAndConnectTime().observe(this, (pair) -> { in onCreateView()
86 mActiveCall = viewModel.getPrimaryCall(); in onCreateView()
/packages/apps/Car/Dialer/tests/robotests/src/com/android/car/dialer/testutils/
DShadowAndroidViewModelFactory.java40 public static <T extends ViewModel> void add(Class<T> modelClass, T viewModel) { in add() argument
41 VIEW_MODEL_MAP.put(modelClass, viewModel); in add()
/packages/apps/TvSettings/Settings/src/com/android/tv/settings/
DSettingsPreferenceFragment.java142 private void iteratePreferenceAndSetObserver(SettingsViewModel viewModel, in iteratePreferenceAndSetObserver() argument
148 viewModel.getVisibilityLiveData( in iteratePreferenceAndSetObserver()
153 iteratePreferenceAndSetObserver(viewModel, (PreferenceGroup) pref); in iteratePreferenceAndSetObserver()
/packages/apps/Car/Messenger/src/com/android/car/messenger/core/ui/launcher/
DMessageLauncherActivity.java42 MessageLauncherViewModel viewModel = in onCreate() local
46 viewModel in onCreate()
/packages/apps/Car/Dialer/src/com/android/car/dialer/ui/common/
DDialerBaseFragment.java79 TelecomActivityViewModel viewModel = new ViewModelProvider(requireActivity()).get( in setupToolbar() local
81 LiveData<String> toolbarTitleLiveData = viewModel.getToolbarTitle(); in setupToolbar()
/packages/apps/Car/Messenger/src/com/android/car/messenger/core/ui/conversationlist/
DConversationListFragment.java67 ConversationListViewModel viewModel = in onViewCreated() local
70 viewModel in onViewCreated()
/packages/apps/ManagedProvisioning/src/com/android/managedprovisioning/preprovisioning/
DPreProvisioningActivityController.java149 @NonNull PreProvisioningViewModel viewModel) { in PreProvisioningActivityController() argument
159 mViewModel = requireNonNull(viewModel); in PreProvisioningActivityController()