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

Commit 1f46779f authored by Philip P. Moltmann's avatar Philip P. Moltmann
Browse files

Display toast when print services are disabled.

Change-Id: Id1ebcbbf39eb558bc15c7c69c03fe8124b9c79d7
parent d1d53361
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -150,6 +150,9 @@
    <!-- Description of printer info icon. [CHAR LIMIT=50] -->
    <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  -->

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

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

        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