Permalink
Browse files

Fix issue #7323256: permission dialog has bad layout

Change-Id: I3fc9f9bf492178ba064a4579826f49f252d41a20
  • Loading branch information...
1 parent ba12a2c commit 03347bac6c91b8a8371b05783f6b23ef883b8c9a Dianne Hackborn committed Oct 11, 2012
Showing with 20 additions and 11 deletions.
  1. +8 −0 res/layout/install_confirm.xml
  2. +12 −11 src/com/android/packageinstaller/PackageInstallerActivity.java
@@ -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"
@@ -284,19 +284,20 @@ private void startInstallConfirm() {
}
}
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);

0 comments on commit 03347ba

Please sign in to comment.