Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6552bf3d authored by Svetoslav's avatar Svetoslav
Browse files

Print spooler UI polish and bug fixes.

1. Added an empty state for pages that are being rendered.

2. Fixed a NPA on a binder thread when destoroying the
   remote print adapter.

3. Fixed a rare crash when the print activity gets an
   activity class callback while initializing.

4. Changed the preview pages on phone in land to four.

5. Fixed a flicker from a list of pages to an empty state
   and then back to the list of pages.

bug:15704969
bug:16966145

Change-Id: I0eea2f30a102d8fefcbf90187fa6d8612fb19434

Conflicts:
	packages/PrintSpooler/src/com/android/printspooler/widget/PageContentView.java
parent 522f671e
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -535,7 +535,7 @@ public final class PrintManager {
                destroyed = isDestroyedLocked();
            }

            if (destroyed) {
            if (destroyed && observer != null) {
                try {
                    observer.onDestroy();
                } catch (RemoteException re) {
+32 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2014 The Android Open Source Project

     Licensed under the Apache License, Version 2.0 (the "License");
     you may not use this file except in compliance with the License.
     You may obtain a copy of the License at

      http://www.apache.org/licenses/LICENSE-2.0

     Unless required by applicable law or agreed to in writing, software
     distributed under the License is distributed on an "AS IS" BASIS,
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     See the License for the specific language governing permissions and
     limitations under the License.
-->

<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent">

    <ImageView
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_margin="36dip"
        android:layout_gravity="center"
        android:src="@drawable/ic_grayedout_printer"
        android:contentDescription="@null"
        android:scaleType="centerInside"
        android:adjustViewBounds="true">
    </ImageView>

</FrameLayout>
+1 −1
Original line number Diff line number Diff line
@@ -16,7 +16,7 @@

<resources>

    <integer name="preview_page_per_row_count">2</integer>
    <integer name="preview_page_per_row_count">4</integer>

    <integer name="print_option_column_count">3</integer>

+0 −1
Original line number Diff line number Diff line
@@ -76,7 +76,6 @@
    <!-- Title for the print dialog announced to the user for accessibility. Not shown in the UI. [CHAR LIMIT=none] -->
    <string name="print_dialog">Print dialog</string>


    <!-- Template for the message that shows the current page out of the total number of pages -->
    <string name="current_page_template"><xliff:g id="current_page">%1$d</xliff:g>
        /<xliff:g id="page_count">%2$d</xliff:g></string>
+5 −0
Original line number Diff line number Diff line
@@ -317,6 +317,11 @@ public final class RemotePrintDocument {
        return mState == STATE_FAILED;
    }

    public boolean hasLaidOutPages() {
        return mDocumentInfo.info != null
                && mDocumentInfo.info.getPageCount() > 0;
    }

    public void clearUpdateError() {
        if (!hasUpdateError()) {
            throw new IllegalStateException("No update error to clear");
Loading