summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThe Android Open Source Project <initial-contribution@android.com>2008-12-17 18:06:03 -0800
committerThe Android Open Source Project <initial-contribution@android.com>2008-12-17 18:06:03 -0800
commitafc13f7b3a8c047256d7fd8c0ea5f0f816f2cbba (patch)
tree2829c70712133a4a06953979cbee0f4b323d7cc8
parent5fad77410b4e940237533bb8a0d306db36be0a23 (diff)
downloadUpdater-afc13f7b3a8c047256d7fd8c0ea5f0f816f2cbba.tar.gz
Code drop from //branches/cupcake/...@124589
-rw-r--r--res/values-de-rDE/strings.xml11
-rw-r--r--res/values-de/strings.xml9
-rw-r--r--res/values-en-rGB/strings.xml14
-rw-r--r--res/values-es-rUS/strings.xml11
-rw-r--r--res/values-fr-rFR/strings.xml11
-rw-r--r--res/values-it-rIT/strings.xml11
-rw-r--r--res/values-ja/strings.xml9
-rw-r--r--res/values-zh-rTW/strings.xml11
-rw-r--r--res/values/strings.xml5
-rw-r--r--src/com/android/updater/PesterActivity.java22
10 files changed, 33 insertions, 81 deletions
diff --git a/res/values-de-rDE/strings.xml b/res/values-de-rDE/strings.xml
deleted file mode 100644
index d376501..0000000
--- a/res/values-de-rDE/strings.xml
+++ /dev/null
@@ -1,11 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="app_name">Aktualisierung</string>
- <string name="later_button">Später aktualisieren</string>
- <string name="message">
- Während das Telefon die Aktualisierung durchführt, können Sie keine Notrufe absetzen. Das Telefon wird während der Aktualisierung neu gestartet.
- </string>
- <string name="now_button">Jetzt aktualisieren</string>
- <string name="pester_label">Ein System-Update steht zur Verfügung</string>
-</resources>
diff --git a/res/values-de/strings.xml b/res/values-de/strings.xml
new file mode 100644
index 0000000..e23f118
--- /dev/null
+++ b/res/values-de/strings.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="app_name">"Google Updater"</string>
+ <string name="pester_label">"Es ist ein System-Update verfügbar."</string>
+ <string name="message">"Während des Updates können Sie mit Ihrem Telefon keine Notrufe tätigen. Ihr Telefon wird beim Update neu gestartet."</string>
+ <string name="now_button">"Jetzt aktualisieren"</string>
+ <string name="later_button">"Später aktualisieren"</string>
+</resources>
diff --git a/res/values-en-rGB/strings.xml b/res/values-en-rGB/strings.xml
index c8a8ea8..57253b2 100644
--- a/res/values-en-rGB/strings.xml
+++ b/res/values-en-rGB/strings.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="utf-8"?>
+<?xml version="1.0" encoding="UTF-8"?>
<resources xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="later_button">Update later</string>
- <string name="message">
- While your phone is updating, you cannot make emergency calls. Your phone will restart during update.
- </string>
- <string name="now_button">Update now</string>
- <string name="pester_label">A system update is available</string>
+ <!-- no translation found for app_name (2536904272647090578) -->
+ <skip />
+ <string name="pester_label">"A system update is available"</string>
+ <string name="message">"While your phone is updating, you cannot make emergency calls. Your phone will restart during update."</string>
+ <string name="now_button">"Update now"</string>
+ <string name="later_button">"Update later"</string>
</resources>
diff --git a/res/values-es-rUS/strings.xml b/res/values-es-rUS/strings.xml
deleted file mode 100644
index 18e5ba9..0000000
--- a/res/values-es-rUS/strings.xml
+++ /dev/null
@@ -1,11 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="app_name">Actualizador</string>
- <string name="later_button">Actualizar más tarde</string>
- <string name="message">
- Mientras su teléfono se está actualizando, no puede realizar llamadas de emergencia. Su teléfono se reiniciará durante la actualización.
- </string>
- <string name="now_button">Actualizar ahora</string>
- <string name="pester_label">Se dispone de una actualización del sistema</string>
-</resources>
diff --git a/res/values-fr-rFR/strings.xml b/res/values-fr-rFR/strings.xml
deleted file mode 100644
index 080a243..0000000
--- a/res/values-fr-rFR/strings.xml
+++ /dev/null
@@ -1,11 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="app_name">Mise à jour</string>
- <string name="later_button">Mettre à jour plus tard</string>
- <string name="message">
- Quand votre téléphone se met à jour, vous ne pouvez pas faire d\'appel d\'urgence. Votre téléphone redémarrera pendant la mise à jour.
- </string>
- <string name="now_button">Mettre à jour maintenant</string>
- <string name="pester_label">Une mise à jour système est disponible</string>
-</resources>
diff --git a/res/values-it-rIT/strings.xml b/res/values-it-rIT/strings.xml
deleted file mode 100644
index 5cc3776..0000000
--- a/res/values-it-rIT/strings.xml
+++ /dev/null
@@ -1,11 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="app_name">Programma per l'aggiornamento</string>
- <string name="later_button">Aggiorna in seguito</string>
- <string name="message">
- Durante l'aggiornamento del telefono non è possibile eseguire chiamate di emergenza. Il telefono verrà riavviato durante l'aggiornamento.
- </string>
- <string name="now_button">Aggiorna ora</string>
- <string name="pester_label">È disponibile un aggiornamento del sistema</string>
-</resources>
diff --git a/res/values-ja/strings.xml b/res/values-ja/strings.xml
new file mode 100644
index 0000000..f99adec
--- /dev/null
+++ b/res/values-ja/strings.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<resources xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
+ <string name="app_name">"アップデータ"</string>
+ <string name="pester_label">"システムアップデートが利用可能です"</string>
+ <string name="message">"更新中は緊急通話をかけられません。また、更新中に本体は再起動されます。"</string>
+ <string name="now_button">"今すぐ更新"</string>
+ <string name="later_button">"後で更新"</string>
+</resources>
diff --git a/res/values-zh-rTW/strings.xml b/res/values-zh-rTW/strings.xml
deleted file mode 100644
index 84d5138..0000000
--- a/res/values-zh-rTW/strings.xml
+++ /dev/null
@@ -1,11 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<resources xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
- <string name="app_name">更新程式</string>
- <string name="later_button">稍後更新</string>
- <string name="message">
- 正在更新電話時無法撥打緊急電話。電話將會在更新期間重新啟動。
- </string>
- <string name="now_button">立即更新</string>
- <string name="pester_label">目前有可用的系統更新</string>
-</resources>
diff --git a/res/values/strings.xml b/res/values/strings.xml
index 70fd427..5d83a06 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -16,13 +16,18 @@
-->
<resources>
+ <!-- Name of the Application -->
<string name="app_name">Updater</string>
+ <!-- Dialog box which appears that tells the user that there is a new system update available for install-->
<string name="pester_label">A system update is available</string>
+ <!-- Dialog which appears to tell the user, that during the update, they cannot make emergency calls-->
<string name="message">
While your phone is updating, you cannot make emergency calls. Your phone will restart during update.
</string>
+ <!-- Button Label for option to let user indicate to start the update process-->
<string name="now_button">Update now</string>
+ <!-- Button Label for option to let user indicate to delay the update process-->
<string name="later_button">Update later</string>
</resources>
diff --git a/src/com/android/updater/PesterActivity.java b/src/com/android/updater/PesterActivity.java
index d668244..14fb363 100644
--- a/src/com/android/updater/PesterActivity.java
+++ b/src/com/android/updater/PesterActivity.java
@@ -21,13 +21,11 @@ import android.app.AlarmManager;
import android.app.PendingIntent;
import android.content.Context;
import android.content.Intent;
-import android.content.IntentFilter;
import android.net.Uri;
import android.os.Bundle;
import android.os.SystemClock;
import android.provider.Checkin;
-import com.android.internal.telephony.Phone;
-import com.android.internal.telephony.TelephonyIntents;
+import android.telephony.TelephonyManager;
import android.util.Log;
import android.view.View;
import android.view.Window;
@@ -53,22 +51,8 @@ public class PesterActivity extends Activity {
/** @return whether a call is in progress (or the phone is ringing) */
private boolean inPhoneCall() {
- IntentFilter filter = new IntentFilter();
- filter.addAction(TelephonyIntents.ACTION_PHONE_STATE_CHANGED);
- Intent intent = registerReceiver(null, filter);
- if (intent == null) return false;
-
- String state = intent.getStringExtra(Phone.STATE_KEY);
- if (state == null) return false;
-
- try {
- Phone.State phoneState = Phone.State.valueOf(state);
- if (phoneState != Phone.State.IDLE) return true;
- } catch (IllegalArgumentException e) {
- // returned state isn't a valid enum value.
- Log.e(TAG, "parsing phone state:", e);
- }
- return false;
+ TelephonyManager tm = (TelephonyManager) getSystemService(Context.TELEPHONY_SERVICE);
+ return (tm.getCallState() != TelephonyManager.CALL_STATE_IDLE);
}
/**