Loading packages/PrintSpooler/flags/flags.aconfig +0 −11 Original line number Diff line number Diff line Loading @@ -8,17 +8,6 @@ flag { bug: "385340868" } flag { name: "print_edge2edge" namespace: "printing" description: "Enable edge to edge in print spooler" bug: "378652618" is_fixed_read_only: true metadata { purpose: PURPOSE_BUGFIX } } flag { name: "printer_button_contrast" namespace: "printing" Loading packages/PrintSpooler/res/values-night/themes.xml +0 −2 Original line number Diff line number Diff line Loading @@ -24,14 +24,12 @@ <style name="Theme.SelectPrinterActivity" parent="android:style/Theme.DeviceDefault"> <item name="android:textAppearanceListItemSecondary">@style/ListItemSecondary</item> <item name="android:windowOptOutEdgeToEdgeEnforcement" android:featureFlag="!com.android.printspooler.flags.print_edge2edge">true</item> </style> <style name="Theme.PrintActivity" parent="@android:style/Theme.DeviceDefault"> <item name="android:windowIsTranslucent">true</item> <item name="android:windowActionBar">false</item> <item name="android:windowNoTitle">true</item> <item name="android:windowOptOutEdgeToEdgeEnforcement" android:featureFlag="!com.android.printspooler.flags.print_edge2edge">true</item> </style> </resources> packages/PrintSpooler/res/values/themes.xml +0 −2 Original line number Diff line number Diff line Loading @@ -24,7 +24,6 @@ parent="android:style/Theme.DeviceDefault.Light"> <item name="android:textAppearanceListItemSecondary">@style/ListItemSecondary</item> <item name="android:windowLightStatusBar">true</item> <item name="android:windowOptOutEdgeToEdgeEnforcement" android:featureFlag="!com.android.printspooler.flags.print_edge2edge">true</item> </style> <style name="Theme.PrintActivity" parent="@android:style/Theme.DeviceDefault.Light"> Loading @@ -32,7 +31,6 @@ <item name="android:windowActionBar">false</item> <item name="android:windowNoTitle">true</item> <item name="android:windowLightStatusBar">true</item> <item name="android:windowOptOutEdgeToEdgeEnforcement" android:featureFlag="!com.android.printspooler.flags.print_edge2edge">true</item> </style> </resources> packages/PrintSpooler/src/com/android/printspooler/ui/SelectPrinterActivity.java +1 −2 Original line number Diff line number Diff line Loading @@ -66,7 +66,6 @@ import android.widget.Toast; import com.android.internal.logging.MetricsLogger; import com.android.internal.logging.nano.MetricsProto.MetricsEvent; import com.android.printspooler.R; import com.android.printspooler.flags.Flags; import java.util.ArrayList; import java.util.List; Loading Loading @@ -134,7 +133,7 @@ public final class SelectPrinterActivity extends Activity implements mPrinterRegistry = new PrinterRegistry(this, null, LOADER_ID_PRINT_REGISTRY, LOADER_ID_PRINT_REGISTRY_INT); findViewById(R.id.select_printer).setFitsSystemWindows(Flags.printEdge2edge()); findViewById(R.id.select_printer).setFitsSystemWindows(true); // Hook up the list view. mListView = findViewById(android.R.id.list); Loading packages/PrintSpooler/src/com/android/printspooler/widget/PrintContentView.java +10 −24 Original line number Diff line number Diff line Loading @@ -25,7 +25,6 @@ import android.view.ViewGroup; import android.view.inputmethod.InputMethodManager; import com.android.printspooler.R; import com.android.printspooler.flags.Flags; /** * This class is a layout manager for the print screen. It has a sliding Loading Loading @@ -94,7 +93,7 @@ public final class PrintContentView extends ViewGroup implements View.OnClickLis // The options view is sliding under the static header but appears // after it in the layout, so we will draw in opposite order. setChildrenDrawingOrderEnabled(true); setFitsSystemWindows(Flags.printEdge2edge()); setFitsSystemWindows(true); } public void setOptionsStateChangeListener(OptionsStateChangeListener listener) { Loading Loading @@ -150,7 +149,7 @@ public final class PrintContentView extends ViewGroup implements View.OnClickLis mExpandCollapseHandle = findViewById(R.id.expand_collapse_handle); mExpandCollapseIcon = findViewById(R.id.expand_collapse_icon); mOptionsContainer.setFitsSystemWindows(Flags.printEdge2edge()); mOptionsContainer.setFitsSystemWindows(true); mExpandCollapseHandle.setOnClickListener(this); mSummaryContent.setOnClickListener(this); Loading Loading @@ -274,28 +273,15 @@ public final class PrintContentView extends ViewGroup implements View.OnClickLis @Override protected void onLayout(boolean changed, int left, int top, int right, int bottom) { final int childLeft; final int childRight; final int childTop; if (Flags.printEdge2edge()) { childLeft = left + mPaddingLeft; childRight = right - mPaddingRight; childTop = top + mPaddingTop; } else { childLeft = left; childRight = right; childTop = top; } final int childLeft = left + mPaddingLeft; final int childRight = right - mPaddingRight; final int childTop = top + mPaddingTop; mStaticContent.layout(childLeft, childTop, childRight, mStaticContent.getMeasuredHeight() + (Flags.printEdge2edge() ? mPaddingTop : 0)); mStaticContent.getMeasuredHeight() + mPaddingTop); if (mSummaryContent.getVisibility() != View.GONE) { mSummaryContent.layout(childLeft, (Flags.printEdge2edge() ? mStaticContent.getBottom() : mStaticContent.getMeasuredHeight()), childRight, (Flags.printEdge2edge() ? mStaticContent.getBottom() : mStaticContent.getMeasuredHeight()) + mSummaryContent.getMeasuredHeight()); mSummaryContent.layout(childLeft, mStaticContent.getBottom(), childRight, mStaticContent.getBottom() + mSummaryContent.getMeasuredHeight()); } final int dynContentTop = mStaticContent.getBottom() + mCurrentOptionsOffsetY; Loading @@ -318,11 +304,11 @@ public final class PrintContentView extends ViewGroup implements View.OnClickLis mPrintButton.layout(printButtonLeft, printButtonTop, printButtonRight, printButtonBottom); final int embContentTop = (Flags.printEdge2edge() ? mPaddingTop : 0) final int embContentTop = mPaddingTop + mStaticContent.getMeasuredHeight() + mClosedOptionsOffsetY + mDynamicContent.getMeasuredHeight(); final int embContentBottom = embContentTop + mEmbeddedContentContainer.getMeasuredHeight() - (Flags.printEdge2edge() ? mPaddingBottom : 0); - mPaddingBottom; mEmbeddedContentContainer.layout(childLeft, embContentTop, childRight, embContentBottom); } Loading Loading
packages/PrintSpooler/flags/flags.aconfig +0 −11 Original line number Diff line number Diff line Loading @@ -8,17 +8,6 @@ flag { bug: "385340868" } flag { name: "print_edge2edge" namespace: "printing" description: "Enable edge to edge in print spooler" bug: "378652618" is_fixed_read_only: true metadata { purpose: PURPOSE_BUGFIX } } flag { name: "printer_button_contrast" namespace: "printing" Loading
packages/PrintSpooler/res/values-night/themes.xml +0 −2 Original line number Diff line number Diff line Loading @@ -24,14 +24,12 @@ <style name="Theme.SelectPrinterActivity" parent="android:style/Theme.DeviceDefault"> <item name="android:textAppearanceListItemSecondary">@style/ListItemSecondary</item> <item name="android:windowOptOutEdgeToEdgeEnforcement" android:featureFlag="!com.android.printspooler.flags.print_edge2edge">true</item> </style> <style name="Theme.PrintActivity" parent="@android:style/Theme.DeviceDefault"> <item name="android:windowIsTranslucent">true</item> <item name="android:windowActionBar">false</item> <item name="android:windowNoTitle">true</item> <item name="android:windowOptOutEdgeToEdgeEnforcement" android:featureFlag="!com.android.printspooler.flags.print_edge2edge">true</item> </style> </resources>
packages/PrintSpooler/res/values/themes.xml +0 −2 Original line number Diff line number Diff line Loading @@ -24,7 +24,6 @@ parent="android:style/Theme.DeviceDefault.Light"> <item name="android:textAppearanceListItemSecondary">@style/ListItemSecondary</item> <item name="android:windowLightStatusBar">true</item> <item name="android:windowOptOutEdgeToEdgeEnforcement" android:featureFlag="!com.android.printspooler.flags.print_edge2edge">true</item> </style> <style name="Theme.PrintActivity" parent="@android:style/Theme.DeviceDefault.Light"> Loading @@ -32,7 +31,6 @@ <item name="android:windowActionBar">false</item> <item name="android:windowNoTitle">true</item> <item name="android:windowLightStatusBar">true</item> <item name="android:windowOptOutEdgeToEdgeEnforcement" android:featureFlag="!com.android.printspooler.flags.print_edge2edge">true</item> </style> </resources>
packages/PrintSpooler/src/com/android/printspooler/ui/SelectPrinterActivity.java +1 −2 Original line number Diff line number Diff line Loading @@ -66,7 +66,6 @@ import android.widget.Toast; import com.android.internal.logging.MetricsLogger; import com.android.internal.logging.nano.MetricsProto.MetricsEvent; import com.android.printspooler.R; import com.android.printspooler.flags.Flags; import java.util.ArrayList; import java.util.List; Loading Loading @@ -134,7 +133,7 @@ public final class SelectPrinterActivity extends Activity implements mPrinterRegistry = new PrinterRegistry(this, null, LOADER_ID_PRINT_REGISTRY, LOADER_ID_PRINT_REGISTRY_INT); findViewById(R.id.select_printer).setFitsSystemWindows(Flags.printEdge2edge()); findViewById(R.id.select_printer).setFitsSystemWindows(true); // Hook up the list view. mListView = findViewById(android.R.id.list); Loading
packages/PrintSpooler/src/com/android/printspooler/widget/PrintContentView.java +10 −24 Original line number Diff line number Diff line Loading @@ -25,7 +25,6 @@ import android.view.ViewGroup; import android.view.inputmethod.InputMethodManager; import com.android.printspooler.R; import com.android.printspooler.flags.Flags; /** * This class is a layout manager for the print screen. It has a sliding Loading Loading @@ -94,7 +93,7 @@ public final class PrintContentView extends ViewGroup implements View.OnClickLis // The options view is sliding under the static header but appears // after it in the layout, so we will draw in opposite order. setChildrenDrawingOrderEnabled(true); setFitsSystemWindows(Flags.printEdge2edge()); setFitsSystemWindows(true); } public void setOptionsStateChangeListener(OptionsStateChangeListener listener) { Loading Loading @@ -150,7 +149,7 @@ public final class PrintContentView extends ViewGroup implements View.OnClickLis mExpandCollapseHandle = findViewById(R.id.expand_collapse_handle); mExpandCollapseIcon = findViewById(R.id.expand_collapse_icon); mOptionsContainer.setFitsSystemWindows(Flags.printEdge2edge()); mOptionsContainer.setFitsSystemWindows(true); mExpandCollapseHandle.setOnClickListener(this); mSummaryContent.setOnClickListener(this); Loading Loading @@ -274,28 +273,15 @@ public final class PrintContentView extends ViewGroup implements View.OnClickLis @Override protected void onLayout(boolean changed, int left, int top, int right, int bottom) { final int childLeft; final int childRight; final int childTop; if (Flags.printEdge2edge()) { childLeft = left + mPaddingLeft; childRight = right - mPaddingRight; childTop = top + mPaddingTop; } else { childLeft = left; childRight = right; childTop = top; } final int childLeft = left + mPaddingLeft; final int childRight = right - mPaddingRight; final int childTop = top + mPaddingTop; mStaticContent.layout(childLeft, childTop, childRight, mStaticContent.getMeasuredHeight() + (Flags.printEdge2edge() ? mPaddingTop : 0)); mStaticContent.getMeasuredHeight() + mPaddingTop); if (mSummaryContent.getVisibility() != View.GONE) { mSummaryContent.layout(childLeft, (Flags.printEdge2edge() ? mStaticContent.getBottom() : mStaticContent.getMeasuredHeight()), childRight, (Flags.printEdge2edge() ? mStaticContent.getBottom() : mStaticContent.getMeasuredHeight()) + mSummaryContent.getMeasuredHeight()); mSummaryContent.layout(childLeft, mStaticContent.getBottom(), childRight, mStaticContent.getBottom() + mSummaryContent.getMeasuredHeight()); } final int dynContentTop = mStaticContent.getBottom() + mCurrentOptionsOffsetY; Loading @@ -318,11 +304,11 @@ public final class PrintContentView extends ViewGroup implements View.OnClickLis mPrintButton.layout(printButtonLeft, printButtonTop, printButtonRight, printButtonBottom); final int embContentTop = (Flags.printEdge2edge() ? mPaddingTop : 0) final int embContentTop = mPaddingTop + mStaticContent.getMeasuredHeight() + mClosedOptionsOffsetY + mDynamicContent.getMeasuredHeight(); final int embContentBottom = embContentTop + mEmbeddedContentContainer.getMeasuredHeight() - (Flags.printEdge2edge() ? mPaddingBottom : 0); - mPaddingBottom; mEmbeddedContentContainer.layout(childLeft, embContentTop, childRight, embContentBottom); } Loading