summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
Diffstat (limited to 'core')
-rw-r--r--core/java/android/appwidget/AppWidgetHostView.java55
-rw-r--r--core/java/android/net/wimax/WimaxManagerConstants.java104
-rw-r--r--core/java/android/provider/Settings.java19
-rwxr-xr-xcore/java/android/provider/Telephony.java10
-rwxr-xr-xcore/java/android/speech/tts/TextToSpeech.java1
-rw-r--r--core/java/android/speech/tts/TextToSpeechService.java9
-rw-r--r--core/java/android/webkit/BrowserFrame.java7
-rw-r--r--core/java/android/webkit/JWebCoreJavaBridge.java2
-rw-r--r--core/java/android/webkit/LoadListener.java4
-rw-r--r--core/java/android/webkit/PerfChecker.java49
-rw-r--r--core/java/android/webkit/WebView.java57
-rw-r--r--core/java/android/widget/Spinner.java18
-rw-r--r--core/java/android/widget/TextView.java81
-rw-r--r--core/java/com/android/internal/widget/LockPatternUtils.java29
-rw-r--r--core/res/AndroidManifest.xml12
-rw-r--r--core/res/res/drawable-hdpi/stat_sys_data_wimax_signal_3_fully.pngbin0 -> 2219 bytes
-rw-r--r--core/res/res/drawable-hdpi/stat_sys_data_wimax_signal_disconnected.pngbin0 -> 1807 bytes
-rw-r--r--core/res/res/values-sw600dp/dimens.xml6
-rwxr-xr-xcore/res/res/values/attrs.xml3
-rw-r--r--[-rwxr-xr-x]core/res/res/values/config.xml18
-rw-r--r--core/res/res/values/public.xml1
-rw-r--r--[-rwxr-xr-x]core/res/res/values/strings.xml6
-rw-r--r--core/res/res/values/styles.xml1
23 files changed, 278 insertions, 214 deletions
diff --git a/core/java/android/appwidget/AppWidgetHostView.java b/core/java/android/appwidget/AppWidgetHostView.java
index 761c7eb..61a9dce 100644
--- a/core/java/android/appwidget/AppWidgetHostView.java
+++ b/core/java/android/appwidget/AppWidgetHostView.java
@@ -26,6 +26,7 @@ import android.graphics.Bitmap;
import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.Paint;
+import android.graphics.Rect;
import android.os.Build;
import android.os.Parcel;
import android.os.Parcelable;
@@ -41,8 +42,8 @@ import android.widget.AdapterView;
import android.widget.BaseAdapter;
import android.widget.FrameLayout;
import android.widget.RemoteViews;
-import android.widget.TextView;
import android.widget.RemoteViewsAdapter.RemoteAdapterConnectionCallback;
+import android.widget.TextView;
/**
* Provides the glue to show AppWidget views. This class offers automatic animation
@@ -106,7 +107,9 @@ public class AppWidgetHostView extends FrameLayout {
}
/**
- * Set the AppWidget that will be displayed by this view.
+ * Set the AppWidget that will be displayed by this view. This method also adds default padding
+ * to widgets, as described in {@link #getDefaultPaddingForWidget(Context, ComponentName, Rect)}
+ * and can be overridden in order to add custom padding.
*/
public void setAppWidget(int appWidgetId, AppWidgetProviderInfo info) {
mAppWidgetId = appWidgetId;
@@ -116,49 +119,57 @@ public class AppWidgetHostView extends FrameLayout {
// a widget, eg. for some widgets in safe mode.
if (info != null) {
// We add padding to the AppWidgetHostView if necessary
- Padding padding = getPaddingForWidget(info.provider);
+ Rect padding = getDefaultPaddingForWidget(mContext, info.provider, null);
setPadding(padding.left, padding.top, padding.right, padding.bottom);
}
}
- private static class Padding {
- int left = 0;
- int right = 0;
- int top = 0;
- int bottom = 0;
- }
-
/**
* As of ICE_CREAM_SANDWICH we are automatically adding padding to widgets targeting
* ICE_CREAM_SANDWICH and higher. The new widget design guidelines strongly recommend
* that widget developers do not add extra padding to their widgets. This will help
* achieve consistency among widgets.
+ *
+ * Note: this method is only needed by developers of AppWidgetHosts. The method is provided in
+ * order for the AppWidgetHost to account for the automatic padding when computing the number
+ * of cells to allocate to a particular widget.
+ *
+ * @param context the current context
+ * @param component the component name of the widget
+ * @param padding Rect in which to place the output, if null, a new Rect will be allocated and
+ * returned
+ * @return default padding for this widget
*/
- private Padding getPaddingForWidget(ComponentName component) {
- PackageManager packageManager = mContext.getPackageManager();
- Padding p = new Padding();
+ public static Rect getDefaultPaddingForWidget(Context context, ComponentName component,
+ Rect padding) {
+ PackageManager packageManager = context.getPackageManager();
ApplicationInfo appInfo;
+ if (padding == null) {
+ padding = new Rect(0, 0, 0, 0);
+ } else {
+ padding.set(0, 0, 0, 0);
+ }
+
try {
appInfo = packageManager.getApplicationInfo(component.getPackageName(), 0);
- } catch (Exception e) {
+ } catch (NameNotFoundException e) {
// if we can't find the package, return 0 padding
- return p;
+ return padding;
}
if (appInfo.targetSdkVersion >= Build.VERSION_CODES.ICE_CREAM_SANDWICH) {
- Resources r = getResources();
- p.left = r.getDimensionPixelSize(com.android.internal.
+ Resources r = context.getResources();
+ padding.left = r.getDimensionPixelSize(com.android.internal.
R.dimen.default_app_widget_padding_left);
- p.right = r.getDimensionPixelSize(com.android.internal.
+ padding.right = r.getDimensionPixelSize(com.android.internal.
R.dimen.default_app_widget_padding_right);
- p.top = r.getDimensionPixelSize(com.android.internal.
+ padding.top = r.getDimensionPixelSize(com.android.internal.
R.dimen.default_app_widget_padding_top);
- p.bottom = r.getDimensionPixelSize(com.android.internal.
+ padding.bottom = r.getDimensionPixelSize(com.android.internal.
R.dimen.default_app_widget_padding_bottom);
}
-
- return p;
+ return padding;
}
public int getAppWidgetId() {
diff --git a/core/java/android/net/wimax/WimaxManagerConstants.java b/core/java/android/net/wimax/WimaxManagerConstants.java
new file mode 100644
index 0000000..b4aaf5b
--- /dev/null
+++ b/core/java/android/net/wimax/WimaxManagerConstants.java
@@ -0,0 +1,104 @@
+package android.net.wimax;
+
+/**
+ * {@hide}
+ */
+public class WimaxManagerConstants
+{
+
+ /**
+ * Used by android.net.wimax.WimaxManager for handling management of
+ * Wimax access.
+ */
+ public static final String WIMAX_SERVICE = "WiMax";
+
+ /**
+ * Broadcast intent action indicating that Wimax has been enabled, disabled,
+ * enabling, disabling, or unknown. One extra provides this state as an int.
+ * Another extra provides the previous state, if available.
+ */
+ public static final String NET_4G_STATE_CHANGED_ACTION =
+ "android.net.fourG.NET_4G_STATE_CHANGED";
+
+ /**
+ * The lookup key for an int that indicates whether Wimax is enabled,
+ * disabled, enabling, disabling, or unknown.
+ */
+ public static final String EXTRA_WIMAX_STATUS = "wimax_status";
+
+ /**
+ * Broadcast intent action indicating that Wimax state has been changed
+ * state could be scanning, connecting, connected, disconnecting, disconnected
+ * initializing, initialized, unknown and ready. One extra provides this state as an int.
+ * Another extra provides the previous state, if available.
+ */
+ public static final String WIMAX_NETWORK_STATE_CHANGED_ACTION =
+ "android.net.fourG.wimax.WIMAX_NETWORK_STATE_CHANGED";
+
+ /**
+ * Broadcast intent action indicating that Wimax signal level has been changed.
+ * Level varies from 0 to 3.
+ */
+ public static final String SIGNAL_LEVEL_CHANGED_ACTION =
+ "android.net.wimax.SIGNAL_LEVEL_CHANGED";
+
+ /**
+ * The lookup key for an int that indicates whether Wimax state is
+ * scanning, connecting, connected, disconnecting, disconnected
+ * initializing, initialized, unknown and ready.
+ */
+ public static final String EXTRA_WIMAX_STATE = "WimaxState";
+ public static final String EXTRA_4G_STATE = "4g_state";
+ public static final String EXTRA_WIMAX_STATE_INT = "WimaxStateInt";
+ /**
+ * The lookup key for an int that indicates whether state of Wimax
+ * is idle.
+ */
+ public static final String EXTRA_WIMAX_STATE_DETAIL = "WimaxStateDetail";
+
+ /**
+ * The lookup key for an int that indicates Wimax signal level.
+ */
+ public static final String EXTRA_NEW_SIGNAL_LEVEL = "newSignalLevel";
+
+ /**
+ * Indicatates Wimax is disabled.
+ */
+ public static final int NET_4G_STATE_DISABLED = 1;
+
+ /**
+ * Indicatates Wimax is enabled.
+ */
+ public static final int NET_4G_STATE_ENABLED = 3;
+
+ /**
+ * Indicatates Wimax status is known.
+ */
+ public static final int NET_4G_STATE_UNKNOWN = 4;
+
+ /**
+ * Indicatates Wimax is in idle state.
+ */
+ public static final int WIMAX_IDLE = 6;
+
+ /**
+ * Indicatates Wimax is being deregistered.
+ */
+ public static final int WIMAX_DEREGISTRATION = 8;
+
+ /**
+ * Indicatates wimax state is unknown.
+ */
+ public static final int WIMAX_STATE_UNKNOWN = 0;
+
+ /**
+ * Indicatates wimax state is connected.
+ */
+ public static final int WIMAX_STATE_CONNECTED = 7;
+
+ /**
+ * Indicatates wimax state is disconnected.
+ */
+ public static final int WIMAX_STATE_DISCONNECTED = 9;
+
+}
diff --git a/core/java/android/provider/Settings.java b/core/java/android/provider/Settings.java
index a0652f7..769776e 100644
--- a/core/java/android/provider/Settings.java
+++ b/core/java/android/provider/Settings.java
@@ -1183,6 +1183,10 @@ public final class Settings {
public static final String RADIO_WIFI = "wifi";
/**
+ * {@hide}
+ */
+ public static final String RADIO_WIMAX = "wimax";
+ /**
* Constant for use in AIRPLANE_MODE_RADIOS to specify Cellular radio.
*/
public static final String RADIO_CELL = "cell";
@@ -2899,6 +2903,11 @@ public final class Settings {
*/
public static final String WIFI_NETWORKS_AVAILABLE_NOTIFICATION_ON =
"wifi_networks_available_notification_on";
+ /**
+ * {@hide}
+ */
+ public static final String WIMAX_NETWORKS_AVAILABLE_NOTIFICATION_ON =
+ "wimax_networks_available_notification_on";
/**
* Delay (in seconds) before repeating the Wi-Fi networks available notification.
@@ -4068,6 +4077,13 @@ public final class Settings {
"contacts_preauth_uri_expiration";
/**
+ * Whether the Messaging app posts notifications.
+ * 0=disabled. 1=enabled.
+ */
+ public static final String MESSAGING_APP_NOTIFICATIONS = "messaging_app_notifications";
+
+
+ /**
* This are the settings to be backed up.
*
* NOTE: Settings are backed up and restored in the order they appear
@@ -4104,7 +4120,8 @@ public final class Settings {
MOUNT_UMS_NOTIFY_ENABLED,
UI_NIGHT_MODE,
LOCK_SCREEN_OWNER_INFO,
- LOCK_SCREEN_OWNER_INFO_ENABLED
+ LOCK_SCREEN_OWNER_INFO_ENABLED,
+ MESSAGING_APP_NOTIFICATIONS
};
/**
diff --git a/core/java/android/provider/Telephony.java b/core/java/android/provider/Telephony.java
index 0e6d07d..8eb9da1 100755
--- a/core/java/android/provider/Telephony.java
+++ b/core/java/android/provider/Telephony.java
@@ -1838,5 +1838,15 @@ public final class Telephony {
public static final String EXTRA_PLMN = "plmn";
public static final String EXTRA_SHOW_SPN = "showSpn";
public static final String EXTRA_SPN = "spn";
+
+ /**
+ * Activity Action: Shows a dialog to turn off Messaging app notification.
+ * <p>Input: Nothing.
+ * <p>Output: Nothing.
+ */
+ @SdkConstant(SdkConstantType.ACTIVITY_INTENT_ACTION)
+ public static final String ACTION_MESSAGING_APP_NOTIFICATIONS =
+ "android.provider.Telephony.MESSAGING_APP_NOTIFICATIONS";
+
}
}
diff --git a/core/java/android/speech/tts/TextToSpeech.java b/core/java/android/speech/tts/TextToSpeech.java
index 954a6fe..fdc2570 100755
--- a/core/java/android/speech/tts/TextToSpeech.java
+++ b/core/java/android/speech/tts/TextToSpeech.java
@@ -1089,6 +1089,7 @@ public class TextToSpeech {
// Copy feature strings defined by the framework.
copyStringParam(bundle, params, Engine.KEY_FEATURE_NETWORK_SYNTHESIS);
+ copyStringParam(bundle, params, Engine.KEY_FEATURE_EMBEDDED_SYNTHESIS);
// Copy over all parameters that start with the name of the
// engine that we are currently connected to. The engine is
diff --git a/core/java/android/speech/tts/TextToSpeechService.java b/core/java/android/speech/tts/TextToSpeechService.java
index 245271d..83b6d4c 100644
--- a/core/java/android/speech/tts/TextToSpeechService.java
+++ b/core/java/android/speech/tts/TextToSpeechService.java
@@ -792,8 +792,13 @@ public abstract class TextToSpeechService extends Service {
public String[] getFeaturesForLanguage(String lang, String country, String variant) {
Set<String> features = onGetFeaturesForLanguage(lang, country, variant);
- String[] featuresArray = new String[features.size()];
- features.toArray(featuresArray);
+ String[] featuresArray = null;
+ if (features != null) {
+ featuresArray = new String[features.size()];
+ features.toArray(featuresArray);
+ } else {
+ featuresArray = new String[0];
+ }
return featuresArray;
}
diff --git a/core/java/android/webkit/BrowserFrame.java b/core/java/android/webkit/BrowserFrame.java
index 2cc928f..388920c 100644
--- a/core/java/android/webkit/BrowserFrame.java
+++ b/core/java/android/webkit/BrowserFrame.java
@@ -813,8 +813,6 @@ class BrowserFrame extends Handler {
boolean synchronous,
String username,
String password) {
- PerfChecker checker = new PerfChecker();
-
if (mSettings.getCacheMode() != WebSettings.LOAD_DEFAULT) {
cacheMode = mSettings.getCacheMode();
}
@@ -872,11 +870,6 @@ class BrowserFrame extends Handler {
|| headers.containsKey("If-None-Match") ?
WebSettings.LOAD_NO_CACHE : cacheMode);
// Set referrer to current URL?
- if (!loader.executeLoad()) {
- checker.responseAlert("startLoadingResource fail");
- }
- checker.responseAlert("startLoadingResource succeed");
-
return !synchronous ? loadListener : null;
}
diff --git a/core/java/android/webkit/JWebCoreJavaBridge.java b/core/java/android/webkit/JWebCoreJavaBridge.java
index 5b78586..b498435 100644
--- a/core/java/android/webkit/JWebCoreJavaBridge.java
+++ b/core/java/android/webkit/JWebCoreJavaBridge.java
@@ -87,11 +87,9 @@ final class JWebCoreJavaBridge extends Handler {
* Call native timer callbacks.
*/
private void fireSharedTimer() {
- PerfChecker checker = new PerfChecker();
// clear the flag so that sharedTimerFired() can set a new timer
mHasInstantTimer = false;
sharedTimerFired();
- checker.responseAlert("sharedTimer");
}
/**
diff --git a/core/java/android/webkit/LoadListener.java b/core/java/android/webkit/LoadListener.java
index 04af738..37e8bc0 100644
--- a/core/java/android/webkit/LoadListener.java
+++ b/core/java/android/webkit/LoadListener.java
@@ -1136,7 +1136,6 @@ class LoadListener extends Handler implements EventHandler {
// Give the data to WebKit now. We don't have to synchronize on
// mDataBuilder here because pulling each chunk removes it from the
// internal list so it cannot be modified.
- PerfChecker checker = new PerfChecker();
ByteArrayBuilder.Chunk c;
while (true) {
c = mDataBuilder.getFirstChunk();
@@ -1152,7 +1151,6 @@ class LoadListener extends Handler implements EventHandler {
} else {
c.release();
}
- checker.responseAlert("res nativeAddData");
}
}
@@ -1173,13 +1171,11 @@ class LoadListener extends Handler implements EventHandler {
WebViewWorker.MSG_REMOVE_CACHE, this).sendToTarget();
}
if (mNativeLoader != 0) {
- PerfChecker checker = new PerfChecker();
if (!mSetNativeResponse) {
setNativeResponse();
}
nativeFinished();
- checker.responseAlert("res nativeFinished");
clearNativeLoader();
}
}
diff --git a/core/java/android/webkit/PerfChecker.java b/core/java/android/webkit/PerfChecker.java
deleted file mode 100644
index 8c5f86e..0000000
--- a/core/java/android/webkit/PerfChecker.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- * Copyright (C) 2007 The Android Open Source 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 android.webkit;
-
-import android.os.SystemClock;
-import android.util.Log;
-
-class PerfChecker {
-
- private long mTime;
- private static final long mResponseThreshold = 2000; // 2s
-
- public PerfChecker() {
- if (false) {
- mTime = SystemClock.uptimeMillis();
- }
- }
-
- /**
- * @param what log string
- * Logs given string if mResponseThreshold time passed between either
- * instantiation or previous responseAlert call
- */
- public void responseAlert(String what) {
- if (false) {
- long upTime = SystemClock.uptimeMillis();
- long time = upTime - mTime;
- if (time > mResponseThreshold) {
- Log.w("webkit", what + " used " + time + " ms");
- }
- // Reset mTime, to permit reuse
- mTime = upTime;
- }
- }
-}
diff --git a/core/java/android/webkit/WebView.java b/core/java/android/webkit/WebView.java
index f0dc732..55f345f 100644
--- a/core/java/android/webkit/WebView.java
+++ b/core/java/android/webkit/WebView.java
@@ -683,7 +683,6 @@ public class WebView extends AbsoluteLayout
private static final int SWITCH_TO_LONGPRESS = 4;
private static final int RELEASE_SINGLE_TAP = 5;
private static final int REQUEST_FORM_DATA = 6;
- private static final int RESUME_WEBCORE_PRIORITY = 7;
private static final int DRAG_HELD_MOTIONLESS = 8;
private static final int AWAKEN_SCROLL_BARS = 9;
private static final int PREVENT_DEFAULT_TIMEOUT = 10;
@@ -2850,46 +2849,47 @@ public class WebView extends AbsoluteLayout
// Used to avoid sending many visible rect messages.
private Rect mLastVisibleRectSent;
private Rect mLastGlobalRect;
+ private Rect mVisibleRect = new Rect();
+ private Rect mGlobalVisibleRect = new Rect();
+ private Point mScrollOffset = new Point();
Rect sendOurVisibleRect() {
if (mZoomManager.isPreventingWebkitUpdates()) return mLastVisibleRectSent;
- Rect rect = new Rect();
- calcOurContentVisibleRect(rect);
+ calcOurContentVisibleRect(mVisibleRect);
// Rect.equals() checks for null input.
- if (!rect.equals(mLastVisibleRectSent)) {
+ if (!mVisibleRect.equals(mLastVisibleRectSent)) {
if (!mBlockWebkitViewMessages) {
- Point pos = new Point(rect.left, rect.top);
+ mScrollOffset.set(mVisibleRect.left, mVisibleRect.top);
mWebViewCore.removeMessages(EventHub.SET_SCROLL_OFFSET);
mWebViewCore.sendMessage(EventHub.SET_SCROLL_OFFSET,
- nativeMoveGeneration(), mSendScrollEvent ? 1 : 0, pos);
+ nativeMoveGeneration(), mSendScrollEvent ? 1 : 0, mScrollOffset);
}
- mLastVisibleRectSent = rect;
+ mLastVisibleRectSent = mVisibleRect;
mPrivateHandler.removeMessages(SWITCH_TO_LONGPRESS);
}
- Rect globalRect = new Rect();
- if (getGlobalVisibleRect(globalRect)
- && !globalRect.equals(mLastGlobalRect)) {
+ if (getGlobalVisibleRect(mGlobalVisibleRect)
+ && !mGlobalVisibleRect.equals(mLastGlobalRect)) {
if (DebugFlags.WEB_VIEW) {
- Log.v(LOGTAG, "sendOurVisibleRect=(" + globalRect.left + ","
- + globalRect.top + ",r=" + globalRect.right + ",b="
- + globalRect.bottom);
+ Log.v(LOGTAG, "sendOurVisibleRect=(" + mGlobalVisibleRect.left + ","
+ + mGlobalVisibleRect.top + ",r=" + mGlobalVisibleRect.right + ",b="
+ + mGlobalVisibleRect.bottom);
}
// TODO: the global offset is only used by windowRect()
// in ChromeClientAndroid ; other clients such as touch
// and mouse events could return view + screen relative points.
if (!mBlockWebkitViewMessages) {
- mWebViewCore.sendMessage(EventHub.SET_GLOBAL_BOUNDS, globalRect);
+ mWebViewCore.sendMessage(EventHub.SET_GLOBAL_BOUNDS, mGlobalVisibleRect);
}
- mLastGlobalRect = globalRect;
+ mLastGlobalRect = mGlobalVisibleRect;
}
- return rect;
+ return mVisibleRect;
}
+ private Point mGlobalVisibleOffset = new Point();
// Sets r to be the visible rectangle of our webview in view coordinates
private void calcOurVisibleRect(Rect r) {
- Point p = new Point();
- getGlobalVisibleRect(r, p);
- r.offset(-p.x, -p.y);
+ getGlobalVisibleRect(r, mGlobalVisibleOffset);
+ r.offset(-mGlobalVisibleOffset.x, -mGlobalVisibleOffset.y);
}
// Sets r to be our visible rectangle in content coordinates
@@ -2905,21 +2905,21 @@ public class WebView extends AbsoluteLayout
r.bottom = viewToContentY(r.bottom);
}
+ private Rect mContentVisibleRect = new Rect();
// Sets r to be our visible rectangle in content coordinates. We use this
// method on the native side to compute the position of the fixed layers.
// Uses floating coordinates (necessary to correctly place elements when
// the scale factor is not 1)
private void calcOurContentVisibleRectF(RectF r) {
- Rect ri = new Rect(0,0,0,0);
- calcOurVisibleRect(ri);
- r.left = viewToContentXf(ri.left);
+ calcOurVisibleRect(mContentVisibleRect);
+ r.left = viewToContentXf(mContentVisibleRect.left);
// viewToContentY will remove the total height of the title bar. Add
// the visible height back in to account for the fact that if the title
// bar is partially visible, the part of the visible rect which is
// displaying our content is displaced by that amount.
- r.top = viewToContentYf(ri.top + getVisibleTitleHeightImpl());
- r.right = viewToContentXf(ri.right);
- r.bottom = viewToContentYf(ri.bottom);
+ r.top = viewToContentYf(mContentVisibleRect.top + getVisibleTitleHeightImpl());
+ r.right = viewToContentXf(mContentVisibleRect.right);
+ r.bottom = viewToContentYf(mContentVisibleRect.bottom);
}
static class ViewSizeData {
@@ -3569,7 +3569,6 @@ public class WebView extends AbsoluteLayout
mScrollingLayerRect.top = y;
}
abortAnimation();
- mPrivateHandler.removeMessages(RESUME_WEBCORE_PRIORITY);
nativeSetIsScrolling(false);
if (!mBlockWebkitViewMessages) {
WebViewCore.resumePriority();
@@ -5992,7 +5991,6 @@ public class WebView extends AbsoluteLayout
mScroller.abortAnimation();
mTouchMode = TOUCH_DRAG_START_MODE;
mConfirmMove = true;
- mPrivateHandler.removeMessages(RESUME_WEBCORE_PRIORITY);
nativeSetIsScrolling(false);
} else if (mPrivateHandler.hasMessages(RELEASE_SINGLE_TAP)) {
mPrivateHandler.removeMessages(RELEASE_SINGLE_TAP);
@@ -7329,7 +7327,6 @@ public class WebView extends AbsoluteLayout
mLastTouchTime = eventTime;
if (!mScroller.isFinished()) {
abortAnimation();
- mPrivateHandler.removeMessages(RESUME_WEBCORE_PRIORITY);
}
mSnapScrollMode = SNAP_NONE;
mVelocityTracker = VelocityTracker.obtain();
@@ -8461,10 +8458,6 @@ public class WebView extends AbsoluteLayout
mWebTextView.setAdapterCustom(adapter);
}
break;
- case RESUME_WEBCORE_PRIORITY:
- WebViewCore.resumePriority();
- WebViewCore.resumeUpdatePicture(mWebViewCore);
- break;
case LONG_PRESS_CENTER:
// as this is shared by keydown and trackballdown, reset all
diff --git a/core/java/android/widget/Spinner.java b/core/java/android/widget/Spinner.java
index 27d44bf..ec3790e 100644
--- a/core/java/android/widget/Spinner.java
+++ b/core/java/android/widget/Spinner.java
@@ -68,6 +68,7 @@ public class Spinner extends AbsSpinner implements OnClickListener {
int mDropDownWidth;
private int mGravity;
+ private boolean mDisableChildrenWhenDisabled;
private Rect mTempRect = new Rect();
@@ -186,6 +187,9 @@ public class Spinner extends AbsSpinner implements OnClickListener {
mPopup.setPromptText(a.getString(com.android.internal.R.styleable.Spinner_prompt));
+ mDisableChildrenWhenDisabled = a.getBoolean(
+ com.android.internal.R.styleable.Spinner_disableChildrenWhenDisabled, false);
+
a.recycle();
// Base constructor can call setAdapter before we initialize mPopup.
@@ -196,6 +200,17 @@ public class Spinner extends AbsSpinner implements OnClickListener {
}
}
+ @Override
+ public void setEnabled(boolean enabled) {
+ super.setEnabled(enabled);
+ if (mDisableChildrenWhenDisabled) {
+ final int count = getChildCount();
+ for (int i = 0; i < count; i++) {
+ getChildAt(i).setEnabled(enabled);
+ }
+ }
+ }
+
/**
* Describes how the selected item view is positioned. Currently only the horizontal component
* is used. The default is determined by the current theme.
@@ -398,6 +413,9 @@ public class Spinner extends AbsSpinner implements OnClickListener {
addViewInLayout(child, 0, lp);
child.setSelected(hasFocus());
+ if (mDisableChildrenWhenDisabled) {
+ child.setEnabled(isEnabled());
+ }
// Get measure specs
int childHeightSpec = ViewGroup.getChildMeasureSpec(mHeightMeasureSpec,
diff --git a/core/java/android/widget/TextView.java b/core/java/android/widget/TextView.java
index a8680d4..5833afd 100644
--- a/core/java/android/widget/TextView.java
+++ b/core/java/android/widget/TextView.java
@@ -9059,51 +9059,6 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener
sendAccessibilityEventUnchecked(event);
}
- @Override
- protected void onCreateContextMenu(ContextMenu menu) {
- super.onCreateContextMenu(menu);
- boolean added = false;
- mContextMenuTriggeredByKey = mDPadCenterIsDown || mEnterKeyIsDown;
- // Problem with context menu on long press: the menu appears while the key in down and when
- // the key is released, the view does not receive the key_up event.
- // We need two layers of flags: mDPadCenterIsDown and mEnterKeyIsDown are set in key down/up
- // events. We cannot simply clear these flags in onTextContextMenuItem since
- // it may not be called (if the user/ discards the context menu with the back key).
- // We clear these flags here and mContextMenuTriggeredByKey saves that state so that it is
- // available in onTextContextMenuItem.
- mDPadCenterIsDown = mEnterKeyIsDown = false;
-
- MenuHandler handler = new MenuHandler();
-
- if (mText instanceof Spanned && hasSelectionController()) {
- long lastTouchOffset = getLastTouchOffsets();
- final int selStart = extractRangeStartFromLong(lastTouchOffset);
- final int selEnd = extractRangeEndFromLong(lastTouchOffset);
-
- URLSpan[] urls = ((Spanned) mText).getSpans(selStart, selEnd, URLSpan.class);
- if (urls.length > 0) {
- menu.add(0, ID_COPY_URL, 0, com.android.internal.R.string.copyUrl).
- setOnMenuItemClickListener(handler);
-
- added = true;
- }
- }
-
- // The context menu is not empty, which will prevent the selection mode from starting.
- // Add a entry to start it in the context menu.
- // TODO Does not handle the case where a subclass does not call super.thisMethod or
- // populates the menu AFTER this call.
- if (menu.size() > 0) {
- menu.add(0, ID_SELECTION_MODE, 0, com.android.internal.R.string.selectTextMode).
- setOnMenuItemClickListener(handler);
- added = true;
- }
-
- if (added) {
- menu.setHeaderTitle(com.android.internal.R.string.editTextMenuTitle);
- }
- }
-
/**
* Returns whether this text view is a current input method target. The
* default implementation just checks with {@link InputMethodManager}.
@@ -9118,9 +9073,6 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener
private static final int ID_CUT = android.R.id.cut;
private static final int ID_COPY = android.R.id.copy;
private static final int ID_PASTE = android.R.id.paste;
- // Context menu entries
- private static final int ID_COPY_URL = android.R.id.copyUrl;
- private static final int ID_SELECTION_MODE = android.R.id.selectTextMode;
private class MenuHandler implements MenuItem.OnMenuItemClickListener {
public boolean onMenuItemClick(MenuItem item) {
@@ -9130,9 +9082,8 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener
/**
* Called when a context menu option for the text view is selected. Currently
- * this will be {@link android.R.id#copyUrl}, {@link android.R.id#selectTextMode},
- * {@link android.R.id#selectAll}, {@link android.R.id#paste}, {@link android.R.id#cut}
- * or {@link android.R.id#copy}.
+ * this will be one of {@link android.R.id#selectAll}, {@link android.R.id#cut},
+ * {@link android.R.id#copy} or {@link android.R.id#paste}.
*
* @return true if the context menu item action was performed.
*/
@@ -9149,34 +9100,6 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener
}
switch (id) {
- case ID_COPY_URL:
- URLSpan[] urls = ((Spanned) mText).getSpans(min, max, URLSpan.class);
- if (urls.length >= 1) {
- ClipData clip = null;
- for (int i=0; i<urls.length; i++) {
- Uri uri = Uri.parse(urls[0].getURL());
- if (clip == null) {
- clip = ClipData.newRawUri(null, uri);
- } else {
- clip.addItem(new ClipData.Item(uri));
- }
- }
- if (clip != null) {
- setPrimaryClip(clip);
- }
- }
- stopSelectionActionMode();
- return true;
-
- case ID_SELECTION_MODE:
- if (mSelectionActionMode != null) {
- // Selection mode is already started, simply change selected part.
- selectCurrentWord();
- } else {
- startSelectionActionMode();
- }
- return true;
-
case ID_SELECT_ALL:
// This does not enter text selection mode. Text is highlighted, so that it can be
// bulk edited, like selectAllOnFocus does. Returns true even if text is empty.
diff --git a/core/java/com/android/internal/widget/LockPatternUtils.java b/core/java/com/android/internal/widget/LockPatternUtils.java
index d5450e4..17b8acf 100644
--- a/core/java/com/android/internal/widget/LockPatternUtils.java
+++ b/core/java/com/android/internal/widget/LockPatternUtils.java
@@ -439,17 +439,6 @@ public class LockPatternUtils {
}
/**
- * Calls back SetupFaceLock to save the temporary gallery file if this is the backup lock.
- * This doesn't have to verify that biometric is enabled because it's only called in that case
- */
- void moveTempGallery() {
- Intent intent = new Intent().setClassName("com.android.facelock",
- "com.android.facelock.SetupFaceLock");
- intent.putExtra("moveTempGallery", true);
- mContext.startActivity(intent);
- }
-
- /**
* Calls back SetupFaceLock to delete the temporary gallery file
*/
public void deleteTempGallery() {
@@ -501,8 +490,7 @@ public class LockPatternUtils {
setLong(PASSWORD_TYPE_KEY, DevicePolicyManager.PASSWORD_QUALITY_BIOMETRIC_WEAK);
setLong(PASSWORD_TYPE_ALTERNATE_KEY,
DevicePolicyManager.PASSWORD_QUALITY_SOMETHING);
- setBoolean(BIOMETRIC_WEAK_EVER_CHOSEN_KEY, true);
- moveTempGallery();
+ finishBiometricWeak();
}
dpm.setActivePasswordState(DevicePolicyManager.PASSWORD_QUALITY_SOMETHING, pattern
.size(), 0, 0, 0, 0, 0, 0);
@@ -619,8 +607,7 @@ public class LockPatternUtils {
} else {
setLong(PASSWORD_TYPE_KEY, DevicePolicyManager.PASSWORD_QUALITY_BIOMETRIC_WEAK);
setLong(PASSWORD_TYPE_ALTERNATE_KEY, Math.max(quality, computedQuality));
- setBoolean(BIOMETRIC_WEAK_EVER_CHOSEN_KEY, true);
- moveTempGallery();
+ finishBiometricWeak();
}
if (computedQuality != DevicePolicyManager.PASSWORD_QUALITY_UNSPECIFIED) {
int letters = 0;
@@ -1087,4 +1074,16 @@ public class LockPatternUtils {
}
return false;
}
+
+ private void finishBiometricWeak() {
+ setBoolean(BIOMETRIC_WEAK_EVER_CHOSEN_KEY, true);
+
+ // Launch intent to show final screen, this also
+ // moves the temporary gallery to the actual gallery
+ Intent intent = new Intent();
+ intent.setClassName("com.android.facelock",
+ "com.android.facelock.SetupEndScreen");
+ mContext.startActivity(intent);
+ }
+
}
diff --git a/core/res/AndroidManifest.xml b/core/res/AndroidManifest.xml
index 18194ee..0ed0523 100644
--- a/core/res/AndroidManifest.xml
+++ b/core/res/AndroidManifest.xml
@@ -423,6 +423,12 @@
android:description="@string/permdesc_accessWifiState"
android:label="@string/permlab_accessWifiState" />
+ <!-- @hide -->
+ <permission android:name="android.permission.ACCESS_WIMAX_STATE"
+ android:permissionGroup="android.permission-group.NETWORK"
+ android:protectionLevel="normal"
+ android:description="@string/permdesc_accessWimaxState"
+ android:label="@string/permlab_accessWimaxState" />
<!-- Allows applications to connect to paired bluetooth devices -->
<permission android:name="android.permission.BLUETOOTH"
android:permissionGroup="android.permission-group.NETWORK"
@@ -984,6 +990,12 @@
android:description="@string/permdesc_changeWifiState"
android:label="@string/permlab_changeWifiState" />
+ <!-- @hide -->
+ <permission android:name="android.permission.CHANGE_WIMAX_STATE"
+ android:permissionGroup="android.permission-group.SYSTEM_TOOLS"
+ android:protectionLevel="dangerous"
+ android:description="@string/permdesc_changeWimaxState"
+ android:label="@string/permlab_changeWimaxState" />
<!-- Allows applications to enter Wi-Fi Multicast mode -->
<permission android:name="android.permission.CHANGE_WIFI_MULTICAST_STATE"
android:permissionGroup="android.permission-group.SYSTEM_TOOLS"
diff --git a/core/res/res/drawable-hdpi/stat_sys_data_wimax_signal_3_fully.png b/core/res/res/drawable-hdpi/stat_sys_data_wimax_signal_3_fully.png
new file mode 100644
index 0000000..c2e4b78
--- /dev/null
+++ b/core/res/res/drawable-hdpi/stat_sys_data_wimax_signal_3_fully.png
Binary files differ
diff --git a/core/res/res/drawable-hdpi/stat_sys_data_wimax_signal_disconnected.png b/core/res/res/drawable-hdpi/stat_sys_data_wimax_signal_disconnected.png
new file mode 100644
index 0000000..51b839f
--- /dev/null
+++ b/core/res/res/drawable-hdpi/stat_sys_data_wimax_signal_disconnected.png
Binary files differ
diff --git a/core/res/res/values-sw600dp/dimens.xml b/core/res/res/values-sw600dp/dimens.xml
index 551c1d8..5b488c0 100644
--- a/core/res/res/values-sw600dp/dimens.xml
+++ b/core/res/res/values-sw600dp/dimens.xml
@@ -60,6 +60,12 @@
<!-- Compensate for double margin : preference_screen_side_margin + 4 (frame background shadow) = -preference_screen_side_margin_negative -->
<dimen name="preference_screen_side_margin_negative">-4dp</dimen>
+ <!-- Default padding to apply to AppWidgetHostViews containing widgets targeting API level 14 and up. -->
+ <dimen name="default_app_widget_padding_left">12dp</dimen>
+ <dimen name="default_app_widget_padding_top">12dp</dimen>
+ <dimen name="default_app_widget_padding_right">4dp</dimen>
+ <dimen name="default_app_widget_padding_bottom">20dp</dimen>
+
<!-- Minimum width for an action button in the menu area of an action bar -->
<dimen name="action_button_min_width">64dip</dimen>
</resources>
diff --git a/core/res/res/values/attrs.xml b/core/res/res/values/attrs.xml
index a40e24c..d0ab8b1 100755
--- a/core/res/res/values/attrs.xml
+++ b/core/res/res/values/attrs.xml
@@ -3331,6 +3331,9 @@
<attr name="popupPromptView" format="reference" />
<!-- Gravity setting for positioning the currently selected item. -->
<attr name="gravity" />
+ <!-- Whether this spinner should mark child views as enabled/disabled when
+ the spinner itself is enabled/disabled. -->
+ <attr name="disableChildrenWhenDisabled" format="boolean" />
</declare-styleable>
<declare-styleable name="DatePicker">
diff --git a/core/res/res/values/config.xml b/core/res/res/values/config.xml
index 48e8f1e..8b07e34 100755..100644
--- a/core/res/res/values/config.xml
+++ b/core/res/res/values/config.xml
@@ -166,6 +166,12 @@
</string-array>
<!-- List of regexpressions describing the interface (if any) that represent tetherable
+ WiMAX interfaces. If the device doesn't want to support tethering over Wifi this
+ should be empty. An example would be "softap.*" -->
+ <string-array translatable="false" name="config_tether_wimax_regexs">
+ </string-array>
+
+ <!-- List of regexpressions describing the interface (if any) that represent tetherable
bluetooth interfaces. If the device doesn't want to support tethering over bluetooth this
should be empty. -->
<string-array translatable="false" name="config_tether_bluetooth_regexs">
@@ -718,4 +724,16 @@
<!-- Default network policy warning threshold, in megabytes. -->
<integer name="config_networkPolicyDefaultWarning">2048</integer>
+ <!-- Set and Unsets WiMAX -->
+ <bool name="config_wimaxEnabled">false</bool>
+ <!-- Location of the wimax framwork jar location -->
+ <string name="config_wimaxServiceJarLocation"></string>
+ <!-- Location of the wimax native library locaiton -->
+ <string name="config_wimaxNativeLibLocation"></string>
+ <!-- Name of the wimax manager class -->
+ <string name="config_wimaxManagerClassname"></string>
+ <!-- Name of the wimax service class -->
+ <string name="config_wimaxServiceClassname"></string>
+ <!-- Name of the wimax state tracker clas -->
+ <string name="config_wimaxStateTrackerClassname"></string>
</resources>
diff --git a/core/res/res/values/public.xml b/core/res/res/values/public.xml
index 97d5afe..4d97ad2 100644
--- a/core/res/res/values/public.xml
+++ b/core/res/res/values/public.xml
@@ -1974,5 +1974,4 @@
<public type="color" name="holo_orange_dark" id="0x01060019" />
<public type="color" name="holo_purple" id="0x0106001a" />
<public type="color" name="holo_blue_bright" id="0x0106001b" />
-
</resources>
diff --git a/core/res/res/values/strings.xml b/core/res/res/values/strings.xml
index a819173..2f40a5a 100755..100644
--- a/core/res/res/values/strings.xml
+++ b/core/res/res/values/strings.xml
@@ -1362,6 +1362,12 @@
than the non-multicast mode.</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_accessWimaxState">view WiMAX state</string>
+ <string name="permdesc_accessWimaxState">Allows an application to view
+ the information about the state of WiMAX.</string>
+ <string name="permlab_changeWimaxState">change WiMAX state</string>
+ <string name="permdesc_changeWimaxState">Allows an application to connect
+ to and disconnect from WiMAX network.</string>
<string name="permlab_bluetoothAdmin">bluetooth administration</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_bluetoothAdmin" product="tablet">Allows an application to configure
diff --git a/core/res/res/values/styles.xml b/core/res/res/values/styles.xml
index 949f01f..73e1a7c 100644
--- a/core/res/res/values/styles.xml
+++ b/core/res/res/values/styles.xml
@@ -1798,6 +1798,7 @@ please see styles_device_defaults.xml.
<item name="android:dropDownWidth">wrap_content</item>
<item name="android:popupPromptView">@android:layout/simple_dropdown_hint</item>
<item name="android:gravity">left|center_vertical</item>
+ <item name="android:disableChildrenWhenDisabled">true</item>
</style>
<style name="Widget.Holo.Spinner.DropDown">