summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDianne Hackborn <hackbod@google.com>2012-10-11 15:36:32 -0700
committerDianne Hackborn <hackbod@google.com>2012-10-11 15:36:32 -0700
commit03347bac6c91b8a8371b05783f6b23ef883b8c9a (patch)
treeca3bf242839c0c6a90ae0403b905457cbae31f5b
parentba12a2cee006122d2dc4ccb364ee5885494709d6 (diff)
downloadpackages_apps_packageinstaller-03347bac6c91b8a8371b05783f6b23ef883b8c9a.zip
packages_apps_packageinstaller-03347bac6c91b8a8371b05783f6b23ef883b8c9a.tar.gz
packages_apps_packageinstaller-03347bac6c91b8a8371b05783f6b23ef883b8c9a.tar.bz2
Fix issue #7323256: permission dialog has bad layout
Change-Id: I3fc9f9bf492178ba064a4579826f49f252d41a20
-rw-r--r--res/layout/install_confirm.xml8
-rw-r--r--src/com/android/packageinstaller/PackageInstallerActivity.java23
2 files changed, 20 insertions, 11 deletions
diff --git a/res/layout/install_confirm.xml b/res/layout/install_confirm.xml
index 9589e8a..f9fb359 100644
--- a/res/layout/install_confirm.xml
+++ b/res/layout/install_confirm.xml
@@ -44,6 +44,14 @@
android:background="?android:attr/dividerHorizontal"
android:visibility="gone" />
+ <FrameLayout
+ android:id="@+id/filler"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_weight="1"
+ android:visibility="gone">
+ </FrameLayout>
+
<TabHost
android:id="@android:id/tabhost"
android:layout_width="match_parent"
diff --git a/src/com/android/packageinstaller/PackageInstallerActivity.java b/src/com/android/packageinstaller/PackageInstallerActivity.java
index d0c50fc..4a6db21 100644
--- a/src/com/android/packageinstaller/PackageInstallerActivity.java
+++ b/src/com/android/packageinstaller/PackageInstallerActivity.java
@@ -284,19 +284,20 @@ public class PackageInstallerActivity extends Activity implements OnCancelListen
}
}
if (!permVisible) {
- if (msg == 0) {
- if (mAppInfo != null) {
- // This is an update to an application, but there are no
- // permissions at all.
- msg = (mAppInfo.flags & ApplicationInfo.FLAG_SYSTEM) != 0
- ? R.string.install_confirm_question_update_system_no_perms
- : R.string.install_confirm_question_update_no_perms;
- } else {
- // This is a new application with no permissions.
- msg = R.string.install_confirm_question_no_perms;
- }
+ if (mAppInfo != null) {
+ // This is an update to an application, but there are no
+ // permissions at all.
+ msg = (mAppInfo.flags & ApplicationInfo.FLAG_SYSTEM) != 0
+ ? R.string.install_confirm_question_update_system_no_perms
+ : R.string.install_confirm_question_update_no_perms;
+ } else {
+ // This is a new application with no permissions.
+ msg = R.string.install_confirm_question_no_perms;
}
tabHost.setVisibility(View.GONE);
+ findViewById(R.id.filler).setVisibility(View.VISIBLE);
+ findViewById(R.id.divider).setVisibility(View.GONE);
+ mScrollView = null;
}
if (msg != 0) {
((TextView)findViewById(R.id.install_confirm_question)).setText(msg);