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

Commit f7b50180 authored by Philip P. Moltmann's avatar Philip P. Moltmann Committed by Android (Google) Code Review
Browse files

Merge "Display toast when print services are disabled."

parents c06fbb12 1f46779f
Loading
Loading
Loading
Loading
+3 −0
Original line number Original line Diff line number Diff line
@@ -150,6 +150,9 @@
    <!-- Description of printer info icon. [CHAR LIMIT=50] -->
    <!-- Description of printer info icon. [CHAR LIMIT=50] -->
    <string name="printer_info_desc">More information about this printer</string>
    <string name="printer_info_desc">More information about this printer</string>


    <!-- Notification that print services as disabled. [CHAR LIMIT=50] -->
    <string name="print_services_disabled_toast">Some print services are disabled.</string>

    <!-- Add printer dialog  -->
    <!-- Add printer dialog  -->


    <!-- Title for the alert dialog for selecting a print service. [CHAR LIMIT=50] -->
    <!-- Title for the alert dialog for selecting a print service. [CHAR LIMIT=50] -->
+9 −0
Original line number Original line Diff line number Diff line
@@ -65,6 +65,7 @@ import android.widget.ImageView;
import android.widget.ListView;
import android.widget.ListView;
import android.widget.SearchView;
import android.widget.SearchView;
import android.widget.TextView;
import android.widget.TextView;
import android.widget.Toast;


import com.android.internal.content.PackageMonitor;
import com.android.internal.content.PackageMonitor;
import com.android.printspooler.R;
import com.android.printspooler.R;
@@ -147,6 +148,14 @@ public final class SelectPrinterActivity extends Activity {
        });
        });


        registerForContextMenu(mListView);
        registerForContextMenu(mListView);

        // Display a notification about disabled services if there are disabled services
        String disabledServicesSetting = Settings.Secure.getString(getContentResolver(),
                Settings.Secure.DISABLED_PRINT_SERVICES);
        if (!TextUtils.isEmpty(disabledServicesSetting)) {
            Toast.makeText(this, getString(R.string.print_services_disabled_toast),
                    Toast.LENGTH_LONG).show();
        }
    }
    }


    @Override
    @Override