Home
last modified time | relevance | path

Searched refs:lp (Results 1 – 25 of 205) sorted by relevance

123456789

/frameworks/base/tests/net/common/java/android/net/
DLinkPropertiesTest.java111 private void checkEmpty(final LinkProperties lp) { in checkEmpty() argument
112 assertEquals(0, lp.getAllInterfaceNames().size()); in checkEmpty()
113 assertEquals(0, lp.getAllAddresses().size()); in checkEmpty()
114 assertEquals(0, lp.getDnsServers().size()); in checkEmpty()
115 assertEquals(0, lp.getValidatedPrivateDnsServers().size()); in checkEmpty()
116 assertEquals(0, lp.getPcscfServers().size()); in checkEmpty()
117 assertEquals(0, lp.getAllRoutes().size()); in checkEmpty()
118 assertEquals(0, lp.getAllLinkAddresses().size()); in checkEmpty()
119 assertEquals(0, lp.getStackedLinks().size()); in checkEmpty()
120 assertEquals(0, lp.getMtu()); in checkEmpty()
[all …]
/frameworks/base/core/tests/coretests/src/android/preference/
DListPreferenceTest.java28 ListPreference lp = new ListPreference(getContext()); in testListPreferenceSummaryFromEntries() local
29 lp.setEntries(entries); in testListPreferenceSummaryFromEntries()
30 lp.setEntryValues(entryValues); in testListPreferenceSummaryFromEntries()
32 lp.setValue(entryValues[1]); in testListPreferenceSummaryFromEntries()
33 assertTrue(lp.getSummary() == null); in testListPreferenceSummaryFromEntries()
35 lp.setSummary("%1$s"); in testListPreferenceSummaryFromEntries()
36 assertEquals(entries[1], lp.getSummary()); in testListPreferenceSummaryFromEntries()
38 lp.setValue(entryValues[2]); in testListPreferenceSummaryFromEntries()
39 assertEquals(entries[2], lp.getSummary()); in testListPreferenceSummaryFromEntries()
41 lp.setSummary(null); in testListPreferenceSummaryFromEntries()
[all …]
/frameworks/base/tests/net/java/com/android/server/connectivity/
DDnsManagerTest.java154 LinkProperties lp = new LinkProperties(); in testTrackedValidationUpdates() local
155 lp.setInterfaceName(TEST_IFACENAME); in testTrackedValidationUpdates()
156 lp.addDnsServer(InetAddress.getByName("3.3.3.3")); in testTrackedValidationUpdates()
157 lp.addDnsServer(InetAddress.getByName("4.4.4.4")); in testTrackedValidationUpdates()
161 mDnsManager.noteDnsServersForNetwork(TEST_NETID, lp); in testTrackedValidationUpdates()
162 mDnsManager.setDefaultDnsSystemProperties(lp.getDnsServers()); in testTrackedValidationUpdates()
165 mDnsManager.noteDnsServersForNetwork(TEST_NETID_ALTERNATE, lp); in testTrackedValidationUpdates()
170 LinkProperties fixedLp = new LinkProperties(lp); in testTrackedValidationUpdates()
174 fixedLp = new LinkProperties(lp); in testTrackedValidationUpdates()
182 lp.addLinkAddress(new LinkAddress("192.0.2.4/24")); in testTrackedValidationUpdates()
[all …]
/frameworks/base/core/java/com/android/internal/widget/
DDialogViewAnimator.java57 final LayoutParams lp = (LayoutParams) child.getLayoutParams(); in onMeasure() local
58 final boolean matchWidth = lp.width == LayoutParams.MATCH_PARENT; in onMeasure()
59 final boolean matchHeight = lp.height == LayoutParams.MATCH_PARENT; in onMeasure()
72 + lp.leftMargin + lp.rightMargin); in onMeasure()
78 + lp.topMargin + lp.bottomMargin); in onMeasure()
110 final MarginLayoutParams lp = (MarginLayoutParams) child.getLayoutParams(); in onMeasure() local
113 if (lp.width == LayoutParams.MATCH_PARENT) { in onMeasure()
116 - lp.leftMargin - lp.rightMargin, in onMeasure()
120 getPaddingLeft() + getPaddingRight() + lp.leftMargin + lp.rightMargin, in onMeasure()
121 lp.width); in onMeasure()
[all …]
DMessagingLinearLayout.java84 final LayoutParams lp = (LayoutParams) child.getLayoutParams(); in onMeasure() local
85 lp.hide = true; in onMeasure()
108 LayoutParams lp = (LayoutParams) getChildAt(i).getLayoutParams(); in onMeasure() local
130 int newHeight = Math.max(totalHeight, totalHeight + childHeight + lp.topMargin + in onMeasure()
131 lp.bottomMargin + spacing + previousChildIncrease); in onMeasure()
153 child.getMeasuredWidth() + lp.leftMargin + lp.rightMargin in onMeasure()
155 lp.hide = false; in onMeasure()
203 final LayoutParams lp = (LayoutParams) child.getLayoutParams(); in onLayout() local
211 childLeft = childRight - childWidth - lp.rightMargin; in onLayout()
213 childLeft = paddingLeft + lp.leftMargin; in onLayout()
[all …]
DWatchListDecorLayout.java113 final MarginLayoutParams lp = (MarginLayoutParams) child.getLayoutParams(); in applyMeasureToChild() local
116 if (lp.width == LayoutParams.MATCH_PARENT) { in applyMeasureToChild()
119 - lp.leftMargin - lp.rightMargin); in applyMeasureToChild()
125 lp.leftMargin + lp.rightMargin, in applyMeasureToChild()
126 lp.width); in applyMeasureToChild()
130 if (lp.height == LayoutParams.MATCH_PARENT) { in applyMeasureToChild()
133 - lp.topMargin - lp.bottomMargin); in applyMeasureToChild()
139 lp.topMargin + lp.bottomMargin, in applyMeasureToChild()
140 lp.height); in applyMeasureToChild()
175 final LayoutParams lp = (LayoutParams) child.getLayoutParams(); in onMeasure() local
[all …]
DGridLayoutManager.java146 ViewGroup.LayoutParams lp = host.getLayoutParams(); in onInitializeAccessibilityNodeInfoForItem() local
147 if (!(lp instanceof LayoutParams)) { in onInitializeAccessibilityNodeInfoForItem()
151 LayoutParams glp = (LayoutParams) lp; in onInitializeAccessibilityNodeInfoForItem()
190 final LayoutParams lp = (LayoutParams) getChildAt(i).getLayoutParams(); in cachePreLayoutSpanMapping() local
191 final int viewPosition = lp.getViewLayoutPosition(); in cachePreLayoutSpanMapping()
192 mPreLayoutSpanSizeCache.put(viewPosition, lp.getSpanSize()); in cachePreLayoutSpanMapping()
193 mPreLayoutSpanIndexCache.put(viewPosition, lp.getSpanIndex()); in cachePreLayoutSpanMapping()
240 public RecyclerView.LayoutParams generateLayoutParams(ViewGroup.LayoutParams lp) { in generateLayoutParams() argument
241 if (lp instanceof ViewGroup.MarginLayoutParams) { in generateLayoutParams()
242 return new LayoutParams((ViewGroup.MarginLayoutParams) lp); in generateLayoutParams()
[all …]
DActionBarOverlayLayout.java294 LayoutParams lp = (LayoutParams)view.getLayoutParams();
295 if (left && lp.leftMargin != insets.left) {
297 lp.leftMargin = insets.left;
299 if (top && lp.topMargin != insets.top) {
301 lp.topMargin = insets.top;
303 if (right && lp.rightMargin != insets.right) {
305 lp.rightMargin = insets.right;
307 if (bottom && lp.bottomMargin != insets.bottom) {
309 lp.bottomMargin = insets.bottom;
384 LayoutParams lp = (LayoutParams) mActionBarTop.getLayoutParams();
[all …]
/frameworks/base/core/java/android/widget/
DFrameLayout.java195 final LayoutParams lp = (LayoutParams) child.getLayoutParams(); in onMeasure() local
197 child.getMeasuredWidth() + lp.leftMargin + lp.rightMargin); in onMeasure()
199 child.getMeasuredHeight() + lp.topMargin + lp.bottomMargin); in onMeasure()
202 if (lp.width == LayoutParams.MATCH_PARENT || in onMeasure()
203 lp.height == LayoutParams.MATCH_PARENT) { in onMeasure()
233 final MarginLayoutParams lp = (MarginLayoutParams) child.getLayoutParams(); in onMeasure() local
236 if (lp.width == LayoutParams.MATCH_PARENT) { in onMeasure()
239 - lp.leftMargin - lp.rightMargin); in onMeasure()
245 lp.leftMargin + lp.rightMargin, in onMeasure()
246 lp.width); in onMeasure()
[all …]
DActionMenuView.java166 final LayoutParams lp = (LayoutParams) child.getLayoutParams(); in onMeasure() local
167 lp.leftMargin = lp.rightMargin = 0; in onMeasure()
223 final LayoutParams lp = (LayoutParams) child.getLayoutParams(); in onMeasureExactFormat() local
224 lp.expanded = false; in onMeasureExactFormat()
225 lp.extraPixels = 0; in onMeasureExactFormat()
226 lp.cellsUsed = 0; in onMeasureExactFormat()
227 lp.expandable = false; in onMeasureExactFormat()
228 lp.leftMargin = 0; in onMeasureExactFormat()
229 lp.rightMargin = 0; in onMeasureExactFormat()
230 lp.preventEdgeOffset = isGeneratedItem && ((ActionMenuItemView) child).hasText(); in onMeasureExactFormat()
[all …]
DLinearLayout.java441 final LayoutParams lp = (LayoutParams) child.getLayoutParams(); in drawDividersVertical() local
442 final int top = child.getTop() - lp.topMargin - mDividerHeight; in drawDividersVertical()
454 final LayoutParams lp = (LayoutParams) child.getLayoutParams(); in drawDividersVertical() local
455 bottom = child.getBottom() + lp.bottomMargin; in drawDividersVertical()
482 final LayoutParams lp = (LayoutParams) child.getLayoutParams(); in drawDividersHorizontal() local
485 position = child.getRight() + lp.rightMargin; in drawDividersHorizontal()
487 position = child.getLeft() - lp.leftMargin - mDividerWidth; in drawDividersHorizontal()
504 final LayoutParams lp = (LayoutParams) child.getLayoutParams(); in drawDividersHorizontal() local
506 position = child.getLeft() - lp.leftMargin - mDividerWidth; in drawDividersHorizontal()
508 position = child.getRight() + lp.rightMargin; in drawDividersHorizontal()
[all …]
DToolbar.java1179 final LayoutParams lp = generateDefaultLayoutParams(); in ensureMenuView() local
1180 lp.gravity = Gravity.END | (mButtonGravity & Gravity.VERTICAL_GRAVITY_MASK); in ensureMenuView()
1181 mMenuView.setLayoutParams(lp); in ensureMenuView()
1497 final LayoutParams lp = generateDefaultLayoutParams(); in ensureNavButtonView() local
1498 lp.gravity = Gravity.START | (mButtonGravity & Gravity.VERTICAL_GRAVITY_MASK); in ensureNavButtonView()
1499 mNavButtonView.setLayoutParams(lp); in ensureNavButtonView()
1508 final LayoutParams lp = generateDefaultLayoutParams(); in ensureCollapseButtonView() local
1509 lp.gravity = Gravity.START | (mButtonGravity & Gravity.VERTICAL_GRAVITY_MASK); in ensureCollapseButtonView()
1510 lp.mViewType = LayoutParams.EXPANDED; in ensureCollapseButtonView()
1511 mCollapseButtonView.setLayoutParams(lp); in ensureCollapseButtonView()
[all …]
DTableRow.java195 final LayoutParams lp = (LayoutParams) child.getLayoutParams(); in measureChildBeforeLayout() local
200 final int span = lp.span; in measureChildBeforeLayout()
206 final int gravity = lp.gravity; in measureChildBeforeLayout()
217 Math.max(0, columnWidth - lp.leftMargin - lp.rightMargin), measureMode in measureChildBeforeLayout()
220 mPaddingTop + mPaddingBottom + lp.topMargin + in measureChildBeforeLayout()
221 lp .bottomMargin + totalHeight, lp.height); in measureChildBeforeLayout()
227 lp.mOffset[LayoutParams.LOCATION_NEXT] = columnWidth - childWidth; in measureChildBeforeLayout()
236 lp.mOffset[LayoutParams.LOCATION] = lp.mOffset[LayoutParams.LOCATION_NEXT]; in measureChildBeforeLayout()
239lp.mOffset[LayoutParams.LOCATION] = lp.mOffset[LayoutParams.LOCATION_NEXT] / 2; in measureChildBeforeLayout()
243 lp.mOffset[LayoutParams.LOCATION] = lp.mOffset[LayoutParams.LOCATION_NEXT] = 0; in measureChildBeforeLayout()
/frameworks/base/packages/SystemUI/src/com/android/systemui/accessibility/
DMirrorWindowControl.java100 final LayoutParams lp = new LayoutParams(); in showControl() local
103 lp.width = viewSize.x <= 0 ? defaultSize : viewSize.x; in showControl()
104 lp.height = viewSize.y <= 0 ? defaultSize : viewSize.y; in showControl()
105 lp.token = binder; in showControl()
106 setDefaultParams(lp); in showControl()
107 setDefaultPosition(lp); in showControl()
108 mWindowManager.addView(mControlsView, lp); in showControl()
109 updateDraggableBound(lp.width, lp.height); in showControl()
112 private void setDefaultParams(LayoutParams lp) { in setDefaultParams() argument
113 lp.gravity = Gravity.TOP | Gravity.LEFT; in setDefaultParams()
[all …]
/frameworks/base/core/java/android/inputmethodservice/
DSoftInputWindow.java94 WindowManager.LayoutParams lp = getWindow().getAttributes(); in setToken() local
95 lp.token = token; in setToken()
96 getWindow().setAttributes(lp); in setToken()
179 WindowManager.LayoutParams lp = getWindow().getAttributes(); in setGravity() local
180 lp.gravity = gravity; in setGravity()
181 updateWidthHeight(lp); in setGravity()
182 getWindow().setAttributes(lp); in setGravity()
189 private void updateWidthHeight(WindowManager.LayoutParams lp) { in updateWidthHeight() argument
190 if (lp.gravity == Gravity.TOP || lp.gravity == Gravity.BOTTOM) { in updateWidthHeight()
191 lp.width = WindowManager.LayoutParams.MATCH_PARENT; in updateWidthHeight()
[all …]
/frameworks/base/packages/Tethering/src/com/android/networkstack/tethering/
DIPv6TetheringCoordinator.java163 final LinkProperties lp = getInterfaceIPv6LinkProperties(ipServer); in updateIPv6TetheringInterfaces() local
164 ipServer.sendMessage(IpServer.CMD_IPV6_TETHER_UPDATE, getTtlAdjustment(), 0, lp); in updateIPv6TetheringInterfaces()
207 final LinkProperties lp = getIPv6OnlyLinkProperties( in getInterfaceIPv6LinkProperties() local
209 if (lp.hasIpv6DefaultRoute() && lp.hasGlobalIpv6Address()) { in getInterfaceIPv6LinkProperties()
210 return lp; in getInterfaceIPv6LinkProperties()
224 private static LinkProperties getIPv6OnlyLinkProperties(LinkProperties lp) { in getIPv6OnlyLinkProperties() argument
226 if (lp == null) { in getIPv6OnlyLinkProperties()
233 v6only.setInterfaceName(lp.getInterfaceName()); in getIPv6OnlyLinkProperties()
235 v6only.setMtu(lp.getMtu()); in getIPv6OnlyLinkProperties()
237 for (LinkAddress linkAddr : lp.getLinkAddresses()) { in getIPv6OnlyLinkProperties()
[all …]
/frameworks/base/packages/SystemUI/src/com/android/systemui/statusbar/phone/
DKeyguardStatusBarView.java135 MarginLayoutParams lp = (MarginLayoutParams) mMultiUserAvatar.getLayoutParams(); in onConfigurationChanged() local
136 lp.width = lp.height = getResources().getDimensionPixelSize( in onConfigurationChanged()
138 mMultiUserAvatar.setLayoutParams(lp); in onConfigurationChanged()
141 lp = (MarginLayoutParams) mMultiUserSwitch.getLayoutParams(); in onConfigurationChanged()
142 lp.width = getResources().getDimensionPixelSize( in onConfigurationChanged()
144 lp.setMarginEnd(getResources().getDimensionPixelSize( in onConfigurationChanged()
146 mMultiUserSwitch.setLayoutParams(lp); in onConfigurationChanged()
149 lp = (MarginLayoutParams) mSystemIconsContainer.getLayoutParams(); in onConfigurationChanged()
150 lp.setMarginStart(getResources().getDimensionPixelSize( in onConfigurationChanged()
152 mSystemIconsContainer.setLayoutParams(lp); in onConfigurationChanged()
[all …]
/frameworks/base/packages/EasterEgg/src/com/android/egg/paint/
DToolbarView.kt51 var lp = layoutParams as FrameLayout.LayoutParams? in onApplyWindowInsets() variable
52 if (lp != null && insets != null) { in onApplyWindowInsets()
54 lp.topMargin = insets.stableInsetTop in onApplyWindowInsets()
55 lp.bottomMargin = insets.stableInsetBottom in onApplyWindowInsets()
57 lp.topMargin = insets.systemWindowInsetTop in onApplyWindowInsets()
58 lp.bottomMargin = insets.systemWindowInsetBottom in onApplyWindowInsets()
60 layoutParams = lp in onApplyWindowInsets()
/frameworks/base/core/tests/coretests/src/android/widget/listview/
DListViewHeight.java62 ViewGroup.MarginLayoutParams lp; in onCreate()
63 lp = (ViewGroup.MarginLayoutParams) mInnerList.getLayoutParams(); in onCreate()
64 lp.height = 200; in onCreate()
65 mInnerList.setLayoutParams(lp); in onCreate()
78 ViewGroup.MarginLayoutParams lp; in onCreate()
79 lp = (ViewGroup.MarginLayoutParams) mInnerList.getLayoutParams(); in onCreate()
80 lp.height = lp.MATCH_PARENT; in onCreate()
81 mInnerList.setLayoutParams(lp); in onCreate()
/frameworks/base/core/tests/coretests/src/android/util/
DListItemFactory.java96 final LinearLayout.LayoutParams lp in horizontalButtonSlots() local
98 lp.setMargins(10, 0, 10, 0); in horizontalButtonSlots()
99 lp.weight = 0.33f; in horizontalButtonSlots()
121 ll.addView(button, lp); in horizontalButtonSlots()
123 ll.addView(new View(context), lp); in horizontalButtonSlots()
129 ll.addView(button, lp); in horizontalButtonSlots()
131 ll.addView(new View(context), lp); in horizontalButtonSlots()
137 ll.addView(button, lp); in horizontalButtonSlots()
139 ll.addView(new View(context), lp); in horizontalButtonSlots()
159 final ViewGroup.LayoutParams lp = new AbsListView.LayoutParams( in button() local
[all …]
/frameworks/base/services/core/java/com/android/server/
DTestNetworkService.java168 @NonNull LinkProperties lp,
172 super(looper, context, TEST_NETWORK_TYPE, ni, nc, lp, NETWORK_SCORE);
177 mLp = lp;
231 @Nullable LinkProperties lp,
259 if (lp == null) {
260 lp = new LinkProperties();
262 lp = new LinkProperties(lp);
265 lp.setLinkAddresses(new ArrayList<>());
267 lp.setInterfaceName(iface);
275 lp.addLinkAddress(
[all …]
/frameworks/base/services/core/java/com/android/server/connectivity/
DNat464Xlat.java125 LinkProperties lp = nai.linkProperties; in requiresClat() local
126 final boolean isIpv6OnlyNetwork = (lp != null) && lp.hasGlobalIpv6Address() in requiresClat()
127 && !lp.hasIpv4Address(); in requiresClat()
145 LinkProperties lp = nai.linkProperties; in shouldStartClat() local
146 return requiresClat(nai) && lp != null && lp.getNat64Prefix() != null; in shouldStartClat()
287 LinkProperties lp = new LinkProperties(mNetwork.linkProperties); in stop() local
288 lp.removeStackedLink(iface); in stop()
289 mNetwork.connService().handleUpdateLinkProperties(mNetwork, lp); in stop()
409 public void fixupLinkProperties(@NonNull LinkProperties oldLp, @NonNull LinkProperties lp) { in fixupLinkProperties() argument
412 lp.setNat64Prefix(selectNat64Prefix()); in fixupLinkProperties()
[all …]
/frameworks/base/tests/SurfaceComposition/src/android/surfacecomposition/
DCustomLayout.java44 CustomLayout.LayoutParams lp = (CustomLayout.LayoutParams) child.getLayoutParams(); in onLayout() local
45 child.layout(lp.mLeft, lp.mTop, lp.mRight, lp.mBottom); in onLayout()
/frameworks/opt/setupwizard/library/main/src/com/android/setupwizardlib/view/
DFillContentLayout.java87 final MarginLayoutParams lp = (MarginLayoutParams) child.getLayoutParams(); in measureIllustrationChild() local
94 getPaddingLeft() + getPaddingRight() + lp.leftMargin + lp.rightMargin, in measureIllustrationChild()
95 lp.width); in measureIllustrationChild()
99 getPaddingTop() + getPaddingBottom() + lp.topMargin + lp.bottomMargin, in measureIllustrationChild()
100 lp.height); in measureIllustrationChild()
/frameworks/base/core/java/android/net/
DTestNetworkManager.java71 @Nullable LinkProperties lp, in setupTestNetwork() argument
76 mService.setupTestNetwork(iface, lp, isMetered, administratorUids, binder); in setupTestNetwork()
93 @NonNull LinkProperties lp, boolean isMetered, @NonNull IBinder binder) { in setupTestNetwork()
94 Preconditions.checkNotNull(lp, "Invalid LinkProperties"); in setupTestNetwork()
95 setupTestNetwork(lp.getInterfaceName(), lp, isMetered, new int[0], binder); in setupTestNetwork() local

123456789