Remove uneeded case of no new permissions in InstallConfirmActivity

This commit is contained in:
Dominik Schürmann 2015-05-20 18:40:20 +02:00
parent f48236deb9
commit 2befa22b2c
3 changed files with 1 additions and 27 deletions

View File

@ -1,20 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2012 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.
-->
<TextView
xmlns:android="http://schemas.android.com/apk/res/android"
android:textAppearance="?android:attr/textAppearanceMedium"
android:gravity="center" />

View File

@ -367,8 +367,6 @@
<string name="uninstall_update_confirm">Do you want to replace this app with the factory version?</string> <string name="uninstall_update_confirm">Do you want to replace this app with the factory version?</string>
<string name="uninstall_confirm">Do you want to uninstall this app?</string> <string name="uninstall_confirm">Do you want to uninstall this app?</string>
<string name="no_new_perms">This update requires no new permissions.</string>
<string name="perms_new_perm_prefix"><font size="12" fgcolor="#ff33b5e5">NEW: </font></string> <string name="perms_new_perm_prefix"><font size="12" fgcolor="#ff33b5e5">NEW: </font></string>
<string name="perms_description_app">Provided by %1$s.</string> <string name="perms_description_app">Provided by %1$s.</string>
</resources> </resources>

View File

@ -100,11 +100,7 @@ public class InstallConfirmActivity extends Activity implements OnCancelListener
mScrollView.addView(perms.getPermissionsView( mScrollView.addView(perms.getPermissionsView(
AppSecurityPermissions.WHICH_NEW)); AppSecurityPermissions.WHICH_NEW));
} else { } else {
LayoutInflater inflater = (LayoutInflater) getSystemService( throw new RuntimeException("This should not happen. No new permissions were found but InstallConfirmActivity has been started!");
Context.LAYOUT_INFLATER_SERVICE);
TextView label = (TextView) inflater.inflate(R.layout.label, null);
label.setText(R.string.no_new_perms);
mScrollView.addView(label);
} }
adapter.addTab(tabHost.newTabSpec(TAB_ID_NEW).setIndicator( adapter.addTab(tabHost.newTabSpec(TAB_ID_NEW).setIndicator(
getText(R.string.newPerms)), mScrollView); getText(R.string.newPerms)), mScrollView);