summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--core/java/android/accounts/AccountManagerService.java2
-rw-r--r--core/java/android/app/TimePickerDialog.java4
-rw-r--r--core/java/android/service/wallpaper/WallpaperService.java1
-rw-r--r--core/java/android/webkit/WebView.java4
-rw-r--r--core/java/android/webkit/WebViewCore.java8
-rwxr-xr-xmedia/jni/mediaeditor/VideoEditorMain.cpp12
-rw-r--r--telephony/java/android/telephony/CellLocation.java8
-rw-r--r--telephony/java/android/telephony/TelephonyManager.java26
8 files changed, 40 insertions, 25 deletions
diff --git a/core/java/android/accounts/AccountManagerService.java b/core/java/android/accounts/AccountManagerService.java
index fb166097573c..2e70a569c095 100644
--- a/core/java/android/accounts/AccountManagerService.java
+++ b/core/java/android/accounts/AccountManagerService.java
@@ -1781,7 +1781,7 @@ public class AccountManagerService
// will return a different value, but we *don't* erase the
// passwords. We only erase them if it has a different
// subscriber ID once it's provisioned.
- if (telephonyManager.getPhoneType() == TelephonyManager.PHONE_TYPE_CDMA) {
+ if (telephonyManager.getCurrentPhoneType() == TelephonyManager.PHONE_TYPE_CDMA) {
IBinder service = ServiceManager.checkService(Context.TELEPHONY_SERVICE);
if (service == null) {
Log.w(TAG, "call to checkService(TELEPHONY_SERVICE) failed");
diff --git a/core/java/android/app/TimePickerDialog.java b/core/java/android/app/TimePickerDialog.java
index f9920c77b8c4..a990ee98de51 100644
--- a/core/java/android/app/TimePickerDialog.java
+++ b/core/java/android/app/TimePickerDialog.java
@@ -107,9 +107,9 @@ public class TimePickerDialog extends AlertDialog
mTimePicker = (TimePicker) view.findViewById(R.id.timePicker);
// initialize state
+ mTimePicker.setIs24HourView(mIs24HourView);
mTimePicker.setCurrentHour(mInitialHourOfDay);
mTimePicker.setCurrentMinute(mInitialMinute);
- mTimePicker.setIs24HourView(mIs24HourView);
mTimePicker.setOnTimeChangedListener(this);
}
@@ -144,8 +144,8 @@ public class TimePickerDialog extends AlertDialog
super.onRestoreInstanceState(savedInstanceState);
int hour = savedInstanceState.getInt(HOUR);
int minute = savedInstanceState.getInt(MINUTE);
+ mTimePicker.setIs24HourView(savedInstanceState.getBoolean(IS_24_HOUR));
mTimePicker.setCurrentHour(hour);
mTimePicker.setCurrentMinute(minute);
- mTimePicker.setIs24HourView(savedInstanceState.getBoolean(IS_24_HOUR));
}
}
diff --git a/core/java/android/service/wallpaper/WallpaperService.java b/core/java/android/service/wallpaper/WallpaperService.java
index 7a6d86c20f7c..912a88d39759 100644
--- a/core/java/android/service/wallpaper/WallpaperService.java
+++ b/core/java/android/service/wallpaper/WallpaperService.java
@@ -214,6 +214,7 @@ public abstract class WallpaperService extends Service {
throw new UnsupportedOperationException(
"Wallpapers currently only support sizing from layout");
}
+ super.setFixedSize(width, height);
}
public void setKeepScreenOn(boolean screenOn) {
diff --git a/core/java/android/webkit/WebView.java b/core/java/android/webkit/WebView.java
index c84e314975ec..f91ae9f15736 100644
--- a/core/java/android/webkit/WebView.java
+++ b/core/java/android/webkit/WebView.java
@@ -8151,7 +8151,7 @@ public class WebView extends AbsoluteLayout
* @hide only used by the Browser
*/
public void setExpandedTileBounds(boolean enabled) {
- mWebViewCore.sendMessage(EventHub.SET_EXPANDED_TILE_BOUNDS, enabled ? 1 : 0, 0);
+ nativeSetExpandedTileBounds(enabled);
}
/**
@@ -8310,6 +8310,8 @@ public class WebView extends AbsoluteLayout
static final int NO_LEFTEDGE = -1;
native int nativeGetBlockLeftEdge(int x, int y, float scale);
+ private native void nativeSetExpandedTileBounds(boolean enabled);
+
// Returns a pointer to the scrollable LayerAndroid at the given point.
private native int nativeScrollableLayer(int x, int y, Rect scrollRect,
Rect scrollBounds);
diff --git a/core/java/android/webkit/WebViewCore.java b/core/java/android/webkit/WebViewCore.java
index 6536e457e0f0..b949a4165f6e 100644
--- a/core/java/android/webkit/WebViewCore.java
+++ b/core/java/android/webkit/WebViewCore.java
@@ -578,8 +578,6 @@ final class WebViewCore {
private native void nativeSetJsFlags(String flags);
- private native void nativeSetExpandedTileBounds(boolean enabled);
-
/**
* Delete text from start to end in the focused textfield. If there is no
* focus, or if start == end, silently fail. If start and end are out of
@@ -1001,8 +999,6 @@ final class WebViewCore {
static final int PROXY_CHANGED = 193;
- static final int SET_EXPANDED_TILE_BOUNDS = 194;
-
// private message ids
private static final int DESTROY = 200;
@@ -1562,10 +1558,6 @@ final class WebViewCore {
mWebView.mPrivateHandler.obtainMessage(WebView.AUTOFILL_COMPLETE, null)
.sendToTarget();
break;
-
- case EventHub.SET_EXPANDED_TILE_BOUNDS:
- nativeSetExpandedTileBounds(msg.arg1 == 1);
- break;
}
}
};
diff --git a/media/jni/mediaeditor/VideoEditorMain.cpp b/media/jni/mediaeditor/VideoEditorMain.cpp
index 221bfa1e93f0..101619c419d1 100755
--- a/media/jni/mediaeditor/VideoEditorMain.cpp
+++ b/media/jni/mediaeditor/VideoEditorMain.cpp
@@ -1485,7 +1485,7 @@ videoEditor_populateSettings(
if ( pContext->pEditSettings->nbEffects )
{
pOverlayIndex
- = (int*) M4OSA_malloc(pContext->pEditSettings->nbEffects, 0,
+ = (int*) M4OSA_malloc(pContext->pEditSettings->nbEffects * sizeof(int), 0,
(M4OSA_Char*)"pOverlayIndex");
}
@@ -1528,9 +1528,15 @@ videoEditor_populateSettings(
result = M4xVSS_internalConvertARGB888toYUV420_FrammingEffect(pContext->engineContext,
&(pContext->pEditSettings->Effects[j]),aFramingCtx,
pContext->pEditSettings->Effects[j].xVSS.framingScaledSize);
- if (result != M4NO_ERROR)
- {
+ videoEditJava_checkAndThrowRuntimeException(&needToBeLoaded, pEnv,
+ (M4NO_ERROR != result), result);
+ if (needToBeLoaded == false) {
M4OSA_TRACE1_1("M4xVSS_internalConvertARGB888toYUV420_FrammingEffect returned 0x%x", result);
+ if (aFramingCtx != M4OSA_NULL) {
+ M4OSA_free((M4OSA_MemAddr32)aFramingCtx);
+ aFramingCtx = M4OSA_NULL;
+ }
+ return;
}
//framing buffers are resized to fit the output video resolution.
diff --git a/telephony/java/android/telephony/CellLocation.java b/telephony/java/android/telephony/CellLocation.java
index 2edfc23d8ac3..5eaa5a074114 100644
--- a/telephony/java/android/telephony/CellLocation.java
+++ b/telephony/java/android/telephony/CellLocation.java
@@ -61,9 +61,9 @@ public abstract class CellLocation {
* @hide
*/
public static CellLocation newFromBundle(Bundle bundle) {
- // TelephonyManager.getDefault().getPhoneType() handles the case when
+ // TelephonyManager.getDefault().getCurrentPhoneType() handles the case when
// ITelephony interface is not up yet.
- switch(TelephonyManager.getDefault().getPhoneType()) {
+ switch(TelephonyManager.getDefault().getCurrentPhoneType()) {
case Phone.PHONE_TYPE_CDMA:
return new CdmaCellLocation(bundle);
case Phone.PHONE_TYPE_GSM:
@@ -89,9 +89,9 @@ public abstract class CellLocation {
*
*/
public static CellLocation getEmpty() {
- // TelephonyManager.getDefault().getPhoneType() handles the case when
+ // TelephonyManager.getDefault().getCurrentPhoneType() handles the case when
// ITelephony interface is not up yet.
- switch(TelephonyManager.getDefault().getPhoneType()) {
+ switch(TelephonyManager.getDefault().getCurrentPhoneType()) {
case Phone.PHONE_TYPE_CDMA:
return new CdmaCellLocation();
case Phone.PHONE_TYPE_GSM:
diff --git a/telephony/java/android/telephony/TelephonyManager.java b/telephony/java/android/telephony/TelephonyManager.java
index 01f2bae60d13..b0f0a4320cbe 100644
--- a/telephony/java/android/telephony/TelephonyManager.java
+++ b/telephony/java/android/telephony/TelephonyManager.java
@@ -276,19 +276,18 @@ public class TelephonyManager {
public static final int PHONE_TYPE_SIP = Phone.PHONE_TYPE_SIP;
/**
- * Returns a constant indicating the device phone type. This
- * indicates the type of radio used to transmit voice calls.
+ * Returns the current phone type.
+ * TODO: This is a last minute change and hence hidden.
*
* @see #PHONE_TYPE_NONE
* @see #PHONE_TYPE_GSM
* @see #PHONE_TYPE_CDMA
* @see #PHONE_TYPE_SIP
+ *
+ * {@hide}
*/
- public int getPhoneType() {
+ public int getCurrentPhoneType() {
try{
- if (!isVoiceCapable()) {
- return PHONE_TYPE_NONE;
- }
ITelephony telephony = getITelephony();
if (telephony != null) {
return telephony.getActivePhoneType();
@@ -307,6 +306,21 @@ public class TelephonyManager {
}
}
+ /**
+ * Returns a constant indicating the device phone type. This
+ * indicates the type of radio used to transmit voice calls.
+ *
+ * @see #PHONE_TYPE_NONE
+ * @see #PHONE_TYPE_GSM
+ * @see #PHONE_TYPE_CDMA
+ * @see #PHONE_TYPE_SIP
+ */
+ public int getPhoneType() {
+ if (!isVoiceCapable()) {
+ return PHONE_TYPE_NONE;
+ }
+ return getCurrentPhoneType();
+ }
private int getPhoneTypeFromProperty() {
int type =