Home
last modified time | relevance | path

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

12345678

/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/
DMessagingLinearLayout.java85 final LayoutParams lp = (LayoutParams) child.getLayoutParams(); in onMeasure() local
86 lp.hide = true; in onMeasure()
99 LayoutParams lp = (LayoutParams) getChildAt(i).getLayoutParams(); in onMeasure() local
112 int newHeight = Math.max(totalHeight, totalHeight + childHeight + lp.topMargin + in onMeasure()
113 lp.bottomMargin + spacing); in onMeasure()
127 child.getMeasuredWidth() + lp.leftMargin + lp.rightMargin in onMeasure()
129 lp.hide = false; in onMeasure()
167 final LayoutParams lp = (LayoutParams) child.getLayoutParams(); in onLayout() local
175 childLeft = childRight - childWidth - lp.rightMargin; in onLayout()
177 childLeft = paddingLeft + lp.leftMargin; in onLayout()
[all …]
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 …]
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 …]
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 …]
DAlertDialogLayout.java233 final LayoutParams lp = (LayoutParams) child.getLayoutParams(); in forceUniformWidth() local
234 if (lp.width == LayoutParams.MATCH_PARENT) { in forceUniformWidth()
237 final int oldHeight = lp.height; in forceUniformWidth()
238 lp.height = child.getMeasuredHeight(); in forceUniformWidth()
242 lp.height = oldHeight; in forceUniformWidth()
318 final LinearLayout.LayoutParams lp = in onLayout() local
321 int layoutGravity = lp.gravity; in onLayout()
333 + lp.leftMargin - lp.rightMargin; in onLayout()
337 childLeft = childRight - childWidth - lp.rightMargin; in onLayout()
342 childLeft = paddingLeft + lp.leftMargin; in onLayout()
[all …]
/frameworks/base/core/java/android/widget/
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 …]
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 …]
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 …]
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/core/java/android/inputmethodservice/
DSoftInputWindow.java95 WindowManager.LayoutParams lp = getWindow().getAttributes(); in setToken() local
96 lp.token = token; in setToken()
97 getWindow().setAttributes(lp); in setToken()
175 WindowManager.LayoutParams lp = getWindow().getAttributes(); in setGravity() local
176 lp.gravity = gravity; in setGravity()
177 updateWidthHeight(lp); in setGravity()
178 getWindow().setAttributes(lp); in setGravity()
185 private void updateWidthHeight(WindowManager.LayoutParams lp) { in updateWidthHeight() argument
186 if (lp.gravity == Gravity.TOP || lp.gravity == Gravity.BOTTOM) { in updateWidthHeight()
187 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.java129 MarginLayoutParams lp = (MarginLayoutParams) mMultiUserAvatar.getLayoutParams(); in onConfigurationChanged() local
130 lp.width = lp.height = getResources().getDimensionPixelSize( in onConfigurationChanged()
132 mMultiUserAvatar.setLayoutParams(lp); in onConfigurationChanged()
135 lp = (MarginLayoutParams) mMultiUserSwitch.getLayoutParams(); in onConfigurationChanged()
136 lp.width = getResources().getDimensionPixelSize( in onConfigurationChanged()
138 lp.setMarginEnd(getResources().getDimensionPixelSize( in onConfigurationChanged()
140 mMultiUserSwitch.setLayoutParams(lp); in onConfigurationChanged()
143 lp = (MarginLayoutParams) mSystemIconsContainer.getLayoutParams(); in onConfigurationChanged()
144 lp.setMarginStart(getResources().getDimensionPixelSize( in onConfigurationChanged()
146 mSystemIconsContainer.setLayoutParams(lp); in onConfigurationChanged()
[all …]
/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/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/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/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/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/base/packages/Tethering/tests/unit/src/com/android/networkstack/tethering/
DOffloadControllerTest.java290 final LinkProperties lp = new LinkProperties(); in testSetUpstreamLinkPropertiesWorking() local
293 lp.setInterfaceName(testIfName); in testSetUpstreamLinkPropertiesWorking()
294 offload.setUpstreamLinkProperties(lp); in testSetUpstreamLinkPropertiesWorking()
304 lp.addLinkAddress(new LinkAddress(linkAddr)); in testSetUpstreamLinkPropertiesWorking()
305 lp.addRoute(new RouteInfo(new IpPrefix("192.0.2.0/24"), null, null, RTN_UNICAST)); in testSetUpstreamLinkPropertiesWorking()
306 offload.setUpstreamLinkProperties(lp); in testSetUpstreamLinkPropertiesWorking()
321 lp.addRoute(new RouteInfo(null, InetAddress.getByName(ipv4Gateway), null, RTN_UNICAST)); in testSetUpstreamLinkPropertiesWorking()
322 offload.setUpstreamLinkProperties(lp); in testSetUpstreamLinkPropertiesWorking()
332 lp.addRoute(new RouteInfo(null, InetAddress.getByName(ipv6Gw1), null, RTN_UNICAST)); in testSetUpstreamLinkPropertiesWorking()
333 offload.setUpstreamLinkProperties(lp); in testSetUpstreamLinkPropertiesWorking()
[all …]
/frameworks/ex/widget/java/com/android/ex/widget/
DStaggeredGridView.java514 final LayoutParams lp = (LayoutParams) child.getLayoutParams(); in recycleOffscreenViews() local
519 final int colEnd = lp.column + Math.min(mColCount, lp.span); in recycleOffscreenViews()
520 for (int col = lp.column; col < colEnd; col++) { in recycleOffscreenViews()
521 final int colTop = top - rec.getMarginAbove(col - lp.column); in recycleOffscreenViews()
522 final int colBottom = bottom + rec.getMarginBelow(col - lp.column); in recycleOffscreenViews()
759 LayoutParams lp = (LayoutParams) child.getLayoutParams(); in layoutChildren() local
760 final int col = lp.column; in layoutChildren()
771 lp = (LayoutParams) child.getLayoutParams(); // Might have changed in layoutChildren()
774 final int span = Math.min(mColCount, lp.span); in layoutChildren()
781 if (lp.height == LayoutParams.WRAP_CONTENT) { in layoutChildren()
[all …]

12345678