summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSuchi Amalapurapu <asuchitra@google.com>2009-06-24 15:48:58 -0700
committerSuchi Amalapurapu <asuchitra@google.com>2009-06-24 16:45:00 -0700
commit3d8cab3e3e7884d628a4b799a93155c6efcab95a (patch)
tree4432ce3aa0d3d573b15ef273dfe22433d9abf5e3
parentb123ff94f917533f1507abcb5199fb52c830d8d1 (diff)
downloadandroid_packages_apps_PackageInstaller-3d8cab3e3e7884d628a4b799a93155c6efcab95a.tar.gz
android_packages_apps_PackageInstaller-3d8cab3e3e7884d628a4b799a93155c6efcab95a.tar.bz2
android_packages_apps_PackageInstaller-3d8cab3e3e7884d628a4b799a93155c6efcab95a.zip
Rename strings when uninstalling updates for system apps
Add new strings
-rwxr-xr-xres/layout/uninstall_confirm.xml4
-rwxr-xr-xres/layout/uninstall_done.xml2
-rw-r--r--res/values/strings.xml2
-rwxr-xr-xsrc/com/android/packageinstaller/UninstallAppDone.java1
-rwxr-xr-xsrc/com/android/packageinstaller/UninstallerActivity.java10
5 files changed, 15 insertions, 4 deletions
diff --git a/res/layout/uninstall_confirm.xml b/res/layout/uninstall_confirm.xml
index 3f7f18ac..ef88937f 100755
--- a/res/layout/uninstall_confirm.xml
+++ b/res/layout/uninstall_confirm.xml
@@ -38,7 +38,6 @@
android:id="@+id/uninstall_question"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
- android:text="@string/uninstall_application_question"
android:textStyle="bold"
android:paddingTop="16dip"
android:paddingLeft="16dip"
@@ -50,9 +49,8 @@
<!-- uninstall application confirmation text -->
<TextView
android:id="@+id/uninstall_confirm_text"
- android:layout_width="fill_parent"
+ android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:text="@string/uninstall_application_text"
android:textColor="?android:attr/textColorSecondary"
android:textAppearance="?android:attr/textAppearanceMedium"
android:layout_below="@id/uninstall_question"
diff --git a/res/layout/uninstall_done.xml b/res/layout/uninstall_done.xml
index 082d48b5..e65f29fb 100755
--- a/res/layout/uninstall_done.xml
+++ b/res/layout/uninstall_done.xml
@@ -54,6 +54,8 @@
android:paddingRight="6dip"
android:layout_alignParentRight="true"
android:text="@string/ok"
+ android.paddingTop="6dip"
+ android:gravity="center"
android:layout_width="150dip"
android:layout_height="wrap_content"/>
</RelativeLayout>
diff --git a/res/values/strings.xml b/res/values/strings.xml
index f36660bc..67b8e533 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -45,7 +45,9 @@
<string name="app_not_found_dlg_text"> The application was not
found in the list of installed applications.</string>
<string name="uninstall_application_question">Uninstall application?</string>
+ <string name="uninstall_update_question">Uninstall update?</string>
<string name="uninstall_application_text">This application will be removed from your phone.</string>
+ <string name="uninstall_update_text">The application update will be uninstalled. You can still use the factory version of the application.</string>
<string name="uninstalling">Uninstalling\u2026</string>
<string name="uninstall_done">Uninstall finished!</string>
<string name="uninstall_failed">Uninstall not successful</string>
diff --git a/src/com/android/packageinstaller/UninstallAppDone.java b/src/com/android/packageinstaller/UninstallAppDone.java
index 73dffe3d..3a9e149d 100755
--- a/src/com/android/packageinstaller/UninstallAppDone.java
+++ b/src/com/android/packageinstaller/UninstallAppDone.java
@@ -51,7 +51,6 @@ public class UninstallAppDone extends Activity implements View.OnClickListener
public void initView() {
String unknown = getString(R.string.unknown);
- requestWindowFeature(Window.FEATURE_NO_TITLE);
setContentView(R.layout.uninstall_done);
TextView centerText = (TextView)findViewById(R.id.center_text);
if(uninstallFlag) {
diff --git a/src/com/android/packageinstaller/UninstallerActivity.java b/src/com/android/packageinstaller/UninstallerActivity.java
index 00658247..bbc89e88 100755
--- a/src/com/android/packageinstaller/UninstallerActivity.java
+++ b/src/com/android/packageinstaller/UninstallerActivity.java
@@ -31,6 +31,7 @@ import android.view.View;
import android.view.Window;
import android.view.View.OnClickListener;
import android.widget.Button;
+import android.widget.TextView;
import android.content.pm.PackageManager.NameNotFoundException;
/*
@@ -138,6 +139,15 @@ public class UninstallerActivity extends Activity implements OnClickListener {
requestWindowFeature(Window.FEATURE_NO_TITLE);
//set view
setContentView(R.layout.uninstall_confirm);
+ TextView question = (TextView) findViewById(R.id.uninstall_question);
+ TextView confirm = (TextView) findViewById(R.id.uninstall_confirm_text);
+ if ((mAppInfo.flags & ApplicationInfo.FLAG_UPDATED_SYSTEM_APP) != 0) {
+ question.setText(R.string.uninstall_update_question);
+ confirm.setText(R.string.uninstall_update_text);
+ } else {
+ question.setText(R.string.uninstall_application_question);
+ confirm.setText(R.string.uninstall_application_text);
+ }
PackageUtil.initSnippetForInstalledApp(this, mAppInfo, R.id.app_snippet);
//initialize ui elements
mOk = (Button)findViewById(R.id.ok_button);