Merge change Id60fa26a into eclair
* changes:
Fix issue 2152541 thumbnail images stretched.
diff --git a/api/current.xml b/api/current.xml
index e4d6308..1b3b3d9 100644
--- a/api/current.xml
+++ b/api/current.xml
@@ -10956,6 +10956,17 @@
visibility="public"
>
</field>
+<field name="stat_notify_sdcard_prepare"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="17301675"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
<field name="stat_notify_sdcard_usb"
type="int"
transient="false"
@@ -113219,37 +113230,6 @@
>
</field>
</interface>
-<class name="ContactsContract.CommonDataKinds.Birthday"
- extends="java.lang.Object"
- abstract="false"
- static="true"
- final="true"
- deprecated="not deprecated"
- visibility="public"
->
-<field name="BIRTHDAY"
- type="java.lang.String"
- transient="false"
- volatile="false"
- value=""data1""
- static="true"
- final="true"
- deprecated="not deprecated"
- visibility="public"
->
-</field>
-<field name="CONTENT_ITEM_TYPE"
- type="java.lang.String"
- transient="false"
- volatile="false"
- value=""vnd.android.cursor.item/birthday""
- static="true"
- final="true"
- deprecated="not deprecated"
- visibility="public"
->
-</field>
-</class>
<class name="ContactsContract.CommonDataKinds.Email"
extends="java.lang.Object"
abstract="false"
@@ -113404,11 +113384,24 @@
deprecated="not deprecated"
visibility="public"
>
+<method name="getTypeResource"
+ return="int"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="type" type="java.lang.Integer">
+</parameter>
+</method>
<field name="CONTENT_ITEM_TYPE"
type="java.lang.String"
transient="false"
volatile="false"
- value=""vnd.android.cursor.item/event""
+ value=""vnd.android.cursor.item/contact_event""
static="true"
final="true"
deprecated="not deprecated"
@@ -113437,6 +113430,17 @@
visibility="public"
>
</field>
+<field name="TYPE_BIRTHDAY"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="3"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
<field name="TYPE_OTHER"
type="int"
transient="false"
@@ -115748,6 +115752,98 @@
>
</constructor>
</class>
+<class name="ContactsContract.QuickContact"
+ extends="java.lang.Object"
+ abstract="false"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="ContactsContract.QuickContact"
+ type="android.provider.ContactsContract.QuickContact"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<method name="showQuickContact"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+<parameter name="target" type="android.view.View">
+</parameter>
+<parameter name="lookupUri" type="android.net.Uri">
+</parameter>
+<parameter name="mode" type="int">
+</parameter>
+<parameter name="excludeMimes" type="java.lang.String[]">
+</parameter>
+</method>
+<method name="showQuickContact"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="context" type="android.content.Context">
+</parameter>
+<parameter name="target" type="android.graphics.Rect">
+</parameter>
+<parameter name="lookupUri" type="android.net.Uri">
+</parameter>
+<parameter name="mode" type="int">
+</parameter>
+<parameter name="excludeMimes" type="java.lang.String[]">
+</parameter>
+</method>
+<field name="MODE_LARGE"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="3"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="MODE_MEDIUM"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="2"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="MODE_SMALL"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
<class name="ContactsContract.RawContacts"
extends="java.lang.Object"
abstract="false"
@@ -186374,6 +186470,19 @@
<parameter name="excludeMimes" type="java.lang.String[]">
</parameter>
</method>
+<method name="setMode"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="size" type="int">
+</parameter>
+</method>
<field name="mExcludeMimes"
type="java.lang.String[]"
transient="false"
diff --git a/core/java/android/app/ActivityThread.java b/core/java/android/app/ActivityThread.java
index d6f024b..fc00a4c 100644
--- a/core/java/android/app/ActivityThread.java
+++ b/core/java/android/app/ActivityThread.java
@@ -122,7 +122,7 @@
private static final boolean localLOGV = DEBUG ? Config.LOGD : Config.LOGV;
private static final boolean DEBUG_BROADCAST = false;
private static final boolean DEBUG_RESULTS = false;
- private static final boolean DEBUG_BACKUP = true;
+ private static final boolean DEBUG_BACKUP = false;
private static final boolean DEBUG_CONFIGURATION = false;
private static final long MIN_TIME_BETWEEN_GCS = 5*1000;
private static final Pattern PATTERN_SEMICOLON = Pattern.compile(";");
diff --git a/core/java/android/app/BackupAgent.java b/core/java/android/app/BackupAgent.java
index 0ac8a1e..b207998 100644
--- a/core/java/android/app/BackupAgent.java
+++ b/core/java/android/app/BackupAgent.java
@@ -36,6 +36,7 @@
*/
public abstract class BackupAgent extends ContextWrapper {
private static final String TAG = "BackupAgent";
+ private static final boolean DEBUG = false;
public BackupAgent() {
super(null);
@@ -116,7 +117,7 @@
ParcelFileDescriptor data,
ParcelFileDescriptor newState) throws RemoteException {
// !!! TODO - real implementation; for now just invoke the callbacks directly
- Log.v(TAG, "doBackup() invoked");
+ if (DEBUG) Log.v(TAG, "doBackup() invoked");
BackupDataOutput output = new BackupDataOutput(data.getFileDescriptor());
try {
BackupAgent.this.onBackup(oldState, output, newState);
@@ -132,7 +133,7 @@
public void doRestore(ParcelFileDescriptor data, int appVersionCode,
ParcelFileDescriptor newState) throws RemoteException {
// !!! TODO - real implementation; for now just invoke the callbacks directly
- Log.v(TAG, "doRestore() invoked");
+ if (DEBUG) Log.v(TAG, "doRestore() invoked");
BackupDataInput input = new BackupDataInput(data.getFileDescriptor());
try {
BackupAgent.this.onRestore(input, appVersionCode, newState);
diff --git a/core/java/android/backup/AbsoluteFileBackupHelper.java b/core/java/android/backup/AbsoluteFileBackupHelper.java
index ab24675..1dbccc9 100644
--- a/core/java/android/backup/AbsoluteFileBackupHelper.java
+++ b/core/java/android/backup/AbsoluteFileBackupHelper.java
@@ -31,6 +31,7 @@
*/
public class AbsoluteFileBackupHelper extends FileBackupHelperBase implements BackupHelper {
private static final String TAG = "AbsoluteFileBackupHelper";
+ private static final boolean DEBUG = false;
Context mContext;
String[] mFiles;
@@ -54,8 +55,7 @@
}
public void restoreEntity(BackupDataInputStream data) {
- // TODO: turn this off before ship
- Log.d(TAG, "got entity '" + data.getKey() + "' size=" + data.size());
+ if (DEBUG) Log.d(TAG, "got entity '" + data.getKey() + "' size=" + data.size());
String key = data.getKey();
if (isKeyInList(key, mFiles)) {
File f = new File(key);
diff --git a/core/java/android/backup/FileBackupHelper.java b/core/java/android/backup/FileBackupHelper.java
index 4058497..dacfc8f 100644
--- a/core/java/android/backup/FileBackupHelper.java
+++ b/core/java/android/backup/FileBackupHelper.java
@@ -26,6 +26,7 @@
/** @hide */
public class FileBackupHelper extends FileBackupHelperBase implements BackupHelper {
private static final String TAG = "FileBackupHelper";
+ private static final boolean DEBUG = false;
Context mContext;
File mFilesDir;
@@ -60,8 +61,7 @@
}
public void restoreEntity(BackupDataInputStream data) {
- // TODO: turn this off before ship
- Log.d(TAG, "got entity '" + data.getKey() + "' size=" + data.size());
+ if (DEBUG) Log.d(TAG, "got entity '" + data.getKey() + "' size=" + data.size());
String key = data.getKey();
if (isKeyInList(key, mFiles)) {
File f = new File(mFilesDir, key);
diff --git a/core/java/android/backup/SharedPreferencesBackupHelper.java b/core/java/android/backup/SharedPreferencesBackupHelper.java
index 4a7b399..6a0bc96 100644
--- a/core/java/android/backup/SharedPreferencesBackupHelper.java
+++ b/core/java/android/backup/SharedPreferencesBackupHelper.java
@@ -26,6 +26,7 @@
/** @hide */
public class SharedPreferencesBackupHelper extends FileBackupHelperBase implements BackupHelper {
private static final String TAG = "SharedPreferencesBackupHelper";
+ private static final boolean DEBUG = false;
private Context mContext;
private String[] mPrefGroups;
@@ -56,9 +57,9 @@
public void restoreEntity(BackupDataInputStream data) {
Context context = mContext;
- // TODO: turn this off before ship
- Log.d(TAG, "got entity '" + data.getKey() + "' size=" + data.size());
String key = data.getKey();
+ if (DEBUG) Log.d(TAG, "got entity '" + key + "' size=" + data.size());
+
if (isKeyInList(key, mPrefGroups)) {
File f = context.getSharedPrefsFile(key).getAbsoluteFile();
writeFile(f, data);
diff --git a/core/java/android/bluetooth/HeadsetBase.java b/core/java/android/bluetooth/HeadsetBase.java
index 29cf41d..e2935c9 100644
--- a/core/java/android/bluetooth/HeadsetBase.java
+++ b/core/java/android/bluetooth/HeadsetBase.java
@@ -211,9 +211,10 @@
*/
public boolean connectAsync() {
- return connectAsyncNative();
+ int ret = connectAsyncNative();
+ return (ret == 0) ? true : false;
}
- private native boolean connectAsyncNative();
+ private native int connectAsyncNative();
public int getRemainingAsyncConnectWaitingTimeMs() {
return mTimeoutRemainingMs;
diff --git a/core/java/android/hardware/Camera.java b/core/java/android/hardware/Camera.java
index 11c8b6f..66f5740 100644
--- a/core/java/android/hardware/Camera.java
+++ b/core/java/android/hardware/Camera.java
@@ -1281,7 +1281,11 @@
}
/**
- * Sets the scene mode.
+ * Sets the scene mode. Other parameters may be changed after changing
+ * scene mode. For example, flash and supported flash mode may be
+ * changed to "off" in night scene mode. After setting scene mode,
+ * applications should call getParameters to know if some parameters are
+ * changed.
*
* @param value SCENE_MODE_XXX string constants.
*/
diff --git a/core/java/android/pim/vcard/ContactStruct.java b/core/java/android/pim/vcard/ContactStruct.java
index a078f15..b6a453a 100644
--- a/core/java/android/pim/vcard/ContactStruct.java
+++ b/core/java/android/pim/vcard/ContactStruct.java
@@ -25,8 +25,8 @@
import android.provider.ContactsContract.Data;
import android.provider.ContactsContract.Groups;
import android.provider.ContactsContract.RawContacts;
-import android.provider.ContactsContract.CommonDataKinds.Birthday;
import android.provider.ContactsContract.CommonDataKinds.Email;
+import android.provider.ContactsContract.CommonDataKinds.Event;
import android.provider.ContactsContract.CommonDataKinds.GroupMembership;
import android.provider.ContactsContract.CommonDataKinds.Im;
import android.provider.ContactsContract.CommonDataKinds.Nickname;
@@ -1317,9 +1317,10 @@
if (!TextUtils.isEmpty(mBirthday)) {
builder = ContentProviderOperation.newInsert(Data.CONTENT_URI);
- builder.withValueBackReference(Birthday.RAW_CONTACT_ID, 0);
- builder.withValue(Data.MIMETYPE, Birthday.CONTENT_ITEM_TYPE);
- builder.withValue(Birthday.BIRTHDAY, mBirthday);
+ builder.withValueBackReference(Event.RAW_CONTACT_ID, 0);
+ builder.withValue(Data.MIMETYPE, Event.CONTENT_ITEM_TYPE);
+ builder.withValue(Event.START_DATE, mBirthday);
+ builder.withValue(Event.TYPE, Event.TYPE_BIRTHDAY);
operationList.add(builder.build());
}
diff --git a/core/java/android/pim/vcard/VCardComposer.java b/core/java/android/pim/vcard/VCardComposer.java
index c943d85..7b75f4a 100644
--- a/core/java/android/pim/vcard/VCardComposer.java
+++ b/core/java/android/pim/vcard/VCardComposer.java
@@ -30,8 +30,8 @@
import android.provider.ContactsContract.Contacts;
import android.provider.ContactsContract.Data;
import android.provider.ContactsContract.RawContacts;
-import android.provider.ContactsContract.CommonDataKinds.Birthday;
import android.provider.ContactsContract.CommonDataKinds.Email;
+import android.provider.ContactsContract.CommonDataKinds.Event;
import android.provider.ContactsContract.CommonDataKinds.Im;
import android.provider.ContactsContract.CommonDataKinds.Nickname;
import android.provider.ContactsContract.CommonDataKinds.Note;
@@ -1301,12 +1301,16 @@
private void appendBirthday(final StringBuilder builder,
final Map<String, List<ContentValues>> contentValuesListMap) {
final List<ContentValues> contentValuesList = contentValuesListMap
- .get(Birthday.CONTENT_ITEM_TYPE);
+ .get(Event.CONTENT_ITEM_TYPE);
if (contentValuesList != null && contentValuesList.size() > 0) {
+ Integer eventType = contentValuesList.get(0).getAsInteger(Event.TYPE);
+ if (eventType == null || !eventType.equals(Event.TYPE_BIRTHDAY)) {
+ return;
+ }
// Theoretically, there must be only one birthday for each vCard data and
// we are afraid of some parse error occuring in some devices, so
// we emit only one birthday entry for now.
- String birthday = contentValuesList.get(0).getAsString(Birthday.BIRTHDAY);
+ String birthday = contentValuesList.get(0).getAsString(Event.START_DATE);
if (birthday != null) {
birthday = birthday.trim();
}
diff --git a/core/java/android/provider/ContactsContract.java b/core/java/android/provider/ContactsContract.java
index c4f6d5b..2e4bbab 100644
--- a/core/java/android/provider/ContactsContract.java
+++ b/core/java/android/provider/ContactsContract.java
@@ -1692,26 +1692,6 @@
}
/**
- * Common data definition for birthdays.
- */
- public static final class Birthday implements DataColumnsWithJoins {
- /**
- * This utility class cannot be instantiated
- */
- private Birthday() {}
-
- /** MIME type used when storing this in data table. */
- public static final String CONTENT_ITEM_TYPE = "vnd.android.cursor.item/birthday";
-
- /**
- * The birthday. This must be of the form YYYY-MM-DD or YYYY-MM-DDThh:mm:ss
- * These are xs:date and xs:dateTime
- * <P>Type: TEXT</P>
- */
- public static final String BIRTHDAY = DATA1;
- }
-
- /**
* Common data definition for relations.
*/
public static final class Relation implements DataColumnsWithJoins, CommonColumns {
@@ -1755,16 +1735,34 @@
private Event() {}
/** MIME type used when storing this in data table. */
- public static final String CONTENT_ITEM_TYPE = "vnd.android.cursor.item/event";
+ public static final String CONTENT_ITEM_TYPE = "vnd.android.cursor.item/contact_event";
public static final int TYPE_ANNIVERSARY = 1;
public static final int TYPE_OTHER = 2;
+ public static final int TYPE_BIRTHDAY = 3;
/**
* The event start date as the user entered it.
* <P>Type: TEXT</P>
*/
public static final String START_DATE = DATA;
+
+ /**
+ * Return the string resource that best describes the given
+ * {@link #TYPE}. Will always return a valid resource.
+ */
+ public static int getTypeResource(Integer type) {
+ if (type == null) {
+ return com.android.internal.R.string.eventTypeOther;
+ }
+ switch (type) {
+ case TYPE_ANNIVERSARY:
+ return com.android.internal.R.string.eventTypeAnniversary;
+ case TYPE_BIRTHDAY: return com.android.internal.R.string.eventTypeBirthday;
+ case TYPE_OTHER: return com.android.internal.R.string.eventTypeOther;
+ default: return com.android.internal.R.string.eventTypeOther;
+ }
+ }
}
/**
@@ -2133,18 +2131,16 @@
}
/**
- * Helper methods to display FastTrack dialogs that allow users to pivot on
+ * Helper methods to display QuickContact dialogs that allow users to pivot on
* a specific {@link Contacts} entry.
- *
- * @hide
*/
- public static final class FastTrack {
+ public static final class QuickContact {
/**
* Action used to trigger person pivot dialog.
* @hide
*/
- public static final String ACTION_FAST_TRACK =
- "com.android.contacts.action.FAST_TRACK";
+ public static final String ACTION_QUICK_CONTACT =
+ "com.android.contacts.action.QUICK_CONTACT";
/**
* Extra used to specify pivot dialog location in screen coordinates.
@@ -2166,19 +2162,19 @@
public static final String EXTRA_EXCLUDE_MIMES = "exclude_mimes";
/**
- * Small FastTrack mode, usually presented with minimal actions.
+ * Small QuickContact mode, usually presented with minimal actions.
*/
public static final int MODE_SMALL = 1;
/**
- * Medium FastTrack mode, includes actions and light summary describing
+ * Medium QuickContact mode, includes actions and light summary describing
* the {@link Contacts} entry being shown. This may include social
* status and presence details.
*/
public static final int MODE_MEDIUM = 2;
/**
- * Large FastTrack mode, includes actions and larger, card-like summary
+ * Large QuickContact mode, includes actions and larger, card-like summary
* of the {@link Contacts} entry being shown. This may include detailed
* information, such as a photo.
*/
@@ -2207,7 +2203,7 @@
* already viewing the contact details card, this can be used
* to omit the details entry from the dialog.
*/
- public static void showFastTrack(Context context, View target, Uri lookupUri, int mode,
+ public static void showQuickContact(Context context, View target, Uri lookupUri, int mode,
String[] excludeMimes) {
// Find location and bounds of target view
final int[] location = new int[2];
@@ -2220,7 +2216,7 @@
rect.bottom = rect.top + target.getHeight();
// Trigger with obtained rectangle
- showFastTrack(context, rect, lookupUri, mode, excludeMimes);
+ showQuickContact(context, rect, lookupUri, mode, excludeMimes);
}
/**
@@ -2246,10 +2242,10 @@
* already viewing the contact details card, this can be used
* to omit the details entry from the dialog.
*/
- public static void showFastTrack(Context context, Rect target, Uri lookupUri, int mode,
+ public static void showQuickContact(Context context, Rect target, Uri lookupUri, int mode,
String[] excludeMimes) {
// Launch pivot dialog through intent for now
- final Intent intent = new Intent(ACTION_FAST_TRACK);
+ final Intent intent = new Intent(ACTION_QUICK_CONTACT);
intent.setData(lookupUri);
intent.putExtra(EXTRA_TARGET_RECT, target);
intent.putExtra(EXTRA_MODE, mode);
diff --git a/core/java/android/server/BluetoothA2dpService.java b/core/java/android/server/BluetoothA2dpService.java
index f871533..d61b42f 100644
--- a/core/java/android/server/BluetoothA2dpService.java
+++ b/core/java/android/server/BluetoothA2dpService.java
@@ -112,6 +112,13 @@
Message msg = Message.obtain(mHandler, MESSAGE_CONNECT_TO, device);
mHandler.sendMessageDelayed(msg, 6000);
}
+ } else if (action.equals(BluetoothDevice.ACTION_ACL_DISCONNECTED)) {
+ synchronized (this) {
+ if (mAudioDevices.containsKey(device)) {
+ int state = mAudioDevices.get(device);
+ handleSinkStateChange(device, state, BluetoothA2dp.STATE_DISCONNECTED);
+ }
+ }
}
}
};
@@ -135,6 +142,7 @@
mIntentFilter = new IntentFilter(BluetoothAdapter.ACTION_STATE_CHANGED);
mIntentFilter.addAction(BluetoothDevice.ACTION_BOND_STATE_CHANGED);
mIntentFilter.addAction(BluetoothDevice.ACTION_ACL_CONNECTED);
+ mIntentFilter.addAction(BluetoothDevice.ACTION_ACL_DISCONNECTED);
mContext.registerReceiver(mReceiver, mIntentFilter);
mAudioDevices = new HashMap<BluetoothDevice, Integer>();
diff --git a/core/java/android/text/method/QwertyKeyListener.java b/core/java/android/text/method/QwertyKeyListener.java
index f736f85..2e76470 100644
--- a/core/java/android/text/method/QwertyKeyListener.java
+++ b/core/java/android/text/method/QwertyKeyListener.java
@@ -405,12 +405,13 @@
PICKER_SETS.put('C', "\u00C7\u0106\u010C");
PICKER_SETS.put('D', "\u010E");
PICKER_SETS.put('E', "\u00C8\u00C9\u00CA\u00CB\u0118\u011A\u0112");
+ PICKER_SETS.put('G', "\u011E");
PICKER_SETS.put('L', "\u0141");
PICKER_SETS.put('I', "\u00CC\u00CD\u00CE\u00CF\u012A\u0130");
PICKER_SETS.put('N', "\u00D1\u0143\u0147");
PICKER_SETS.put('O', "\u00D8\u0152\u00D5\u00D2\u00D3\u00D4\u00D6\u014C");
PICKER_SETS.put('R', "\u0158");
- PICKER_SETS.put('S', "\u015A\u0160");
+ PICKER_SETS.put('S', "\u015A\u0160\u015E");
PICKER_SETS.put('T', "\u0164");
PICKER_SETS.put('U', "\u00D9\u00DA\u00DB\u00DC\u016E\u016A");
PICKER_SETS.put('Y', "\u00DD\u0178");
@@ -419,12 +420,13 @@
PICKER_SETS.put('c', "\u00E7\u0107\u010D");
PICKER_SETS.put('d', "\u010F");
PICKER_SETS.put('e', "\u00E8\u00E9\u00EA\u00EB\u0119\u011B\u0113");
+ PICKER_SETS.put('g', "\u011F");
PICKER_SETS.put('i', "\u00EC\u00ED\u00EE\u00EF\u012B\u0131");
PICKER_SETS.put('l', "\u0142");
PICKER_SETS.put('n', "\u00F1\u0144\u0148");
PICKER_SETS.put('o', "\u00F8\u0153\u00F5\u00F2\u00F3\u00F4\u00F6\u014D");
PICKER_SETS.put('r', "\u0159");
- PICKER_SETS.put('s', "\u00A7\u00DF\u015B\u0161");
+ PICKER_SETS.put('s', "\u00A7\u00DF\u015B\u0161\u015F");
PICKER_SETS.put('t', "\u0165");
PICKER_SETS.put('u', "\u00F9\u00FA\u00FB\u00FC\u016F\u016B");
PICKER_SETS.put('y', "\u00FD\u00FF");
diff --git a/core/java/android/webkit/PluginManager.java b/core/java/android/webkit/PluginManager.java
index 766bd75..edba446 100644
--- a/core/java/android/webkit/PluginManager.java
+++ b/core/java/android/webkit/PluginManager.java
@@ -65,6 +65,15 @@
private ArrayList<PackageInfo> mPackageInfoCache;
+ // Only plugin matches one of the signatures in the list can be loaded
+ // inside the WebView process
+ private static final String SIGNATURE_1 = "308204a830820390a003020102020900936eacbe07f201df300d06092a864886f70d0101050500308194310b3009060355040613025553311330110603550408130a43616c69666f726e6961311630140603550407130d4d6f756e7461696e20566965773110300e060355040a1307416e64726f69643110300e060355040b1307416e64726f69643110300e06035504031307416e64726f69643122302006092a864886f70d0109011613616e64726f696440616e64726f69642e636f6d301e170d3038303232393031333334365a170d3335303731373031333334365a308194310b3009060355040613025553311330110603550408130a43616c69666f726e6961311630140603550407130d4d6f756e7461696e20566965773110300e060355040a1307416e64726f69643110300e060355040b1307416e64726f69643110300e06035504031307416e64726f69643122302006092a864886f70d0109011613616e64726f696440616e64726f69642e636f6d30820120300d06092a864886f70d01010105000382010d00308201080282010100d6931904dec60b24b1edc762e0d9d8253e3ecd6ceb1de2ff068ca8e8bca8cd6bd3786ea70aa76ce60ebb0f993559ffd93e77a943e7e83d4b64b8e4fea2d3e656f1e267a81bbfb230b578c20443be4c7218b846f5211586f038a14e89c2be387f8ebecf8fcac3da1ee330c9ea93d0a7c3dc4af350220d50080732e0809717ee6a053359e6a694ec2cb3f284a0a466c87a94d83b31093a67372e2f6412c06e6d42f15818dffe0381cc0cd444da6cddc3b82458194801b32564134fbfde98c9287748dbf5676a540d8154c8bbca07b9e247553311c46b9af76fdeeccc8e69e7c8a2d08e782620943f99727d3c04fe72991d99df9bae38a0b2177fa31d5b6afee91f020103a381fc3081f9301d0603551d0e04160414485900563d272c46ae118605a47419ac09ca8c113081c90603551d230481c13081be8014485900563d272c46ae118605a47419ac09ca8c11a1819aa48197308194310b3009060355040613025553311330110603550408130a43616c69666f726e6961311630140603550407130d4d6f756e7461696e20566965773110300e060355040a1307416e64726f69643110300e060355040b1307416e64726f69643110300e06035504031307416e64726f69643122302006092a864886f70d0109011613616e64726f696440616e64726f69642e636f6d820900936eacbe07f201df300c0603551d13040530030101ff300d06092a864886f70d010105050003820101007aaf968ceb50c441055118d0daabaf015b8a765a27a715a2c2b44f221415ffdace03095abfa42df70708726c2069e5c36eddae0400be29452c084bc27eb6a17eac9dbe182c204eb15311f455d824b656dbe4dc2240912d7586fe88951d01a8feb5ae5a4260535df83431052422468c36e22c2a5ef994d61dd7306ae4c9f6951ba3c12f1d1914ddc61f1a62da2df827f603fea5603b2c540dbd7c019c36bab29a4271c117df523cdbc5f3817a49e0efa60cbd7f74177e7a4f193d43f4220772666e4c4d83e1bd5a86087cf34f2dec21e245ca6c2bb016e683638050d2c430eea7c26a1c49d3760a58ab7f1a82cc938b4831384324bd0401fa12163a50570e684d";
+ private static final String SIGNATURE_2 = "308204c5308203ada003020102020900d7cb412f75f4887e300d06092a864886f70d010105050030819d310b3009060355040613025553311330110603550408130a43616c69666f726e69613111300f0603550407130853616e204a6f736531233021060355040a131a41646f62652053797374656d7320496e636f72706f7261746564311c301a060355040b1313496e666f726d6174696f6e2053797374656d73312330210603550403131a41646f62652053797374656d7320496e636f72706f7261746564301e170d3039313030313030323331345a170d3337303231363030323331345a30819d310b3009060355040613025553311330110603550408130a43616c69666f726e69613111300f0603550407130853616e204a6f736531233021060355040a131a41646f62652053797374656d7320496e636f72706f7261746564311c301a060355040b1313496e666f726d6174696f6e2053797374656d73312330210603550403131a41646f62652053797374656d7320496e636f72706f726174656430820120300d06092a864886f70d01010105000382010d0030820108028201010099724f3e05bbd78843794f357776e04b340e13cb1c9ccb3044865180d7d8fec8166c5bbd876da8b80aa71eb6ba3d4d3455c9a8de162d24a25c4c1cd04c9523affd06a279fc8f0d018f242486bdbb2dbfbf6fcb21ed567879091928b876f7ccebc7bccef157366ebe74e33ae1d7e9373091adab8327482154afc0693a549522f8c796dd84d16e24bb221f5dbb809ca56dd2b6e799c5fa06b6d9c5c09ada54ea4c5db1523a9794ed22a3889e5e05b29f8ee0a8d61efe07ae28f65dece2ff7edc5b1416d7c7aad7f0d35e8f4a4b964dbf50ae9aa6d620157770d974131b3e7e3abd6d163d65758e2f0822db9c88598b9db6263d963d13942c91fc5efe34fc1e06e3020103a382010630820102301d0603551d0e041604145af418e419a639e1657db960996364a37ef20d403081d20603551d230481ca3081c780145af418e419a639e1657db960996364a37ef20d40a181a3a481a030819d310b3009060355040613025553311330110603550408130a43616c69666f726e69613111300f0603550407130853616e204a6f736531233021060355040a131a41646f62652053797374656d7320496e636f72706f7261746564311c301a060355040b1313496e666f726d6174696f6e2053797374656d73312330210603550403131a41646f62652053797374656d7320496e636f72706f7261746564820900d7cb412f75f4887e300c0603551d13040530030101ff300d06092a864886f70d0101050500038201010076c2a11fe303359689c2ebc7b2c398eff8c3f9ad545cdbac75df63bf7b5395b6988d1842d6aa1556d595b5692e08224d667a4c9c438f05e74906c53dd8016dde7004068866f01846365efd146e9bfaa48c9ecf657f87b97c757da11f225c4a24177bf2d7188e6cce2a70a1e8a841a14471eb51457398b8a0addd8b6c8c1538ca8f1e40b4d8b960009ea22c188d28924813d2c0b4a4d334b7cf05507e1fcf0a06fe946c7ffc435e173af6fc3e3400643710acc806f830a14788291d46f2feed9fb5c70423ca747ed1572d752894ac1f19f93989766308579393fabb43649aa8806a313b1ab9a50922a44c2467b9062037f2da0d484d9ffd8fe628eeea629ba637";
+
+ private static final Signature[] SIGNATURES = new Signature[] {
+ new Signature(SIGNATURE_1), new Signature(SIGNATURE_2)
+ };
+
private PluginManager(Context context) {
mContext = context;
mPackageInfoCache = new ArrayList<PackageInfo>();
@@ -148,9 +157,12 @@
}
boolean signatureMatch = false;
for (Signature signature : signatures) {
- // TODO: check signature against Google provided one
- signatureMatch = true;
- break;
+ for (int i = 0; i < SIGNATURES.length; i++) {
+ if (SIGNATURES[i].equals(signature)) {
+ signatureMatch = true;
+ break;
+ }
+ }
}
if (!signatureMatch) {
continue;
diff --git a/core/java/android/webkit/WebView.java b/core/java/android/webkit/WebView.java
index da04032..4bc1a0e 100644
--- a/core/java/android/webkit/WebView.java
+++ b/core/java/android/webkit/WebView.java
@@ -3871,11 +3871,25 @@
if (mSnapScrollMode == SNAP_X
|| mSnapScrollMode == SNAP_X_LOCK) {
- scrollBy(deltaX, 0);
+ if (deltaX == 0) {
+ // keep the scrollbar on the screen even there is no
+ // scroll
+ awakenScrollBars(ViewConfiguration
+ .getScrollDefaultDelay(), false);
+ } else {
+ scrollBy(deltaX, 0);
+ }
mLastTouchX = x;
} else if (mSnapScrollMode == SNAP_Y
|| mSnapScrollMode == SNAP_Y_LOCK) {
- scrollBy(0, deltaY);
+ if (deltaY == 0) {
+ // keep the scrollbar on the screen even there is no
+ // scroll
+ awakenScrollBars(ViewConfiguration
+ .getScrollDefaultDelay(), false);
+ } else {
+ scrollBy(0, deltaY);
+ }
mLastTouchY = y;
} else {
scrollBy(deltaX, deltaY);
@@ -3900,6 +3914,9 @@
}
if (done) {
+ // keep the scrollbar on the screen even there is no scroll
+ awakenScrollBars(ViewConfiguration.getScrollDefaultDelay(),
+ false);
// return false to indicate that we can't pan out of the
// view space
return false;
diff --git a/core/java/android/widget/QuickContactBadge.java b/core/java/android/widget/QuickContactBadge.java
index b550d69..8019f14 100644
--- a/core/java/android/widget/QuickContactBadge.java
+++ b/core/java/android/widget/QuickContactBadge.java
@@ -25,7 +25,7 @@
import android.graphics.drawable.Drawable;
import android.net.Uri;
import android.provider.ContactsContract.Contacts;
-import android.provider.ContactsContract.FastTrack;
+import android.provider.ContactsContract.QuickContact;
import android.provider.ContactsContract.Intents;
import android.provider.ContactsContract.PhoneLookup;
import android.provider.ContactsContract.RawContacts;
@@ -88,7 +88,7 @@
com.android.internal.R.styleable.QuickContactBadge, defStyle, 0);
mMode = a.getInt(com.android.internal.R.styleable.QuickContactBadge_quickContactWindowSize,
- FastTrack.MODE_MEDIUM);
+ QuickContact.MODE_MEDIUM);
a.recycle();
@@ -103,6 +103,15 @@
}
/**
+ * Set the QuickContact window mode. Options are {@link QuickContact#MODE_SMALL},
+ * {@link QuickContact#MODE_MEDIUM}, {@link QuickContact#MODE_LARGE}.
+ * @param size
+ */
+ public void setMode(int size) {
+ mMode = size;
+ }
+
+ /**
* Assign the contact uri that this QuickContactBadge should be associated
* with. Note that this is only used for displaying the QuickContact window and
* won't bind the contact's photo for you.
@@ -199,7 +208,7 @@
}
private void trigger(Uri lookupUri) {
- FastTrack.showFastTrack(getContext(), this, lookupUri, mMode, mExcludeMimes);
+ QuickContact.showQuickContact(getContext(), this, lookupUri, mMode, mExcludeMimes);
}
private class QueryHandler extends AsyncQueryHandler {
diff --git a/core/jni/android_bluetooth_HeadsetBase.cpp b/core/jni/android_bluetooth_HeadsetBase.cpp
index bb19e92..bad0186 100644
--- a/core/jni/android_bluetooth_HeadsetBase.cpp
+++ b/core/jni/android_bluetooth_HeadsetBase.cpp
@@ -260,7 +260,7 @@
#endif
}
-static jboolean connectAsyncNative(JNIEnv *env, jobject obj) {
+static jint connectAsyncNative(JNIEnv *env, jobject obj) {
LOGV(__FUNCTION__);
#ifdef HAVE_BLUETOOTH
struct sockaddr_rc addr;
@@ -268,7 +268,7 @@
if (nat->rfcomm_connected) {
LOGV("RFCOMM socket is already connected or connection is in progress.");
- return JNI_TRUE;
+ return 0;
}
if (nat->rfcomm_sock < 0) {
@@ -278,7 +278,7 @@
if (nat->rfcomm_sock < 0) {
LOGE("%s: Could not create RFCOMM socket: %s\n", __FUNCTION__,
strerror(errno));
- return JNI_FALSE;
+ return -1;
}
if (debug_no_encrypt()) {
@@ -291,7 +291,7 @@
sizeof(lm)) < 0) {
LOGE("%s: Can't set RFCOMM link mode", __FUNCTION__);
close(nat->rfcomm_sock);
- return JNI_FALSE;
+ return -1;
}
LOGI("Created RFCOMM socket fd %d.", nat->rfcomm_sock);
}
@@ -314,7 +314,7 @@
if (rc >= 0) {
nat->rfcomm_connected = 1;
LOGI("async connect successful");
- return JNI_TRUE;
+ return 0;
}
else if (rc < 0) {
if (errno == EINPROGRESS || errno == EAGAIN)
@@ -322,20 +322,20 @@
LOGI("async connect is in progress (%s)",
strerror(errno));
nat->rfcomm_connected = -1;
- return JNI_TRUE;
+ return 0;
}
else
{
LOGE("async connect error: %s (%d)", strerror(errno), errno);
close(nat->rfcomm_sock);
nat->rfcomm_sock = -1;
- return JNI_FALSE;
+ return -errno;
}
}
} // fcntl(nat->rfcomm_sock ...)
} // if (nat->rfcomm_sock_flags >= 0)
#endif
- return JNI_FALSE;
+ return -1;
}
static jint waitForAsyncConnectNative(JNIEnv *env, jobject obj,
@@ -357,9 +357,11 @@
close(nat->rfcomm_sock);
nat->rfcomm_sock = -1;
}
- if (JNI_FALSE == connectAsyncNative(env, obj)) {
+ int ret = connectAsyncNative(env, obj);
+
+ if (ret < 0) {
LOGI("Failed to re-open RFCOMM socket!");
- return -1;
+ return ret;
}
if (nat->rfcomm_sock >= 0) {
@@ -532,7 +534,7 @@
{"initializeNativeDataNative", "(I)V", (void *)initializeNativeDataNative},
{"cleanupNativeDataNative", "()V", (void *)cleanupNativeDataNative},
{"connectNative", "()Z", (void *)connectNative},
- {"connectAsyncNative", "()Z", (void *)connectAsyncNative},
+ {"connectAsyncNative", "()I", (void *)connectAsyncNative},
{"waitForAsyncConnectNative", "(I)I", (void *)waitForAsyncConnectNative},
{"disconnectNative", "()V", (void *)disconnectNative},
{"sendURCNative", "(Ljava/lang/String;)Z", (void *)sendURCNative},
diff --git a/core/res/res/drawable-hdpi/stat_notify_sdcard.png b/core/res/res/drawable-hdpi/stat_notify_sdcard.png
old mode 100755
new mode 100644
index 320d63d..d3b624b
--- a/core/res/res/drawable-hdpi/stat_notify_sdcard.png
+++ b/core/res/res/drawable-hdpi/stat_notify_sdcard.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/stat_notify_sdcard_prepare.png b/core/res/res/drawable-hdpi/stat_notify_sdcard_prepare.png
new file mode 100644
index 0000000..a483ba2
--- /dev/null
+++ b/core/res/res/drawable-hdpi/stat_notify_sdcard_prepare.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/stat_notify_sdcard_usb.png b/core/res/res/drawable-hdpi/stat_notify_sdcard_usb.png
old mode 100755
new mode 100644
index 1b49692..a5e369e2
--- a/core/res/res/drawable-hdpi/stat_notify_sdcard_usb.png
+++ b/core/res/res/drawable-hdpi/stat_notify_sdcard_usb.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/stat_notify_sdcard.png b/core/res/res/drawable-mdpi/stat_notify_sdcard.png
index feac3b7..23093ac 100644
--- a/core/res/res/drawable-mdpi/stat_notify_sdcard.png
+++ b/core/res/res/drawable-mdpi/stat_notify_sdcard.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/stat_notify_sdcard_prepare.png b/core/res/res/drawable-mdpi/stat_notify_sdcard_prepare.png
new file mode 100644
index 0000000..9abb1c9
--- /dev/null
+++ b/core/res/res/drawable-mdpi/stat_notify_sdcard_prepare.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/stat_notify_sdcard_usb.png b/core/res/res/drawable-mdpi/stat_notify_sdcard_usb.png
index 6de4043..9880694 100644
--- a/core/res/res/drawable-mdpi/stat_notify_sdcard_usb.png
+++ b/core/res/res/drawable-mdpi/stat_notify_sdcard_usb.png
Binary files differ
diff --git a/core/res/res/layout/contact_header.xml b/core/res/res/layout/contact_header.xml
index b2bc845..d551a26 100644
--- a/core/res/res/layout/contact_header.xml
+++ b/core/res/res/layout/contact_header.xml
@@ -23,10 +23,9 @@
android:paddingRight="5dip">
<android.widget.QuickContactBadge android:id="@+id/photo"
- android:layout_alignParentLeft="true"
android:layout_gravity="center_vertical"
- android:layout_marginRight="10dip"
- android:layout_marginLeft="10dip"
+ android:layout_marginRight="8dip"
+ android:layout_marginLeft="-1dip"
style="@*android:style/Widget.QuickContactBadge.WindowSmall" />
/>
@@ -60,7 +59,7 @@
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceSmall"
- android:maxLines="1"
+ android:singleLine="true"
android:ellipsize="end"
android:layout_marginTop="-4dip"
/>
diff --git a/core/res/res/layout/keyguard_screen_rotary_unlock.xml b/core/res/res/layout/keyguard_screen_rotary_unlock.xml
index 9f18124..59b69cd 100644
--- a/core/res/res/layout/keyguard_screen_rotary_unlock.xml
+++ b/core/res/res/layout/keyguard_screen_rotary_unlock.xml
@@ -30,7 +30,7 @@
<RelativeLayout
android:layout_width="fill_parent"
android:layout_height="fill_parent"
- android:background="#A0000000"
+ android:background="#70000000"
>
<TextView
@@ -135,4 +135,4 @@
</RelativeLayout>
-</FrameLayout>
\ No newline at end of file
+</FrameLayout>
diff --git a/core/res/res/layout/keyguard_screen_rotary_unlock_land.xml b/core/res/res/layout/keyguard_screen_rotary_unlock_land.xml
index 5fe1dde..c503455 100644
--- a/core/res/res/layout/keyguard_screen_rotary_unlock_land.xml
+++ b/core/res/res/layout/keyguard_screen_rotary_unlock_land.xml
@@ -30,7 +30,7 @@
android:orientation="horizontal"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
- android:background="#A0000000"
+ android:background="#70000000"
>
<!-- left side -->
diff --git a/core/res/res/layout/keyguard_screen_unlock_landscape.xml b/core/res/res/layout/keyguard_screen_unlock_landscape.xml
index 059e899..3e00ae8e1 100644
--- a/core/res/res/layout/keyguard_screen_unlock_landscape.xml
+++ b/core/res/res/layout/keyguard_screen_unlock_landscape.xml
@@ -26,7 +26,7 @@
android:orientation="horizontal"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
- android:background="#A0000000"
+ android:background="#70000000"
>
<!-- left side: instructions and emergency call button -->
diff --git a/core/res/res/layout/keyguard_screen_unlock_portrait.xml b/core/res/res/layout/keyguard_screen_unlock_portrait.xml
index f3c7559..0525356 100644
--- a/core/res/res/layout/keyguard_screen_unlock_portrait.xml
+++ b/core/res/res/layout/keyguard_screen_unlock_portrait.xml
@@ -26,7 +26,7 @@
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:gravity="center_horizontal"
- android:background="#A0000000"
+ android:background="#70000000"
>
<LinearLayout
diff --git a/core/res/res/values/colors.xml b/core/res/res/values/colors.xml
index f570e93..5d3069b 100644
--- a/core/res/res/values/colors.xml
+++ b/core/res/res/values/colors.xml
@@ -19,7 +19,7 @@
-->
<resources>
<drawable name="screen_background_light">#ffffffff</drawable>
- <drawable name="screen_background_dark">#ff1a1a1a</drawable>
+ <drawable name="screen_background_dark">#ff000000</drawable>
<drawable name="status_bar_closed_default_background">#ff000000</drawable>
<drawable name="status_bar_opened_default_background">#ff000000</drawable>
<drawable name="search_bar_default_color">#ff000000</drawable>
@@ -36,7 +36,7 @@
<color name="white">#ffffffff</color>
<color name="black">#ff000000</color>
<color name="transparent">#00000000</color>
- <color name="background_dark">#ff1a1a1a</color>
+ <color name="background_dark">#ff000000</color>
<color name="bright_foreground_dark">#ffffffff</color>
<color name="bright_foreground_dark_disabled">#80ffffff</color>
<color name="bright_foreground_dark_inverse">#ff000000</color>
diff --git a/core/res/res/values/public.xml b/core/res/res/values/public.xml
index 8807665..52e32002 100644
--- a/core/res/res/values/public.xml
+++ b/core/res/res/values/public.xml
@@ -1193,4 +1193,5 @@
can be seen. -->
<public type="drawable" name="screen_background_dark_transparent" />
<public type="drawable" name="screen_background_light_transparent" />
+ <public type="drawable" name="stat_notify_sdcard_prepare" />
</resources>
diff --git a/core/res/res/values/strings.xml b/core/res/res/values/strings.xml
index 7191a46..7760db1 100644
--- a/core/res/res/values/strings.xml
+++ b/core/res/res/values/strings.xml
@@ -1243,6 +1243,13 @@
<!-- MMS phone number type -->
<string name="phoneTypeMms">MMS</string>
+ <!-- Label for a birthday event -->
+ <string name="eventTypeBirthday">Birthday</string>
+ <!-- Label for an anniversary event -->
+ <string name="eventTypeAnniversary">Anniversary</string>
+ <!-- Label for other events -->
+ <string name="eventTypeOther">Event</string>
+
<!-- Custom email type -->
<string name="emailTypeCustom">Custom</string>
<!-- Home email type -->
@@ -1299,7 +1306,7 @@
<string name="orgTypeOther">Other</string>
<!-- Custom organization type -->
<string name="orgTypeCustom">Custom</string>
-
+
<!-- Attbution of a contact status update, when the time of update is unknown -->
<string name="contact_status_update_attribution">Via <xliff:g id="source" example="Google Talk">%1$s</xliff:g></string>
diff --git a/libs/rs/rsMatrix.cpp b/libs/rs/rsMatrix.cpp
index 5f68197..2f21405 100644
--- a/libs/rs/rsMatrix.cpp
+++ b/libs/rs/rsMatrix.cpp
@@ -85,7 +85,7 @@
const float zx = z * x;
const float xs = x * s;
const float ys = y * s;
- const float zs = z * s;
+ const float zs = z * s;
m[ 0] = x*x*nc + c;
m[ 4] = xy*nc - zs;
m[ 8] = zx*nc + ys;
@@ -156,4 +156,9 @@
m[15]= 0;
}
-
+void Matrix::vectorMultiply(float *out, const float *in) const {
+ out[0] = (m[0] * in[0]) + (m[4] * in[1]) + (m[8] * in[2]) + m[12];
+ out[1] = (m[1] * in[0]) + (m[5] * in[1]) + (m[9] * in[2]) + m[13];
+ out[2] = (m[2] * in[0]) + (m[6] * in[1]) + (m[10] * in[2]) + m[14];
+ out[3] = (m[3] * in[0]) + (m[7] * in[1]) + (m[11] * in[2]) + m[15];
+}
diff --git a/libs/rs/rsMatrix.h b/libs/rs/rsMatrix.h
index 7dc4165..11ce42e 100644
--- a/libs/rs/rsMatrix.h
+++ b/libs/rs/rsMatrix.h
@@ -23,7 +23,7 @@
namespace android {
namespace renderscript {
-struct Matrix
+struct Matrix
{
float m[16];
@@ -47,6 +47,8 @@
void loadOrtho(float l, float r, float b, float t, float n, float f);
void loadFrustum(float l, float r, float b, float t, float n, float f);
+ void vectorMultiply(float *v4out, const float *v3in) const;
+
void multiply(const Matrix *rhs) {
Matrix tmp;
tmp.loadMultiply(this, rhs);
@@ -71,7 +73,7 @@
};
-
+
}
diff --git a/libs/rs/rsProgramVertex.cpp b/libs/rs/rsProgramVertex.cpp
index 9bfa602..eea8b3b 100644
--- a/libs/rs/rsProgramVertex.cpp
+++ b/libs/rs/rsProgramVertex.cpp
@@ -121,7 +121,14 @@
mDirty = true;
}
-
+void ProgramVertex::transformToScreen(const Context *rsc, float *v4out, const float *v3in) const
+{
+ float *f = static_cast<float *>(mConstants->getPtr());
+ Matrix mvp;
+ mvp.loadMultiply((Matrix *)&f[RS_PROGRAM_VERTEX_MODELVIEW_OFFSET],
+ (Matrix *)&f[RS_PROGRAM_VERTEX_PROJECTION_OFFSET]);
+ mvp.vectorMultiply(v4out, v3in);
+}
ProgramVertexState::ProgramVertexState()
{
diff --git a/libs/rs/rsProgramVertex.h b/libs/rs/rsProgramVertex.h
index e198f23..493668c 100644
--- a/libs/rs/rsProgramVertex.h
+++ b/libs/rs/rsProgramVertex.h
@@ -43,6 +43,9 @@
void setModelviewMatrix(const rsc_Matrix *) const;
void setTextureMatrix(const rsc_Matrix *) const;
+ void transformToScreen(const Context *, float *v4out, const float *v3in) const;
+
+
protected:
uint32_t mLightCount;
ObjectBaseRef<const Light> mLights[MAX_LIGHTS];
diff --git a/libs/rs/rsScriptC_Lib.cpp b/libs/rs/rsScriptC_Lib.cpp
index 8919465..17d14f5 100644
--- a/libs/rs/rsScriptC_Lib.cpp
+++ b/libs/rs/rsScriptC_Lib.cpp
@@ -22,6 +22,8 @@
#include "acc/acc.h"
#include "utils/Timers.h"
+#define GL_GLEXT_PROTOTYPES
+
#include <GLES/gl.h>
#include <GLES/glext.h>
@@ -744,6 +746,48 @@
x4, y4, z4, 0, 0);
}
+static void SC_drawSpriteScreenspace(float x, float y, float z, float w, float h)
+{
+ GET_TLS();
+ rsc->setupCheck();
+
+ GLint crop[4] = {0, h, w, -h};
+ glTexParameteriv(GL_TEXTURE_2D, GL_TEXTURE_CROP_RECT_OES, crop);
+ glDrawTexfOES(x, y, z, w, h);
+}
+
+static void SC_drawSprite(float x, float y, float z, float w, float h)
+{
+ GET_TLS();
+ rsc->setupCheck();
+
+ float vin[3] = {x, y, z};
+ float vout[4];
+
+ //LOGE("ds in %f %f %f", x, y, z);
+ rsc->getVertex()->transformToScreen(rsc, vout, vin);
+ //LOGE("ds out %f %f %f %f", vout[0], vout[1], vout[2], vout[3]);
+ vout[0] /= vout[3];
+ vout[1] /= vout[3];
+ vout[2] /= vout[3];
+
+ vout[0] *= rsc->getWidth() / 2;
+ vout[1] *= rsc->getHeight() / 2;
+ vout[0] += rsc->getWidth() / 2;
+ vout[1] += rsc->getHeight() / 2;
+
+ vout[0] -= w/2;
+ vout[1] -= h/2;
+
+ //LOGE("ds out2 %f %f %f", vout[0], vout[1], vout[2]);
+
+ // U, V, W, H
+ GLint crop[4] = {0, h, w, -h};
+ glTexParameteriv(GL_TEXTURE_2D, GL_TEXTURE_CROP_RECT_OES, crop);
+ glDrawTexiOES(vout[0], vout[1], 0/*vout[2]*/, w, h);
+}
+
+
static void SC_drawRect(float x1, float y1,
float x2, float y2, float z)
{
@@ -1172,6 +1216,10 @@
"void", "(float x1, float y1, float z1, float x2, float y2, float z2, float x3, float y3, float z3, float x4, float y4, float z4)" },
{ "drawQuadTexCoords", (void *)&SC_drawQuadTexCoords,
"void", "(float x1, float y1, float z1, float u1, float v1, float x2, float y2, float z2, float u2, float v2, float x3, float y3, float z3, float u3, float v3, float x4, float y4, float z4, float u4, float v4)" },
+ { "drawSprite", (void *)&SC_drawSprite,
+ "void", "(float x, float y, float z, float w, float h)" },
+ { "drawSpriteScreenspace", (void *)&SC_drawSpriteScreenspace,
+ "void", "(float x, float y, float z, float w, float h)" },
{ "drawLine", (void *)&SC_drawLine,
"void", "(float x1, float y1, float z1, float x2, float y2, float z2)" },
{ "drawPoint", (void *)&SC_drawPoint,
diff --git a/libs/utils/BackupData.cpp b/libs/utils/BackupData.cpp
index 2535094..adb3174 100644
--- a/libs/utils/BackupData.cpp
+++ b/libs/utils/BackupData.cpp
@@ -107,7 +107,7 @@
} else {
k = key;
}
- if (true) {
+ if (false) {
LOGD("Writing entity: prefix='%s' key='%s' dataSize=%d", m_keyPrefix.string(), key.string(),
dataSize);
}
diff --git a/media/java/android/media/AudioService.java b/media/java/android/media/AudioService.java
index f4c4586..d90871e 100644
--- a/media/java/android/media/AudioService.java
+++ b/media/java/android/media/AudioService.java
@@ -178,12 +178,14 @@
if (mMediaServerOk) {
sendMsg(mAudioHandler, MSG_MEDIA_SERVER_DIED, SHARED_MSG, SENDMSG_NOOP, 0, 0,
null, 1500);
+ mMediaServerOk = false;
}
break;
case AudioSystem.AUDIO_STATUS_OK:
if (!mMediaServerOk) {
sendMsg(mAudioHandler, MSG_MEDIA_SERVER_STARTED, SHARED_MSG, SENDMSG_NOOP, 0, 0,
null, 0);
+ mMediaServerOk = true;
}
break;
default:
@@ -1282,10 +1284,13 @@
break;
case MSG_MEDIA_SERVER_DIED:
- Log.e(TAG, "Media server died.");
// Force creation of new IAudioflinger interface
- mMediaServerOk = false;
- AudioSystem.isMusicActive();
+ if (!mMediaServerOk) {
+ Log.e(TAG, "Media server died.");
+ AudioSystem.isMusicActive();
+ sendMsg(mAudioHandler, MSG_MEDIA_SERVER_DIED, SHARED_MSG, SENDMSG_NOOP, 0, 0,
+ null, 500);
+ }
break;
case MSG_MEDIA_SERVER_STARTED:
@@ -1323,8 +1328,6 @@
// Restore ringer mode
setRingerModeInt(getRingerMode(), false);
-
- mMediaServerOk = true;
break;
case MSG_PLAY_SOUND_EFFECT:
diff --git a/packages/SettingsProvider/src/com/android/providers/settings/SettingsBackupAgent.java b/packages/SettingsProvider/src/com/android/providers/settings/SettingsBackupAgent.java
index fb5e4e6..2738efbd 100644
--- a/packages/SettingsProvider/src/com/android/providers/settings/SettingsBackupAgent.java
+++ b/packages/SettingsProvider/src/com/android/providers/settings/SettingsBackupAgent.java
@@ -50,8 +50,7 @@
* List of settings that are backed up are stored in the Settings.java file
*/
public class SettingsBackupAgent extends BackupHelperAgent {
- // STOPSHIP: set DEBUG to false
- private static final boolean DEBUG = true;
+ private static final boolean DEBUG = false;
private static final String KEY_SYSTEM = "system";
private static final String KEY_SECURE = "secure";
diff --git a/services/java/com/android/server/BackupManagerService.java b/services/java/com/android/server/BackupManagerService.java
index e722eb1..82a7c1c 100644
--- a/services/java/com/android/server/BackupManagerService.java
+++ b/services/java/com/android/server/BackupManagerService.java
@@ -79,7 +79,7 @@
class BackupManagerService extends IBackupManager.Stub {
private static final String TAG = "BackupManagerService";
- private static final boolean DEBUG = true;
+ private static final boolean DEBUG = false;
// How often we perform a backup pass. Privileged external callers can
// trigger an immediate pass.
@@ -1648,13 +1648,13 @@
stateFile.delete();
// Tell the transport to remove all the persistent storage for the app
- // STOPSHIP TODO - need to handle failures
+ // TODO - need to handle failures
mTransport.clearBackupData(mPackage);
} catch (RemoteException e) {
// can't happen; the transport is local
} finally {
try {
- // STOPSHIP TODO - need to handle failures
+ // TODO - need to handle failures
mTransport.finishBackup();
} catch (RemoteException e) {
// can't happen; the transport is local
diff --git a/services/java/com/android/server/ConnectivityService.java b/services/java/com/android/server/ConnectivityService.java
index 63845e9..798bcd2 100644
--- a/services/java/com/android/server/ConnectivityService.java
+++ b/services/java/com/android/server/ConnectivityService.java
@@ -439,6 +439,13 @@
return tracker != null && tracker.setRadio(turnOn);
}
+ /**
+ * Used to notice when the calling process dies so we can self-expire
+ *
+ * Also used to know if the process has cleaned up after itself when
+ * our auto-expire timer goes off. The timer has a link to an object.
+ *
+ */
private class FeatureUser implements IBinder.DeathRecipient {
int mNetworkType;
String mFeature;
@@ -453,6 +460,7 @@
mBinder = binder;
mPid = getCallingPid();
mUid = getCallingUid();
+
try {
mBinder.linkToDeath(this, 0);
} catch (RemoteException e) {
@@ -467,11 +475,17 @@
public void binderDied() {
Log.d(TAG, "ConnectivityService FeatureUser binderDied(" +
mNetworkType + ", " + mFeature + ", " + mBinder);
- stopUsingNetworkFeature(mNetworkType, mFeature, mPid, mUid);
+ stopUsingNetworkFeature(this, false);
}
+ public void expire() {
+ Log.d(TAG, "ConnectivityService FeatureUser expire(" +
+ mNetworkType + ", " + mFeature + ", " + mBinder);
+ stopUsingNetworkFeature(this, false);
+ }
}
+ // javadoc from interface
public int startUsingNetworkFeature(int networkType, String feature,
IBinder binder) {
if (DBG) {
@@ -483,9 +497,7 @@
return Phone.APN_REQUEST_FAILED;
}
- synchronized (mFeatureUsers) {
- mFeatureUsers.add(new FeatureUser(networkType, feature, binder));
- }
+ FeatureUser f = new FeatureUser(networkType, feature, binder);
// TODO - move this into the MobileDataStateTracker
int usedNetworkType = networkType;
@@ -513,10 +525,17 @@
return Phone.APN_TYPE_NOT_AVAILABLE;
}
- if (!mNetRequestersPids[usedNetworkType].contains(currentPid)) {
- // this gets used for per-pid dns when connected
- mNetRequestersPids[usedNetworkType].add(currentPid);
+ synchronized(this) {
+ mFeatureUsers.add(f);
+ if (!mNetRequestersPids[usedNetworkType].contains(currentPid)) {
+ // this gets used for per-pid dns when connected
+ mNetRequestersPids[usedNetworkType].add(currentPid);
+ }
}
+ mHandler.sendMessageDelayed(mHandler.obtainMessage(
+ NetworkStateTracker.EVENT_RESTORE_DEFAULT_NETWORK,
+ f), getRestoreDefaultNetworkDelay());
+
if ((ni.isConnectedOrConnecting() == true) &&
!network.isTeardownRequested()) {
@@ -533,22 +552,17 @@
// check if the radio in play can make another contact
// assume if cannot for now
- // since we have to drop the default on this radio, setup
- // an automatic event to switch back
- if(mHandler.hasMessages(NetworkStateTracker.
- EVENT_RESTORE_DEFAULT_NETWORK, radio) ||
- radio.getNetworkInfo().isConnectedOrConnecting()) {
- mHandler.removeMessages(NetworkStateTracker.
- EVENT_RESTORE_DEFAULT_NETWORK,
- radio);
- mHandler.sendMessageDelayed(mHandler.obtainMessage(
- NetworkStateTracker.EVENT_RESTORE_DEFAULT_NETWORK,
- radio), getRestoreDefaultNetworkDelay());
- }
if (DBG) Log.d(TAG, "reconnecting to special network");
network.reconnect();
return Phone.APN_REQUEST_STARTED;
} else {
+ synchronized(this) {
+ mFeatureUsers.add(f);
+ }
+ mHandler.sendMessageDelayed(mHandler.obtainMessage(
+ NetworkStateTracker.EVENT_RESTORE_DEFAULT_NETWORK,
+ f), getRestoreDefaultNetworkDelay());
+
return network.startUsingNetworkFeature(feature,
getCallingPid(), getCallingUid());
}
@@ -556,13 +570,43 @@
return Phone.APN_TYPE_NOT_AVAILABLE;
}
+ // javadoc from interface
public int stopUsingNetworkFeature(int networkType, String feature) {
- return stopUsingNetworkFeature(networkType, feature, getCallingPid(),
- getCallingUid());
+ int pid = getCallingPid();
+ int uid = getCallingUid();
+
+ FeatureUser u = null;
+ boolean found = false;
+
+ synchronized(this) {
+ for (int i = 0; i < mFeatureUsers.size() ; i++) {
+ u = (FeatureUser)mFeatureUsers.get(i);
+ if (uid == u.mUid && pid == u.mPid &&
+ networkType == u.mNetworkType &&
+ TextUtils.equals(feature, u.mFeature)) {
+ found = true;
+ break;
+ }
+ }
+ }
+ if (found && u != null) {
+ // stop regardless of how many other time this proc had called start
+ return stopUsingNetworkFeature(u, true);
+ } else {
+ // none found!
+ return 1;
+ }
}
- private int stopUsingNetworkFeature(int networkType, String feature,
- int pid, int uid) {
+ private int stopUsingNetworkFeature(FeatureUser u, boolean ignoreDups) {
+ int networkType = u.mNetworkType;
+ String feature = u.mFeature;
+ int pid = u.mPid;
+ int uid = u.mUid;
+
+ NetworkStateTracker tracker = null;
+ boolean callTeardown = false; // used to carry our decision outside of sync block
+
if (DBG) {
Log.d(TAG, "stopUsingNetworkFeature for net " + networkType +
": " + feature);
@@ -572,55 +616,65 @@
return -1;
}
- synchronized (mFeatureUsers) {
- for (int i=0; i < mFeatureUsers.size(); i++) {
- FeatureUser u = (FeatureUser)mFeatureUsers.get(i);
- if (uid == u.mUid && pid == u.mPid &&
- networkType == u.mNetworkType &&
- TextUtils.equals(feature, u.mFeature)) {
- u.unlinkDeathRecipient();
- mFeatureUsers.remove(i);
- break;
- }
- }
- }
-
- // TODO - move to MobileDataStateTracker
- int usedNetworkType = networkType;
- if (networkType == ConnectivityManager.TYPE_MOBILE) {
- if (TextUtils.equals(feature, Phone.FEATURE_ENABLE_MMS)) {
- usedNetworkType = ConnectivityManager.TYPE_MOBILE_MMS;
- } else if (TextUtils.equals(feature, Phone.FEATURE_ENABLE_SUPL)) {
- usedNetworkType = ConnectivityManager.TYPE_MOBILE_SUPL;
- } else if (TextUtils.equals(feature, Phone.FEATURE_ENABLE_DUN)) {
- usedNetworkType = ConnectivityManager.TYPE_MOBILE_DUN;
- } else if (TextUtils.equals(feature, Phone.FEATURE_ENABLE_HIPRI)) {
- usedNetworkType = ConnectivityManager.TYPE_MOBILE_HIPRI;
- }
- }
- NetworkStateTracker tracker = mNetTrackers[usedNetworkType];
- if(usedNetworkType != networkType) {
- Integer currentPid = new Integer(pid);
- if (mNetRequestersPids[usedNetworkType].remove(currentPid)) {
- reassessPidDns(pid, true);
- }
- if (mNetRequestersPids[usedNetworkType].size() != 0) {
- if (DBG) Log.d(TAG, "not tearing down special network - " +
- "others still using it");
+ // need to link the mFeatureUsers list with the mNetRequestersPids state in this
+ // sync block
+ synchronized(this) {
+ // check if this process still has an outstanding start request
+ if (!mFeatureUsers.contains(u)) {
return 1;
}
-
- tracker.teardown();
- NetworkStateTracker radio = mNetTrackers[networkType];
- // Check if we want to revert to the default
- if (mHandler.hasMessages(NetworkStateTracker.
- EVENT_RESTORE_DEFAULT_NETWORK, radio)) {
- mHandler.removeMessages(NetworkStateTracker.
- EVENT_RESTORE_DEFAULT_NETWORK, radio);
- radio.reconnect();
+ u.unlinkDeathRecipient();
+ mFeatureUsers.remove(mFeatureUsers.indexOf(u));
+ // If we care about duplicate requests, check for that here.
+ //
+ // This is done to support the extension of a request - the app
+ // can request we start the network feature again and renew the
+ // auto-shutoff delay. Normal "stop" calls from the app though
+ // do not pay attention to duplicate requests - in effect the
+ // API does not refcount and a single stop will counter multiple starts.
+ if (ignoreDups == false) {
+ for (int i = 0; i < mFeatureUsers.size() ; i++) {
+ FeatureUser x = (FeatureUser)mFeatureUsers.get(i);
+ if (x.mUid == u.mUid && x.mPid == u.mPid &&
+ x.mNetworkType == u.mNetworkType &&
+ TextUtils.equals(x.mFeature, u.mFeature)) {
+ return 1;
+ }
+ }
}
+
+ // TODO - move to MobileDataStateTracker
+ int usedNetworkType = networkType;
+ if (networkType == ConnectivityManager.TYPE_MOBILE) {
+ if (TextUtils.equals(feature, Phone.FEATURE_ENABLE_MMS)) {
+ usedNetworkType = ConnectivityManager.TYPE_MOBILE_MMS;
+ } else if (TextUtils.equals(feature, Phone.FEATURE_ENABLE_SUPL)) {
+ usedNetworkType = ConnectivityManager.TYPE_MOBILE_SUPL;
+ } else if (TextUtils.equals(feature, Phone.FEATURE_ENABLE_DUN)) {
+ usedNetworkType = ConnectivityManager.TYPE_MOBILE_DUN;
+ } else if (TextUtils.equals(feature, Phone.FEATURE_ENABLE_HIPRI)) {
+ usedNetworkType = ConnectivityManager.TYPE_MOBILE_HIPRI;
+ }
+ }
+ tracker = mNetTrackers[usedNetworkType];
+ if(usedNetworkType != networkType) {
+ Integer currentPid = new Integer(pid);
+ reassessPidDns(pid, true);
+ mNetRequestersPids[usedNetworkType].remove(currentPid);
+ if (mNetRequestersPids[usedNetworkType].size() != 0) {
+ if (DBG) Log.d(TAG, "not tearing down special network - " +
+ "others still using it");
+ return 1;
+ }
+ callTeardown = true;
+ }
+ }
+
+ if (callTeardown) {
+ tracker.teardown();
return 1;
} else {
+ // do it the old fashioned way
return tracker.stopUsingNetworkFeature(feature, pid, uid);
}
}
@@ -1231,17 +1285,8 @@
// fill me in
break;
case NetworkStateTracker.EVENT_RESTORE_DEFAULT_NETWORK:
- for (NetworkStateTracker net : mNetTrackers) {
- NetworkInfo i = net.getNetworkInfo();
- if (i.isConnected() &&
- !mNetAttributes[i.getType()].isDefault()) {
- if (DBG) {
- Log.d(TAG, "tearing down " + i +
- " to restore the default network");
- }
- teardown(net);
- }
- }
+ FeatureUser u = (FeatureUser)msg.obj;
+ u.expire();
break;
}
}
diff --git a/services/java/com/android/server/MountService.java b/services/java/com/android/server/MountService.java
index f85d931..204389e 100644
--- a/services/java/com/android/server/MountService.java
+++ b/services/java/com/android/server/MountService.java
@@ -313,7 +313,7 @@
setMediaStorageNotification(
com.android.internal.R.string.ext_media_safe_unmount_notification_title,
com.android.internal.R.string.ext_media_safe_unmount_notification_message,
- com.android.internal.R.drawable.stat_notify_sim_toolkit,
+ com.android.internal.R.drawable.stat_notify_sdcard,
true, true, null);
mShowSafeUnmountNotificationWhenUnmounted = false;
} else {
@@ -333,7 +333,7 @@
setMediaStorageNotification(
com.android.internal.R.string.ext_media_checking_notification_title,
com.android.internal.R.string.ext_media_checking_notification_message,
- com.android.internal.R.drawable.stat_notify_sim_toolkit,
+ com.android.internal.R.drawable.stat_notify_sdcard_prepare,
true, false, null);
updateUsbMassStorageNotification(true, false);
diff --git a/services/java/com/android/server/am/ActivityManagerService.java b/services/java/com/android/server/am/ActivityManagerService.java
index a7deed6..c62444d 100644
--- a/services/java/com/android/server/am/ActivityManagerService.java
+++ b/services/java/com/android/server/am/ActivityManagerService.java
@@ -140,7 +140,7 @@
static final boolean DEBUG_PROVIDER = localLOGV || false;
static final boolean DEBUG_USER_LEAVING = localLOGV || false;
static final boolean DEBUG_RESULTS = localLOGV || false;
- static final boolean DEBUG_BACKUP = localLOGV || true;
+ static final boolean DEBUG_BACKUP = localLOGV || false;
static final boolean DEBUG_CONFIGURATION = localLOGV || false;
static final boolean VALIDATE_TOKENS = false;
static final boolean SHOW_ACTIVITY_START_TIME = true;
@@ -11374,8 +11374,7 @@
try {
proc.thread.scheduleCreateBackupAgent(app, backupMode);
} catch (RemoteException e) {
- // !!! TODO: notify the backup manager that we crashed, or rely on
- // death notices, or...?
+ // Will time out on the backup manager side
}
} else {
if (DEBUG_BACKUP) Log.v(TAG, "Agent proc not running, waiting for attach");
diff --git a/telephony/java/com/android/internal/telephony/DataConnectionTracker.java b/telephony/java/com/android/internal/telephony/DataConnectionTracker.java
index 1f0e5a5..52c8b1f 100644
--- a/telephony/java/com/android/internal/telephony/DataConnectionTracker.java
+++ b/telephony/java/com/android/internal/telephony/DataConnectionTracker.java
@@ -100,6 +100,7 @@
public static final int EVENT_CLEAN_UP_CONNECTION = 34;
protected static final int EVENT_CDMA_OTA_PROVISION = 35;
protected static final int EVENT_RESTART_RADIO = 36;
+ protected static final int EVENT_SET_MASTER_DATA_ENABLE = 37;
/***** Constants *****/
@@ -111,8 +112,11 @@
protected static final int APN_HIPRI_ID = 4;
protected static final int APN_NUM_TYPES = 5;
- protected static final int APN_DISABLED = 0;
- protected static final int APN_ENABLED = 1;
+ protected static final int DISABLED = 0;
+ protected static final int ENABLED = 1;
+
+ // responds to the setDataEnabled call - used independently from the APN requests
+ protected boolean mMasterDataEnabled = true;
protected boolean[] dataEnabled = new boolean[APN_NUM_TYPES];
protected int enabledCount = 0;
@@ -322,6 +326,11 @@
onCleanUpConnection(tearDown, (String)msg.obj);
break;
+ case EVENT_SET_MASTER_DATA_ENABLE:
+ boolean enabled = (msg.arg1 == ENABLED) ? true : false;
+ onSetDataEnabled(enabled);
+ break;
+
default:
Log.e("DATA", "Unidentified event = " + msg.what);
break;
@@ -486,7 +495,7 @@
Message msg = obtainMessage(EVENT_ENABLE_NEW_APN);
msg.arg1 = id;
- msg.arg2 = (enable ? APN_ENABLED : APN_DISABLED);
+ msg.arg2 = (enable ? ENABLED : DISABLED);
sendMessage(msg);
}
@@ -497,7 +506,7 @@
", enabledCount = " + enabledCount +
", isApnTypeActive = " + isApnTypeActive(apnIdToType(apnId)));
}
- if (enabled == APN_ENABLED) {
+ if (enabled == ENABLED) {
if (!dataEnabled[apnId]) {
dataEnabled[apnId] = true;
enabledCount++;
@@ -545,8 +554,24 @@
*/
public boolean setDataEnabled(boolean enable) {
if (DBG) Log.d(LOG_TAG, "setDataEnabled(" + enable + ")");
- setEnabled(APN_DEFAULT_ID, enable);
+
+ Message msg = obtainMessage(EVENT_SET_MASTER_DATA_ENABLE);
+ msg.arg1 = (enable ? ENABLED : DISABLED);
+ sendMessage(msg);
return true;
}
+ protected void onSetDataEnabled(boolean enable) {
+ if (mMasterDataEnabled != enable) {
+ mMasterDataEnabled = enable;
+ if (enable) {
+ mRetryMgr.resetRetryCount();
+ onTrySetupData(Phone.REASON_DATA_ENABLED);
+ } else {
+ onCleanUpConnection(true, Phone.REASON_DATA_DISABLED);
+ }
+ }
+ }
+
+
}
diff --git a/telephony/java/com/android/internal/telephony/cdma/CdmaCallTracker.java b/telephony/java/com/android/internal/telephony/cdma/CdmaCallTracker.java
index 9fe2038..1005d20 100644
--- a/telephony/java/com/android/internal/telephony/cdma/CdmaCallTracker.java
+++ b/telephony/java/com/android/internal/telephony/cdma/CdmaCallTracker.java
@@ -1039,8 +1039,8 @@
private void disableDataCallInEmergencyCall(String dialString) {
if (PhoneNumberUtils.isEmergencyNumber(dialString)) {
if (Phone.DEBUG_PHONE) log("disableDataCallInEmergencyCall");
- phone.disableDataConnectivity();
mIsInEmergencyCall = true;
+ phone.disableDataConnectivity();
}
}
@@ -1050,15 +1050,16 @@
*/
private void checkAndEnableDataCallAfterEmergencyCallDropped() {
if (mIsInEmergencyCall) {
+ mIsInEmergencyCall = false;
String inEcm=SystemProperties.get(TelephonyProperties.PROPERTY_INECM_MODE, "false");
if (Phone.DEBUG_PHONE) {
log("checkAndEnableDataCallAfterEmergencyCallDropped,inEcm=" + inEcm);
}
if (inEcm.compareTo("false") == 0) {
// Re-initiate data connection
+ // TODO - can this be changed to phone.enableDataConnectivity();
phone.mDataConnection.setDataEnabled(true);
}
- mIsInEmergencyCall = false;
}
}
diff --git a/telephony/java/com/android/internal/telephony/cdma/CdmaDataConnectionTracker.java b/telephony/java/com/android/internal/telephony/cdma/CdmaDataConnectionTracker.java
index d0a9337..c695dd7 100644
--- a/telephony/java/com/android/internal/telephony/cdma/CdmaDataConnectionTracker.java
+++ b/telephony/java/com/android/internal/telephony/cdma/CdmaDataConnectionTracker.java
@@ -302,7 +302,7 @@
private boolean isDataAllowed() {
boolean roaming = phone.getServiceState().getRoaming();
- return getAnyDataEnabled() && (!roaming || getDataOnRoamingEnabled());
+ return getAnyDataEnabled() && (!roaming || getDataOnRoamingEnabled()) && mMasterDataEnabled;
}
private boolean trySetupData(String reason) {
@@ -347,7 +347,8 @@
" roaming=" + roaming +
" dataOnRoamingEnable=" + getDataOnRoamingEnabled() +
" desiredPowerState=" + desiredPowerState +
- " PendingRestartRadio=" + mPendingRestartRadio);
+ " PendingRestartRadio=" + mPendingRestartRadio +
+ " MasterDataEnabled=" + mMasterDataEnabled);
}
return false;
}
diff --git a/telephony/java/com/android/internal/telephony/gsm/GsmDataConnectionTracker.java b/telephony/java/com/android/internal/telephony/gsm/GsmDataConnectionTracker.java
index 5bdf09f..ffd6dd3 100644
--- a/telephony/java/com/android/internal/telephony/gsm/GsmDataConnectionTracker.java
+++ b/telephony/java/com/android/internal/telephony/gsm/GsmDataConnectionTracker.java
@@ -391,7 +391,8 @@
private boolean isDataAllowed() {
boolean roaming = phone.getServiceState().getRoaming();
- return getAnyDataEnabled() && (!roaming || getDataOnRoamingEnabled());
+ return getAnyDataEnabled() && (!roaming || getDataOnRoamingEnabled()) &&
+ mMasterDataEnabled;
}
//****** Called from ServiceStateTracker
@@ -475,7 +476,8 @@
" roaming=" + phone.getServiceState().getRoaming() +
" dataOnRoamingEnable=" + getDataOnRoamingEnabled() +
" ps restricted=" + mIsPsRestricted +
- " desiredPowerState=" + desiredPowerState);
+ " desiredPowerState=" + desiredPowerState +
+ " MasterDataEnabled=" + mMasterDataEnabled);
return false;
}
}
@@ -1039,7 +1041,7 @@
if (!mRequestedApnType.equals(Phone.APN_TYPE_DEFAULT)) {
// if no more retries on a secondary APN attempt, tell the world and revert.
phone.notifyDataConnection(Phone.REASON_APN_FAILED);
- onEnableApn(apnTypeToId(mRequestedApnType), APN_DISABLED);
+ onEnableApn(apnTypeToId(mRequestedApnType), DISABLED);
return;
}
if (mReregisterOnReconnectFailure) {
@@ -1203,7 +1205,7 @@
notifyNoData(cause);
if (!mRequestedApnType.equals(Phone.APN_TYPE_DEFAULT)) {
phone.notifyDataConnection(Phone.REASON_APN_FAILED);
- onEnableApn(apnTypeToId(mRequestedApnType), APN_DISABLED);
+ onEnableApn(apnTypeToId(mRequestedApnType), DISABLED);
}
return;
}
diff --git a/wifi/java/android/net/wifi/WifiStateTracker.java b/wifi/java/android/net/wifi/WifiStateTracker.java
index 5638480..2c0d0f1 100644
--- a/wifi/java/android/net/wifi/WifiStateTracker.java
+++ b/wifi/java/android/net/wifi/WifiStateTracker.java
@@ -1237,9 +1237,9 @@
/*
* Reset connection depends on both the interface and the IP assigned,
* so it should be done before any chance of the IP being lost.
- */
+ */
NetworkUtils.resetConnections(mInterfaceName);
-
+
// Stop DHCP
if (mDhcpTarget != null) {
mDhcpTarget.setCancelCallback(true);
@@ -1248,11 +1248,10 @@
if (!NetworkUtils.stopDhcp(mInterfaceName)) {
Log.e(TAG, "Could not stop DHCP");
}
-
+
NetworkUtils.disableInterface(mInterfaceName);
- if (reenable) {
- NetworkUtils.enableInterface(mInterfaceName);
- }
+ // we no longer net to start the interface (driver does this for us)
+ // and it led to problems - removed.
}
/**