Home
last modified time | relevance | path

Searched refs:profile (Results 1 – 25 of 130) sorted by relevance

123456

/packages/modules/Connectivity/tests/unit/java/android/net/
DIkev2VpnProfileTest.java107 final Ikev2VpnProfile profile = builder.build(); in testBuildValidProfileWithOptions() local
108 assertNotNull(profile); in testBuildValidProfileWithOptions()
111 assertEquals(SERVER_ADDR_STRING, profile.getServerAddr()); in testBuildValidProfileWithOptions()
112 assertEquals(IDENTITY_STRING, profile.getUserIdentity()); in testBuildValidProfileWithOptions()
113 assertEquals(mProxy, profile.getProxyInfo()); in testBuildValidProfileWithOptions()
114 assertTrue(profile.isBypassable()); in testBuildValidProfileWithOptions()
115 assertTrue(profile.isMetered()); in testBuildValidProfileWithOptions()
116 assertEquals(TEST_MTU, profile.getMaxMtu()); in testBuildValidProfileWithOptions()
117 assertEquals(Ikev2VpnProfile.DEFAULT_ALGORITHMS, profile.getAllowedAlgorithms()); in testBuildValidProfileWithOptions()
125 final Ikev2VpnProfile profile = builder.build(); in testBuildUsernamePasswordProfile() local
[all …]
DVpnManagerTest.java75 final PlatformVpnProfile profile = getPlatformVpnProfile(); in testProvisionVpnProfilePreconsented() local
80 assertNull(mVpnManager.provisionVpnProfile(profile)); in testProvisionVpnProfilePreconsented()
81 verify(mMockService).provisionVpnProfile(eq(profile.toVpnProfile()), eq(PKG_NAME)); in testProvisionVpnProfilePreconsented()
86 final PlatformVpnProfile profile = getPlatformVpnProfile(); in testProvisionVpnProfileNeedsConsent() local
91 final Intent intent = mVpnManager.provisionVpnProfile(profile); in testProvisionVpnProfileNeedsConsent()
98 verify(mMockService).provisionVpnProfile(eq(profile.toVpnProfile()), eq(PKG_NAME)); in testProvisionVpnProfileNeedsConsent()
/packages/services/Car/service/src/com/android/car/
DCarBluetoothUserService.java85 for (int profile : sProfilesToConnect) { in CarBluetoothUserService()
86 mBluetoothProfileStatus.put(profile, false); in CarBluetoothUserService()
113 for (int profile : sProfilesToConnect) { in setupBluetoothConnectionProxies()
114 logd("Creating proxy for %s", Utils.getProfileName(profile)); in setupBluetoothConnectionProxies()
116 mProfileListener, profile); in setupBluetoothConnectionProxies() local
162 public void onServiceConnected(int profile, BluetoothProfile proxy) {
163 logd("onServiceConnected profile: %s", Utils.getProfileName(profile));
169 switch (profile) {
186 logd("Unhandled profile connected: %s", Utils.getProfileName(profile));
190 if (!mBluetoothProfileStatus.get(profile, false)) {
[all …]
DBluetoothProfileInhibitManager.java95 public BluetoothConnection(Integer profile, BluetoothDevice device) { in BluetoothConnection() argument
96 mBluetoothProfile = profile; in BluetoothConnection()
164 Integer profile; in decode() local
166 profile = Integer.valueOf(parts[1]); in decode()
168 profile = null; in decode()
171 return new BluetoothConnection(profile, device); in decode()
309 boolean requestProfileInhibit(BluetoothDevice device, int profile, IBinder token) { in requestProfileInhibit() argument
310 logd("Request profile inhibit: profile " + Utils.getProfileName(profile) in requestProfileInhibit()
312 BluetoothConnection params = new BluetoothConnection(profile, device); in requestProfileInhibit()
327 boolean releaseProfileInhibit(BluetoothDevice device, int profile, IBinder token) { in releaseProfileInhibit() argument
[all …]
DCarBluetoothService.java389 public List<BluetoothDevice> getProfileDevicePriorityList(int profile) { in getProfileDevicePriorityList() argument
393 (BluetoothProfileDeviceManager) mProfileDeviceManagers.get(profile); in getProfileDevicePriorityList()
408 public int getDeviceConnectionPriority(int profile, BluetoothDevice device) { in getDeviceConnectionPriority() argument
412 (BluetoothProfileDeviceManager) mProfileDeviceManagers.get(profile); in getDeviceConnectionPriority()
427 public void setDeviceConnectionPriority(int profile, BluetoothDevice device, int priority) { in setDeviceConnectionPriority() argument
431 (BluetoothProfileDeviceManager) mProfileDeviceManagers.get(profile); in setDeviceConnectionPriority()
449 boolean requestProfileInhibit(BluetoothDevice device, int profile, IBinder token) { in requestProfileInhibit() argument
450 logd("Request profile inhibit: profile " + Utils.getProfileName(profile) in requestProfileInhibit()
454 return mInhibitManager.requestProfileInhibit(device, profile, token); in requestProfileInhibit()
468 boolean releaseProfileInhibit(BluetoothDevice device, int profile, IBinder token) { in releaseProfileInhibit() argument
[all …]
/packages/apps/Settings/src/com/android/settings/bluetooth/
DBluetoothDetailsProfilesController.java92 LocalBluetoothProfile profile) { in createProfilePreference() argument
94 pref.setKey(profile.toString()); in createProfilePreference()
95 pref.setTitle(profile.getNameResource(mCachedDevice.getDevice())); in createProfilePreference()
97 pref.setOrder(profile.getOrdinal()); in createProfilePreference()
105 LocalBluetoothProfile profile) { in refreshProfilePreference() argument
108 if (profile instanceof MapProfile) { in refreshProfilePreference()
111 } else if (profile instanceof PbapServerProfile) { in refreshProfilePreference()
114 } else if (profile instanceof PanProfile) { in refreshProfilePreference()
115 profilePref.setChecked(profile.getConnectionStatus(device) == in refreshProfilePreference()
118 profilePref.setChecked(profile.isEnabled(device)); in refreshProfilePreference()
[all …]
/packages/apps/Settings/src/com/android/settings/vpn2/
DConfigDialogFragment.java62 public static void show(VpnSettings parent, VpnProfile profile, boolean edit, boolean exists) { in show() argument
66 args.putParcelable(ARG_PROFILE, profile); in show()
86 VpnProfile profile = (VpnProfile) args.getParcelable(ARG_PROFILE); in onCreateDialog() local
90 final Dialog dialog = new ConfigDialog(getActivity(), this, profile, editing, exists); in onCreateDialog()
112 VpnProfile profile = (VpnProfile) options.getParcelable(ARG_PROFILE); in onConfirmLockdown() local
113 connect(profile, isAlwaysOn); in onConfirmLockdown()
124 VpnProfile profile = dialog.getProfile(); in onClick() local
133 if (shouldConnect && !isConnected(profile) && in onClick()
136 opts.putParcelable(ARG_PROFILE, profile); in onClick()
140 connect(profile, shouldLockdown); in onClick()
[all …]
DConfigDialog.java98 VpnProfile profile, boolean editing, boolean exists) { in ConfigDialog() argument
102 mProfile = profile; in ConfigDialog()
325 VpnProfile profile = getProfile(); in updateUiControls() local
328 if (profile.isValidLockdownProfile()) { in updateUiControls()
334 if (!profile.isTypeValidForLockdown()) { in updateUiControls()
336 } else if (isLegacyType(profile.type) && !profile.isServerAddressNumeric()) { in updateUiControls()
338 } else if (isLegacyType(profile.type) && !profile.hasDns()) { in updateUiControls()
340 } else if (isLegacyType(profile.type) && !profile.areDnsAddressesNumeric()) { in updateUiControls()
613 VpnProfile profile = new VpnProfile(mProfile.key); in getProfile() local
614 profile.name = mName.getText().toString(); in getProfile()
[all …]
DVpnSettings.java169 VpnProfile profile = new VpnProfile(Long.toHexString(millis)); in onOptionsItemSelected() local
170 ConfigDialogFragment.show(this, profile, true /* editing */, false /* exists */); in onOptionsItemSelected()
300 for (VpnProfile profile : vpnProfiles) { in run()
301 LegacyVpnPreference p = mSettings.findOrCreatePreference(profile, true); in run()
302 if (connectedLegacyVpns.containsKey(profile.key)) { in run()
303 p.setState(connectedLegacyVpns.get(profile.key).state); in run()
307 p.setAlwaysOn(lockdownVpnKey != null && lockdownVpnKey.equals(profile.key)); in run()
308 p.setInsecureVpn(VpnProfile.isLegacyType(profile.type)); in run()
373 VpnProfile profile = pref.getProfile(); in onPreferenceClick() local
374 if (mConnectedLegacyVpn != null && profile.key.equals(mConnectedLegacyVpn.key) && in onPreferenceClick()
[all …]
/packages/modules/Connectivity/tests/cts/net/src/android/net/cts/
DIkev2VpnTest.java246 private void checkBasicIkev2VpnProfile(@NonNull Ikev2VpnProfile profile) throws Exception { in checkBasicIkev2VpnProfile() argument
247 assertEquals(TEST_SERVER_ADDR_V6, profile.getServerAddr()); in checkBasicIkev2VpnProfile()
248 assertEquals(TEST_IDENTITY, profile.getUserIdentity()); in checkBasicIkev2VpnProfile()
249 assertEquals(TEST_PROXY_INFO, profile.getProxyInfo()); in checkBasicIkev2VpnProfile()
250 assertEquals(TEST_ALLOWED_ALGORITHMS, profile.getAllowedAlgorithms()); in checkBasicIkev2VpnProfile()
251 assertTrue(profile.isBypassable()); in checkBasicIkev2VpnProfile()
252 assertFalse(profile.isMetered()); in checkBasicIkev2VpnProfile()
253 assertEquals(TEST_MTU, profile.getMaxMtu()); in checkBasicIkev2VpnProfile()
254 assertFalse(profile.isRestrictedToTestNetworks()); in checkBasicIkev2VpnProfile()
261 final Ikev2VpnProfile profile = in testBuildIkev2VpnProfilePsk() local
[all …]
/packages/apps/Car/Settings/tests/robotests/src/com/android/car/settings/bluetooth/
DBluetoothDeviceProfilesPreferenceControllerTest.java143 LocalBluetoothProfile profile = mock(LocalBluetoothProfile.class); in refreshUi_profiles_showsPreference() local
144 when(profile.getNameResource(mDevice)).thenReturn(R.string.bt_profile_name); in refreshUi_profiles_showsPreference()
145 when(mCachedDevice.getProfiles()).thenReturn(Collections.singletonList(profile)); in refreshUi_profiles_showsPreference()
163 LocalBluetoothProfile profile = mock(LocalBluetoothProfile.class); in profileChecked_setsProfilePreferred() local
164 when(profile.getNameResource(mDevice)).thenReturn(R.string.bt_profile_name); in profileChecked_setsProfilePreferred()
165 when(mCachedDevice.getProfiles()).thenReturn(Collections.singletonList(profile)); in profileChecked_setsProfilePreferred()
173 verify(profile).setEnabled(mDevice, true); in profileChecked_setsProfilePreferred()
178 LocalBluetoothProfile profile = mock(LocalBluetoothProfile.class); in profileChecked_connectsToProfile() local
179 when(profile.getNameResource(mDevice)).thenReturn(R.string.bt_profile_name); in profileChecked_connectsToProfile()
180 when(mCachedDevice.getProfiles()).thenReturn(Collections.singletonList(profile)); in profileChecked_connectsToProfile()
[all …]
/packages/apps/Launcher3/src/com/android/launcher3/widget/util/
DWidgetSizes.java58 for (DeviceProfile profile : LauncherAppState.getIDP(context).supportedProfiles) { in getWidgetPaddedSizes()
59 Size widgetSizePx = getWidgetSizePx(profile, spanX, spanY, cellSize); in getWidgetPaddedSizes()
60 if (!profile.shouldInsetWidgets()) { in getWidgetPaddedSizes()
71 public static Size getWidgetSizePx(DeviceProfile profile, int spanX, int spanY) { in getWidgetSizePx() argument
72 return getWidgetSizePx(profile, spanX, spanY, /* recycledCellSize= */ null); in getWidgetSizePx()
79 DeviceProfile profile, int spanX, int spanY) { in getWidgetPaddedSizePx() argument
80 Size size = getWidgetSizePx(profile, spanX, spanY); in getWidgetPaddedSizePx()
81 if (profile.shouldInsetWidgets()) { in getWidgetPaddedSizePx()
92 public static Size getWidgetItemSizePx(Context context, DeviceProfile profile, in getWidgetItemSizePx() argument
95 int dimension = profile.allAppsIconSizePx + 2 * context.getResources() in getWidgetItemSizePx()
[all …]
/packages/apps/Bluetooth/tests/unit/src/com/android/bluetooth/btservice/
DProfileServiceTest.java64 private void setProfileState(Class profile, int state) throws TimeoutException { in setProfileState() argument
66 mStartedProfileMap.put(profile.getSimpleName(), true); in setProfileState()
68 mStartedProfileMap.put(profile.getSimpleName(), false); in setProfileState()
70 Intent startIntent = new Intent(InstrumentationRegistry.getTargetContext(), profile); in setProfileState()
78 for (Class profile : mProfiles) { in setAllProfilesState()
79 setProfileState(profile, state); in setAllProfilesState()
86 for (Class profile : mProfiles) { in setAllProfilesState()
89 if (arg.getClass().getName().equals(profile.getName())) { in setAllProfilesState()
163 for (Class profile : mProfiles) { in testEnableDisableInterleaved()
164 setProfileState(profile, BluetoothAdapter.STATE_ON); in testEnableDisableInterleaved()
[all …]
/packages/services/Telephony/sip/src/com/android/services/telephony/sip/
DSipConnectionService.java49 void onFound(SipProfile profile); in onFound() argument
116 public void onFound(SipProfile profile) { in onCreateOutgoingConnection()
117 if (profile == null) { in onCreateOutgoingConnection()
123 createConnectionForProfile(profile, request); in onCreateOutgoingConnection()
191 SipProfile profile, in createConnectionForProfile() argument
193 SipPhone phone = findPhoneForProfile(profile); in createConnectionForProfile()
195 phone = createPhoneForProfile(profile); in createConnectionForProfile()
216 for (SipProfile profile : profileList) { in findProfile()
217 if (Objects.equals(profileName, profile.getProfileName())) { in findProfile()
218 profileToUse = profile; in findProfile()
[all …]
DSipSettings.java169 SipProfile profile = intent.getParcelableExtra(KEY_SIP_PROFILE); in onActivityResult() local
171 if (VERBOSE) log("onActivityResult, new: " + profile.getProfileName()); in onActivityResult()
172 addProfile(profile); in onActivityResult()
195 private String getProfileName(SipProfile profile) { in getProfileName() argument
196 String profileName = profile.getProfileName(); in getProfileName()
198 profileName = profile.getUserName() + "@" + profile.getSipDomain(); in getProfileName()
249 SipProfile profile = getProfileFromList(activeProfile); in processActiveProfilesFromSipService() local
250 if (profile == null) { in processActiveProfilesFromSipService()
253 profile.setCallingUid(activeProfile.getCallingUid()); in processActiveProfilesFromSipService()
284 private void handleProfileClick(final SipProfile profile) { in handleProfileClick() argument
[all …]
DSipAccountRegistry.java47 AccountEntry(SipProfile profile) { in AccountEntry() argument
48 mProfile = profile; in AccountEntry()
128 SipProfile profile = profileDb.retrieveSipProfileFromName(profileName); in verifyAndPurgeInvalidPhoneAccounts() local
129 if (profile == null) { in verifyAndPurgeInvalidPhoneAccounts()
220 for (SipProfile profile : sipProfileList) { in startSipProfiles()
221 stopSipService(context, profile.getProfileName()); in startSipProfiles()
222 removeSipProfile(profile.getProfileName()); in startSipProfiles()
224 profileDb.deleteProfile(profile); in startSipProfiles()
DSipUtil.java113 static PhoneAccount createPhoneAccount(Context context, SipProfile profile) { in createPhoneAccount() argument
117 String sipAddress = profile.getUserName() + "@" + profile.getSipDomain(); in createPhoneAccount()
118 Uri sipUri = Uri.parse(profile.getUriString()); in createPhoneAccount()
121 SipUtil.createAccountHandle(context, profile.getProfileName()); in createPhoneAccount()
133 PhoneAccount.Builder builder = PhoneAccount.builder(accountHandle, profile.getDisplayName()) in createPhoneAccount()
/packages/apps/Settings/tests/robotests/src/com/android/settings/bluetooth/
DBluetoothDetailsProfilesControllerTest.java185 LocalBluetoothProfile profile = new FakeBluetoothProfile(mContext, profileNameResId); in addFakeProfile() local
186 profile.setEnabled(mDevice, deviceIsPreferred); in addFakeProfile()
187 mConnectableProfiles.add(profile); in addFakeProfile()
188 when(mProfileManager.getProfileByName(eq(profile.toString()))).thenReturn(profile); in addFakeProfile()
189 return profile; in addFakeProfile()
354 A2dpProfile profile = mock(A2dpProfile.class); in addMockA2dpProfile() local
355 when(mProfileManager.getProfileByName(eq(profile.toString()))).thenReturn(profile); in addMockA2dpProfile()
356 when(profile.getNameResource(mDevice)).thenReturn(R.string.bluetooth_profile_a2dp); in addMockA2dpProfile()
357 when(profile.getHighQualityAudioOptionLabel(mDevice)).thenReturn( in addMockA2dpProfile()
359 when(profile.supportsHighQualityAudio(mDevice)).thenReturn(supportsHighQualityAudio); in addMockA2dpProfile()
[all …]
/packages/modules/Connectivity/tests/unit/java/com/android/internal/net/
DVpnProfileTest.java134 final VpnProfile profile = getSampleIkev2Profile(DUMMY_PROFILE_KEY); in testEncodeDecode() local
135 final VpnProfile decoded = VpnProfile.decode(DUMMY_PROFILE_KEY, profile.encode()); in testEncodeDecode()
136 assertEquals(profile, decoded); in testEncodeDecode()
141 final VpnProfile profile = getSampleIkev2Profile(DUMMY_PROFILE_KEY); in testEncodeDecodeTooManyValues() local
143 (new String(profile.encode()) + VpnProfile.VALUE_DELIMITER + "invalid").getBytes(); in testEncodeDecodeTooManyValues()
187 final VpnProfile profile = getSampleIkev2Profile(DUMMY_PROFILE_KEY); in testEncodeDecodeLoginsNotSaved() local
188 profile.saveLogin = false; in testEncodeDecodeLoginsNotSaved()
190 final VpnProfile decoded = VpnProfile.decode(DUMMY_PROFILE_KEY, profile.encode()); in testEncodeDecodeLoginsNotSaved()
191 assertNotEquals(profile, decoded); in testEncodeDecodeLoginsNotSaved()
194 decoded.username = profile.username; in testEncodeDecodeLoginsNotSaved()
[all …]
/packages/services/Car/car-lib/src/android/car/
DICarBluetoothUserService.aidl25 boolean isBluetoothConnectionProxyAvailable(in int profile); in isBluetoothConnectionProxyAvailable() argument
26 boolean bluetoothConnectToProfile(in int profile, in BluetoothDevice device); in bluetoothConnectToProfile() argument
27 boolean bluetoothDisconnectFromProfile(in int profile, in BluetoothDevice device); in bluetoothDisconnectFromProfile() argument
28 int getProfilePriority(in int profile, in BluetoothDevice device); in getProfilePriority() argument
29 void setProfilePriority(in int profile, in BluetoothDevice device, in int priority); in setProfilePriority() argument
/packages/apps/Car/Settings/src/com/android/car/settings/bluetooth/
DBluetoothDeviceProfilesPreferenceController.java41 LocalBluetoothProfile profile = profilePref.getProfile();
42 profile.setEnabled(profilePref.getCachedDevice().getDevice(), isChecked);
58 for (LocalBluetoothProfile profile : getCachedDevice().getProfiles()) { in updateState()
59 Preference profilePref = preferenceGroup.findPreference(profile.toString()); in updateState()
61 profilePref = new BluetoothDeviceProfilePreference(getContext(), profile, in updateState()
/packages/apps/Bluetooth/src/com/android/bluetooth/btservice/
DAdapterService.java303 public void addProfile(ProfileService profile) { in addProfile() argument
304 mHandler.obtainMessage(MESSAGE_PROFILE_SERVICE_REGISTERED, profile).sendToTarget(); in addProfile()
312 public void removeProfile(ProfileService profile) { in removeProfile() argument
313 mHandler.obtainMessage(MESSAGE_PROFILE_SERVICE_UNREGISTERED, profile).sendToTarget(); in removeProfile()
322 public void onProfileServiceStateChanged(ProfileService profile, int state) { in onProfileServiceStateChanged() argument
327 m.obj = profile; in onProfileServiceStateChanged()
367 private void registerProfileService(ProfileService profile) { in registerProfileService() argument
368 if (mRegisteredProfiles.contains(profile)) { in registerProfileService()
369 Log.e(TAG, profile.getName() + " already registered."); in registerProfileService()
372 mRegisteredProfiles.add(profile); in registerProfileService()
[all …]
DAdapterProperties.java631 int getProfileConnectionState(int profile) { in getProfileConnectionState() argument
633 Pair<Integer, Integer> p = mProfileConnectionState.get(profile); in getProfileConnectionState()
649 private void sendConnectionStateChange(int profile, Intent connIntent) { in sendConnectionStateChange() argument
654 "PROFILE_CONNECTION_STATE_CHANGE: profile=" + profile + ", device=" + device + ", " in sendConnectionStateChange()
657 0 /* deprecated */, profile, mService.obfuscateAddress(device), in sendConnectionStateChange()
662 "PROFILE_CONNECTION_STATE_CHANGE: unexpected transition for profile=" + profile in sendConnectionStateChange()
665 sendConnectionStateChange(device, profile, state, prevState); in sendConnectionStateChange()
668 void sendConnectionStateChange(BluetoothDevice device, int profile, int state, int prevState) { in sendConnectionStateChange() argument
680 updateProfileConnectionState(profile, state, prevState); in sendConnectionStateChange()
696 + profile + ", device=" + device + ", " + prevState + " -> " + state); in sendConnectionStateChange()
[all …]
/packages/services/Car/tests/EmbeddedKitchenSinkApp/src/com/google/android/car/kitchensink/bluetooth/
DBluetoothHeadsetFragment.java412 public void onServiceConnected(int profile, BluetoothProfile proxy) { in onServiceConnected() argument
413 Log.d(TAG, "Proxy connected for profile: " + profile); in onServiceConnected()
414 switch (profile) { in onServiceConnected()
419 Log.w(TAG, "onServiceConnected not supported profile: " + profile); in onServiceConnected()
424 public void onServiceDisconnected(int profile) { in onServiceDisconnected() argument
425 Log.d(TAG, "Proxy disconnected for profile: " + profile); in onServiceDisconnected()
426 switch (profile) { in onServiceDisconnected()
431 Log.w(TAG, "onServiceDisconnected not supported profile: " + profile); in onServiceDisconnected()
/packages/apps/Launcher3/src/com/android/launcher3/
DShortcutAndWidgetContainer.java108 DeviceProfile profile = mActivity.getDeviceProfile(); in setupLp() local
109 ((LauncherAppWidgetHostView) child).getWidgetInset(profile, mTempRect); in setupLp()
111 profile.appWidgetScale.x, profile.appWidgetScale.y, mBorderSpacing, mTempRect); in setupLp()
185 DeviceProfile profile = mActivity.getDeviceProfile(); in layoutChild() local
186 float scaleX = profile.appWidgetScale.x; in layoutChild()
187 float scaleY = profile.appWidgetScale.y; in layoutChild()

123456