summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--core/res/res/values-nl/strings.xml24
-rwxr-xr-xservices/java/com/android/server/NotificationManagerService.java14
-rw-r--r--telephony/java/com/android/internal/telephony/CallManager.java33
-rw-r--r--telephony/java/com/android/internal/telephony/MotoWrigley3GRIL.java69
-rw-r--r--telephony/java/com/android/internal/telephony/PhoneFactory.java3
5 files changed, 137 insertions, 6 deletions
diff --git a/core/res/res/values-nl/strings.xml b/core/res/res/values-nl/strings.xml
index 3daaf3c..4b6509e 100644
--- a/core/res/res/values-nl/strings.xml
+++ b/core/res/res/values-nl/strings.xml
@@ -133,19 +133,26 @@
<string name="turn_off_radio" msgid="8198784949987062346">"Draadloos uitschakelen"</string>
<string name="screen_lock" msgid="799094655496098153">"Schermvergrendeling"</string>
<string name="power_off" msgid="4266614107412865048">"Uitschakelen"</string>
- <string name="shutdown_progress" msgid="2281079257329981203">"Uitschakelen..."</string>
- <string name="shutdown_confirm" msgid="649792175242821353">"Uw telefoon wordt uitgeschakeld."</string>
+ <string name="reboot_system">Telefoon herstarten</string>
+ <string name="reboot_reboot">Herstarten</string>
+ <string name="shutdown_progress" msgid="2281079257329981203">"Uitschakelen\u2026"</string>
+ <string name="reboot_progress">Herstarten\u2026</string>
+ <string name="shutdown_confirm" msgid="649792175242821353">"De telefoon zal worden uitgeschakeld."</string>
+ <string name="reboot_confirm">De telefoon zal worden herstart.</string>
<string name="recent_tasks_title" msgid="3691764623638127888">"Recent"</string>
<string name="no_recent_tasks" msgid="279702952298056674">"Geen recente apps."</string>
<string name="global_actions" msgid="2406416831541615258">"Telefoonopties"</string>
<string name="global_action_lock" msgid="2844945191792119712">"Schermvergrendeling"</string>
<string name="global_action_power_off" msgid="4471879440839879722">"Uitschakelen"</string>
+ <string name="global_action_reboot">"Herstarten"</string>
+ <string name="global_action_choose_profile">"Kies profiel"</string>
<string name="global_action_toggle_silent_mode" msgid="8219525344246810925">"Stille modus"</string>
<string name="global_action_silent_mode_on_status" msgid="3289841937003758806">"Geluid is UIT"</string>
<string name="global_action_silent_mode_off_status" msgid="1506046579177066419">"Geluid is AAN"</string>
<string name="global_actions_toggle_airplane_mode" msgid="5884330306926307456">"Vliegmodus"</string>
<string name="global_actions_airplane_mode_on_status" msgid="2719557982608919750">"Vliegmodus is AAN"</string>
<string name="global_actions_airplane_mode_off_status" msgid="5075070442854490296">"Vliegmodus is UIT"</string>
+ <string name="global_action_screenshot">"Beeldschermafdruk"</string>
<string name="safeMode" msgid="2788228061547930246">"Veilige modus"</string>
<string name="android_system_label" msgid="6577375335728551336">"Android-systeem"</string>
<string name="permgrouplab_costMoney" msgid="5429808217861460401">"Services waarvoor u moet betalen"</string>
@@ -559,6 +566,7 @@
<string name="lockscreen_pattern_correct" msgid="9039008650362261237">"Juist!"</string>
<string name="lockscreen_pattern_wrong" msgid="4817583279053112312">"Probeer het opnieuw"</string>
<string name="lockscreen_plugged_in" msgid="613343852842944435">"Opladen (<xliff:g id="NUMBER">%d</xliff:g><xliff:g id="PERCENT">%%</xliff:g>)"</string>
+ <string name="lockscreen_discharging">Batterij (<xliff:g id="number">%d</xliff:g><xliff:g id="percent">%%</xliff:g>)</string>
<string name="lockscreen_charged" msgid="4938930459620989972">"Opgeladen."</string>
<string name="lockscreen_battery_short" msgid="3617549178603354656">"<xliff:g id="NUMBER">%d</xliff:g><xliff:g id="PERCENT">%%</xliff:g>"</string>
<string name="lockscreen_low_battery" msgid="1482873981919249740">"Sluit de oplader aan."</string>
@@ -912,4 +920,16 @@
<string name="media_shared" product="nosdcard" msgid="5830814349250834225">"USB-opslag wordt momenteel gebruikt door een computer."</string>
<string name="media_shared" product="default" msgid="5706130568133540435">"SD-kaart wordt momenteel gebruikt door een computer."</string>
<string name="media_unknown_state" msgid="729192782197290385">"Extern medium heeft onbekende status."</string>
+
+ <string name="app_killed_message">Applicatie geforceerd afgesloten</string>
+
+ <string name="phone_goggles_problem_count">Probleem #%1$d: </string>
+ <string name="phone_goggles_description">Los de %1$d volgende wiskundeproblemen op in minder dan %2$d seconden om de communicatie uit te voeren.</string>
+ <plurals name="phone_goggles_countdown">
+ <item quantity="one">%d seconde over</item>
+ <item quantity="other">%d seconden over</item>
+ </plurals>
+
+ <string name="permlab_revokePermissions">Staat toe om ingetrokken machtigingen in te zien en te bewerken. Niet gebruiken bij normale applicaties.</string>
+ <string name="permdesc_revokePermissions">Staat toe om ingetrokken machtigingen te lezen en te schrijven. Niet gebruiken bij normale applicaties.</string>
</resources>
diff --git a/services/java/com/android/server/NotificationManagerService.java b/services/java/com/android/server/NotificationManagerService.java
index 785abb4..a2bfe78 100755
--- a/services/java/com/android/server/NotificationManagerService.java
+++ b/services/java/com/android/server/NotificationManagerService.java
@@ -430,12 +430,18 @@ public class NotificationManagerService extends INotificationManager.Stub
boolean queryRestart = false;
if (action.equals(Intent.ACTION_BATTERY_CHANGED)) {
- boolean batteryCharging = (intent.getIntExtra("plugged", 0) != 0);
- int level = intent.getIntExtra("level", -1);
+ int status = intent.getIntExtra(BatteryManager.EXTRA_STATUS,
+ BatteryManager.BATTERY_STATUS_UNKNOWN);
+ int level = intent.getIntExtra(BatteryManager.EXTRA_LEVEL, -1);
+ boolean batteryCharging = status == BatteryManager.BATTERY_STATUS_CHARGING;
boolean batteryLow = (level >= 0 && level <= Power.LOW_BATTERY_THRESHOLD);
- int status = intent.getIntExtra("status", BatteryManager.BATTERY_STATUS_UNKNOWN);
boolean batteryFull = (status == BatteryManager.BATTERY_STATUS_FULL || level >= 90);
+ /* also treat a full battery with connected charger as 'charging' */
+ if (batteryFull && intent.getIntExtra(BatteryManager.EXTRA_PLUGGED, 0) != 0) {
+ batteryCharging = true;
+ }
+
if (batteryCharging != mBatteryCharging ||
batteryLow != mBatteryLow ||
batteryFull != mBatteryFull) {
@@ -1593,7 +1599,7 @@ public class NotificationManagerService extends INotificationManager.Stub
// Battery low always shows, other states only show if charging.
if (mBatteryLow) {
- int color = adjustForQuietHours(BATTERY_LOW_ARGB);
+ int color = adjustForQuietHours(BATTERY_LOW_ARGB);
if (mBatteryCharging) {
mBatteryLight.setColor(color);
} else {
diff --git a/telephony/java/com/android/internal/telephony/CallManager.java b/telephony/java/com/android/internal/telephony/CallManager.java
index b40e7a3..3929864 100644
--- a/telephony/java/com/android/internal/telephony/CallManager.java
+++ b/telephony/java/com/android/internal/telephony/CallManager.java
@@ -78,6 +78,7 @@ public final class CallManager {
private static final int EVENT_SUPP_SERVICE_FAILED = 117;
private static final int EVENT_SERVICE_STATE_CHANGED = 118;
private static final int EVENT_POST_DIAL_CHARACTER = 119;
+ private static final int EVENT_SUPP_SERVICE_NOTIFY = 120;
// Singleton instance
private static final CallManager INSTANCE = new CallManager();
@@ -159,6 +160,9 @@ public final class CallManager {
protected final RegistrantList mSuppServiceFailedRegistrants
= new RegistrantList();
+ protected final RegistrantList mSuppServiceNotificationRegistrants
+ = new RegistrantList();
+
protected final RegistrantList mServiceStateChangedRegistrants
= new RegistrantList();
@@ -428,6 +432,9 @@ public final class CallManager {
phone.registerForMmiComplete(mHandler, EVENT_MMI_COMPLETE, null);
phone.registerForSuppServiceFailed(mHandler, EVENT_SUPP_SERVICE_FAILED, null);
phone.registerForServiceStateChanged(mHandler, EVENT_SERVICE_STATE_CHANGED, null);
+ if (phone.getPhoneType() == Phone.PHONE_TYPE_GSM) {
+ phone.registerForSuppServiceNotification(mHandler, EVENT_SUPP_SERVICE_NOTIFY, null);
+ }
// for events supported only by GSM and CDMA phone
if (phone.getPhoneType() == Phone.PHONE_TYPE_GSM ||
@@ -460,6 +467,7 @@ public final class CallManager {
phone.unregisterForMmiInitiate(mHandler);
phone.unregisterForMmiComplete(mHandler);
phone.unregisterForSuppServiceFailed(mHandler);
+ phone.unregisterForSuppServiceNotification(mHandler);
phone.unregisterForServiceStateChanged(mHandler);
// for events supported only by GSM and CDMA phone
@@ -1268,6 +1276,27 @@ public final class CallManager {
}
/**
+ * Register for supplementary service notifications.
+ * Message.obj will contain an AsyncResult.
+ *
+ * @param h Handler that receives the notification message.
+ * @param what User-defined message code.
+ * @param obj User object.
+ */
+ public void registerForSuppServiceNotification(Handler h, int what, Object obj){
+ mSuppServiceNotificationRegistrants.addUnique(h, what, obj);
+ }
+
+ /**
+ * Unregister for supplementary service notifications.
+ *
+ * @param h Handler to be removed from the registrant list.
+ */
+ public void unregisterForSuppServiceNotification(Handler h){
+ mSuppServiceNotificationRegistrants.remove(h);
+ }
+
+ /**
* Register for notifications when a sInCall VoicePrivacy is enabled
*
* @param h Handler that receives the notification message.
@@ -1776,6 +1805,10 @@ public final class CallManager {
if (VDBG) Log.d(LOG_TAG, " handleMessage (EVENT_SUPP_SERVICE_FAILED)");
mSuppServiceFailedRegistrants.notifyRegistrants((AsyncResult) msg.obj);
break;
+ case EVENT_SUPP_SERVICE_NOTIFY:
+ if (VDBG) Log.d(LOG_TAG, " handleMessage (EVENT_SUPP_SERVICE_NOTIFICATION)");
+ mSuppServiceNotificationRegistrants.notifyRegistrants((AsyncResult) msg.obj);
+ break;
case EVENT_SERVICE_STATE_CHANGED:
if (VDBG) Log.d(LOG_TAG, " handleMessage (EVENT_SERVICE_STATE_CHANGED)");
mServiceStateChangedRegistrants.notifyRegistrants((AsyncResult) msg.obj);
diff --git a/telephony/java/com/android/internal/telephony/MotoWrigley3GRIL.java b/telephony/java/com/android/internal/telephony/MotoWrigley3GRIL.java
new file mode 100644
index 0000000..2bf724a
--- /dev/null
+++ b/telephony/java/com/android/internal/telephony/MotoWrigley3GRIL.java
@@ -0,0 +1,69 @@
+/*
+ * Copyright (C) 2012 The CyanogenMod 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.internal.telephony;
+
+import android.content.Context;
+import android.os.Parcel;
+import android.util.Log;
+
+import com.android.internal.telephony.gsm.NetworkInfo;
+import com.android.internal.telephony.gsm.SuppServiceNotification;
+
+import java.util.ArrayList;
+
+/**
+ * RIL class for Motorola Wrigley 3G RILs which need
+ * supplementary service notification post-processing
+ *
+ * {@hide}
+ */
+public class MotoWrigley3GRIL extends RIL {
+ public MotoWrigley3GRIL(Context context) {
+ super(context);
+ }
+
+ public MotoWrigley3GRIL(Context context, int networkMode, int cdmaSubscription) {
+ super(context, networkMode, cdmaSubscription);
+ }
+
+ @Override
+ protected Object
+ responseSuppServiceNotification(Parcel p) {
+ SuppServiceNotification notification = new SuppServiceNotification();
+
+ notification.notificationType = p.readInt();
+ notification.code = p.readInt();
+ notification.index = p.readInt();
+ notification.type = p.readInt();
+ notification.number = p.readString();
+
+ /**
+ * Moto's RIL seems to confuse code2 0 ('forwarded call') and
+ * 10 ('additional incoming call forwarded') and sends 10 when an
+ * incoming call is forwarded and _no_ call is currently active.
+ * It never sends 10 where it would be appropriate, so it's safe
+ * to just convert every occurence of 10 to 0.
+ */
+ if (notification.notificationType == SuppServiceNotification.NOTIFICATION_TYPE_MT) {
+ if (notification.code == SuppServiceNotification.MT_CODE_ADDITIONAL_CALL_FORWARDED) {
+ notification.code = SuppServiceNotification.MT_CODE_FORWARDED_CALL;
+ }
+ }
+
+ return notification;
+ }
+}
diff --git a/telephony/java/com/android/internal/telephony/PhoneFactory.java b/telephony/java/com/android/internal/telephony/PhoneFactory.java
index 80e15d0..72c1aed 100644
--- a/telephony/java/com/android/internal/telephony/PhoneFactory.java
+++ b/telephony/java/com/android/internal/telephony/PhoneFactory.java
@@ -131,6 +131,9 @@ public class PhoneFactory {
} else if ("mototegra".equals(sRILClassname)) {
Log.i(LOG_TAG, "Using Motorola Tegra2 RIL");
sCommandsInterface = new MotoTegraRIL(context, networkMode, cdmaSubscription);
+ } else if ("motow3g".equals(sRILClassname)) {
+ Log.i(LOG_TAG, "Using Motorola Wrigley 3G RIL");
+ sCommandsInterface = new MotoWrigley3GRIL(context, networkMode, cdmaSubscription);
} else {
sCommandsInterface = new RIL(context, networkMode, cdmaSubscription);
}