summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
Diffstat (limited to 'core')
-rwxr-xr-xcore/java/android/nfc/INfcAdapterExtras.aidl4
-rwxr-xr-xcore/java/android/provider/Telephony.java44
-rw-r--r--core/java/android/server/BluetoothService.java16
-rw-r--r--core/jni/android_nfc_NdefMessage.cpp13
-rw-r--r--core/res/AndroidManifest.xml9
-rw-r--r--core/res/res/values-hr/strings.xml2
-rwxr-xr-xcore/res/res/values/config.xml12
-rwxr-xr-xcore/res/res/values/strings.xml7
8 files changed, 87 insertions, 20 deletions
diff --git a/core/java/android/nfc/INfcAdapterExtras.aidl b/core/java/android/nfc/INfcAdapterExtras.aidl
index 8677a50..0c2a2fd 100755
--- a/core/java/android/nfc/INfcAdapterExtras.aidl
+++ b/core/java/android/nfc/INfcAdapterExtras.aidl
@@ -16,7 +16,6 @@
package android.nfc;
-import android.nfc.ApduList;
import android.os.Bundle;
@@ -29,6 +28,5 @@ interface INfcAdapterExtras {
Bundle transceive(in byte[] data_in);
int getCardEmulationRoute();
void setCardEmulationRoute(int route);
- void registerTearDownApdus(String packageName, in ApduList apdu);
- void unregisterTearDownApdus(String packageName);
+ void authenticate(in byte[] token);
}
diff --git a/core/java/android/provider/Telephony.java b/core/java/android/provider/Telephony.java
index f0f2ecb..c446f88 100755
--- a/core/java/android/provider/Telephony.java
+++ b/core/java/android/provider/Telephony.java
@@ -541,7 +541,7 @@ public final class Telephony {
* values:</p>
*
* <ul>
- * <li><em>pdus</em> - An Object[] od byte[]s containing the PDUs
+ * <li><em>pdus</em> - An Object[] of byte[]s containing the PDUs
* that make up the message.</li>
* </ul>
*
@@ -576,6 +576,46 @@ public final class Telephony {
"android.provider.Telephony.WAP_PUSH_RECEIVED";
/**
+ * Broadcast Action: A new Cell Broadcast message has been received
+ * by the device. The intent will have the following extra
+ * values:</p>
+ *
+ * <ul>
+ * <li><em>pdus</em> - An Object[] of byte[]s containing the PDUs
+ * that make up the message.</li>
+ * </ul>
+ *
+ * <p>The extra values can be extracted using
+ * {@link #getMessagesFromIntent(Intent)}.</p>
+ *
+ * <p>If a BroadcastReceiver encounters an error while processing
+ * this intent it should set the result code appropriately.</p>
+ */
+ @SdkConstant(SdkConstantType.BROADCAST_INTENT_ACTION)
+ public static final String SMS_CB_RECEIVED_ACTION =
+ "android.provider.Telephony.SMS_CB_RECEIVED";
+
+ /**
+ * Broadcast Action: A new Emergency Broadcast message has been received
+ * by the device. The intent will have the following extra
+ * values:</p>
+ *
+ * <ul>
+ * <li><em>pdus</em> - An Object[] of byte[]s containing the PDUs
+ * that make up the message.</li>
+ * </ul>
+ *
+ * <p>The extra values can be extracted using
+ * {@link #getMessagesFromIntent(Intent)}.</p>
+ *
+ * <p>If a BroadcastReceiver encounters an error while processing
+ * this intent it should set the result code appropriately.</p>
+ */
+ @SdkConstant(SdkConstantType.BROADCAST_INTENT_ACTION)
+ public static final String SMS_EMERGENCY_CB_RECEIVED_ACTION =
+ "android.provider.Telephony.SMS_EMERGENCY_CB_RECEIVED";
+
+ /**
* Broadcast Action: The SIM storage for SMS messages is full. If
* space is not freed, messages targeted for the SIM (class 2) may
* not be saved.
@@ -608,7 +648,7 @@ public final class Telephony {
* @param intent the intent to read from
* @return an array of SmsMessages for the PDUs
*/
- public static final SmsMessage[] getMessagesFromIntent(
+ public static SmsMessage[] getMessagesFromIntent(
Intent intent) {
Object[] messages = (Object[]) intent.getSerializableExtra("pdus");
byte[][] pduObjs = new byte[messages.length][];
diff --git a/core/java/android/server/BluetoothService.java b/core/java/android/server/BluetoothService.java
index 064c86c..88732f0 100644
--- a/core/java/android/server/BluetoothService.java
+++ b/core/java/android/server/BluetoothService.java
@@ -104,7 +104,6 @@ public class BluetoothService extends IBluetooth.Stub {
private static final int MESSAGE_REGISTER_SDP_RECORDS = 1;
private static final int MESSAGE_FINISH_DISABLE = 2;
private static final int MESSAGE_UUID_INTENT = 3;
- private static final int MESSAGE_DISCOVERABLE_TIMEOUT = 4;
private static final int MESSAGE_AUTO_PAIRING_FAILURE_ATTEMPT_DELAY = 5;
// The time (in millisecs) to delay the pairing attempt after the first
@@ -508,15 +507,6 @@ public class BluetoothService extends IBluetooth.Stub {
makeServiceChannelCallbacks(address);
}
break;
- case MESSAGE_DISCOVERABLE_TIMEOUT:
- int mode = msg.arg1;
- if (isEnabledInternal()) {
- // TODO: Switch back to the previous scan mode
- // This is ok for now, because we only use
- // CONNECTABLE and CONNECTABLE_DISCOVERABLE
- setScanMode(BluetoothAdapter.SCAN_MODE_CONNECTABLE, -1);
- }
- break;
case MESSAGE_AUTO_PAIRING_FAILURE_ATTEMPT_DELAY:
address = (String)msg.obj;
if (address != null) {
@@ -1083,21 +1073,17 @@ public class BluetoothService extends IBluetooth.Stub {
switch (mode) {
case BluetoothAdapter.SCAN_MODE_NONE:
- mHandler.removeMessages(MESSAGE_DISCOVERABLE_TIMEOUT);
pairable = false;
discoverable = false;
break;
case BluetoothAdapter.SCAN_MODE_CONNECTABLE:
- mHandler.removeMessages(MESSAGE_DISCOVERABLE_TIMEOUT);
pairable = true;
discoverable = false;
break;
case BluetoothAdapter.SCAN_MODE_CONNECTABLE_DISCOVERABLE:
- mHandler.removeMessages(MESSAGE_DISCOVERABLE_TIMEOUT);
+ setDiscoverableTimeout(duration);
pairable = true;
discoverable = true;
- Message msg = mHandler.obtainMessage(MESSAGE_DISCOVERABLE_TIMEOUT);
- mHandler.sendMessageDelayed(msg, duration * 1000);
if (DBG) Log.d(TAG, "BT Discoverable for " + duration + " seconds");
break;
default:
diff --git a/core/jni/android_nfc_NdefMessage.cpp b/core/jni/android_nfc_NdefMessage.cpp
index 9beef2a..aff8aa6 100644
--- a/core/jni/android_nfc_NdefMessage.cpp
+++ b/core/jni/android_nfc_NdefMessage.cpp
@@ -102,6 +102,19 @@ static jint android_nfc_NdefMessage_parseNdefMessage(JNIEnv *e, jobject o,
}
TRACE("phFriNfc_NdefRecord_Parse() returned 0x%04x", status);
+ // We don't exactly know what *is* a valid length, but a simple
+ // sanity check is to make sure that the length of the header
+ // plus all fields does not exceed raw_msg_size. The min length
+ // of the header is 3 bytes: TNF, Type Length, Payload Length
+ // (ID length field is optional!)
+ uint64_t indicatedMsgLength = 3 + record.TypeLength + record.IdLength +
+ (uint64_t)record.PayloadLength;
+ if (indicatedMsgLength >
+ (uint64_t)raw_msg_size) {
+ LOGE("phFri_NdefRecord_Parse: invalid length field");
+ goto end;
+ }
+
type = e->NewByteArray(record.TypeLength);
if (type == NULL) {
LOGD("NFC_Set Record Type Error\n");
diff --git a/core/res/AndroidManifest.xml b/core/res/AndroidManifest.xml
index c582eee..55cb6c8 100644
--- a/core/res/AndroidManifest.xml
+++ b/core/res/AndroidManifest.xml
@@ -150,6 +150,15 @@
android:label="@string/permlab_receiveMms"
android:description="@string/permdesc_receiveMms" />
+ <!-- Allows an application to receive emergency cell broadcast messages,
+ to record or display them to the user. Reserved for system apps.
+ @hide Pending API council approval -->
+ <permission android:name="android.permission.RECEIVE_EMERGENCY_BROADCAST"
+ android:permissionGroup="android.permission-group.MESSAGES"
+ android:protectionLevel="signatureOrSystem"
+ android:label="@string/permlab_receiveEmergencyBroadcast"
+ android:description="@string/permdesc_receiveEmergencyBroadcast" />
+
<!-- Allows an application to read SMS messages. -->
<permission android:name="android.permission.READ_SMS"
android:permissionGroup="android.permission-group.MESSAGES"
diff --git a/core/res/res/values-hr/strings.xml b/core/res/res/values-hr/strings.xml
index fdc3679..91cc3ed 100644
--- a/core/res/res/values-hr/strings.xml
+++ b/core/res/res/values-hr/strings.xml
@@ -183,6 +183,8 @@
<string name="permdesc_receiveSms" msgid="6298292335965966117">"Aplikaciji omogućuje primanje i obradu SMS poruka. Zlonamjerne aplikacije mogu pratiti vaše poruke ili ih izbrisati prije nego što ih vi vidite."</string>
<string name="permlab_receiveMms" msgid="8894700916188083287">"primanje MMS-a"</string>
<string name="permdesc_receiveMms" msgid="4563346832000174373">"Aplikaciji omogućuje primanje i obradu MMS poruka. Zlonamjerne aplikacije mogu pratiti vaše poruke ili ih izbrisati prije nego što ih vi vidite."</string>
+ <string name="permlab_receiveEmergencyBroadcast" msgid="1803477660846288089">"primanje hitnih odašiljanja"</string>
+ <string name="permdesc_receiveEmergencyBroadcast" msgid="7118393393716546131">"Omogućuje aplikaciji primanje i obradu poruka hitnih odašiljanja. Ta je dozvola dostupna samo aplikacijama sustava."</string>
<string name="permlab_sendSms" msgid="5600830612147671529">"slanje SMS poruka"</string>
<string name="permdesc_sendSms" msgid="1946540351763502120">"Aplikaciji omogućuje slanje SMS poruka. Zlonamjerne aplikacije mogu stvarati troškove slanjem poruka bez vaše potvrde."</string>
<string name="permlab_readSms" msgid="4085333708122372256">"čitanje SMS-a ili MMS-a"</string>
diff --git a/core/res/res/values/config.xml b/core/res/res/values/config.xml
index 4433b64..779028e 100755
--- a/core/res/res/values/config.xml
+++ b/core/res/res/values/config.xml
@@ -125,6 +125,7 @@
<!-- Regex array of allowable upstream ifaces for tethering - for example if you want
tethering on a new interface called "foo2" add <item>"foo\\d"</item> to the array -->
+ <!-- Interfaces will be prioritized according to the order listed -->
<string-array translatable="false" name="config_tether_upstream_regexs">
</string-array>
@@ -456,4 +457,15 @@
<string name="config_wimaxServiceClassname"></string>
<!-- Name of the wimax state tracker clas -->
<string name="config_wimaxStateTrackerClassname"></string>
+
+ <!-- Set to true if the RSSI should always display CDMA signal strength
+ even on EVDO -->
+ <bool name="config_alwaysUseCdmaRssi">false</bool>
+
+ <!-- If this value is true, duplicate Source/Destination port fields
+ in WDP header of some carriers OMADM wap push are supported.
+ ex: MSGTYPE-TotalSegments-CurrentSegment
+ -SourcePortDestPort-SourcePortDestPort-OMADM PDU
+ If false, not supported. -->
+ <bool name="config_duplicate_port_omadm_wappush">false</bool>
</resources>
diff --git a/core/res/res/values/strings.xml b/core/res/res/values/strings.xml
index 613e611..5ed8711 100755
--- a/core/res/res/values/strings.xml
+++ b/core/res/res/values/strings.xml
@@ -427,6 +427,13 @@
your messages or delete them without showing them to you.</string>
<!-- Title of an application permission, listed so the user can choose whether they want to allow the application to do this. -->
+ <string name="permlab_receiveEmergencyBroadcast">receive emergency broadcasts</string>
+ <!-- Description of an application permission, listed so the user can choose whether they want to allow the application to do this. -->
+ <string name="permdesc_receiveEmergencyBroadcast">Allows application to receive
+ and process emergency broadcast messages. This permission is only available
+ to system applications.</string>
+
+ <!-- Title of an application permission, listed so the user can choose whether they want to allow the application to do this. -->
<string name="permlab_sendSms">send SMS messages</string>
<!-- Description of an application permission, listed so the user can choose whether they want to allow the application to do this. -->
<string name="permdesc_sendSms">Allows application to send SMS