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

Commit e1b3686f authored by Jeff Davidson's avatar Jeff Davidson Committed by Android (Google) Code Review
Browse files

Merge "Add support for illustrations to SimAppDialog."

parents 78515967 36798b60
Loading
Loading
Loading
Loading
+18 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!--
    Copyright (C) 2018 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.
-->
<!-- Empty drawable as this is not displayed by default. Must be provided by resource overlay. -->
<shape xmlns:android="http://schemas.android.com/apk/res/android" />
+17 −1
Original line number Diff line number Diff line
@@ -37,6 +37,22 @@
            android:text="@string/install_carrier_app_description_default"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"/>

        <com.android.setupwizardlib.view.FillContentLayout
            android:id="@+id/illo_container"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_weight="1"
            android:visibility="gone">

            <ImageView
                android:src="@drawable/illo_sim_app_dialog"
                style="@style/SuwContentIllustration"
                android:contentDescription="@string/install_carrier_app_image_content_description"
                android:layout_width="match_parent"
                android:layout_height="match_parent"/>

        </com.android.setupwizardlib.view.FillContentLayout>
</LinearLayout>

</com.android.setupwizardlib.GlifLayout>
+25 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="UTF-8"?>
<!--
    Copyright (C) 2018 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.
-->
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
    <!--
         Whether to show an illustration on the screen asking the user to download the carrier app.
         May be set to true in a resource overlay as long as a drawable asset with ID
         illo_sim_app_dialog is provided, along with a content description for accessibility with
         string ID install_carrier_app_image_content_description.
    -->
    <bool name="show_sim_app_dialog_illo">false</bool>
</resources>
+3 −1
Original line number Diff line number Diff line
@@ -32,4 +32,6 @@
    <string name="install_carrier_app_defer_action">Not now</string>
    <!-- Name of the button for downloading the carrier app [CHAR LIMIT=25] -->
    <string name="install_carrier_app_download_action">Download app</string>
    <!-- Empty placeholder string for an illustration content description that is supplied via resource overlay. [DO NOT TRANSLATE] -->
    <string name="install_carrier_app_image_content_description" translatable="false" />
</resources>
+5 −0
Original line number Diff line number Diff line
@@ -65,6 +65,11 @@ public class InstallCarrierAppActivity extends Activity implements View.OnClickL
        Button downloadButton = findViewById(R.id.download_button);
        downloadButton.setOnClickListener(this);

        // Show/hide illo depending on whether one was provided in a resource overlay
        boolean showIllo = getResources().getBoolean(R.bool.show_sim_app_dialog_illo);
        View illoContainer = findViewById(R.id.illo_container);
        illoContainer.setVisibility(showIllo ? View.VISIBLE : View.GONE);

        // Include carrier name in description text if its present in the intent
        Intent intent = getIntent();
        if (intent != null) {