Home
last modified time | relevance | path

Searched refs:mViewModel (Results 1 – 9 of 9) sorted by relevance

/packages/apps/PermissionController/src/com/android/packageinstaller/permission/ui/handheld/
DAdjustUserSensitiveFragment.java71 private UserSensitiveOverrideViewModel mViewModel; field in AdjustUserSensitiveFragment
118 mViewModel = ViewModelProviders.of(this, new UserSensitiveOverrideViewModel.Factory( in onCreate()
120 mViewModel.getNonSensitivePackagesLiveData().observe(this, in onCreate()
122 mViewModel.getAllowOverrideUserSensitiveLiveData().observe(this, in onCreate()
124 mViewModel.getForcedUserSensitiveUidsLiveData().observe(this, in onCreate()
126 mViewModel.getAssistantRecordAudioIsUserSensitiveLiveData().observe(this, in onCreate()
133 mViewModel.setAllowOverrideUserSensitive((Boolean) newValue); in onCreate()
139 mViewModel.setAssistantRecordAudioIsUserSensitive((Boolean) newValue); in onCreate()
145 mSortedNonSensitivityPackages = mViewModel.getNonSensitivePackagesLiveData().getValue(); in updateOverrideUi()
162 mViewModel.getAllowOverrideUserSensitiveLiveData().getValue()); in updateOverrideSwitches()
[all …]
/packages/apps/PermissionController/src/com/android/packageinstaller/role/ui/
DDefaultAppListChildFragment.java67 private DefaultAppListViewModel mViewModel; field in DefaultAppListChildFragment
83 mViewModel = ViewModelProviders.of(this).get(DefaultAppListViewModel.class); in onActivityCreated()
84 mViewModel.getLiveData().observe(this, roleItems -> onRoleListChanged()); in onActivityCreated()
85 if (mViewModel.hasWorkProfile()) { in onActivityCreated()
86 mViewModel.getWorkLiveData().observe(this, roleItems -> onRoleListChanged()); in onActivityCreated()
91 List<RoleItem> roleItems = mViewModel.getLiveData().getValue(); in onRoleListChanged()
95 boolean hasWorkProfile = mViewModel.hasWorkProfile(); in onRoleListChanged()
98 workRoleItems = mViewModel.getWorkLiveData().getValue(); in onRoleListChanged()
125 addPreferences(preferenceScreen, roleItems, oldPreferences, this, mViewModel.getUser(), in onRoleListChanged()
138 mViewModel.getWorkProfile(), context); in onRoleListChanged()
DDefaultAppChildFragment.java71 private DefaultAppViewModel mViewModel; field in DefaultAppChildFragment
110 mViewModel = ViewModelProviders.of(this, new DefaultAppViewModel.Factory(mRole, mUser, in onActivityCreated()
112 mViewModel.getRoleLiveData().observe(this, this::onRoleChanged); in onActivityCreated()
113 mViewModel.getManageRoleHolderStateLiveData().observe(this, in onActivityCreated()
214 ManageRoleHolderStateLiveData liveData = mViewModel.getManageRoleHolderStateLiveData(); in onManageRoleHolderStateChanged()
234 mViewModel.setNoneDefaultApp(); in onPreferenceClick()
250 mViewModel.setDefaultApp(packageName); in setDefaultApp()
DSpecialAppAccessChildFragment.java64 private SpecialAppAccessViewModel mViewModel; field in SpecialAppAccessChildFragment
99 mViewModel = ViewModelProviders.of(this, new SpecialAppAccessViewModel.Factory(mRole, in onActivityCreated()
101 mViewModel.getRoleLiveData().observe(this, this::onRoleChanged); in onActivityCreated()
102 mViewModel.observeManageRoleHolderState(this, this::onManageRoleHolderStateChanged); in onActivityCreated()
197 mViewModel.setSpecialAppAccessAsUser(packageName, allow, user, key, this, in onPreferenceClick()
DSpecialAppAccessListChildFragment.java50 private SpecialAppAccessListViewModel mViewModel; field in SpecialAppAccessListChildFragment
66 mViewModel = ViewModelProviders.of(this).get(SpecialAppAccessListViewModel.class); in onActivityCreated()
67 mViewModel.getLiveData().observe(this, roleItems -> onRoleListChanged()); in onActivityCreated()
71 List<RoleItem> roleItems = mViewModel.getLiveData().getValue(); in onRoleListChanged()
DRequestRoleFragment.java82 private RequestRoleViewModel mViewModel; field in RequestRoleFragment
222 mViewModel = ViewModelProviders.of(this, new RequestRoleViewModel.Factory(mRole, in onStart()
224 mViewModel.getRoleLiveData().observe(this, mAdapter::replace); in onStart()
225 mViewModel.getManageRoleHolderStateLiveData().observe(this, in onStart()
286 mViewModel.getManageRoleHolderStateLiveData().clearRoleHoldersAsUser(mRoleName, 0, user, in setRoleHolder()
299 mViewModel.getManageRoleHolderStateLiveData().setRoleHolderAsUser(mRoleName, in setRoleHolder()
312 mViewModel.getManageRoleHolderStateLiveData(); in onManageRoleHolderStateChanged()
337 boolean enabled = mViewModel.getManageRoleHolderStateLiveData().getValue() in updateUi()
/packages/apps/Car/Cluster/src/android/car/cluster/
DPhoneFragment.java40 private PhoneFragmentViewModel mViewModel; field in PhoneFragment
51 mViewModel = ViewModelProviders.of(activity).get( in onCreateView()
61 mViewModel.getContactInfo().observe(getViewLifecycleOwner(), (contactInfo) -> { in onCreateView()
66 mViewModel.getBody().observe(getViewLifecycleOwner(), body::setText); in onCreateView()
67 mViewModel.getState().observe(getViewLifecycleOwner(), (state) -> { in onCreateView()
DNavigationFragment.java48 private ClusterViewModel mViewModel; field in NavigationFragment
121 mViewModel = provider.get(ClusterViewModel.class); in onCreateView()
171 mViewModel.getNavigationActivityState().observe(this, state -> { in onCreateView()
/packages/apps/Car/libs/car-media-common/tests/robotests/src/com/android/car/media/common/source/
DMediaSourceViewModelTest.java76 private MediaSourceViewModel mViewModel; field in MediaSourceViewModelTest
93 mViewModel = new MediaSourceViewModel(application, new MediaSourceViewModel.InputFactory() { in initializeViewModel()
136 mViewModel.getPrimaryMediaSource().observe(mLifecycleOwner, observer); in testGetSelectedMediaSource_none()
150 mViewModel.getConnectedBrowserCallback().onConnectedBrowserChanged(mMediaBrowser); in testGetMediaController_connectedBrowser()
151 mViewModel.getMediaController().observe(mLifecycleOwner, observer); in testGetMediaController_connectedBrowser()
166 mViewModel.getMediaController().observe(mLifecycleOwner, observer); in testGetMediaController_noActiveSession_notConnected()