summaryrefslogtreecommitdiff
path: root/packages/SimAppDialog/src
diff options
context:
space:
mode:
authorJeff Davidson <jpd@google.com>2018-11-05 15:15:39 -0800
committerJeff Davidson <jpd@google.com>2018-11-06 17:31:06 +0000
commit36798b60c5e8f823b4027d49cca18fdc4704afa1 (patch)
treee3a80cde66f9369720c8df4d97c6e2428feede39 /packages/SimAppDialog/src
parent00b0f1d3edb44f1485b92cc758543806c7a943f1 (diff)
Add support for illustrations to SimAppDialog.
Previously these were provided in build-time resource overlays by overriding the entire install_carrier_app_activity.xml layout. This is no longer feasible with the move to runtime overlays as the layout cannot be precisely mimicked due to depending on styles and other parameters from the base APK (and is generally a bit more brittle). Instead, pull in the needed container from the current overlay, add a stub image and content description and hide the container by default so the base APK can be compiled, and provide a boolean that can be overridden along with the image and content description that is used to toggle the image display at runtime. Bug: 118823052 Test: atest GtsSimAppDialogTestCases (with and without overlay) Change-Id: Ic706df3091ce6c9f5d64ee22da6fa61b9b7b1e3c
Diffstat (limited to 'packages/SimAppDialog/src')
-rw-r--r--packages/SimAppDialog/src/com/android/simappdialog/InstallCarrierAppActivity.java5
1 files changed, 5 insertions, 0 deletions
diff --git a/packages/SimAppDialog/src/com/android/simappdialog/InstallCarrierAppActivity.java b/packages/SimAppDialog/src/com/android/simappdialog/InstallCarrierAppActivity.java
index 9e9b80d39ed7..8e8d9f741a81 100644
--- a/packages/SimAppDialog/src/com/android/simappdialog/InstallCarrierAppActivity.java
+++ b/packages/SimAppDialog/src/com/android/simappdialog/InstallCarrierAppActivity.java
@@ -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) {