Skip to content
This repository has been archived by the owner on Nov 8, 2023. It is now read-only.

Commit

Permalink
Fix issue #7323256: permission dialog has bad layout
Browse files Browse the repository at this point in the history
Change-Id: I3fc9f9bf492178ba064a4579826f49f252d41a20
  • Loading branch information
Dianne Hackborn committed Oct 11, 2012
1 parent ba12a2c commit 03347ba
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 11 deletions.
8 changes: 8 additions & 0 deletions res/layout/install_confirm.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
23 changes: 12 additions & 11 deletions src/com/android/packageinstaller/PackageInstallerActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 03347ba

Please sign in to comment.