diff options
author | Jean-Baptiste Queru <jbq@google.com> | 2009-11-12 18:46:11 -0800 |
---|---|---|
committer | Jean-Baptiste Queru <jbq@google.com> | 2009-11-12 18:46:11 -0800 |
commit | fbd1a24320290e9b4106e6f758a0fe98d6974a97 (patch) | |
tree | 9130c43b0b42c55a7779feabc1d0ebf3f039bf85 | |
parent | e99c95820e927c0116fd1ac8426d8cbd3784113f (diff) | |
download | android_packages_apps_PackageInstaller-fbd1a24320290e9b4106e6f758a0fe98d6974a97.tar.gz android_packages_apps_PackageInstaller-fbd1a24320290e9b4106e6f758a0fe98d6974a97.tar.bz2 android_packages_apps_PackageInstaller-fbd1a24320290e9b4106e6f758a0fe98d6974a97.zip |
eclair snapshot
22 files changed, 225 insertions, 511 deletions
diff --git a/AndroidManifest.xml b/AndroidManifest.xml index 303897ad..21131455 100644 --- a/AndroidManifest.xml +++ b/AndroidManifest.xml @@ -5,6 +5,7 @@ <uses-permission android:name="android.permission.DELETE_PACKAGES" /> <uses-permission android:name="android.permission.CLEAR_APP_CACHE" /> <uses-permission android:name="android.permission.READ_PHONE_STATE" /> + <uses-permission android:name="android.permission.CLEAR_APP_USER_DATA" /> <application android:label="@string/app_name"> <activity android:name=".PackageInstallerActivity"> <intent-filter> @@ -15,12 +16,8 @@ <data android:mimeType="application/vnd.android.package-archive" /> </intent-filter> </activity> - <activity android:name=".InstallAppConfirmation"> - </activity> <activity android:name=".InstallAppProgress"> </activity> - <activity android:name=".InstallAppDone"> - </activity> <activity android:name=".UninstallerActivity"> <intent-filter> <action android:name="android.intent.action.VIEW" /> @@ -31,7 +28,5 @@ </activity> <activity android:name=".UninstallAppProgress"> </activity> - <activity android:name=".UninstallAppDone"> - </activity> </application> </manifest> diff --git a/res/drawable-hdpi/button_indicator_finish.png b/res/drawable-hdpi/button_indicator_finish.png Binary files differnew file mode 100644 index 00000000..b1be556a --- /dev/null +++ b/res/drawable-hdpi/button_indicator_finish.png diff --git a/res/drawable/button_indicator_finish.png b/res/drawable-mdpi/button_indicator_finish.png Binary files differindex 5a01bcc4..5a01bcc4 100755 --- a/res/drawable/button_indicator_finish.png +++ b/res/drawable-mdpi/button_indicator_finish.png diff --git a/res/layout/install_confirm.xml b/res/layout/install_confirm.xml index bfda97dc..96340988 100755 --- a/res/layout/install_confirm.xml +++ b/res/layout/install_confirm.xml @@ -24,12 +24,10 @@ <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" + android:layout_weight="1" android:layout_width="fill_parent" - android:layout_height="fill_parent"> + android:layout_height="wrap_content"> - <include - layout="@layout/app_details" - android:id="@+id/app_snippet"/> <TextView android:id="@+id/install_confirm_question" android:layout_width="wrap_content" @@ -55,6 +53,7 @@ android:orientation="vertical"> <TextView android:id="@+id/security_settings_desc" + android:text="@string/security_settings_desc" android:layout_width="wrap_content" android:layout_height="wrap_content" android:textAppearance="?android:attr/textAppearanceMedium" diff --git a/res/layout/install_done.xml b/res/layout/install_done.xml deleted file mode 100755 index e33f57b7..00000000 --- a/res/layout/install_done.xml +++ /dev/null @@ -1,71 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!-- Copyright (C) 2008 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. ---> - -<RelativeLayout - xmlns:android="http://schemas.android.com/apk/res/android" - android:layout_width="fill_parent" - android:layout_height="fill_parent"> - - <include - layout="@layout/app_details" - android:gravity="top" - android:id="@+id/app_snippet" /> - <TextView - android:id="@+id/center_text" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:paddingLeft="20dip" - android:paddingTop="36dip" - android:drawablePadding="6dip" - android:layout_below="@id/app_snippet" - android:textColor="?android:attr/textColorSecondary" - android:textAppearance="?android:attr/textAppearanceMedium"/> - - <!-- Launch and close buttons. --> - <LinearLayout - android:background="@color/title_background" - android:layout_width="fill_parent" - android:layout_height="wrap_content" - android:layout_alignParentBottom="true" - android:orientation="horizontal"> - <Button - android:id="@+id/launch_button" - android:text="@string/launch" - android:layout_width="150dip" - android:paddingLeft="6dip" - android:layout_gravity="left" - android:layout_weight="0.4" - android:layout_height="wrap_content"/> - <!-- Spacer --> - <View - android:id="@+id/buttons_spacer_left" - android:layout_width="0dip" - android:layout_height="wrap_content" - android:visibility="gone" - android:layout_weight="0.2" /> - <Button - android:id="@+id/done_button" - android:layout_width="150dip" - android:paddingRight="6dip" - android:layout_gravity="right" - android:text="@string/done" - android:layout_weight="0.4" - android:layout_height="wrap_content"/> - </LinearLayout> - -</RelativeLayout> - - diff --git a/res/layout/install_start.xml b/res/layout/install_start.xml index 1ef0ab5d..d95daa64 100755 --- a/res/layout/install_start.xml +++ b/res/layout/install_start.xml @@ -14,14 +14,18 @@ limitations under the License. --> -<RelativeLayout +<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" + android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent"> <include layout="@layout/app_details" android:id="@+id/app_snippet"/> -</RelativeLayout> + <include + layout="@layout/install_confirm" + android:id="@+id/install_confirm_panel"/> +</LinearLayout> diff --git a/res/layout/op_progress.xml b/res/layout/op_progress.xml index b957fdf7..aaab8686 100755 --- a/res/layout/op_progress.xml +++ b/res/layout/op_progress.xml @@ -14,33 +14,69 @@ limitations under the License. --> -<LinearLayout +<ScrollView xmlns:android="http://schemas.android.com/apk/res/android" - android:orientation="vertical" android:layout_width="fill_parent" - android:layout_height="wrap_content"> - - <include - layout="@layout/app_details" - android:id="@+id/app_snippet"/> - <ProgressBar - android:id="@+id/progress_bar" - style="?android:attr/progressBarStyleHorizontal" - android:layout_width="fill_parent" - android:layout_height="wrap_content" - android:paddingTop="24dip" - android:paddingLeft="24dip" - android:paddingRight="24dip" - android:max="100" /> - <TextView - android:id="@+id/center_text" + android:layout_height="fill_parent" + android:fillViewport="true"> + <RelativeLayout android:layout_width="fill_parent" - android:layout_height="wrap_content" - android:paddingLeft="24dip" - android:paddingTop="16dip" - android:text="@string/installing" - android:textAppearance="?android:attr/textAppearanceMedium" - android:textColor="?android:attr/textColorSecondary"/> -</LinearLayout> + android:layout_height="fill_parent"> + <include + layout="@layout/app_details" + android:id="@+id/app_snippet"/> + <TextView + android:id="@+id/center_text" + android:layout_width="fill_parent" + android:layout_height="wrap_content" + android:layout_centerHorizontal="true" + android:layout_centerVertical="true" + android:text="@string/installing" + android:paddingLeft="16dip" + android:textAppearance="?android:attr/textAppearanceMedium"/> + <ProgressBar + android:id="@+id/progress_bar" + style="?android:attr/progressBarStyleHorizontal" + android:layout_width="fill_parent" + android:layout_height="wrap_content" + android:paddingTop="24dip" + android:paddingLeft="16dip" + android:paddingRight="16dip" + android:layout_below="@id/center_text" + android:max="100" /> + <!-- Launch and close buttons. --> + <LinearLayout + android:id="@+id/buttons_panel" + android:background="@color/title_background" + android:layout_width="fill_parent" + android:layout_height="wrap_content" + android:layout_alignParentBottom="true" + android:orientation="horizontal"> + <Button + android:id="@+id/launch_button" + android:text="@string/launch" + android:layout_width="150dip" + android:paddingLeft="6dip" + android:layout_gravity="left" + android:layout_weight="0.4" + android:layout_height="wrap_content"/> + <!-- Spacer --> + <View + android:id="@+id/buttons_spacer_left" + android:layout_width="0dip" + android:layout_height="wrap_content" + android:visibility="gone" + android:layout_weight="0.2" /> + <Button + android:id="@+id/done_button" + android:layout_width="150dip" + android:paddingRight="6dip" + android:layout_gravity="right" + android:text="@string/done" + android:layout_weight="0.4" + android:layout_height="wrap_content"/> + </LinearLayout> + </RelativeLayout> +</ScrollView> diff --git a/res/values-da/strings.xml b/res/values-da/strings.xml index d1c9b10d..68cd23f2 100644 --- a/res/values-da/strings.xml +++ b/res/values-da/strings.xml @@ -41,11 +41,9 @@ <string name="app_not_found_dlg_title" msgid="1510267643973600726">"Programmet blev ikke fundet"</string> <string name="app_not_found_dlg_text" msgid="754013198108180241">"Programmet blev ikke fundet på listen over installerede programmer."</string> <string name="uninstall_application_question" msgid="7290302854905395978">"Afinstaller program?"</string> - <!-- no translation found for uninstall_update_question (2600765438050721390) --> - <skip /> + <string name="uninstall_update_question" msgid="2600765438050721390">"Afinstaller opdatering?"</string> <string name="uninstall_application_text" msgid="9107842143723765782">"Dette program fjernes fra din telefon."</string> - <!-- no translation found for uninstall_update_text (6695211142526505726) --> - <skip /> + <string name="uninstall_update_text" msgid="6695211142526505726">"Programopdateringen afinstalleres. Du kan stadig bruge programmets fabriksversion."</string> <string name="uninstalling" msgid="5556217435895938250">"Afinstallerer ..."</string> <string name="uninstall_done" msgid="8730655660697216076">"Afinstallation afsluttet!"</string> <string name="uninstall_failed" msgid="5725854598594371845">"Afinstallationen mislykkedes"</string> diff --git a/res/values-el/strings.xml b/res/values-el/strings.xml index 13f6dfe0..62c87a73 100644 --- a/res/values-el/strings.xml +++ b/res/values-el/strings.xml @@ -41,11 +41,9 @@ <string name="app_not_found_dlg_title" msgid="1510267643973600726">"Η εφαρμογή δεν βρέθηκε"</string> <string name="app_not_found_dlg_text" msgid="754013198108180241">"Η εφαρμογή δεν βρέθηκε στη λίστα των εγκατεστημένων εφαρμογών."</string> <string name="uninstall_application_question" msgid="7290302854905395978">"Να γίνει κατάργηση εγκατάστασης της εφαρμογής;"</string> - <!-- no translation found for uninstall_update_question (2600765438050721390) --> - <skip /> + <string name="uninstall_update_question" msgid="2600765438050721390">"Κατάργηση εγκατάστασης ενημέρωσης;"</string> <string name="uninstall_application_text" msgid="9107842143723765782">"Αυτή η εφαρμογή θα καταργηθεί από το τηλέφωνό σας."</string> - <!-- no translation found for uninstall_update_text (6695211142526505726) --> - <skip /> + <string name="uninstall_update_text" msgid="6695211142526505726">"Θα γίνει κατάργηση της εγκατάστασης της ενημέρωσης της εφαρμογής. Θα εξακολουθείτε να μπορείτε να χρησιμοποιήσετε την εργοστασιακή έκδοση της εφαρμογής."</string> <string name="uninstalling" msgid="5556217435895938250">"Κατάργηση εγκατάστασης..."</string> <string name="uninstall_done" msgid="8730655660697216076">"Η κατάργηση εγκατάστασης ολοκληρώθηκε!"</string> <string name="uninstall_failed" msgid="5725854598594371845">"Η κατάργηση εγκατάστασης δεν ήταν επιτυχής"</string> diff --git a/res/values-es-rUS/strings.xml b/res/values-es-rUS/strings.xml index 830a25c1..0b72b64f 100644 --- a/res/values-es-rUS/strings.xml +++ b/res/values-es-rUS/strings.xml @@ -41,11 +41,9 @@ <string name="app_not_found_dlg_title" msgid="1510267643973600726">"No se ha encontrado la aplicación"</string> <string name="app_not_found_dlg_text" msgid="754013198108180241">"No se ha encontrado la aplicación en la lista de aplicaciones instaladas."</string> <string name="uninstall_application_question" msgid="7290302854905395978">"¿Deseas desinstalar la aplicación?"</string> - <!-- no translation found for uninstall_update_question (2600765438050721390) --> - <skip /> + <string name="uninstall_update_question" msgid="2600765438050721390">"¿Deseas desinstalar la actualización?"</string> <string name="uninstall_application_text" msgid="9107842143723765782">"Se eliminará esta aplicación de tu teléfono."</string> - <!-- no translation found for uninstall_update_text (6695211142526505726) --> - <skip /> + <string name="uninstall_update_text" msgid="6695211142526505726">"La actualización de la aplicación será desinstalada. Aún puedes usar la versión original de la aplicación."</string> <string name="uninstalling" msgid="5556217435895938250">"Desinstalando…"</string> <string name="uninstall_done" msgid="8730655660697216076">"¡Finalizó la desinstalación!"</string> <string name="uninstall_failed" msgid="5725854598594371845">"La desinstalación no se ha realizado correctamente"</string> diff --git a/res/values-ko/strings.xml b/res/values-ko/strings.xml index c3ba5ae6..b6751dbc 100644 --- a/res/values-ko/strings.xml +++ b/res/values-ko/strings.xml @@ -41,11 +41,9 @@ <string name="app_not_found_dlg_title" msgid="1510267643973600726">"응용프로그램을 찾지 못했습니다."</string> <string name="app_not_found_dlg_text" msgid="754013198108180241">"응용프로그램이 설치된 응용프로그램 목록에 없습니다."</string> <string name="uninstall_application_question" msgid="7290302854905395978">"응용프로그램을 제거하시겠습니까?"</string> - <!-- no translation found for uninstall_update_question (2600765438050721390) --> - <skip /> + <string name="uninstall_update_question" msgid="2600765438050721390">"업데이트를 제거하시겠습니까?"</string> <string name="uninstall_application_text" msgid="9107842143723765782">"휴대전화에서 이 응용프로그램이 삭제됩니다."</string> - <!-- no translation found for uninstall_update_text (6695211142526505726) --> - <skip /> + <string name="uninstall_update_text" msgid="6695211142526505726">"응용프로그램 업데이트가 제거됩니다. 하지만 응용프로그램의 초기 버전을 계속 사용할 수 있습니다."</string> <string name="uninstalling" msgid="5556217435895938250">"제거 중..."</string> <string name="uninstall_done" msgid="8730655660697216076">"제거가 완료되었습니다."</string> <string name="uninstall_failed" msgid="5725854598594371845">"제거하지 못했습니다."</string> diff --git a/res/values-pt-rPT/strings.xml b/res/values-pt-rPT/strings.xml index c5a0b5cf..944ef637 100644 --- a/res/values-pt-rPT/strings.xml +++ b/res/values-pt-rPT/strings.xml @@ -41,11 +41,9 @@ <string name="app_not_found_dlg_title" msgid="1510267643973600726">"Aplicação não encontrada"</string> <string name="app_not_found_dlg_text" msgid="754013198108180241">"Não foi possível localizar a aplicação na lista de aplicações instaladas."</string> <string name="uninstall_application_question" msgid="7290302854905395978">"Desinstalar a aplicação?"</string> - <!-- no translation found for uninstall_update_question (2600765438050721390) --> - <skip /> + <string name="uninstall_update_question" msgid="2600765438050721390">"Desinstalar actualização?"</string> <string name="uninstall_application_text" msgid="9107842143723765782">"Esta aplicação será removida do seu telefone."</string> - <!-- no translation found for uninstall_update_text (6695211142526505726) --> - <skip /> + <string name="uninstall_update_text" msgid="6695211142526505726">"A actualização da aplicação será desinstalada. Ainda pode utilizar a versão de origem da aplicação."</string> <string name="uninstalling" msgid="5556217435895938250">"A desinstalar..."</string> <string name="uninstall_done" msgid="8730655660697216076">"Desinstalação concluída!"</string> <string name="uninstall_failed" msgid="5725854598594371845">"Desinstalação sem sucesso"</string> diff --git a/res/values-pt/strings.xml b/res/values-pt/strings.xml index 23f7b50b..5d949389 100644 --- a/res/values-pt/strings.xml +++ b/res/values-pt/strings.xml @@ -41,11 +41,9 @@ <string name="app_not_found_dlg_title" msgid="1510267643973600726">"Aplicativo não encontrado"</string> <string name="app_not_found_dlg_text" msgid="754013198108180241">"O aplicativo não foi encontrado na lista de aplicativos instalados."</string> <string name="uninstall_application_question" msgid="7290302854905395978">"Desinstalar aplicativo?"</string> - <!-- no translation found for uninstall_update_question (2600765438050721390) --> - <skip /> + <string name="uninstall_update_question" msgid="2600765438050721390">"Desinstalar atualização?"</string> <string name="uninstall_application_text" msgid="9107842143723765782">"Este aplicativo será removido do seu telefone."</string> - <!-- no translation found for uninstall_update_text (6695211142526505726) --> - <skip /> + <string name="uninstall_update_text" msgid="6695211142526505726">"A atualização do aplicativo será desinstalada. Você ainda poderá usar a versão de fábrica do aplicativo."</string> <string name="uninstalling" msgid="5556217435895938250">"Desinstalando..."</string> <string name="uninstall_done" msgid="8730655660697216076">"Desinstalação concluída!"</string> <string name="uninstall_failed" msgid="5725854598594371845">"Falha na desinstalação"</string> diff --git a/res/values-ru/strings.xml b/res/values-ru/strings.xml index 5759fe17..197c3843 100644 --- a/res/values-ru/strings.xml +++ b/res/values-ru/strings.xml @@ -41,11 +41,9 @@ <string name="app_not_found_dlg_title" msgid="1510267643973600726">"Приложение не найдено"</string> <string name="app_not_found_dlg_text" msgid="754013198108180241">"Приложение не было найдено в списке установленных приложений."</string> <string name="uninstall_application_question" msgid="7290302854905395978">"Удалить приложение?"</string> - <!-- no translation found for uninstall_update_question (2600765438050721390) --> - <skip /> + <string name="uninstall_update_question" msgid="2600765438050721390">"Удалить обновление?"</string> <string name="uninstall_application_text" msgid="9107842143723765782">"Данное приложение будет удалено с вашего телефона."</string> - <!-- no translation found for uninstall_update_text (6695211142526505726) --> - <skip /> + <string name="uninstall_update_text" msgid="6695211142526505726">"Обновление приложения будет удалено. Вы и далее сможете использовать версию приложения, установленную на заводе-изготовителе."</string> <string name="uninstalling" msgid="5556217435895938250">"Удаление..."</string> <string name="uninstall_done" msgid="8730655660697216076">"Удаление завершено!"</string> <string name="uninstall_failed" msgid="5725854598594371845">"Ошибка при удалении"</string> diff --git a/res/values-sv/strings.xml b/res/values-sv/strings.xml index b9d10c6a..c9a8458a 100644 --- a/res/values-sv/strings.xml +++ b/res/values-sv/strings.xml @@ -28,7 +28,7 @@ <string name="install_failed_msg" msgid="5282789300118241924">"Det gick inte att installera <xliff:g id="APP_NAME">%1$s</xliff:g> på den här telefonen."</string> <string name="launch" msgid="4826921505917605463">"Öppna"</string> <string name="unknown_apps_dlg_title" msgid="2855558586206583032">"Installation blockerad"</string> - <string name="unknown_apps_dlg_text" msgid="5022078090329832537">"Av säkerhetsskäl är din telefon inställd så att den blockerar installation av program som inte finns i Android-butiken."</string> + <string name="unknown_apps_dlg_text" msgid="5022078090329832537">"Av säkerhetsskäl är din telefon inställd så att den blockerar installation av program som inte finns i Android Market."</string> <string name="ok" msgid="3468756155452870475">"OK"</string> <string name="settings" msgid="6743583734099755409">"Inställningar"</string> <string name="manage_applications" msgid="2704331021611806557">"Hantera program"</string> @@ -41,11 +41,9 @@ <string name="app_not_found_dlg_title" msgid="1510267643973600726">"Programmet hittades inte"</string> <string name="app_not_found_dlg_text" msgid="754013198108180241">"Programmet hittades inte i listan över installerade program."</string> <string name="uninstall_application_question" msgid="7290302854905395978">"Avinstallera program?"</string> - <!-- no translation found for uninstall_update_question (2600765438050721390) --> - <skip /> + <string name="uninstall_update_question" msgid="2600765438050721390">"Vill du avinstallera uppdateringen?"</string> <string name="uninstall_application_text" msgid="9107842143723765782">"Programmet tas bort från din telefon."</string> - <!-- no translation found for uninstall_update_text (6695211142526505726) --> - <skip /> + <string name="uninstall_update_text" msgid="6695211142526505726">"Programuppdateringen avinstalleras. Du kan fortfarande använda fabriksversionen av programmet."</string> <string name="uninstalling" msgid="5556217435895938250">"Avinstallerar…"</string> <string name="uninstall_done" msgid="8730655660697216076">"Avinstallationen slutförd!"</string> <string name="uninstall_failed" msgid="5725854598594371845">"Det gick inte att avinstallera"</string> diff --git a/res/values-tr/strings.xml b/res/values-tr/strings.xml index 3bba0f44..5993ebd3 100644 --- a/res/values-tr/strings.xml +++ b/res/values-tr/strings.xml @@ -41,11 +41,9 @@ <string name="app_not_found_dlg_title" msgid="1510267643973600726">"Uygulama bulunamadı"</string> <string name="app_not_found_dlg_text" msgid="754013198108180241">"Uygulama yüklü uygulamalar listesinde bulunamadı."</string> <string name="uninstall_application_question" msgid="7290302854905395978">"Uygulama kaldırılsın mı?"</string> - <!-- no translation found for uninstall_update_question (2600765438050721390) --> - <skip /> + <string name="uninstall_update_question" msgid="2600765438050721390">"Güncelleme kaldırılsın mı?"</string> <string name="uninstall_application_text" msgid="9107842143723765782">"Bu uygulama telefonunuzdan kaldırılacak."</string> - <!-- no translation found for uninstall_update_text (6695211142526505726) --> - <skip /> + <string name="uninstall_update_text" msgid="6695211142526505726">"Uygulama güncellemesi kaldırılacak. Uygulamanın fabrika sürümünü hala kullanabilirsiniz."</string> <string name="uninstalling" msgid="5556217435895938250">"Kaldırılıyor…"</string> <string name="uninstall_done" msgid="8730655660697216076">"Kaldırma işlemi bitti!"</string> <string name="uninstall_failed" msgid="5725854598594371845">"Yüklemeyi kaldırma işlemi başarısız"</string> diff --git a/res/values-zh-rCN/strings.xml b/res/values-zh-rCN/strings.xml index 30e673bd..32a0b1d7 100644 --- a/res/values-zh-rCN/strings.xml +++ b/res/values-zh-rCN/strings.xml @@ -41,11 +41,9 @@ <string name="app_not_found_dlg_title" msgid="1510267643973600726">"找不到应用程序"</string> <string name="app_not_found_dlg_text" msgid="754013198108180241">"在已安装应用程序的列表中找不到该应用程序。"</string> <string name="uninstall_application_question" msgid="7290302854905395978">"是否卸载应用程序?"</string> - <!-- no translation found for uninstall_update_question (2600765438050721390) --> - <skip /> + <string name="uninstall_update_question" msgid="2600765438050721390">"是否卸载更新?"</string> <string name="uninstall_application_text" msgid="9107842143723765782">"将从您的手机中删除该应用程序。"</string> - <!-- no translation found for uninstall_update_text (6695211142526505726) --> - <skip /> + <string name="uninstall_update_text" msgid="6695211142526505726">"此时将卸载该应用程序更新。仍可使用该应用程序的出厂版。"</string> <string name="uninstalling" msgid="5556217435895938250">"正在卸载..."</string> <string name="uninstall_done" msgid="8730655660697216076">"卸载完成!"</string> <string name="uninstall_failed" msgid="5725854598594371845">"卸载失败"</string> diff --git a/src/com/android/packageinstaller/InstallAppConfirmation.java b/src/com/android/packageinstaller/InstallAppConfirmation.java deleted file mode 100755 index 5a65e568..00000000 --- a/src/com/android/packageinstaller/InstallAppConfirmation.java +++ /dev/null @@ -1,126 +0,0 @@ -/* -** -** Copyright 2007, 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. -*/ -package com.android.packageinstaller; - -import com.android.packageinstaller.R; -import java.util.ArrayList; -import android.widget.AppSecurityPermissions; -import android.app.Activity; -import android.content.pm.PackageManager; -import android.content.pm.PackageParser; -import android.content.pm.PermissionInfo; -import android.content.Context; -import android.content.Intent; -import android.content.pm.ApplicationInfo; -import android.content.pm.PackageManager.NameNotFoundException; -import android.net.Uri; -import android.os.Bundle; -import android.util.Log; -import android.view.LayoutInflater; -import android.view.View; -import android.view.Window; -import android.widget.Button; -import android.widget.LinearLayout; -import android.widget.TextView; - -/** - * This activity corresponds to a confirmation screen that is displayed when the user tries - * to install an application bundled as an apk file. - * The intent that launches this activity should include the application information object - * of the application(to be installed) and a list of permission strings associated - * with the application. This information is displayed on the screen and installation is either - * continued or canceled based on the user response(click ok or cancel). - */ -public class InstallAppConfirmation extends Activity implements View.OnClickListener { - private final String TAG="InstallAppConfirmation"; - private boolean localLOGV = false; - private Button mOk; - private Button mCancel; - private ApplicationInfo mAppInfo; - private Uri mPkgURI; - private View mContentView; - - @Override - public void onCreate(Bundle icicle) { - super.onCreate(icicle); - Intent intent = getIntent(); - if(localLOGV) Log.i(TAG, "intent="+intent); - mAppInfo = intent.getParcelableExtra(PackageUtil.INTENT_ATTR_APPLICATION_INFO); - mPkgURI = intent.getData(); - if(localLOGV) Log.i(TAG, "mAppInfo = "+mAppInfo); - initView(); - } - - public void initView() { - requestWindowFeature(Window.FEATURE_NO_TITLE); - String unknown = getString(R.string.unknown); - //set description - String desc = getString(R.string.security_settings_desc); - if(desc == null) { - desc = unknown; - } - LayoutInflater inflater = (LayoutInflater)getSystemService(Context.LAYOUT_INFLATER_SERVICE); - mContentView = inflater.inflate(R.layout.install_confirm, null); - setContentView(mContentView); - //initialize views - PackageUtil.initSnippetForNewApp(this, mAppInfo, R.id.app_snippet, mPkgURI); - if(desc != null) { - ((TextView)findViewById(R.id.security_settings_desc)).setText(desc); - } - - - LinearLayout permsView = (LinearLayout) mContentView.findViewById( - R.id.permissions_section); - boolean permVisible = false; - PackageParser.Package pkg = PackageUtil.getPackageInfo(mPkgURI); - if(pkg != null) { - AppSecurityPermissions asp = new AppSecurityPermissions(this, pkg); - if(asp.getPermissionCount() > 0) { - permVisible = true; - permsView.setVisibility(View.VISIBLE); - LinearLayout securityList = (LinearLayout) permsView.findViewById( - R.id.security_settings_list); - securityList.addView(asp.getPermissionsView()); - } - } - if(!permVisible){ - permsView.setVisibility(View.GONE); - } - mOk = (Button)findViewById(R.id.ok_button); - mCancel = (Button)findViewById(R.id.cancel_button); - mOk.setOnClickListener(this); - mCancel.setOnClickListener(this); - } - - public void setResultAndReturn(int result) { - if(result == RESULT_CANCELED) Log.i(TAG, "Result has been canceled"); - if(result == RESULT_OK) Log.i(TAG, "result ok"); - setResult(result); - finish(); - } - - public void onClick(View v) { - int result = RESULT_CANCELED; - if(v == mOk) { - result = RESULT_OK; - setResultAndReturn(result); - } else if(v == mCancel) { - result = RESULT_CANCELED; - setResultAndReturn(result); - } - } -} diff --git a/src/com/android/packageinstaller/InstallAppDone.java b/src/com/android/packageinstaller/InstallAppDone.java deleted file mode 100755 index 36bd7e0f..00000000 --- a/src/com/android/packageinstaller/InstallAppDone.java +++ /dev/null @@ -1,109 +0,0 @@ -/* -** -** Copyright 2007, 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. -*/ -package com.android.packageinstaller; - -import com.android.packageinstaller.R; -import android.app.Activity; -import android.content.Intent; -import android.content.pm.ApplicationInfo; -import android.content.pm.PackageManager; -import android.graphics.Rect; -import android.graphics.drawable.Drawable; -import android.net.Uri; -import android.os.Bundle; -import android.util.Log; -import android.view.View; -import android.view.Window; -import android.widget.Button; -import android.widget.TextView; - -/** - * This activity corresponds to a install status screen that is displayed - * when the user tries - * to install an application bundled as an apk file. The screen - * has two buttons to either launch the newly installed application - * or close the screen. The installation result and the package uri are passed through the - * intent that launches the activity. - */ -public class InstallAppDone extends Activity implements View.OnClickListener { - private final String TAG="InstallAppDone"; - private boolean localLOGV = false; - private ApplicationInfo mAppInfo; - private Uri mPkgURI; - private Button mDoneButton; - private Button mLaunchButton; - private boolean installFlag; - private Intent mLaunchIntent; - - @Override - public void onCreate(Bundle icicle) { - super.onCreate(icicle); - Intent intent = getIntent(); - mAppInfo = intent.getParcelableExtra(PackageUtil.INTENT_ATTR_APPLICATION_INFO); - mPkgURI = intent.getData(); - installFlag = intent.getBooleanExtra(PackageUtil.INTENT_ATTR_INSTALL_STATUS, true); - if(localLOGV) Log.i(TAG, "installFlag="+installFlag); - initView(); - } - - public void initView() { - requestWindowFeature(Window.FEATURE_NO_TITLE); - String unknown = getString(R.string.unknown); - setContentView(R.layout.install_done); - // Initialize views - PackageUtil.initSnippetForInstalledApp(this, mAppInfo, R.id.app_snippet); - TextView centerText = (TextView)findViewById(R.id.center_text); - mDoneButton = (Button)findViewById(R.id.done_button); - mLaunchButton = (Button)findViewById(R.id.launch_button); - int centerTextDrawableId; - int centerTextLabel; - if(installFlag) { - mLaunchButton.setVisibility(View.VISIBLE); - centerTextDrawableId = R.drawable.button_indicator_finish; - centerTextLabel = R.string.install_done; - // Enable or disable launch button - mLaunchIntent = getPackageManager().getLaunchIntentForPackage( - mAppInfo.packageName); - if(mLaunchIntent != null) { - mLaunchButton.setOnClickListener(this); - } else { - mLaunchButton.setEnabled(false); - } - } else { - centerTextDrawableId = com.android.internal.R.drawable.ic_bullet_key_permission; - centerTextLabel = R.string.install_failed; - mLaunchButton.setVisibility(View.INVISIBLE); - } - Drawable centerTextDrawable = getResources().getDrawable(centerTextDrawableId); - centerTextDrawable.setBounds(0, 0, - centerTextDrawable.getIntrinsicWidth(), - centerTextDrawable.getIntrinsicHeight()); - centerText.setCompoundDrawables(centerTextDrawable, null, null, null); - centerText.setText(getString(centerTextLabel)); - mDoneButton.setOnClickListener(this); - } - - public void onClick(View v) { - if(v == mDoneButton) { - Log.i(TAG, "Finished installing "+mAppInfo); - finish(); - } else if(v == mLaunchButton) { - startActivity(mLaunchIntent); - finish(); - } - } -} diff --git a/src/com/android/packageinstaller/InstallAppProgress.java b/src/com/android/packageinstaller/InstallAppProgress.java index 28abd3cc..c5a3c5b5 100755 --- a/src/com/android/packageinstaller/InstallAppProgress.java +++ b/src/com/android/packageinstaller/InstallAppProgress.java @@ -17,6 +17,7 @@ package com.android.packageinstaller; import com.android.packageinstaller.R; + import android.app.Activity; import android.content.Intent; import android.content.pm.ApplicationInfo; @@ -24,12 +25,16 @@ import android.content.pm.IPackageInstallObserver; import android.content.pm.PackageInfo; import android.content.pm.PackageManager; import android.content.pm.PackageManager.NameNotFoundException; +import android.content.res.Resources; +import android.graphics.drawable.Drawable; import android.net.Uri; import android.os.Bundle; import android.os.Handler; import android.os.Message; import android.util.Log; +import android.view.View; import android.view.Window; +import android.widget.Button; import android.widget.ProgressBar; import android.widget.TextView; @@ -41,19 +46,56 @@ import android.widget.TextView; * codes defined in PackageManager. If the package being installed already exists, * the existing package is replaced with the new one. */ -public class InstallAppProgress extends Activity { +public class InstallAppProgress extends Activity implements View.OnClickListener { private final String TAG="InstallAppProgress"; private boolean localLOGV = false; private ApplicationInfo mAppInfo; private Uri mPackageURI; private ProgressBar mProgressBar; + private View mOkPanel; + private TextView mStatusTextView; + private Button mDoneButton; + private Button mLaunchButton; + final static int SUCCEEDED = 1; + final static int FAILED = 0; private final int INSTALL_COMPLETE = 1; + private Intent mLaunchIntent; private Handler mHandler = new Handler() { public void handleMessage(Message msg) { switch (msg.what) { case INSTALL_COMPLETE: - //finish the activity posting result - setResultAndFinish(msg.arg1); + // Update the status text + mProgressBar.setVisibility(View.INVISIBLE); + // Show the ok button + int centerTextLabel; + Drawable centerTextDrawable = null; + if(msg.arg1 == SUCCEEDED) { + mLaunchButton.setVisibility(View.VISIBLE); + centerTextDrawable = getResources().getDrawable(R.drawable.button_indicator_finish); + centerTextLabel = R.string.install_done; + // Enable or disable launch button + mLaunchIntent = getPackageManager().getLaunchIntentForPackage( + mAppInfo.packageName); + if(mLaunchIntent != null) { + mLaunchButton.setOnClickListener(InstallAppProgress.this); + } else { + mLaunchButton.setEnabled(false); + } + } else { + centerTextDrawable = Resources.getSystem().getDrawable( + com.android.internal.R.drawable.ic_bullet_key_permission); + centerTextLabel = R.string.install_failed; + mLaunchButton.setVisibility(View.INVISIBLE); + } + if (centerTextDrawable != null) { + centerTextDrawable.setBounds(0, 0, + centerTextDrawable.getIntrinsicWidth(), + centerTextDrawable.getIntrinsicHeight()); + mStatusTextView.setCompoundDrawables(centerTextDrawable, null, null, null); + } + mStatusTextView.setText(centerTextLabel); + mDoneButton.setOnClickListener(InstallAppProgress.this); + mOkPanel.setVisibility(View.VISIBLE); break; default: break; @@ -77,23 +119,21 @@ public class InstallAppProgress extends Activity { mHandler.sendMessage(msg); } } - - void setResultAndFinish(int retCode) { - Intent data = new Intent(); - setResult(retCode); - finish(); - } - + public void initView() { requestWindowFeature(Window.FEATURE_NO_TITLE); - String unknown = getString(R.string.unknown); setContentView(R.layout.op_progress); - //initialize views - PackageUtil.initSnippetForNewApp(this, mAppInfo, R.id.app_snippet, mPackageURI); - TextView installTextView = (TextView)findViewById(R.id.center_text); - installTextView.setText(R.string.installing); + // Initialize views + PackageUtil.initSnippetForInstalledApp(this, mAppInfo, R.id.app_snippet); + mStatusTextView = (TextView)findViewById(R.id.center_text); + mStatusTextView.setText(R.string.installing); mProgressBar = (ProgressBar) findViewById(R.id.progress_bar); mProgressBar.setIndeterminate(true); + // Hide button till progress is being displayed + mOkPanel = (View)findViewById(R.id.buttons_panel); + mDoneButton = (Button)findViewById(R.id.done_button); + mLaunchButton = (Button)findViewById(R.id.launch_button); + mOkPanel.setVisibility(View.INVISIBLE); // Set flag to replace package if already existing int installFlags = 0; PackageManager pm = getPackageManager(); @@ -106,7 +146,7 @@ public class InstallAppProgress extends Activity { } catch (NameNotFoundException e) { } if((installFlags & PackageManager.INSTALL_REPLACE_EXISTING )!= 0) { - Log.w(TAG, "Replacing package:"+mAppInfo.packageName); + Log.w(TAG, "Replacing package:" + mAppInfo.packageName); } String installerPackageName = getIntent().getStringExtra( Intent.EXTRA_INSTALLER_PACKAGE_NAME); @@ -114,4 +154,14 @@ public class InstallAppProgress extends Activity { PackageInstallObserver observer = new PackageInstallObserver(); pm.installPackage(mPackageURI, observer, installFlags, installerPackageName); } + + public void onClick(View v) { + if(v == mDoneButton) { + Log.i(TAG, "Finished installing "+mAppInfo); + finish(); + } else if(v == mLaunchButton) { + startActivity(mLaunchIntent); + finish(); + } + } } diff --git a/src/com/android/packageinstaller/PackageInstallerActivity.java b/src/com/android/packageinstaller/PackageInstallerActivity.java index 9b487d13..8f681bb0 100644 --- a/src/com/android/packageinstaller/PackageInstallerActivity.java +++ b/src/com/android/packageinstaller/PackageInstallerActivity.java @@ -44,7 +44,13 @@ import android.os.Handler; import android.os.Message; import android.provider.Settings; import android.util.Log; +import android.view.View; import android.view.Window; +import android.view.View.OnClickListener; +import android.widget.AppSecurityPermissions; +import android.widget.Button; +import android.widget.LinearLayout; +import android.widget.TextView; /* * This activity is launched when a new application is installed via side loading @@ -56,28 +62,30 @@ import android.view.Window; * Based on the user response the package is then installed by launching InstallAppConfirm * sub activity. All state transitions are handled in this activity */ -public class PackageInstallerActivity extends Activity implements OnCancelListener { - private static final int INSTALL_INITIAL = 0; - private static final int INSTALL_CONFIRM = 1; - private static final int INSTALL_PROGRESS = 2; - private static final int INSTALL_DONE = 3; +public class PackageInstallerActivity extends Activity implements OnCancelListener, OnClickListener { private static final String TAG = "PackageInstaller"; private Uri mPackageURI; private boolean localLOGV = false; - private int mCurrentState = INSTALL_INITIAL; PackageManager mPm; + private boolean mReplacing = false; private PackageParser.Package mPkgInfo; private File mTmpFile; private static final int SUCCEEDED = 1; private static final int FAILED = 0; // Broadcast receiver for clearing cache - ClearCacheReceiver mClearCacheReceiver; + ClearCacheReceiver mClearCacheReceiver = null; private static final int HANDLER_BASE_MSG_IDX = 0; private static final int FREE_SPACE = HANDLER_BASE_MSG_IDX + 1; // ApplicationInfo object primarily used for already existing applications private ApplicationInfo mAppInfo = null; + // View for install progress + View mInstallConfirm; + // Buttons to indicate user acceptance + private Button mOk; + private Button mCancel; + // Dialog identifiers used in showDialog private static final int DLG_BASE = 0; private static final int DLG_REPLACE_APP = DLG_BASE + 1; @@ -90,7 +98,9 @@ public class PackageInstallerActivity extends Activity implements OnCancelListen public void handleMessage(Message msg) { switch (msg.what) { case FREE_SPACE: - unregisterReceiver(mClearCacheReceiver); + if (mClearCacheReceiver != null) { + unregisterReceiver(mClearCacheReceiver); + } if(msg.arg1 == SUCCEEDED) { makeTempCopyAndInstall(); } else { @@ -102,47 +112,29 @@ public class PackageInstallerActivity extends Activity implements OnCancelListen } } }; - - private void startInstallActivityClass(int requestCode, Class<?> cls) { - Intent newIntent = new Intent(); - startInstallActivityClass(newIntent, requestCode, cls); - } - - private void startInstallActivityClass(Intent newIntent, int requestCode, Class<?> cls) { - newIntent.putExtra(PackageUtil.INTENT_ATTR_APPLICATION_INFO, - mPkgInfo.applicationInfo); - newIntent.setData(mPackageURI); - newIntent.setClass(this, cls); - String installerPackageName = getIntent().getStringExtra( - Intent.EXTRA_INSTALLER_PACKAGE_NAME); - if (installerPackageName != null) { - newIntent.putExtra(Intent.EXTRA_INSTALLER_PACKAGE_NAME, installerPackageName); + private void startInstallConfirm() { + LinearLayout permsSection = (LinearLayout) mInstallConfirm.findViewById(R.id.permissions_section); + LinearLayout securityList = (LinearLayout) permsSection.findViewById( + R.id.security_settings_list); + boolean permVisible = false; + if(mPkgInfo != null) { + AppSecurityPermissions asp = new AppSecurityPermissions(this, mPkgInfo); + if(asp.getPermissionCount() > 0) { + permVisible = true; + securityList.addView(asp.getPermissionsView()); + } } - - if(localLOGV) Log.i(TAG, "downloaded app uri="+mPackageURI); - startActivityForResult(newIntent, requestCode); + if(!permVisible){ + permsSection.setVisibility(View.INVISIBLE); + } + mInstallConfirm.setVisibility(View.VISIBLE); + mOk = (Button)findViewById(R.id.ok_button); + mCancel = (Button)findViewById(R.id.cancel_button); + mOk.setOnClickListener(this); + mCancel.setOnClickListener(this); } - private void startInstallConfirm() { - Intent newIntent = new Intent(); - newIntent.putExtra(PackageUtil.INTENT_ATTR_APPLICATION_INFO, - mPkgInfo.applicationInfo); - newIntent.setData(mPackageURI); - newIntent.setClass(this, InstallAppConfirmation.class); - startActivityForResult(newIntent, INSTALL_CONFIRM); - } - - private void startInstallProgress() { - startInstallActivityClass(INSTALL_PROGRESS, InstallAppProgress.class); - } - - private void startInstallDone() { - Intent newIntent = new Intent(Intent.ACTION_VIEW); - newIntent.putExtra(PackageUtil.INTENT_ATTR_INSTALL_STATUS, true); - startInstallActivityClass(newIntent, INSTALL_DONE, InstallAppDone.class); - } - private void showDialogInner(int id) { // TODO better fix for this? Remove dialog so that it gets created again removeDialog(id); @@ -163,6 +155,7 @@ public class PackageInstallerActivity extends Activity implements OnCancelListen .setPositiveButton(R.string.ok, new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int which) { startInstallConfirm(); + mReplacing = true; }}) .setNegativeButton(R.string.cancel, new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int which) { @@ -335,7 +328,7 @@ public class PackageInstallerActivity extends Activity implements OnCancelListen } @Override - public void onCreate(Bundle icicle) { + protected void onCreate(Bundle icicle) { super.onCreate(icicle); //get intent information final Intent intent = getIntent(); @@ -353,6 +346,8 @@ public class PackageInstallerActivity extends Activity implements OnCancelListen //set view requestWindowFeature(Window.FEATURE_NO_TITLE); setContentView(R.layout.install_start); + mInstallConfirm = findViewById(R.id.install_confirm_panel); + mInstallConfirm.setVisibility(View.INVISIBLE); PackageUtil.initSnippetForNewApp(this, mPkgInfo.applicationInfo, R.id.app_snippet, mPackageURI); //check setting @@ -361,6 +356,8 @@ public class PackageInstallerActivity extends Activity implements OnCancelListen showDialogInner(DLG_UNKNOWN_APPS); return; } + // Clear any other temporary files in data directory + mPm.clearApplicationUserData(getPackageName(), null); //compute the size of the application. just an estimate long size; String apkPath = mPackageURI.getPath(); @@ -378,51 +375,30 @@ public class PackageInstallerActivity extends Activity implements OnCancelListen deleteFile(mTmpFile.getName()); } } - - @Override - protected void onActivityResult(int requestCode, int resultCode, Intent data) { - boolean finish = true; - boolean removeTmpFile = false; - switch(requestCode) { - case INSTALL_CONFIRM: - if (resultCode == RESULT_OK) { - finish = false; - mCurrentState = INSTALL_PROGRESS; - startInstallProgress(); - } else { - removeTmpFile = true; - } - break; - case INSTALL_PROGRESS: - finish = false; - mCurrentState = INSTALL_DONE; - if (resultCode == PackageManager.INSTALL_SUCCEEDED) { - //start the next screen to show final status of installation - startInstallDone(); - } else { - showDialogInner(DLG_INSTALL_ERROR); - } - // Now that the package is installed just delete the temp file - removeTmpFile = true; - break; - case INSTALL_DONE: - //neednt check for result code here - break; - default: - break; - } - if ((removeTmpFile) && (mTmpFile != null)) { - deleteFile(mTmpFile.getName()); - } - if (finish) { - //finish off this activity to return to the previous activity that launched it - if (localLOGV) Log.i(TAG, "Finishing off activity"); - finish(); - } - } // Generic handling when pressing back key public void onCancel(DialogInterface dialog) { finish(); } + + public void onClick(View v) { + if(v == mOk) { + // Start subactivity to actually install the application + Intent newIntent = new Intent(); + newIntent.putExtra(PackageUtil.INTENT_ATTR_APPLICATION_INFO, + mPkgInfo.applicationInfo); + newIntent.setData(mPackageURI); + newIntent.setClass(this, InstallAppProgress.class); + String installerPackageName = getIntent().getStringExtra(Intent.EXTRA_INSTALLER_PACKAGE_NAME); + if (installerPackageName != null) { + newIntent.putExtra(Intent.EXTRA_INSTALLER_PACKAGE_NAME, installerPackageName); + } + if(localLOGV) Log.i(TAG, "downloaded app uri="+mPackageURI); + startActivity(newIntent); + finish(); + } else if(v == mCancel) { + // Cancel and finish + finish(); + } + } } diff --git a/src/com/android/packageinstaller/UninstallerActivity.java b/src/com/android/packageinstaller/UninstallerActivity.java index c6b6eb8f..6310de8d 100755 --- a/src/com/android/packageinstaller/UninstallerActivity.java +++ b/src/com/android/packageinstaller/UninstallerActivity.java @@ -43,8 +43,6 @@ public class UninstallerActivity extends Activity implements OnClickListener, DialogInterface.OnCancelListener { private static final String TAG = "UninstallerActivity"; private boolean localLOGV = false; - // Request code - private static final int UNINSTALL_PROGRESS = 1; PackageManager mPm; private ApplicationInfo mAppInfo; private Button mOk; @@ -54,11 +52,7 @@ public class UninstallerActivity extends Activity implements OnClickListener, private static final int DLG_BASE = 0; private static final int DLG_APP_NOT_FOUND = DLG_BASE + 1; private static final int DLG_UNINSTALL_FAILED = DLG_BASE + 2; - - private void showDialogInner(int id) { - showDialog(id); - } - + @Override public Dialog onCreateDialog(int id) { switch (id) { @@ -98,7 +92,8 @@ public class UninstallerActivity extends Activity implements OnClickListener, newIntent.putExtra(PackageUtil.INTENT_ATTR_APPLICATION_INFO, mAppInfo); newIntent.setClass(this, UninstallAppProgress.class); - startActivityForResult(newIntent, UNINSTALL_PROGRESS); + startActivity(newIntent); + finish(); } @Override @@ -146,21 +141,6 @@ public class UninstallerActivity extends Activity implements OnClickListener, } } - @Override - protected void onActivityResult(int requestCode, int resultCode, Intent data) { - if (requestCode != UNINSTALL_PROGRESS) { - return; - } - // Start the next screen to show final status of installation - if (resultCode != UninstallAppProgress.SUCCEEDED) { - showDialogInner(DLG_UNINSTALL_FAILED); - } else { - // Finish off this activity - if (localLOGV) Log.i(TAG, "Finishing off activity"); - finish(); - } - } - public void onClick(View v) { if(v == mOk) { //initiate next screen |