Merge "docs: fix bug 5878445" into ics-mr1
diff --git a/core/java/android/app/Fragment.java b/core/java/android/app/Fragment.java
index f427e78..492fcc7 100644
--- a/core/java/android/app/Fragment.java
+++ b/core/java/android/app/Fragment.java
@@ -149,7 +149,7 @@
* {@link Fragment#getFragmentManager() Fragment.getFragmentManager()}.
*
* <p>The Fragment class can be used many ways to achieve a wide variety of
- * results. It is core, it represents a particular operation or interface
+ * results. In its core, it represents a particular operation or interface
* that is running within a larger {@link Activity}. A Fragment is closely
* tied to the Activity it is in, and can not be used apart from one. Though
* Fragment defines its own lifecycle, that lifecycle is dependent on its
diff --git a/core/java/android/text/TextUtils.java b/core/java/android/text/TextUtils.java
index 95a3cdc..43dfc81 100644
--- a/core/java/android/text/TextUtils.java
+++ b/core/java/android/text/TextUtils.java
@@ -1325,7 +1325,11 @@
sb.append("&"); //$NON-NLS-1$
break;
case '\'':
- sb.append("'"); //$NON-NLS-1$
+ //http://www.w3.org/TR/xhtml1
+ // The named character reference ' (the apostrophe, U+0027) was introduced in
+ // XML 1.0 but does not appear in HTML. Authors should therefore use ' instead
+ // of ' to work as expected in HTML 4 user agents.
+ sb.append("'"); //$NON-NLS-1$
break;
case '"':
sb.append("""); //$NON-NLS-1$
diff --git a/core/java/android/view/ActionMode.java b/core/java/android/view/ActionMode.java
index 0349a2b..c1c7fe2 100644
--- a/core/java/android/view/ActionMode.java
+++ b/core/java/android/view/ActionMode.java
@@ -24,7 +24,7 @@
* <div class="special reference">
* <h3>Developer Guides</h3>
* <p>For information about how to provide contextual actions with {@code ActionMode},
- * read the <a href="{@docRoot}guide/topics/ui/menu.html#context-menu">Menus</a>
+ * read the <a href="{@docRoot}guide/topics/ui/menus.html#context-menu">Menus</a>
* developer guide.</p>
* </div>
*/
diff --git a/core/java/android/view/HardwareRenderer.java b/core/java/android/view/HardwareRenderer.java
index ccb6489..71f3cf5 100644
--- a/core/java/android/view/HardwareRenderer.java
+++ b/core/java/android/view/HardwareRenderer.java
@@ -811,6 +811,8 @@
if (canDraw()) {
if (!hasDirtyRegions()) {
dirty = null;
+ } else if (dirty != null) {
+ dirty.intersect(0, 0, mWidth, mHeight);
}
attachInfo.mIgnoreDirtyState = true;
attachInfo.mDrawingTime = SystemClock.uptimeMillis();
diff --git a/core/java/android/view/animation/Animation.java b/core/java/android/view/animation/Animation.java
index 0d57c9b..03a0700 100644
--- a/core/java/android/view/animation/Animation.java
+++ b/core/java/android/view/animation/Animation.java
@@ -913,7 +913,7 @@
*
* @param interpolatedTime The value of the normalized time (0.0 to 1.0)
* after it has been run through the interpolation function.
- * @param t The Transofrmation object to fill in with the current
+ * @param t The Transformation object to fill in with the current
* transforms.
*/
protected void applyTransformation(float interpolatedTime, Transformation t) {
diff --git a/core/java/android/view/inputmethod/InputMethodManager.java b/core/java/android/view/inputmethod/InputMethodManager.java
index b41e6f5..ce36046 100644
--- a/core/java/android/view/inputmethod/InputMethodManager.java
+++ b/core/java/android/view/inputmethod/InputMethodManager.java
@@ -26,7 +26,6 @@
import com.android.internal.view.InputBindResult;
import android.content.Context;
-import android.content.pm.PackageManager;
import android.graphics.Rect;
import android.os.Bundle;
import android.os.Handler;
@@ -198,7 +197,31 @@
static final Object mInstanceSync = new Object();
static InputMethodManager mInstance;
-
+
+ /**
+ * @hide Flag for IInputMethodManager.windowGainedFocus: a view in
+ * the window has input focus.
+ */
+ public static final int CONTROL_WINDOW_VIEW_HAS_FOCUS = 1<<0;
+
+ /**
+ * @hide Flag for IInputMethodManager.windowGainedFocus: the focus
+ * is a text editor.
+ */
+ public static final int CONTROL_WINDOW_IS_TEXT_EDITOR = 1<<1;
+
+ /**
+ * @hide Flag for IInputMethodManager.windowGainedFocus: this is the first
+ * time the window has gotten focus.
+ */
+ public static final int CONTROL_WINDOW_FIRST = 1<<2;
+
+ /**
+ * @hide Flag for IInputMethodManager.startInput: this is the first
+ * time the window has gotten focus.
+ */
+ public static final int CONTROL_START_INITIAL = 1<<8;
+
final IInputMethodManager mService;
final Looper mMainLooper;
@@ -216,7 +239,7 @@
/**
* Set whenever this client becomes inactive, to know we need to reset
- * state with the IME then next time we receive focus.
+ * state with the IME the next time we receive focus.
*/
boolean mHasBeenInactive = true;
@@ -243,11 +266,6 @@
*/
View mNextServedView;
/**
- * True if we should restart input in the next served view, even if the
- * view hasn't actually changed from the current serve view.
- */
- boolean mNextServedNeedsStart;
- /**
* This is set when we are in the process of connecting, to determine
* when we have actually finished.
*/
@@ -331,11 +349,12 @@
mCurId = res.id;
mBindSequence = res.sequence;
}
- startInputInner();
+ startInputInner(null, 0, 0, 0);
return;
}
case MSG_UNBIND: {
final int sequence = msg.arg1;
+ boolean startInput = false;
synchronized (mH) {
if (mBindSequence == sequence) {
if (false) {
@@ -355,8 +374,13 @@
if (mServedView != null && mServedView.isFocused()) {
mServedConnecting = true;
}
+ if (mActive) {
+ startInput = true;
+ }
}
- startInputInner();
+ }
+ if (startInput) {
+ startInputInner(null, 0, 0, 0);
}
return;
}
@@ -946,10 +970,11 @@
mServedConnecting = true;
}
- startInputInner();
+ startInputInner(null, 0, 0, 0);
}
- void startInputInner() {
+ boolean startInputInner(IBinder windowGainingFocus, int controlFlags, int softInputMode,
+ int windowFlags) {
final View view;
synchronized (mH) {
view = mServedView;
@@ -958,7 +983,7 @@
if (DEBUG) Log.v(TAG, "Starting input: view=" + view);
if (view == null) {
if (DEBUG) Log.v(TAG, "ABORT input: no served view!");
- return;
+ return false;
}
}
@@ -971,7 +996,7 @@
// If the view doesn't have a handler, something has changed out
// from under us, so just bail.
if (DEBUG) Log.v(TAG, "ABORT input: no handler for view!");
- return;
+ return false;
}
if (vh.getLooper() != Looper.myLooper()) {
// The view is running on a different thread than our own, so
@@ -979,10 +1004,10 @@
if (DEBUG) Log.v(TAG, "Starting input: reschedule to view thread");
vh.post(new Runnable() {
public void run() {
- startInputInner();
+ startInputInner(null, 0, 0, 0);
}
});
- return;
+ return false;
}
// Okay we are now ready to call into the served view and have it
@@ -1002,12 +1027,14 @@
if (DEBUG) Log.v(TAG,
"Starting input: finished by someone else (view="
+ mServedView + " conn=" + mServedConnecting + ")");
- return;
+ return false;
}
-
+
// If we already have a text box, then this view is already
// connected so we want to restart it.
- final boolean initial = mCurrentTextBoxAttribute == null;
+ if (mCurrentTextBoxAttribute == null) {
+ controlFlags |= CONTROL_START_INITIAL;
+ }
// Hook 'em up and let 'er rip.
mCurrentTextBoxAttribute = tba;
@@ -1027,9 +1054,17 @@
try {
if (DEBUG) Log.v(TAG, "START INPUT: " + view + " ic="
- + ic + " tba=" + tba + " initial=" + initial);
- InputBindResult res = mService.startInput(mClient,
- servedContext, tba, initial, true);
+ + ic + " tba=" + tba + " controlFlags=#"
+ + Integer.toHexString(controlFlags));
+ InputBindResult res;
+ if (windowGainingFocus != null) {
+ res = mService.windowGainedFocus(mClient, windowGainingFocus,
+ controlFlags, softInputMode, windowFlags,
+ tba, servedContext);
+ } else {
+ res = mService.startInput(mClient,
+ servedContext, tba, controlFlags);
+ }
if (DEBUG) Log.v(TAG, "Starting input: Bind result=" + res);
if (res != null) {
if (res.id != null) {
@@ -1038,7 +1073,7 @@
} else if (mCurMethod == null) {
// This means there is no input method available.
if (DEBUG) Log.v(TAG, "ABORT input: no input method!");
- return;
+ return true;
}
}
if (mCurMethod != null && mCompletions != null) {
@@ -1051,6 +1086,8 @@
Log.w(TAG, "IME died: " + mCurId, e);
}
}
+
+ return true;
}
/**
@@ -1127,43 +1164,48 @@
* @hide
*/
public void checkFocus() {
+ if (checkFocusNoStartInput(false)) {
+ startInputInner(null, 0, 0, 0);
+ }
+ }
+
+ private boolean checkFocusNoStartInput(boolean forceNewFocus) {
// This is called a lot, so short-circuit before locking.
- if (mServedView == mNextServedView && !mNextServedNeedsStart) {
- return;
+ if (mServedView == mNextServedView && !forceNewFocus) {
+ return false;
}
InputConnection ic = null;
synchronized (mH) {
- if (mServedView == mNextServedView && !mNextServedNeedsStart) {
- return;
+ if (mServedView == mNextServedView && !forceNewFocus) {
+ return false;
}
if (DEBUG) Log.v(TAG, "checkFocus: view=" + mServedView
+ " next=" + mNextServedView
- + " restart=" + mNextServedNeedsStart);
-
- mNextServedNeedsStart = false;
+ + " forceNewFocus=" + forceNewFocus);
+
if (mNextServedView == null) {
finishInputLocked();
// In this case, we used to have a focused view on the window,
// but no longer do. We should make sure the input method is
// no longer shown, since it serves no purpose.
closeCurrentInput();
- return;
+ return false;
}
-
+
ic = mServedInputConnection;
-
+
mServedView = mNextServedView;
mCurrentTextBoxAttribute = null;
mCompletions = null;
mServedConnecting = true;
}
-
+
if (ic != null) {
ic.finishComposingText();
}
-
- startInputInner();
+
+ return true;
}
void closeCurrentInput() {
@@ -1172,13 +1214,14 @@
} catch (RemoteException e) {
}
}
-
+
/**
* Called by ViewAncestor when its window gets input focus.
* @hide
*/
public void onWindowFocus(View rootView, View focusedView, int softInputMode,
boolean first, int windowFlags) {
+ boolean forceNewFocus = false;
synchronized (mH) {
if (DEBUG) Log.v(TAG, "onWindowFocus: " + focusedView
+ " softInputMode=" + softInputMode
@@ -1187,20 +1230,39 @@
if (mHasBeenInactive) {
if (DEBUG) Log.v(TAG, "Has been inactive! Starting fresh");
mHasBeenInactive = false;
- mNextServedNeedsStart = true;
+ forceNewFocus = true;
}
focusInLocked(focusedView != null ? focusedView : rootView);
}
+
+ int controlFlags = 0;
+ if (focusedView != null) {
+ controlFlags |= CONTROL_WINDOW_VIEW_HAS_FOCUS;
+ if (focusedView.onCheckIsTextEditor()) {
+ controlFlags |= CONTROL_WINDOW_IS_TEXT_EDITOR;
+ }
+ }
+ if (first) {
+ controlFlags |= CONTROL_WINDOW_FIRST;
+ }
- checkFocus();
+ if (checkFocusNoStartInput(forceNewFocus)) {
+ // We need to restart input on the current focus view. This
+ // should be done in conjunction with telling the system service
+ // about the window gaining focus, to help make the transition
+ // smooth.
+ if (startInputInner(rootView.getWindowToken(),
+ controlFlags, softInputMode, windowFlags)) {
+ return;
+ }
+ }
+ // For some reason we didn't do a startInput + windowFocusGain, so
+ // we'll just do a window focus gain and call it a day.
synchronized (mH) {
try {
- final boolean isTextEditor = focusedView != null &&
- focusedView.onCheckIsTextEditor();
mService.windowGainedFocus(mClient, rootView.getWindowToken(),
- focusedView != null, isTextEditor, softInputMode, first,
- windowFlags);
+ controlFlags, softInputMode, windowFlags, null, null);
} catch (RemoteException e) {
}
}
@@ -1633,8 +1695,7 @@
p.println(" mCurMethod=" + mCurMethod);
p.println(" mCurRootView=" + mCurRootView);
p.println(" mServedView=" + mServedView);
- p.println(" mNextServedNeedsStart=" + mNextServedNeedsStart
- + " mNextServedView=" + mNextServedView);
+ p.println(" mNextServedView=" + mNextServedView);
p.println(" mServedConnecting=" + mServedConnecting);
if (mCurrentTextBoxAttribute != null) {
p.println(" mCurrentTextBoxAttribute:");
diff --git a/core/java/android/widget/NumberPicker.java b/core/java/android/widget/NumberPicker.java
index 750cbaa..f26d7d7 100644
--- a/core/java/android/widget/NumberPicker.java
+++ b/core/java/android/widget/NumberPicker.java
@@ -48,6 +48,7 @@
import android.view.accessibility.AccessibilityEvent;
import android.view.accessibility.AccessibilityManager;
import android.view.animation.DecelerateInterpolator;
+import android.view.inputmethod.EditorInfo;
import android.view.inputmethod.InputMethodManager;
import com.android.internal.R;
@@ -367,9 +368,9 @@
private float mLastMotionEventY;
/**
- * Flag if to begin edit on next up event.
+ * Flag if to check for double tap and potentially start edit.
*/
- private boolean mBeginEditOnUpEvent;
+ private boolean mCheckBeginEditOnUpEvent;
/**
* Flag if to adjust the selector wheel on next up event.
@@ -447,6 +448,11 @@
private boolean mScrollWheelAndFadingEdgesInitialized;
/**
+ * The time of the last up event.
+ */
+ private long mLastUpEventTimeMillis;
+
+ /**
* Interface to listen for changes of the current value.
*/
public interface OnValueChangeListener {
@@ -624,10 +630,6 @@
public void onFocusChange(View v, boolean hasFocus) {
if (hasFocus) {
mInputText.selectAll();
- InputMethodManager inputMethodManager = InputMethodManager.peekInstance();
- if (inputMethodManager != null) {
- inputMethodManager.showSoftInput(mInputText, 0);
- }
} else {
mInputText.setSelection(0, 0);
validateInputTextView(v);
@@ -639,6 +641,7 @@
});
mInputText.setRawInputType(InputType.TYPE_CLASS_NUMBER);
+ mInputText.setImeOptions(EditorInfo.IME_ACTION_DONE);
// initialize constants
mTouchSlop = ViewConfiguration.getTapTimeout();
@@ -773,7 +776,7 @@
removeAllCallbacks();
mShowInputControlsAnimator.cancel();
mDimSelectorWheelAnimator.cancel();
- mBeginEditOnUpEvent = false;
+ mCheckBeginEditOnUpEvent = false;
mAdjustScrollerOnUpEvent = true;
if (mSelectorWheelState == SELECTOR_WHEEL_STATE_LARGE) {
mSelectorWheelPaint.setAlpha(SELECTOR_WHEEL_BRIGHT_ALPHA);
@@ -784,7 +787,7 @@
mAdjustScroller.forceFinished(true);
onScrollStateChange(OnScrollListener.SCROLL_STATE_IDLE);
}
- mBeginEditOnUpEvent = scrollersFinished;
+ mCheckBeginEditOnUpEvent = scrollersFinished;
mAdjustScrollerOnUpEvent = true;
hideInputControls();
return true;
@@ -801,7 +804,7 @@
float currentMoveY = event.getY();
int deltaDownY = (int) Math.abs(currentMoveY - mLastDownEventY);
if (deltaDownY > mTouchSlop) {
- mBeginEditOnUpEvent = false;
+ mCheckBeginEditOnUpEvent = false;
onScrollStateChange(OnScrollListener.SCROLL_STATE_TOUCH_SCROLL);
setSelectorWheelState(SELECTOR_WHEEL_STATE_LARGE);
hideInputControls();
@@ -825,11 +828,11 @@
switch (action) {
case MotionEvent.ACTION_MOVE:
float currentMoveY = ev.getY();
- if (mBeginEditOnUpEvent
+ if (mCheckBeginEditOnUpEvent
|| mScrollState != OnScrollListener.SCROLL_STATE_TOUCH_SCROLL) {
int deltaDownY = (int) Math.abs(currentMoveY - mLastDownEventY);
if (deltaDownY > mTouchSlop) {
- mBeginEditOnUpEvent = false;
+ mCheckBeginEditOnUpEvent = false;
onScrollStateChange(OnScrollListener.SCROLL_STATE_TOUCH_SCROLL);
}
}
@@ -839,11 +842,20 @@
mLastMotionEventY = currentMoveY;
break;
case MotionEvent.ACTION_UP:
- if (mBeginEditOnUpEvent) {
- setSelectorWheelState(SELECTOR_WHEEL_STATE_SMALL);
- showInputControls(mShowInputControlsAnimimationDuration);
- mInputText.requestFocus();
- return true;
+ if (mCheckBeginEditOnUpEvent) {
+ mCheckBeginEditOnUpEvent = false;
+ final long deltaTapTimeMillis = ev.getEventTime() - mLastUpEventTimeMillis;
+ if (deltaTapTimeMillis < ViewConfiguration.getDoubleTapTimeout()) {
+ setSelectorWheelState(SELECTOR_WHEEL_STATE_SMALL);
+ showInputControls(mShowInputControlsAnimimationDuration);
+ mInputText.requestFocus();
+ InputMethodManager inputMethodManager = InputMethodManager.peekInstance();
+ if (inputMethodManager != null) {
+ inputMethodManager.showSoftInput(mInputText, 0);
+ }
+ mLastUpEventTimeMillis = ev.getEventTime();
+ return true;
+ }
}
VelocityTracker velocityTracker = mVelocityTracker;
velocityTracker.computeCurrentVelocity(1000, mMaximumFlingVelocity);
@@ -862,6 +874,7 @@
}
mVelocityTracker.recycle();
mVelocityTracker = null;
+ mLastUpEventTimeMillis = ev.getEventTime();
break;
}
return true;
@@ -1985,4 +1998,22 @@
postDelayed(this, mLongPressUpdateInterval);
}
}
+
+ /**
+ * @hide
+ */
+ public static class CustomEditText extends EditText {
+
+ public CustomEditText(Context context, AttributeSet attrs) {
+ super(context, attrs);
+ }
+
+ @Override
+ public void onEditorAction(int actionCode) {
+ super.onEditorAction(actionCode);
+ if (actionCode == EditorInfo.IME_ACTION_DONE) {
+ clearFocus();
+ }
+ }
+ }
}
diff --git a/core/java/com/android/internal/view/IInputMethodManager.aidl b/core/java/com/android/internal/view/IInputMethodManager.aidl
index 683aca5..714d8ba 100644
--- a/core/java/com/android/internal/view/IInputMethodManager.aidl
+++ b/core/java/com/android/internal/view/IInputMethodManager.aidl
@@ -43,16 +43,17 @@
void removeClient(in IInputMethodClient client);
InputBindResult startInput(in IInputMethodClient client,
- IInputContext inputContext, in EditorInfo attribute,
- boolean initial, boolean needResult);
+ IInputContext inputContext, in EditorInfo attribute, int controlFlags);
void finishInput(in IInputMethodClient client);
boolean showSoftInput(in IInputMethodClient client, int flags,
in ResultReceiver resultReceiver);
boolean hideSoftInput(in IInputMethodClient client, int flags,
in ResultReceiver resultReceiver);
- void windowGainedFocus(in IInputMethodClient client, in IBinder windowToken,
- boolean viewHasFocus, boolean isTextEditor,
- int softInputMode, boolean first, int windowFlags);
+ // Report that a window has gained focus. If 'attribute' is non-null,
+ // this will also do a startInput.
+ InputBindResult windowGainedFocus(in IInputMethodClient client, in IBinder windowToken,
+ int controlFlags, int softInputMode, int windowFlags,
+ in EditorInfo attribute, IInputContext inputContext);
void showInputMethodPickerFromClient(in IInputMethodClient client);
void showInputMethodAndSubtypeEnablerFromClient(in IInputMethodClient client, String topId);
diff --git a/core/java/com/android/internal/widget/ActionBarContextView.java b/core/java/com/android/internal/widget/ActionBarContextView.java
index ed02636..fa16527 100644
--- a/core/java/com/android/internal/widget/ActionBarContextView.java
+++ b/core/java/com/android/internal/widget/ActionBarContextView.java
@@ -405,8 +405,7 @@
View child = mMenuView.getChildAt(i);
child.setScaleY(0);
ObjectAnimator a = ObjectAnimator.ofFloat(child, "scaleY", 0, 1);
- a.setDuration(100);
- a.setStartDelay(j * 70);
+ a.setDuration(300);
b.with(a);
}
}
@@ -432,8 +431,7 @@
View child = mMenuView.getChildAt(i);
child.setScaleY(0);
ObjectAnimator a = ObjectAnimator.ofFloat(child, "scaleY", 0);
- a.setDuration(100);
- a.setStartDelay(i * 70);
+ a.setDuration(300);
b.with(a);
}
}
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
index c2e4b78..cb08eed 100644
--- 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
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
index 51b839f..ea065c3 100644
--- 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
Binary files differ
diff --git a/core/res/res/drawable-mdpi/stat_sys_data_wimax_signal_3_fully.png b/core/res/res/drawable-mdpi/stat_sys_data_wimax_signal_3_fully.png
new file mode 100644
index 0000000..d3ba98c
--- /dev/null
+++ b/core/res/res/drawable-mdpi/stat_sys_data_wimax_signal_3_fully.png
Binary files differ
diff --git a/core/res/res/drawable-mdpi/stat_sys_data_wimax_signal_disconnected.png b/core/res/res/drawable-mdpi/stat_sys_data_wimax_signal_disconnected.png
new file mode 100644
index 0000000..153c6ad
--- /dev/null
+++ b/core/res/res/drawable-mdpi/stat_sys_data_wimax_signal_disconnected.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/stat_sys_data_wimax_signal_3_fully.png b/core/res/res/drawable-xhdpi/stat_sys_data_wimax_signal_3_fully.png
new file mode 100644
index 0000000..ec6bc54
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/stat_sys_data_wimax_signal_3_fully.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/stat_sys_data_wimax_signal_disconnected.png b/core/res/res/drawable-xhdpi/stat_sys_data_wimax_signal_disconnected.png
new file mode 100644
index 0000000..9fd4f33
--- /dev/null
+++ b/core/res/res/drawable-xhdpi/stat_sys_data_wimax_signal_disconnected.png
Binary files differ
diff --git a/core/res/res/layout/number_picker.xml b/core/res/res/layout/number_picker.xml
index 807daf2..2967696 100644
--- a/core/res/res/layout/number_picker.xml
+++ b/core/res/res/layout/number_picker.xml
@@ -25,7 +25,8 @@
style="?android:attr/numberPickerUpButtonStyle"
android:contentDescription="@string/number_picker_increment_button" />
- <EditText android:id="@+id/numberpicker_input"
+ <view class="android.widget.NumberPicker$CustomEditText"
+ android:id="@+id/numberpicker_input"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
style="?android:attr/numberPickerInputTextStyle" />
diff --git a/core/res/res/values/config.xml b/core/res/res/values/config.xml
index 5eb09e6..24afe15 100755
--- a/core/res/res/values/config.xml
+++ b/core/res/res/values/config.xml
@@ -227,6 +227,13 @@
<item>4</item>
</integer-array>
+ <!-- If the DUN connection for this CDMA device supports more than just DUN -->
+ <!-- traffic you should list them here. -->
+ <!-- If this device is not CDMA this is ignored. If this list is empty on -->
+ <!-- a DUN-requiring CDMA device, the DUN APN will just support just DUN. -->
+ <string-array translatable="false" name="config_cdma_dun_supported_types">
+ </string-array>
+
<!-- String containing the apn value for tethering. May be overriden by secure settings
TETHER_DUN_APN. Value is a comma separated series of strings:
"name,apn,proxy,port,username,password,server,mmsc,mmsproxy,mmsport,mcc,mnc,auth,type"
@@ -522,13 +529,13 @@
<!-- Component name of the default wallpaper. This will be ImageWallpaper if not
specified -->
- <string name="default_wallpaper_component">@null</string>
+ <string name="default_wallpaper_component" translatable="false">@null</string>
<!-- Component name of the service providing network location support. -->
- <string name="config_networkLocationProvider">@null</string>
+ <string name="config_networkLocationProvider" translatable="false">@null</string>
<!-- Component name of the service providing geocoder API support. -->
- <string name="config_geocodeProvider">@null</string>
+ <string name="config_geocodeProvider" translatable="false">@null</string>
<!-- Boolean indicating if current platform supports bluetooth SCO for off call
use cases -->
@@ -552,7 +559,7 @@
<integer name="config_datause_throttle_kbitsps">300</integer>
<!-- The default iface on which to monitor data use -->
- <string name="config_datause_iface">rmnet0</string>
+ <string name="config_datause_iface" translatable="false">rmnet0</string>
<!-- The default reduced-datarate notification mask -->
<!-- 2 means give warning -->
@@ -582,11 +589,11 @@
<bool name="config_sms_capable">true</bool>
<!-- IP address of the dns server to use if nobody else suggests one -->
- <string name="config_default_dns_server">8.8.8.8</string>
+ <string name="config_default_dns_server" translatable="false">8.8.8.8</string>
<!-- The default character set for GsmAlphabet -->
<!-- Empty string means MBCS is not considered -->
- <string name="gsm_alphabet_default_charset"></string>
+ <string name="gsm_alphabet_default_charset" translatable="false"></string>
<!-- Enables SIP on WIFI only -->
<bool name="config_sip_wifi_only">false</bool>
@@ -621,7 +628,7 @@
OMA-TS-UAProf-V2_0-20060206-A Section 8.1.1.1. If the URL contains a '%s'
format string then that substring will be replaced with the value of
Build.MODEL. The format string shall not be escaped. -->
- <string name="config_useragentprofile_url"></string>
+ <string name="config_useragentprofile_url" translatable="false"></string>
<!-- When a database query is executed, the results retuned are paginated
in pages of size (in KB) indicated by this value -->
@@ -632,7 +639,7 @@
<bool name="config_showMenuShortcutsWhenKeyboardPresent">false</bool>
<!-- Do not translate. Defines the slots is Two Digit Number for dialing normally not USSD -->
- <string-array name="config_twoDigitNumberPattern">
+ <string-array name="config_twoDigitNumberPattern" translatable="false">
</string-array>
<!-- The VoiceMail default value is displayed to my own number if it is true -->
@@ -732,15 +739,15 @@
<!-- Set and Unsets WiMAX -->
<bool name="config_wimaxEnabled">false</bool>
<!-- Location of the wimax framwork jar location -->
- <string name="config_wimaxServiceJarLocation"></string>
+ <string name="config_wimaxServiceJarLocation" translatable="false"></string>
<!-- Location of the wimax native library locaiton -->
- <string name="config_wimaxNativeLibLocation"></string>
+ <string name="config_wimaxNativeLibLocation" translatable="false"></string>
<!-- Name of the wimax manager class -->
- <string name="config_wimaxManagerClassname"></string>
+ <string name="config_wimaxManagerClassname" translatable="false"></string>
<!-- Name of the wimax service class -->
- <string name="config_wimaxServiceClassname"></string>
+ <string name="config_wimaxServiceClassname" translatable="false"></string>
<!-- Name of the wimax state tracker clas -->
- <string name="config_wimaxStateTrackerClassname"></string>
+ <string name="config_wimaxStateTrackerClassname" translatable="false"></string>
<!-- Base "touch slop" value used by ViewConfiguration as a
movement threshold where scrolling should begin. -->
diff --git a/core/tests/bandwidthtests/src/com/android/bandwidthtest/BandwidthTest.java b/core/tests/bandwidthtests/src/com/android/bandwidthtest/BandwidthTest.java
index a781472..76b702e 100644
--- a/core/tests/bandwidthtests/src/com/android/bandwidthtest/BandwidthTest.java
+++ b/core/tests/bandwidthtests/src/com/android/bandwidthtest/BandwidthTest.java
@@ -90,6 +90,7 @@
*/
@LargeTest
public void testWifiDownload() throws Exception {
+ mConnectionUtil.wifiTestInit();
assertTrue("Could not connect to wifi!", setDeviceWifiAndAirplaneMode(mSsid));
downloadFile();
}
@@ -143,6 +144,7 @@
*/
@LargeTest
public void testWifiUpload() throws Exception {
+ mConnectionUtil.wifiTestInit();
assertTrue(setDeviceWifiAndAirplaneMode(mSsid));
uploadFile();
}
@@ -197,6 +199,7 @@
*/
@LargeTest
public void testWifiDownloadWithDownloadManager() throws Exception {
+ mConnectionUtil.wifiTestInit();
assertTrue(setDeviceWifiAndAirplaneMode(mSsid));
downloadFileUsingDownloadManager();
}
@@ -286,6 +289,8 @@
* @return true if we successfully connect to mobile data.
*/
public boolean hasMobileData() {
+ assertTrue(mConnectionUtil.waitForNetworkState(ConnectivityManager.TYPE_MOBILE,
+ State.CONNECTED, ConnectionUtil.LONG_TIMEOUT));
assertTrue("Not connected to mobile", mConnectionUtil.isConnectedToMobile());
assertFalse("Still connected to wifi.", mConnectionUtil.isConnectedToWifi());
return mConnectionUtil.hasData();
diff --git a/core/tests/bandwidthtests/src/com/android/bandwidthtest/util/ConnectionUtil.java b/core/tests/bandwidthtests/src/com/android/bandwidthtest/util/ConnectionUtil.java
index a5e5ab0e..8d778c4 100644
--- a/core/tests/bandwidthtests/src/com/android/bandwidthtest/util/ConnectionUtil.java
+++ b/core/tests/bandwidthtests/src/com/android/bandwidthtest/util/ConnectionUtil.java
@@ -44,6 +44,8 @@
import com.android.bandwidthtest.NetworkState.StateTransitionDirection;
import com.android.internal.util.AsyncChannel;
+import junit.framework.Assert;
+
import java.io.IOException;
import java.net.UnknownHostException;
import java.util.List;
@@ -57,7 +59,7 @@
private static final int WAIT_FOR_SCAN_RESULT = 10 * 1000; // 10 seconds
private static final int WIFI_SCAN_TIMEOUT = 50 * 1000;
public static final int SHORT_TIMEOUT = 5 * 1000;
- public static final int LONG_TIMEOUT = 10 * 1000;
+ public static final int LONG_TIMEOUT = 120 * 1000; // 2 minutes
private ConnectivityReceiver mConnectivityReceiver = null;
private WifiReceiver mWifiReceiver = null;
private DownloadReceiver mDownloadReceiver = null;
@@ -118,8 +120,14 @@
initializeNetworkStates();
- mWifiManager.setWifiEnabled(true);
+ }
+
+ /**
+ * Additional initialization needed for wifi related tests.
+ */
+ public void wifiTestInit() {
+ mWifiManager.setWifiEnabled(true);
Log.v(LOG_TAG, "Clear Wifi before we start the test.");
sleep(SHORT_TIMEOUT);
removeConfiguredNetworksAndDisableWifi();
@@ -146,10 +154,10 @@
Log.v("ConnectivityReceiver", "onReceive() called with " + intent);
return;
}
- if (intent.hasExtra(ConnectivityManager.EXTRA_NETWORK_INFO)) {
- mNetworkInfo = (NetworkInfo)
- intent.getParcelableExtra(ConnectivityManager.EXTRA_NETWORK_INFO);
- }
+
+ final ConnectivityManager connManager = (ConnectivityManager) context
+ .getSystemService(Context.CONNECTIVITY_SERVICE);
+ mNetworkInfo = connManager.getActiveNetworkInfo();
if (intent.hasExtra(ConnectivityManager.EXTRA_OTHER_NETWORK_INFO)) {
mOtherNetworkInfo = (NetworkInfo)
@@ -447,6 +455,11 @@
} catch (InterruptedException e) {
e.printStackTrace();
}
+ if (mNetworkInfo == null) {
+ Log.v(LOG_TAG, "Do not have networkInfo! Force fetch of network info.");
+ mNetworkInfo = mCM.getActiveNetworkInfo();
+ Assert.assertNotNull(mNetworkInfo);
+ }
if ((mNetworkInfo.getType() != networkType) ||
(mNetworkInfo.getState() != expectedState)) {
Log.v(LOG_TAG, "network state for " + mNetworkInfo.getType() +
@@ -525,7 +538,7 @@
/**
* Connect to Wi-Fi with the given configuration.
* @param config
- * @return true if we ar connected to a given
+ * @return true if we are connected to a given AP.
*/
public boolean connectToWifiWithConfiguration(WifiConfiguration config) {
// The SSID in the configuration is a pure string, need to convert it to a quoted string.
diff --git a/docs/html/design/building-blocks/buttons.html b/docs/html/design/building-blocks/buttons.html
index cc43fcb..9f9652f9 100644
--- a/docs/html/design/building-blocks/buttons.html
+++ b/docs/html/design/building-blocks/buttons.html
@@ -80,6 +80,10 @@
</ul>
</li>
+ <li class="nav-section">
+ <div class="nav-section-header empty"><a href="../downloads/index.html">Downloads</a></div>
+ </li>
+
<li>
<div id="back-dac-section"><a href="../../index.html">Developers</a></div>
</li>
@@ -110,7 +114,8 @@
<img src="../static/content/buttons_basic.png">
</div>
-<h2>Basic Buttons</h2>
+<h2 id="basic">Basic Buttons</h2>
+
<p>Basic buttons are traditional buttons with borders and background. Android supports two styles for
basic buttons: default and small. Default buttons have slightly larger font size and are optimized
for display outside of form content. Small buttons are intended for display alongside other content.
@@ -131,7 +136,8 @@
</div>
</div>
-<h2>Borderless Buttons</h2>
+<h2 id="borderless">Borderless Buttons</h2>
+
<p>Borderless buttons resemble basic buttons except that they have no borders or background. You can
use borderless buttons with both icons and text. Borderless buttons are visually more lightweight
than basic buttons and integrate nicely with other content.</p>
diff --git a/docs/html/design/building-blocks/dialogs.html b/docs/html/design/building-blocks/dialogs.html
index fc00780..f03a57a 100644
--- a/docs/html/design/building-blocks/dialogs.html
+++ b/docs/html/design/building-blocks/dialogs.html
@@ -80,6 +80,10 @@
</ul>
</li>
+ <li class="nav-section">
+ <div class="nav-section-header empty"><a href="../downloads/index.html">Downloads</a></div>
+ </li>
+
<li>
<div id="back-dac-section"><a href="../../index.html">Developers</a></div>
</li>
diff --git a/docs/html/design/building-blocks/grid-lists.html b/docs/html/design/building-blocks/grid-lists.html
index b4cfdcb..3f60216 100644
--- a/docs/html/design/building-blocks/grid-lists.html
+++ b/docs/html/design/building-blocks/grid-lists.html
@@ -80,6 +80,10 @@
</ul>
</li>
+ <li class="nav-section">
+ <div class="nav-section-header empty"><a href="../downloads/index.html">Downloads</a></div>
+ </li>
+
<li>
<div id="back-dac-section"><a href="../../index.html">Developers</a></div>
</li>
@@ -159,7 +163,7 @@
</div>
-<h2 id="with_labels">Grid List with Labels</h2>
+<h2 id="with-labels">Grid List with Labels</h2>
<p>Use labels to display additional contextual information for your grid list items.</p>
diff --git a/docs/html/design/building-blocks/index.html b/docs/html/design/building-blocks/index.html
index c99d85c..029cabf 100644
--- a/docs/html/design/building-blocks/index.html
+++ b/docs/html/design/building-blocks/index.html
@@ -93,6 +93,10 @@
</ul>
</li>
+ <li class="nav-section">
+ <div class="nav-section-header empty"><a href="../downloads/index.html">Downloads</a></div>
+ </li>
+
<li>
<div id="back-dac-section"><a href="../../index.html">Developers</a></div>
</li>
diff --git a/docs/html/design/building-blocks/lists.html b/docs/html/design/building-blocks/lists.html
index 914ae9e..dfd13d9 100644
--- a/docs/html/design/building-blocks/lists.html
+++ b/docs/html/design/building-blocks/lists.html
@@ -80,6 +80,10 @@
</ul>
</li>
+ <li class="nav-section">
+ <div class="nav-section-header empty"><a href="../downloads/index.html">Downloads</a></div>
+ </li>
+
<li>
<div id="back-dac-section"><a href="../../index.html">Developers</a></div>
</li>
diff --git a/docs/html/design/building-blocks/pickers.html b/docs/html/design/building-blocks/pickers.html
index 4c95a9f..fc9989c 100644
--- a/docs/html/design/building-blocks/pickers.html
+++ b/docs/html/design/building-blocks/pickers.html
@@ -80,6 +80,10 @@
</ul>
</li>
+ <li class="nav-section">
+ <div class="nav-section-header empty"><a href="../downloads/index.html">Downloads</a></div>
+ </li>
+
<li>
<div id="back-dac-section"><a href="../../index.html">Developers</a></div>
</li>
@@ -123,7 +127,7 @@
</div>
</div>
-<h2>Date and time pickers</h2>
+<h2 id="date-time">Date and time pickers</h2>
<p>Android provides these as ready-to-use dialogs. Each picker is a dialog with a set of controls for
entering the parts of the date (month, day, year) or time (hour, minute, AM/PM). Using these in your
diff --git a/docs/html/design/building-blocks/progress.html b/docs/html/design/building-blocks/progress.html
index 7aae913..32183bc 100644
--- a/docs/html/design/building-blocks/progress.html
+++ b/docs/html/design/building-blocks/progress.html
@@ -80,6 +80,10 @@
</ul>
</li>
+ <li class="nav-section">
+ <div class="nav-section-header empty"><a href="../downloads/index.html">Downloads</a></div>
+ </li>
+
<li>
<div id="back-dac-section"><a href="../../index.html">Developers</a></div>
</li>
@@ -105,7 +109,8 @@
<p>When an operation of interest to the user is taking place over a relatively long period of time,
provide visual feedback that it's still happening and in the process of being completed.</p>
-<h2>Progress</h2>
+<h2 id="progress">Progress</h2>
+
<p>If you know the percentage of the operation that has been completed, use a determinate progress bar
to give the user a sense of how much longer it will take.</p>
diff --git a/docs/html/design/building-blocks/scrolling.html b/docs/html/design/building-blocks/scrolling.html
index 3f1167c..3599a97 100644
--- a/docs/html/design/building-blocks/scrolling.html
+++ b/docs/html/design/building-blocks/scrolling.html
@@ -80,6 +80,10 @@
</ul>
</li>
+ <li class="nav-section">
+ <div class="nav-section-header empty"><a href="../downloads/index.html">Downloads</a></div>
+ </li>
+
<li>
<div id="back-dac-section"><a href="../../index.html">Developers</a></div>
</li>
@@ -104,7 +108,8 @@
<p>Scrolling allows the user to navigate to content in the overflow using a swipe gesture. The
scrolling speed is proportional to the speed of the gesture.</p>
-<h2>Scroll Indicator</h2>
+<h2 id="indicator">Scroll Indicator</h2>
+
<p>Appears during scrolling to indicate what portion of the content is currently in view.</p>
<div class="framed-galaxynexus-land-span-13">
@@ -118,7 +123,8 @@
<div class="video-instructions"> </div>
</div>
-<h2>Index Scrolling</h2>
+<h2 id="index-scrolling">Index Scrolling</h2>
+
<p>In addition to traditional scrolling, a long alphabetical list can also offer index scrolling: a way
to quickly navigate to the items that begin with a particular letter. With index scrolling, a scroll
indicator appears even when the user isn't scrolling. Touching or dragging it causes the current
diff --git a/docs/html/design/building-blocks/seek-bars.html b/docs/html/design/building-blocks/seek-bars.html
index 84cf5d2..aef1823 100644
--- a/docs/html/design/building-blocks/seek-bars.html
+++ b/docs/html/design/building-blocks/seek-bars.html
@@ -80,6 +80,10 @@
</ul>
</li>
+ <li class="nav-section">
+ <div class="nav-section-header empty"><a href="../downloads/index.html">Downloads</a></div>
+ </li>
+
<li>
<div id="back-dac-section"><a href="../../index.html">Developers</a></div>
</li>
diff --git a/docs/html/design/building-blocks/spinners.html b/docs/html/design/building-blocks/spinners.html
index bf21fe8..5ef9d04 100644
--- a/docs/html/design/building-blocks/spinners.html
+++ b/docs/html/design/building-blocks/spinners.html
@@ -80,6 +80,10 @@
</ul>
</li>
+ <li class="nav-section">
+ <div class="nav-section-header empty"><a href="../downloads/index.html">Downloads</a></div>
+ </li>
+
<li>
<div id="back-dac-section"><a href="../../index.html">Developers</a></div>
</li>
diff --git a/docs/html/design/building-blocks/switches.html b/docs/html/design/building-blocks/switches.html
index 3d7bc9c..09af540 100644
--- a/docs/html/design/building-blocks/switches.html
+++ b/docs/html/design/building-blocks/switches.html
@@ -80,6 +80,10 @@
</ul>
</li>
+ <li class="nav-section">
+ <div class="nav-section-header empty"><a href="../downloads/index.html">Downloads</a></div>
+ </li>
+
<li>
<div id="back-dac-section"><a href="../../index.html">Developers</a></div>
</li>
@@ -104,7 +108,8 @@
<p>Switches allow the user to select options. There are three kinds of switches: checkboxes, radio
buttons, and on/off switches.</p>
-<h2>Checkboxes</h2>
+<h2 id="checkboxes">Checkboxes</h2>
+
<p>Checkboxes allow the user to select multiple options from a set. Avoid using a single checkbox to
turn an option off or on. Instead, use an on/off switch.</p>
@@ -112,7 +117,8 @@
<img src="../static/content/switches_checkboxes.png">
</div>
-<h2>Radio Buttons</h2>
+<h2 id="radio-buttons">Radio Buttons</h2>
+
<p>Radio buttons allow the user to select one option from a set. Use radio buttons for exclusive
selection if you think that the user needs to see all available options side-by-side. Otherwise,
consider a spinner, which uses less space.</p>
@@ -121,7 +127,8 @@
<img src="../static/content/switches_radios.png">
</div>
-<h2>On/off Switches</h2>
+<h2 id="switches">On/off Switches</h2>
+
<p>On/off switches toggle the state of a single settings option.</p>
<div style="text-align: center">
diff --git a/docs/html/design/building-blocks/tabs.html b/docs/html/design/building-blocks/tabs.html
index c094cce..d4b0e52 100644
--- a/docs/html/design/building-blocks/tabs.html
+++ b/docs/html/design/building-blocks/tabs.html
@@ -80,6 +80,10 @@
</ul>
</li>
+ <li class="nav-section">
+ <div class="nav-section-header empty"><a href="../downloads/index.html">Downloads</a></div>
+ </li>
+
<li>
<div id="back-dac-section"><a href="../../index.html">Developers</a></div>
</li>
diff --git a/docs/html/design/building-blocks/text-fields.html b/docs/html/design/building-blocks/text-fields.html
index 6496fa5..b9ec42d 100644
--- a/docs/html/design/building-blocks/text-fields.html
+++ b/docs/html/design/building-blocks/text-fields.html
@@ -80,6 +80,10 @@
</ul>
</li>
+ <li class="nav-section">
+ <div class="nav-section-header empty"><a href="../downloads/index.html">Downloads</a></div>
+ </li>
+
<li>
<div id="back-dac-section"><a href="../../index.html">Developers</a></div>
</li>
@@ -141,7 +145,7 @@
</div>
</div>
-<h2>Text Selection</h2>
+<h2 id="text-selection">Text Selection</h2>
<p>Users can select any word in a text field with a long press. This action triggers a text selection
mode that facilitates extending the selection or choosing an action to perform on the selected text.
diff --git a/docs/html/design/downloads/index.html b/docs/html/design/downloads/index.html
new file mode 100644
index 0000000..f910b29
--- /dev/null
+++ b/docs/html/design/downloads/index.html
@@ -0,0 +1,278 @@
+<!DOCTYPE html>
+<html lang="en">
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+ <title>
+
+Android Design - Downloads
+ </title>
+ <link rel="shortcut icon" type="image/x-icon" href="/favicon.ico">
+ <link rel="stylesheet" href="http://fonts.googleapis.com/css?family=Roboto:regular,medium,thin,italic,mediumitalic">
+ <link rel="stylesheet" href="../static/yui-3.3.0-reset-min.css">
+ <link rel="stylesheet" href="../static/default.css">
+
+ </head>
+ <body>
+
+ <div id="page-container">
+
+ <div id="page-header"><a href="../index.html">Android Design</a></div>
+
+ <div id="main-row">
+
+ <ul id="nav">
+
+ <li class="nav-section">
+ <div class="nav-section-header"><a href="../index.html">Get Started</a></div>
+ <ul>
+ <li><a href="../get-started/creative-vision.html">Creative Vision</a></li>
+ <li><a href="../get-started/principles.html">Design Principles</a></li>
+ <li><a href="../get-started/ui-overview.html">UI Overview</a></li>
+ </ul>
+ </li>
+
+ <li class="nav-section">
+ <div class="nav-section-header"><a href="../style/index.html">Style</a></div>
+ <ul>
+ <li><a href="../style/devices-displays.html">Devices and Displays</a></li>
+ <li><a href="../style/themes.html">Themes</a></li>
+ <li><a href="../style/touch-feedback.html">Touch Feedback</a></li>
+ <li><a href="../style/metrics-grids.html">Metrics and Grids</a></li>
+ <li><a href="../style/typography.html">Typography</a></li>
+ <li><a href="../style/color.html">Color</a></li>
+ <li><a href="../style/iconography.html">Iconography</a></li>
+ <li><a href="../style/writing.html">Writing Style</a></li>
+ </ul>
+ </li>
+
+ <li class="nav-section">
+ <div class="nav-section-header"><a href="../patterns/index.html">Patterns</a></div>
+ <ul>
+ <li><a href="../patterns/new-4-0.html">New in Android 4.0</a></li>
+ <li><a href="../patterns/gestures.html">Gestures</a></li>
+ <li><a href="../patterns/app-structure.html">App Structure</a></li>
+ <li><a href="../patterns/navigation.html">Navigation</a></li>
+ <li><a href="../patterns/actionbar.html">Action Bar</a></li>
+ <li><a href="../patterns/multi-pane-layouts.html">Multi-pane Layouts</a></li>
+ <li><a href="../patterns/swipe-views.html">Swipe Views</a></li>
+ <li><a href="../patterns/selection.html">Selection</a></li>
+ <li><a href="../patterns/notifications.html">Notifications</a></li>
+ <li><a href="../patterns/compatibility.html">Compatibility</a></li>
+ <li><a href="../patterns/pure-android.html">Pure Android</a></li>
+ </ul>
+ </li>
+
+ <li class="nav-section">
+ <div class="nav-section-header"><a href="../building-blocks/index.html">Building Blocks</a></div>
+ <ul>
+ <li><a href="../building-blocks/tabs.html">Tabs</a></li>
+ <li><a href="../building-blocks/lists.html">Lists</a></li>
+ <li><a href="../building-blocks/grid-lists.html">Grid Lists</a></li>
+ <li><a href="../building-blocks/scrolling.html">Scrolling</a></li>
+ <li><a href="../building-blocks/spinners.html">Spinners</a></li>
+ <li><a href="../building-blocks/buttons.html">Buttons</a></li>
+ <li><a href="../building-blocks/text-fields.html">Text Fields</a></li>
+ <li><a href="../building-blocks/seek-bars.html">Seek Bars</a></li>
+ <li><a href="../building-blocks/progress.html">Progress & Activity</a></li>
+ <li><a href="../building-blocks/switches.html">Switches</a></li>
+ <li><a href="../building-blocks/dialogs.html">Dialogs</a></li>
+ <li><a href="../building-blocks/pickers.html">Pickers</a></li>
+ </ul>
+ </li>
+
+ <li class="nav-section">
+ <div class="nav-section-header empty"><a href="../downloads/index.html">Downloads</a></div>
+ </li>
+
+ <li>
+ <div id="back-dac-section"><a href="../../index.html">Developers</a></div>
+ </li>
+
+ </ul>
+
+ <div id="content">
+
+
+ <div class="layout-content-row content-header">
+ <div class="layout-content-col span-9">
+ <h2>Downloads</h2>
+ </div>
+ <div class="paging-links layout-content-col span-4">
+ <a href="#" class="prev-page-link">Previous</a>
+ <a href="#" class="next-page-link">Next</a>
+ </div>
+ </div>
+
+
+
+
+<div class="layout-content-row">
+ <div class="layout-content-col span-9">
+
+<p>Want everything? We've bundled all the downloads available on Android Design into a single ZIP file.
+You can also download individual files listed below.</p>
+<p>You may use these materials without restriction in your apps and to develop your apps.</p>
+
+ </div>
+ <div class="layout-content-col span-4">
+
+<p>
+ <a class="download-button" href="https://dl-ssl.google.com/android/design/Android_Design_Downloads_20120229.zip">Download All</a>
+</p>
+
+ </div>
+</div>
+
+<h2 id="stencils">Stencils and Sources</h2>
+
+<div class="layout-content-row">
+ <div class="layout-content-col span-5">
+
+<p>Drag and drop your way to beautifully designed Ice Cream Sandwich apps. The stencils feature the
+rich typography, colors, interactive controls, and icons found throughout Android 4.0, along with
+phone and tablet outlines to frame your creations. Source files for icons and controls are also
+available.</p>
+
+ </div>
+ <div class="layout-content-col span-4">
+
+ <img src="../static/content/downloads_stencils.png">
+
+ </div>
+ <div class="layout-content-col span-4">
+
+<p>
+ <a class="download-button" href="https://dl-ssl.google.com/android/design/Android_Design_Fireworks_Stencil_20120229.png">Adobe® Fireworks® PNG Stencil</a>
+ <a class="download-button" href="https://dl-ssl.google.com/android/design/Android_Design_OmniGraffle_Stencil_20120229.graffle">Omni® OmniGraffle® Stencil</a>
+ <a class="download-button" href="https://dl-ssl.google.com/android/design/Android_Design_Holo_Widgets_20120229.zip">Adobe® Photoshop® Sources</a>
+</p>
+
+ </div>
+</div>
+
+<h2 id="action-bar-icon-pack">Action Bar Icon Pack</h2>
+
+<div class="layout-content-row">
+ <div class="layout-content-col span-5">
+
+<p>Action bar icons are graphic buttons that represent the most important actions people can take
+within your app. <a href="../style/iconography.html">More on Action Bar Iconography</a></p>
+<p>The download package includes icons that are scaled for various screen densities and suitable for
+use with the Holo Light and Holo Dark themes. The package also includes unstyled icons that you can
+modify to match your theme, plus source files.</p>
+
+ </div>
+ <div class="layout-content-col span-4">
+
+ <img src="../static/content/iconography_actionbar_style.png">
+
+ </div>
+ <div class="layout-content-col span-4">
+
+<p>
+ <a class="download-button" href="https://dl-ssl.google.com/android/design/Android_Design_Icons_20120229.zip">Action Bar Icon Pack</a>
+</p>
+
+ </div>
+</div>
+
+<h2 id="style">Style</h2>
+
+<div class="layout-content-row">
+ <div class="layout-content-col span-5">
+
+<h4>Roboto</h4>
+<p>Ice Cream Sandwich introduced a new type family named Roboto, created specifically for the
+requirements of UI and high-resolution screens.</p>
+<p><a href="../style/typography.html#actionbar">More on Roboto</a></p>
+
+ </div>
+ <div class="layout-content-col span-4">
+
+ <img src="../static/content/downloads_roboto_specimen_preview.png">
+
+ </div>
+ <div class="layout-content-col span-4">
+
+<p>
+ <a class="download-button" href="https://dl-ssl.google.com/android/design/Roboto_Hinted_20111129.zip">Roboto</a>
+ <a class="download-button" href="https://dl-ssl.google.com/android/design/Roboto_Specimen_Book_20111129.pdf">Specimen Book</a>
+</p>
+
+ </div>
+</div>
+
+<div class="layout-content-row">
+ <div class="layout-content-col span-5">
+
+<h4>Color</h4>
+<p>Blue is the standard accent color in Android's color palette. Each color has a corresponding darker
+shade that can be used as a complement when needed.</p>
+<p><a href="../style/color.html">More on Color</a></p>
+
+ </div>
+ <div class="layout-content-col span-4">
+
+ <img src="../static/content/downloads_color_swatches.png">
+
+ </div>
+ <div class="layout-content-col span-4">
+
+<p>
+ <a class="download-button" href="https://dl-ssl.google.com/android/design/Android_Design_Color_Swatches_20120229.zip">Color Swatches</a>
+</p>
+
+ </div>
+</div>
+
+
+
+
+ <div class="layout-content-row content-footer">
+ <div class="paging-links layout-content-col span-9"> </div>
+ <div class="paging-links layout-content-col span-4">
+ <a href="#" class="prev-page-link">Previous</a>
+ <a href="#" class="next-page-link">Next</a>
+ </div>
+ </div>
+
+ </div>
+
+ </div>
+
+ <div id="page-footer">
+
+ <p id="copyright">
+ Except as noted, this content is licensed under
+ <a href="http://creativecommons.org/licenses/by/2.5/">
+ Creative Commons Attribution 2.5</a>.<br>
+ For details and restrictions, see the
+ <a href="http://developer.android.com/license.html">Content License</a>.
+ </p>
+
+ <p>
+ <a href="http://www.android.com/terms.html">Site Terms of Service</a> –
+ <a href="http://www.android.com/privacy.html">Privacy Policy</a> –
+ <a href="http://www.android.com/branding.html">Brand Guidelines</a>
+ </p>
+
+ </div>
+ </div>
+
+ <script src="../static/jquery-1.6.2.min.js"></script>
+ <script>
+ var SITE_ROOT = '../';
+ </script>
+ <script src="../static/default.js"></script>
+
+
+ <script type="text/javascript">
+ var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
+ document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
+ </script>
+ <script type="text/javascript">
+ var pageTracker = _gat._getTracker("UA-5831155-1");
+ pageTracker._trackPageview();
+ </script>
+ </body>
+</html>
diff --git a/docs/html/design/get-started/creative-vision.html b/docs/html/design/get-started/creative-vision.html
index 11783c4..154f8d0 100644
--- a/docs/html/design/get-started/creative-vision.html
+++ b/docs/html/design/get-started/creative-vision.html
@@ -80,6 +80,10 @@
</ul>
</li>
+ <li class="nav-section">
+ <div class="nav-section-header empty"><a href="../downloads/index.html">Downloads</a></div>
+ </li>
+
<li>
<div id="back-dac-section"><a href="../../index.html">Developers</a></div>
</li>
diff --git a/docs/html/design/get-started/principles.html b/docs/html/design/get-started/principles.html
index 0d9ef20..f10a90d 100644
--- a/docs/html/design/get-started/principles.html
+++ b/docs/html/design/get-started/principles.html
@@ -80,6 +80,10 @@
</ul>
</li>
+ <li class="nav-section">
+ <div class="nav-section-header empty"><a href="../downloads/index.html">Downloads</a></div>
+ </li>
+
<li>
<div id="back-dac-section"><a href="../../index.html">Developers</a></div>
</li>
@@ -106,7 +110,7 @@
best interests in mind. Consider them as you apply your own creativity and design thinking. Deviate
with purpose.</p>
-<h2>Enchant Me</h2>
+<h2 id="enchant-me">Enchant Me</h2>
<div class="layout-content-row">
<div class="layout-content-col span-7">
@@ -176,7 +180,7 @@
</div>
</div>
-<h2>Simplify My Life</h2>
+<h2 id="simplify-my-life">Simplify My Life</h2>
<div class="layout-content-row">
<div class="layout-content-col span-7">
@@ -312,7 +316,7 @@
</div>
</div>
-<h2>Make Me Amazing</h2>
+<h2 id="make-me-amazing">Make Me Amazing</h2>
<div class="layout-content-row">
<div class="layout-content-col span-7">
diff --git a/docs/html/design/get-started/ui-overview.html b/docs/html/design/get-started/ui-overview.html
index bd5ff9c..a4881d5 100644
--- a/docs/html/design/get-started/ui-overview.html
+++ b/docs/html/design/get-started/ui-overview.html
@@ -80,6 +80,10 @@
</ul>
</li>
+ <li class="nav-section">
+ <div class="nav-section-header empty"><a href="../downloads/index.html">Downloads</a></div>
+ </li>
+
<li>
<div id="back-dac-section"><a href="../../index.html">Developers</a></div>
</li>
@@ -109,7 +113,7 @@
in your app.</p>
<p>Read on for a quick overview of the most important aspects of the Android user interface.</p>
-<h2>Home, All Apps, and Recents</h2>
+<h2 id="home-all-apps-recents">Home, All Apps, and Recents</h2>
<div class="vspace size-1"> </div>
@@ -153,7 +157,7 @@
</div>
</div>
-<h2>System Bars</h2>
+<h2 id="system-bars">System Bars</h2>
<p>The system bars are screen areas dedicated to the display of notifications, communication of device
status, and device navigation. Typically the system bars are displayed concurrently with your app.
@@ -185,7 +189,7 @@
</div>
-<h2>Notifications</h2>
+<h2 id="notifications">Notifications</h2>
<p>Notifications are brief messages that users can access at any time from the status bar. They
provide updates, reminders, or information that's important, but not critical enough to warrant
diff --git a/docs/html/design/index.html b/docs/html/design/index.html
index 14d7b63..8583aa4 100644
--- a/docs/html/design/index.html
+++ b/docs/html/design/index.html
@@ -93,6 +93,10 @@
</ul>
</li>
+ <li class="nav-section">
+ <div class="nav-section-header empty"><a href="downloads/index.html">Downloads</a></div>
+ </li>
+
<li>
<div id="back-dac-section"><a href="../index.html">Developers</a></div>
</li>
diff --git a/docs/html/design/patterns/actionbar.html b/docs/html/design/patterns/actionbar.html
index 911c549..1566d04 100644
--- a/docs/html/design/patterns/actionbar.html
+++ b/docs/html/design/patterns/actionbar.html
@@ -80,6 +80,10 @@
</ul>
</li>
+ <li class="nav-section">
+ <div class="nav-section-header empty"><a href="../downloads/index.html">Downloads</a></div>
+ </li>
+
<li>
<div id="back-dac-section"><a href="../../index.html">Developers</a></div>
</li>
@@ -118,7 +122,8 @@
<p>If you're new to writing Android apps, note that the action bar is one of the most important design
elements you can implement. Following the guidelines described here will go a long way toward making
your app's interface consistent with the core Android apps.</p>
-<h2>General Organization</h2>
+<h2 id="organization">General Organization</h2>
+
<p>The action bar is split into four different functional areas that apply to most apps.</p>
<img src="../static/content/action_bar_basics.png">
@@ -129,8 +134,8 @@
<li class="value-1"><h4>App icon</h4>
<p>
-The app icon establishes your app's identity. It can be replaced with a different logo or branding if
-you wish.
+The app icon establishes your app's identity. It can be replaced with a different logo or branding
+if you wish.
Important: If the app is currently not displaying the top-level screen, be sure to display the Up
caret to the left of the app icon, so the user can navigate up the hierarchy. For more discussion of
Up navigation, see the <a href="../patterns/navigation.html">Navigation</a> pattern.
@@ -180,12 +185,11 @@
</p>
</li>
</ol>
-
</div>
</div>
+<h2 id="adapting-rotation">Adapting to Rotation and Different Screen Sizes</h2>
-<h2>Adapting to Rotation and Different Screen Sizes</h2>
<p>One of the most important UI issues to consider when creating an app is how to adjust to screen
rotation on different screen sizes.</p>
<p>You can adapt to such changes by using <em>split action bars</em>, which allow you to distribute action bar
@@ -196,7 +200,7 @@
Split action bar showing action buttons at the bottom of the screen in vertical orientation.
</div>
-<h2>Layout Considerations for Split Action Bars</h2>
+<h2 id="considerations-split-action-bars">Layout Considerations for Split Action Bars</h2>
<div class="layout-content-row">
<div class="layout-content-col span-8 with-callouts">
@@ -222,7 +226,8 @@
</div>
</div>
-<h2>Contextual Action Bars</h2>
+<h2 id="contextual">Contextual Action Bars</h2>
+
<p>A <em>contextual action bar (CAB)</em> is a temporary action bar that overlays the app's action bar for the
duration of a particular sub-task. CABs are most typically used for tasks that involve acting on
selected data or text.</p>
@@ -244,7 +249,8 @@
<p>Use CABs whenever you allow the user to select data via long press. You can control the action
content of a CAB in order to insert the actions you would like the user to be able to perform.</p>
<p>For more information, refer to the "Selection" pattern.</p>
-<h2>Action Bar Elements</h2>
+<h2 id="elements">Action Bar Elements</h2>
+
<h4>Tabs</h4>
<p><em>Tabs</em> display app views concurrently and make it easy to explore and switch between them. Use tabs
if you expect your users to switch views frequently.</p>
@@ -326,7 +332,9 @@
<p><em>Action buttons</em> on the action bar surface your app's most important activities. Think about which
buttons will get used most often, and order them accordingly. Depending on available screen real
estate, the system shows your most important actions as action buttons and moves the rest to the
-action overflow.</p>
+action overflow. The action bar and the action overflow should only present actions to the user that
+are available. If an action is unavailable in the current context, hide it. Do not show it as
+disabled.</p>
<img src="../static/content/action_bar_pattern_action_icons.png">
<div class="figure-caption">
@@ -380,8 +388,7 @@
</p>
<p>
-<a href="../static/download/action_bar_icons-v4.0.zip">Download the Action Bar Icon
-Pack</a>
+<a href="https://dl-ssl.google.com/android/design/Android_Design_Icons_20120229.zip">Download the Action Bar Icon Pack</a>
</p>
@@ -436,7 +443,8 @@
The Gallery app's share action provider with extended spinner for additional sharing options.
</div>
-<h2>Action Bar Checklist</h2>
+<h2 id="checklist">Action Bar Checklist</h2>
+
<p>When planning your split action bars, ask yourself questions like these:</p>
<h4>How important is view navigation to the task?</h4>
<p>If view navigation is very important to your app, use tabs (for fastest view-switching) or spinners.</p>
diff --git a/docs/html/design/patterns/app-structure.html b/docs/html/design/patterns/app-structure.html
index fb9205b..1b48280 100644
--- a/docs/html/design/patterns/app-structure.html
+++ b/docs/html/design/patterns/app-structure.html
@@ -80,6 +80,10 @@
</ul>
</li>
+ <li class="nav-section">
+ <div class="nav-section-header empty"><a href="../downloads/index.html">Downloads</a></div>
+ </li>
+
<li>
<div id="back-dac-section"><a href="../../index.html">Developers</a></div>
</li>
@@ -111,7 +115,8 @@
<li>Apps such as Gmail or Market that combine a broad set of data views with deep navigation</li>
</ul>
<p>Your app's structure depends largely on the content and tasks you want to surface for your users.</p>
-<h2>General Structure</h2>
+<h2 id="general-structure">General Structure</h2>
+
<p>A typical Android app consists of top level and detail/edit views. If the navigation hierarchy is
deep and complex, category views connect top level and detail views.</p>
@@ -139,7 +144,8 @@
</div>
</div>
-<h2>Top Level</h2>
+<h2 id="top-level">Top Level</h2>
+
<p>The layout of your start screen requires special attention. This is the first screen people see
after launching your app, so it should be an equally rewarding experience for new and frequent
visitors alike.</p>
@@ -219,7 +225,8 @@
</div>
</div>
-<h2>Categories</h2>
+<h2 id="categories">Categories</h2>
+
<p>Generally, the purpose of a deep, data-driven app is to navigate through organizational categories
to the detail level, where data can be viewed and managed. Minimize perceived navigation effort by
keeping your apps shallow.</p>
@@ -281,7 +288,8 @@
delete multiple items in the category view. Analyze which detail view actions are applicable to
collections of items. Then use multi-select to allow application of those actions to multiple items
in a category view.</p>
-<h2>Details</h2>
+<h2 id="details">Details</h2>
+
<p>The detail view allows you to view and act on your data. The layout of the detail view depends on
the data type being displayed, and therefore differs widely among apps.</p>
@@ -330,7 +338,8 @@
filmstrip control that lets people quickly jump to specific images.
</div>
-<h2>Checklist</h2>
+<h2 id="checklist">Checklist</h2>
+
<ul>
<li>
<p>Find ways to display useful content on your start screen.</p>
diff --git a/docs/html/design/patterns/compatibility.html b/docs/html/design/patterns/compatibility.html
index f18c62d..d6e59f5 100644
--- a/docs/html/design/patterns/compatibility.html
+++ b/docs/html/design/patterns/compatibility.html
@@ -80,6 +80,10 @@
</ul>
</li>
+ <li class="nav-section">
+ <div class="nav-section-header empty"><a href="../downloads/index.html">Downloads</a></div>
+ </li>
+
<li>
<div id="back-dac-section"><a href="../../index.html">Developers</a></div>
</li>
@@ -110,7 +114,7 @@
</ul>
<p>Android 4.0 brings these changes for tablets to the phone platform.</p>
-<h2>Adapting Android 4.0 to Older Hardware and Apps</h2>
+<h2 id="older-hardware">Adapting Android 4.0 to Older Hardware and Apps</h2>
<div class="layout-content-row">
<div class="layout-content-col span-6">
diff --git a/docs/html/design/patterns/gestures.html b/docs/html/design/patterns/gestures.html
index f8585e4..c88817f 100644
--- a/docs/html/design/patterns/gestures.html
+++ b/docs/html/design/patterns/gestures.html
@@ -80,6 +80,10 @@
</ul>
</li>
+ <li class="nav-section">
+ <div class="nav-section-header empty"><a href="../downloads/index.html">Downloads</a></div>
+ </li>
+
<li>
<div id="back-dac-section"><a href="../../index.html">Developers</a></div>
</li>
diff --git a/docs/html/design/patterns/index.html b/docs/html/design/patterns/index.html
index ff797db..863baa9 100644
--- a/docs/html/design/patterns/index.html
+++ b/docs/html/design/patterns/index.html
@@ -93,6 +93,10 @@
</ul>
</li>
+ <li class="nav-section">
+ <div class="nav-section-header empty"><a href="../downloads/index.html">Downloads</a></div>
+ </li>
+
<li>
<div id="back-dac-section"><a href="../../index.html">Developers</a></div>
</li>
diff --git a/docs/html/design/patterns/multi-pane-layouts.html b/docs/html/design/patterns/multi-pane-layouts.html
index af05e31..7925c98 100644
--- a/docs/html/design/patterns/multi-pane-layouts.html
+++ b/docs/html/design/patterns/multi-pane-layouts.html
@@ -80,6 +80,10 @@
</ul>
</li>
+ <li class="nav-section">
+ <div class="nav-section-header empty"><a href="../downloads/index.html">Downloads</a></div>
+ </li>
+
<li>
<div id="back-dac-section"><a href="../../index.html">Developers</a></div>
</li>
@@ -108,7 +112,8 @@
<p><em>Panels</em> are a great way for your app to achieve this. They allow you to combine multiple views into
one compound view when a lot of horizontal screen real estate is available and by splitting them up
when less space is available.</p>
-<h2>Combining Multiple Views Into One</h2>
+<h2 id="combining-views">Combining Multiple Views Into One</h2>
+
<p>On smaller devices your content is typically divided into a master grid or list view and a detail
view. Touching an item in the master view opens a different screen showing that item's detail
information.</p>
@@ -124,7 +129,8 @@
<p>In general, use the pane on the right to present more information about the item you selected in the
left pane. Make sure to keep the item in the left pane selected in order to establish the
relationship between the panels.</p>
-<h2>Compound Views and Orientation Changes</h2>
+<h2 id="orientation">Compound Views and Orientation Changes</h2>
+
<p>Screens should have the same functionality regardless of orientation. If you use a compound view in
one orientation, don't split it up when the user rotates the screen. There are several techniques
you can use to adjust the layout after orientation change while keeping functional parity intact.</p>
@@ -189,7 +195,8 @@
</div>
</div>
-<h2>Checklist</h2>
+<h2 id="checklist">Checklist</h2>
+
<ul>
<li>
<p>Plan in advance on how your app scales to different screen sizes and screen orientations.</p>
diff --git a/docs/html/design/patterns/navigation.html b/docs/html/design/patterns/navigation.html
index cad3682..6287b5e 100644
--- a/docs/html/design/patterns/navigation.html
+++ b/docs/html/design/patterns/navigation.html
@@ -80,6 +80,10 @@
</ul>
</li>
+ <li class="nav-section">
+ <div class="nav-section-header empty"><a href="../downloads/index.html">Downloads</a></div>
+ </li>
+
<li>
<div id="back-dac-section"><a href="../../index.html">Developers</a></div>
</li>
@@ -112,7 +116,8 @@
<img src="../static/content/navigation_with_back_and_up.png">
-<h2>Up vs. Back</h2>
+<h2 id="up-vs-back">Up vs. Back</h2>
+
<p>The Up button is used to navigate within an application based on the hierarchical relationships
between screens. For instance, if screen A displays a list of items, and selecting an item leads to
screen B (which presents that item in more detail), then screen B should offer an Up button that
@@ -134,7 +139,8 @@
<li>Back dismisses contextual action bars, and removes the highlight from the selected items</li>
<li>Back hides the onscreen keyboard (IME)</li>
</ul>
-<h2>Navigation Within Your App</h2>
+<h2 id="within-app">Navigation Within Your App</h2>
+
<h4>Navigating to screens with multiple entry points</h4>
<p>Sometimes a screen doesn't have a strict position within the app's hierarchy, and can be reached
from multiple entry points—e.g., a settings screen which can be navigated to from any screen
@@ -176,7 +182,8 @@
<img src="../static/content/navigation_between_siblings_market2.png">
-<h2>Navigation From Outside Your App</h2>
+<h2 id="from-outside">Navigation From Outside Your App</h2>
+
<p>There are two categories of navigation from outside your app to screens deep within the app's
hierarchy:</p>
<ul>
diff --git a/docs/html/design/patterns/new-4-0.html b/docs/html/design/patterns/new-4-0.html
index 272b079..2e2cbc2 100644
--- a/docs/html/design/patterns/new-4-0.html
+++ b/docs/html/design/patterns/new-4-0.html
@@ -80,6 +80,10 @@
</ul>
</li>
+ <li class="nav-section">
+ <div class="nav-section-header empty"><a href="../downloads/index.html">Downloads</a></div>
+ </li>
+
<li>
<div id="back-dac-section"><a href="../../index.html">Developers</a></div>
</li>
diff --git a/docs/html/design/patterns/notifications.html b/docs/html/design/patterns/notifications.html
index c5045aed..99af418 100644
--- a/docs/html/design/patterns/notifications.html
+++ b/docs/html/design/patterns/notifications.html
@@ -80,6 +80,10 @@
</ul>
</li>
+ <li class="nav-section">
+ <div class="nav-section-header empty"><a href="../downloads/index.html">Downloads</a></div>
+ </li>
+
<li>
<div id="back-dac-section"><a href="../../index.html">Developers</a></div>
</li>
@@ -173,7 +177,7 @@
</div>
</div>
-<h2>Design Guidelines</h2>
+<h2 id="design-guidelines">Design Guidelines</h2>
<div class="layout-content-row">
<div class="layout-content-col span-6">
@@ -269,7 +273,7 @@
<li>Use color to distinguish your app from others. Notification icons should generally be monochrome.</li>
</ul>
-<h2>Interacting With Notifications</h2>
+<h2 id="interacting-with-notifications">Interacting With Notifications</h2>
<div class="layout-content-row">
<div class="layout-content-col span-6">
diff --git a/docs/html/design/patterns/pure-android.html b/docs/html/design/patterns/pure-android.html
index 507558a..f5a8042 100644
--- a/docs/html/design/patterns/pure-android.html
+++ b/docs/html/design/patterns/pure-android.html
@@ -80,6 +80,10 @@
</ul>
</li>
+ <li class="nav-section">
+ <div class="nav-section-header empty"><a href="../downloads/index.html">Downloads</a></div>
+ </li>
+
<li>
<div id="back-dac-section"><a href="../../index.html">Developers</a></div>
</li>
@@ -227,7 +231,7 @@
</div>
</div>
-<h2>Device Independence</h2>
+<h2 id="device-independence">Device Independence</h2>
<p>Remember that your app will run on a wide variety of different screen sizes. Create visual assets
for different screen sizes and densities and make use of concepts such as multi-pane layouts to
diff --git a/docs/html/design/patterns/selection.html b/docs/html/design/patterns/selection.html
index 37dcab5..44c6a84 100644
--- a/docs/html/design/patterns/selection.html
+++ b/docs/html/design/patterns/selection.html
@@ -80,6 +80,10 @@
</ul>
</li>
+ <li class="nav-section">
+ <div class="nav-section-header empty"><a href="../downloads/index.html">Downloads</a></div>
+ </li>
+
<li>
<div id="back-dac-section"><a href="../../index.html">Developers</a></div>
</li>
@@ -180,7 +184,8 @@
</div>
</div>
-<h2>Checklist</h2>
+<h2 id="checklist">Checklist</h2>
+
<ul>
<li>
<p>Whenever your app supports the selection of multiple data items, make use of the contextual action
diff --git a/docs/html/design/patterns/swipe-views.html b/docs/html/design/patterns/swipe-views.html
index 4e8cd03..acc9f39 100644
--- a/docs/html/design/patterns/swipe-views.html
+++ b/docs/html/design/patterns/swipe-views.html
@@ -80,6 +80,10 @@
</ul>
</li>
+ <li class="nav-section">
+ <div class="nav-section-header empty"><a href="../downloads/index.html">Downloads</a></div>
+ </li>
+
<li>
<div id="back-dac-section"><a href="../../index.html">Developers</a></div>
</li>
@@ -107,7 +111,8 @@
vertical hierarchies and make access to related data items faster and more enjoyable. Swipe views
allow the user to efficiently move from item to item using a simple gesture and thereby make
browsing and consuming data a more fluent experience.</p>
-<h2>Swiping Between Detail Views</h2>
+<h2 id="detail-views">Swiping Between Detail Views</h2>
+
<p>An app's data is often organized in a master/detail relationship: The user can view a list of
related data items, such as images, chats, or emails, and then pick one of the items to see the
detail contents in a separate screen.</p>
@@ -127,7 +132,7 @@
Navigating between consecutive Email messages using the swipe gesture.
</div>
-<h2>Swiping Between Tabs</h2>
+<h2 id="between-tabs">Swiping Between Tabs</h2>
<div class="layout-content-row">
<div class="layout-content-col span-5">
@@ -150,7 +155,8 @@
<p>If your app uses action bar tabs, use swipe to navigate between the different views.</p>
<div class="vspace size-2"> </div>
-<h2>Checklist</h2>
+<h2 id="checklist">Checklist</h2>
+
<ul>
<li>
<p>Use swipe to quickly navigate between detail views or tabs.</p>
diff --git a/docs/html/design/static/content/downloads_color_swatches.png b/docs/html/design/static/content/downloads_color_swatches.png
new file mode 100644
index 0000000..af2b24f
--- /dev/null
+++ b/docs/html/design/static/content/downloads_color_swatches.png
Binary files differ
diff --git a/docs/html/design/static/content/downloads_roboto_specimen_preview.png b/docs/html/design/static/content/downloads_roboto_specimen_preview.png
new file mode 100644
index 0000000..2954cbf
--- /dev/null
+++ b/docs/html/design/static/content/downloads_roboto_specimen_preview.png
Binary files differ
diff --git a/docs/html/design/static/content/downloads_stencils.png b/docs/html/design/static/content/downloads_stencils.png
new file mode 100644
index 0000000..9e09319
--- /dev/null
+++ b/docs/html/design/static/content/downloads_stencils.png
Binary files differ
diff --git a/docs/html/design/static/default.css b/docs/html/design/static/default.css
index 42ab527..3aa1db3 100644
--- a/docs/html/design/static/default.css
+++ b/docs/html/design/static/default.css
@@ -3,8 +3,8 @@
/* clearfix idiom */
/* common mixins */
/* page layout + top-level styles */
-::-moz-selection,
::-webkit-selection,
+::-moz-selection,
::selection {
background-color: #0099cc;
color: #fff; }
@@ -256,6 +256,8 @@
position: absolute;
top: 10px;
right: 10px; }
+ #nav .nav-section-header.empty:after {
+ display: none; }
#nav li.expanded .nav-section-header {
background: rgba(0, 0, 0, 0.05); }
#nav li.expanded .nav-section-header:after {
@@ -268,9 +270,9 @@
overflow: hidden;
margin-bottom: 0; }
#nav > li > ul.animate-height {
- transition: height 0.25s ease-in;
-webkit-transition: height 0.25s ease-in;
- -moz-transition: height 0.25s ease-in; }
+ -moz-transition: height 0.25s ease-in;
+ transition: height 0.25s ease-in; }
#nav > li > ul li {
padding: 10px 10px 11px 10px; }
#nav > li.expanded > ul {
@@ -330,6 +332,39 @@
margin-left: 5px; }
/* content body */
+@-webkit-keyframes glowheader {
+ from {
+ background-color: #33b5e5;
+ color: #000;
+ border-bottom-color: #000; }
+
+ to {
+ background-color: transparent;
+ color: #33b5e5;
+ border-bottom-color: #33b5e5; } }
+
+@-moz-keyframes glowheader {
+ from {
+ background-color: #33b5e5;
+ color: #000;
+ border-bottom-color: #000; }
+
+ to {
+ background-color: transparent;
+ color: #33b5e5;
+ border-bottom-color: #33b5e5; } }
+
+@keyframes glowheader {
+ from {
+ background-color: #33b5e5;
+ color: #000;
+ border-bottom-color: #000; }
+
+ to {
+ background-color: transparent;
+ color: #33b5e5;
+ border-bottom-color: #33b5e5; } }
+
#content p,
#content ul,
#content ol,
@@ -345,6 +380,16 @@
color: #33b5e5;
border-bottom: 1px solid #33b5e5;
height: 30px; }
+ #content h2:target {
+ -webkit-animation-name: glowheader;
+ -moz-animation-name: glowheader;
+ animation-name: glowheader;
+ -webkit-animation-duration: 0.7s;
+ -moz-animation-duration: 0.7s;
+ animation-duration: 0.7s;
+ -webkit-animation-timing-function: ease-out;
+ -moz-animation-timing-function: ease-out;
+ animation-timing-function: ease-out; }
#content hr {
border: 0;
border-bottom: 1px solid #33b5e5;
@@ -569,3 +614,20 @@
margin-right: 8px; }
.video-instructions:after {
content: 'Click to replay movie.'; }
+
+/* download buttons */
+.download-button {
+ display: block;
+ margin-bottom: 5px;
+ text-decoration: none;
+ background-color: #33b5e5;
+ color: #fff !important;
+ font-weight: 500;
+ box-shadow: 0 1px 1px rgba(0, 0, 0, 0.12);
+ padding: 6px 12px;
+ border-radius: 2px; }
+ .download-button:hover, .download-button:focus {
+ background-color: #0099cc;
+ color: #fff !important; }
+ .download-button:active {
+ background-color: #006699; }
diff --git a/docs/html/design/static/default.js b/docs/html/design/static/default.js
index 6721ab8..b213dd9 100644
--- a/docs/html/design/static/default.js
+++ b/docs/html/design/static/default.js
@@ -158,4 +158,12 @@
$tooltip.hide();
});
});
+
+ // Set up <h2> deeplinks
+ $('h2').click(function() {
+ var id = $(this).attr('id');
+ if (id) {
+ document.location.hash = id;
+ }
+ });
});
\ No newline at end of file
diff --git a/docs/html/design/static/download/RobotoSpecimenBook.pdf b/docs/html/design/static/download/RobotoSpecimenBook.pdf
deleted file mode 100644
index 594a366..0000000
--- a/docs/html/design/static/download/RobotoSpecimenBook.pdf
+++ /dev/null
Binary files differ
diff --git a/docs/html/design/static/download/Roboto_Hinted_20111129.zip b/docs/html/design/static/download/Roboto_Hinted_20111129.zip
deleted file mode 100644
index 3d3ab77..0000000
--- a/docs/html/design/static/download/Roboto_Hinted_20111129.zip
+++ /dev/null
Binary files differ
diff --git a/docs/html/design/static/download/action_bar_icons-v4.0.zip b/docs/html/design/static/download/action_bar_icons-v4.0.zip
deleted file mode 100644
index 4568894..0000000
--- a/docs/html/design/static/download/action_bar_icons-v4.0.zip
+++ /dev/null
Binary files differ
diff --git a/docs/html/design/static/download/color_swatches.zip b/docs/html/design/static/download/color_swatches.zip
deleted file mode 100644
index 0221d7b..0000000
--- a/docs/html/design/static/download/color_swatches.zip
+++ /dev/null
Binary files differ
diff --git a/docs/html/design/static/ico_styleguide.png b/docs/html/design/static/ico_styleguide.png
deleted file mode 100644
index c12907c..0000000
--- a/docs/html/design/static/ico_styleguide.png
+++ /dev/null
Binary files differ
diff --git a/docs/html/design/style/color.html b/docs/html/design/style/color.html
index 893e09e..bca3c45 100644
--- a/docs/html/design/style/color.html
+++ b/docs/html/design/style/color.html
@@ -173,6 +173,10 @@
</ul>
</li>
+ <li class="nav-section">
+ <div class="nav-section-header empty"><a href="../downloads/index.html">Downloads</a></div>
+ </li>
+
<li>
<div id="back-dac-section"><a href="../../index.html">Developers</a></div>
</li>
@@ -218,10 +222,11 @@
</ul>
</div>
-<h2>Palette</h2>
+<h2 id="palette">Palette</h2>
+
<p>Blue is the standard accent color in Android's color palette. Each color has a corresponding darker
shade that can be used as a complement when needed.</p>
-<p><a href="../static/download/color_swatches.zip">Download the swatches</a></p>
+<p><a href="https://dl-ssl.google.com/android/design/Android_Design_Color_Swatches_20120229.zip">Download the swatches</a></p>
<img src="../static/content/color_spectrum.png">
diff --git a/docs/html/design/style/devices-displays.html b/docs/html/design/style/devices-displays.html
index 9fba719..89e0876 100644
--- a/docs/html/design/style/devices-displays.html
+++ b/docs/html/design/style/devices-displays.html
@@ -80,6 +80,10 @@
</ul>
</li>
+ <li class="nav-section">
+ <div class="nav-section-header empty"><a href="../downloads/index.html">Downloads</a></div>
+ </li>
+
<li>
<div id="back-dac-section"><a href="../../index.html">Developers</a></div>
</li>
diff --git a/docs/html/design/style/iconography.html b/docs/html/design/style/iconography.html
index 5d5d200..96954de 100644
--- a/docs/html/design/style/iconography.html
+++ b/docs/html/design/style/iconography.html
@@ -80,6 +80,10 @@
</ul>
</li>
+ <li class="nav-section">
+ <div class="nav-section-header empty"><a href="../downloads/index.html">Downloads</a></div>
+ </li>
+
<li>
<div id="back-dac-section"><a href="../../index.html">Developers</a></div>
</li>
@@ -191,7 +195,7 @@
</div>
-<h2 id="actionbar">Action Bar</h2>
+<h2 id="action-bar">Action Bar</h2>
<p>
@@ -211,8 +215,7 @@
</p>
<p>
-<a href="../static/download/action_bar_icons-v4.0.zip">Download the Action Bar Icon
-Pack</a>
+<a href="https://dl-ssl.google.com/android/design/Android_Design_Icons_20120229.zip">Download the Action Bar Icon Pack</a>
</p>
@@ -290,7 +293,7 @@
</div>
-<h2 id="small_contextual">Small / Contextual Icons</h2>
+<h2 id="small-contextual">Small / Contextual Icons</h2>
<p>Within the body of your app, use small icons to surface actions and/or provide status for specific
items. For example, in the Gmail app, each message has a star icon that marks the message as
diff --git a/docs/html/design/style/index.html b/docs/html/design/style/index.html
index 5ecbafa..c7ac58f 100644
--- a/docs/html/design/style/index.html
+++ b/docs/html/design/style/index.html
@@ -93,6 +93,10 @@
</ul>
</li>
+ <li class="nav-section">
+ <div class="nav-section-header empty"><a href="../downloads/index.html">Downloads</a></div>
+ </li>
+
<li>
<div id="back-dac-section"><a href="../../index.html">Developers</a></div>
</li>
diff --git a/docs/html/design/style/metrics-grids.html b/docs/html/design/style/metrics-grids.html
index 17d4937..7bb9dd0 100644
--- a/docs/html/design/style/metrics-grids.html
+++ b/docs/html/design/style/metrics-grids.html
@@ -80,6 +80,10 @@
</ul>
</li>
+ <li class="nav-section">
+ <div class="nav-section-header empty"><a href="../downloads/index.html">Downloads</a></div>
+ </li>
+
<li>
<div id="back-dac-section"><a href="../../index.html">Developers</a></div>
</li>
@@ -130,7 +134,7 @@
</div>
</div>
-<h2>48dp Rhythm</h2>
+<h2 id="48dp-rhythm">48dp Rhythm</h2>
<p>Touchable UI components are generally laid out along 48dp units.</p>
@@ -157,7 +161,7 @@
<h4>Mind the gaps</h4>
<p>Spacing between each UI element is 8dp.</p>
-<h2>Examples</h2>
+<h2 id="examples">Examples</h2>
<img src="../static/content/metrics_forms.png">
diff --git a/docs/html/design/style/themes.html b/docs/html/design/style/themes.html
index ada974d..a629978 100644
--- a/docs/html/design/style/themes.html
+++ b/docs/html/design/style/themes.html
@@ -80,6 +80,10 @@
</ul>
</li>
+ <li class="nav-section">
+ <div class="nav-section-header empty"><a href="../downloads/index.html">Downloads</a></div>
+ </li>
+
<li>
<div id="back-dac-section"><a href="../../index.html">Developers</a></div>
</li>
diff --git a/docs/html/design/style/touch-feedback.html b/docs/html/design/style/touch-feedback.html
index 0d49832..d1c08f8 100644
--- a/docs/html/design/style/touch-feedback.html
+++ b/docs/html/design/style/touch-feedback.html
@@ -80,6 +80,10 @@
</ul>
</li>
+ <li class="nav-section">
+ <div class="nav-section-header empty"><a href="../downloads/index.html">Downloads</a></div>
+ </li>
+
<li>
<div id="back-dac-section"><a href="../../index.html">Developers</a></div>
</li>
diff --git a/docs/html/design/style/typography.html b/docs/html/design/style/typography.html
index d3cc769..d9b6d4b 100644
--- a/docs/html/design/style/typography.html
+++ b/docs/html/design/style/typography.html
@@ -80,6 +80,10 @@
</ul>
</li>
+ <li class="nav-section">
+ <div class="nav-section-header empty"><a href="../downloads/index.html">Downloads</a></div>
+ </li>
+
<li>
<div id="back-dac-section"><a href="../../index.html">Developers</a></div>
</li>
@@ -119,8 +123,8 @@
<img src="../static/content/typography_alphas.png">
-<p><a href="../static/download/Roboto_Hinted_20111129.zip">Download Roboto</a></p>
-<p><a href="../static/download/RobotoSpecimenBook.pdf">Specimen Book</a></p>
+<p><a href="https://dl-ssl.google.com/android/design/Roboto_Hinted_20111129.zip">Download Roboto</a></p>
+<p><a href="https://dl-ssl.google.com/android/design/Roboto_Specimen_Book_20111129.pdf">Specimen Book</a></p>
</div>
</div>
diff --git a/docs/html/design/style/writing.html b/docs/html/design/style/writing.html
index e5f1ea8..146ce88 100644
--- a/docs/html/design/style/writing.html
+++ b/docs/html/design/style/writing.html
@@ -132,6 +132,10 @@
</ul>
</li>
+ <li class="nav-section">
+ <div class="nav-section-header empty"><a href="../downloads/index.html">Downloads</a></div>
+ </li>
+
<li>
<div id="back-dac-section"><a href="../../index.html">Developers</a></div>
</li>
@@ -186,7 +190,7 @@
</li>
</ol>
-<h2>Examples</h2>
+<h2 id="examples">Examples</h2>
<ol><li class="value-1"><strong>Keep it brief.</strong> From the setup wizard:</ol>
diff --git a/docs/html/guide/developing/device.jd b/docs/html/guide/developing/device.jd
index d390ec1..d22dca1 100644
--- a/docs/html/guide/developing/device.jd
+++ b/docs/html/guide/developing/device.jd
@@ -51,19 +51,13 @@
<ol>
<li>Declare your application as "debuggable" in your Android Manifest.
- <p>In Eclipse, you can do this from the <b>Application</b> tab when viewing the Manifest
- (on the right side, set <b>Debuggable</b> to <em>true</em>). Otherwise, in the
-<code>AndroidManifest.xml</code>
- file, add <code>android:debuggable="true"</code> to the <code><application></code>
-element.</p>
- </li>
- <li>Set up your device to allow installation of non-Market applications. <p>On
-the device, go to <strong>Settings > Applications</strong> and enable
-
-<strong>Unknown sources</strong> (on an Android 4.0 device, the setting is
-located in <strong>Settings > Security</strong>).</p>
-
- </li>
+ <p>When using Eclipse, you can skip this step, because running your app directly from
+the Eclipse IDE automatically enables debugging.</p>
+ <p>In the <code>AndroidManifest.xml</code> file, add <code>android:debuggable="true"</code> to
+the <code><application></code> element.</p>
+ <p class="note"><strong>Note:</strong> If you manually enable debugging in the manifest
+ file, be sure to disable it before you build for release (your published application
+should usually <em>not</em> be debuggable).</p></li>
<li>Turn on "USB Debugging" on your device.
<p>On the device, go to <strong>Settings > Applications > Development</strong>
and enable <strong>USB debugging</strong>
@@ -72,13 +66,10 @@
</li>
<li>Set up your system to detect your device.
<ul>
- <li>If you're developing on Windows, you need to install a USB driver
- for adb. If you're using an Android Developer Phone (ADP), Nexus One, or Nexus S,
- see the <a href="{@docRoot}sdk/win-usb.html">Google Windows USB
- Driver</a>. Otherwise, you can find a link to the appropriate OEM driver in the
- <a href="{@docRoot}sdk/oem-usb.html">OEM USB Drivers</a> document.</li>
+ <li>If you're developing on Windows, you need to install a USB driver for adb. For an
+installation guide and links to OEM drivers, see the <a href="{@docRoot}sdk/oem-usb.html">OEM USB
+Drivers</a> document.</li>
<li>If you're developing on Mac OS X, it just works. Skip this step.</li>
-
<li>If you're developing on Ubuntu Linux, you need to add a
<code>udev</code> rules file that contains a USB configuration for each type of device
you want to use for development. In the rules file, each device manufacturer
@@ -114,7 +105,7 @@
</li>
</ol>
-<p>You can verify that your device is connected by executing <code>adb
+<p>When plugged in over USB, can verify that your device is connected by executing <code>adb
devices</code> from your SDK {@code platform-tools/} directory. If connected,
you'll see the device name listed as a "device."</p>
diff --git a/docs/html/guide/developing/projects/projects-cmdline.jd b/docs/html/guide/developing/projects/projects-cmdline.jd
index 81c2c58..b8db5f3 100644
--- a/docs/html/guide/developing/projects/projects-cmdline.jd
+++ b/docs/html/guide/developing/projects/projects-cmdline.jd
@@ -218,7 +218,7 @@
<p>To add a reference to a library project, navigate to the <code><sdk>/tools/</code>
directory and use this command:</p>
<pre>
-android update lib-project \
+android update project \
--target <em><target_ID></em> \
--path <em>path/to/your/project</em>
--library <em>path/to/library_projectA</em>
diff --git a/docs/html/images/training/lint_icon.png b/docs/html/images/training/lint_icon.png
new file mode 100644
index 0000000..118a741
--- /dev/null
+++ b/docs/html/images/training/lint_icon.png
Binary files differ
diff --git a/docs/html/index.jd b/docs/html/index.jd
index b9d6758..431a7d2 100644
--- a/docs/html/index.jd
+++ b/docs/html/index.jd
@@ -154,7 +154,7 @@
+ "href='https://plus.google.com/108967384991768947849'>+Android Developers</a>. "
+ "We'll use it to host Hangouts for developers, talk about the latest releases, "
+ "development and design tips, and much more.</p>"
-+ "<div style='margin:.7em 0 0 -1.2em'><g:plus href='https://plus.google.com/108967384991768947849' "
++ "<div style='margin:.7em 0 0 0'><g:plus href='https://plus.google.com/108967384991768947849' "
+ "size=\"smallbadge\" width=\"275\"></g:plus></div>"
},
diff --git a/docs/html/sdk/ndk/index.jd b/docs/html/sdk/ndk/index.jd
index afbad57..29f0749 100644
--- a/docs/html/sdk/ndk/index.jd
+++ b/docs/html/sdk/ndk/index.jd
@@ -1,16 +1,16 @@
ndk=true
-ndk.win_download=android-ndk-r7-windows.zip
-ndk.win_bytes=81270552
-ndk.win_checksum=55483482cf2b75e8dd1a5d9a7caeb6e5
+ndk.win_download=android-ndk-r7b-windows.zip
+ndk.win_bytes=80346206
+ndk.win_checksum=c42b0c9c14428397337421d5e4999380
-ndk.mac_download=android-ndk-r7-darwin-x86.tar.bz2
-ndk.mac_bytes=71262092
-ndk.mac_checksum=817ca5675a1dd44078098e43070f19b6
+ndk.mac_download=android-ndk-r7b-darwin-x86.tar.bz2
+ndk.mac_bytes=73817184
+ndk.mac_checksum=6daa82ca6b73bc0614c9997430079c7a
-ndk.linux_download=android-ndk-r7-linux-x86.tar.bz2
-ndk.linux_bytes=64884365
-ndk.linux_checksum=bf15e6b47bf50824c4b96849bf003ca3
+ndk.linux_download=android-ndk-r7b-linux-x86.tar.bz2
+ndk.linux_bytes=64349733
+ndk.linux_checksum=0eb8af18796cdaa082df8f7c54ad7f9a
page.title=Android NDK
@@ -62,6 +62,116 @@
<div class="toggleable open">
<a href="#" onclick="return toggleDiv(this)"><img src=
"{@docRoot}assets/images/triangle-opened.png" class="toggle-img" height="9px" width="9px">
+ Android NDK, Revision 7b</a> <em>(February 2012)</em>
+
+ <div class="toggleme">
+ <p>This release of the NDK includes fixes for native Windows builds, Cygwin and many other
+ improvements:</p>
+
+ <dl>
+ <dt>Important bug fixes:</dt>
+
+ <dd>
+ <ul>
+ <li>Updated {@code sys/atomics.h} to avoid correctness issues
+ on some multi-core ARM-based devices. Rebuild your unmodified sources with this
+ version of the NDK and this problem should be completely eliminated.
+ For more details, read {@code docs/ANDROID-ATOMICS.html}.</li>
+ <li>Reverted to {@code binutils} 2.19 to fix debugging issues that
+ appeared in NDK r7 (which switched to {@code binutils} 2.20.1).</li>
+ <li>Fixed {@code ndk-build} on 32-bit Linux. A packaging error put a 64-bit version
+ of the {@code awk} executable under {@code prebuilt/linux-x86/bin} in NDK r7.</li>
+ <li>Fixed native Windows build ({@code ndk-build.cmd}). Other build modes were not
+ affected. The fixes include:
+ <ul>
+ <li>Removed an infinite loop / stack overflow bug that happened when trying
+ to call {@code ndk-build.cmd} from a directory that was <em>not</em> the top of
+ your project path (e.g., in any sub-directory of it).</li>
+ <li>Fixed a problem where the auto-generated dependency files were ignored. This
+ meant that updating a header didn't trigger recompilation of sources that included
+ it.</li>
+ <li>Fixed a problem where special characters in files or paths, other than spaces and
+ quotes, were not correctly handled.</li>
+ </ul>
+ </li>
+ <li>Fixed the standalone toolchain to generate proper binaries when using
+ {@code -lstdc++} (i.e., linking against the GNU {@code libstdc++} C++ runtime). You
+ should use {@code -lgnustl_shared} if you want to link against the shared library
+ version or {@code -lstdc++} for the static version.
+
+ <p>See {@code docs/STANDALONE-TOOLCHAIN.html} for more details about this fix.</p>
+ </li>
+ <li>Fixed {@code gnustl_shared} on Cygwin. The linker complained that it couldn't find
+ {@code libsupc++.a} even though the file was at the right location.</li>
+ <li>Fixed Cygwin C++ link when not using any specific C++ runtime through
+ {@code APP_STL}.</li>
+ </ul>
+ </dd>
+ </dl>
+
+ <dl>
+ <dt>Other changes:</dt>
+
+ <dd>
+ <ul>
+ <li>When your application uses the GNU {@code libstdc++} runtime, the compiler will
+ no longer forcibly enable exceptions and RTTI. This change results in smaller code.
+ <p>If you need these features, you must do one of the following:</p>
+ <ul>
+ <li>Enable exceptions and/or RTTI explicitly in your modules or
+ {@code Application.mk}. (recommended)</li>
+ <li>Define {@code APP_GNUSTL_FORCE_CPP_FEATURES} to {@code 'exceptions'},
+ {@code 'rtti'} or both in your {@code Application.mk}. See
+ {@code docs/APPLICATION-MK.html} for more details.</li>
+ </ul>
+ </li>
+ <li>{@code ndk-gdb} now works properly when your application has private services
+ running in independent processes. It debugs the main application process, instead of the
+ first process listed by {@code ps}, which is usually a service process.</li>
+ <li>Fixed a rare bug where NDK r7 would fail to honor the {@code LOCAL_ARM_MODE} value
+ and always compile certain source files (but not all) to 32-bit instructions.</li>
+ <li>{@code stlport}: Refresh the sources to match the Android platform version. This
+ update fixes a few minor bugs:
+ <ul>
+ <li>Fixed instantiation of an incomplete type</li>
+ <li>Fixed minor "==" versus "=" typo</li>
+ <li>Used {@code memmove} instead of {@code memcpy} in {@code string::assign}</li>
+ <li>Added better handling of {@code IsNANorINF}, {@code IsINF}, {@code IsNegNAN},
+ etc.</li>
+ </ul>
+ <p>For complete details, see the commit log.</p>
+ </li>
+ <li>{@code stlport}: Removed 5 unnecessary static initializers from the library.</li>
+ <li>The GNU libstdc++ libraries for armeabi-v7a were mistakenly compiled for
+ armeabi instead. This change had no impact on correctness, but using the right
+ ABI should provide slightly better performance.</li>
+ <li>The {@code cpu-features} helper library was updated to report three optional
+ x86 CPU features ({@code SSSE3}, {@code MOVBE} and {@code POPCNT}). See
+ {@code docs/CPU-FEATURES.html} for more details.</li>
+ <li>{@code docs/NDK-BUILD.html} was updated to mention {@code NDK_APPLICATION_MK} instead
+ of {@code NDK_APP_APPLICATION_MK} to select a custom {@code Application.mk} file.</li>
+ <li>Cygwin: {@code ndk-build} no longer creates an empty "NUL" file in the current
+ directory when invoked.</li>
+ <li>Cygwin: Added better automatic dependency detection. In the previous version, it
+ didn't work properly in the following cases:
+ <ul>
+ <li>When the Cygwin drive prefix was not {@code /cygdrive}.</li>
+ <li>When using drive-less mounts, for example, when Cygwin would translate
+ {@code /home} to {@code \\server\subdir} instead of {@code C:\Some\Dir}.</li>
+ </ul>
+ </li>
+ <li>Cygwin: {@code ndk-build} does not try to use the native Windows tools under
+ {@code $NDK/prebuilt/windows/bin} with certain versions of Cygwin and/or GNU Make.</li>
+ </ul>
+ </dd>
+ </dl>
+ </div>
+</div>
+
+
+<div class="toggleable closed">
+ <a href="#" onclick="return toggleDiv(this)"><img src=
+ "{@docRoot}assets/images/triangle-closed.png" class="toggle-img" height="9px" width="9px">
Android NDK, Revision 7</a> <em>(November 2011)</em>
<div class="toggleme">
diff --git a/docs/html/sdk/ndk/overview.jd b/docs/html/sdk/ndk/overview.jd
index 85599f7..e969f5d 100644
--- a/docs/html/sdk/ndk/overview.jd
+++ b/docs/html/sdk/ndk/overview.jd
@@ -46,7 +46,7 @@
<li>Documentation, samples, and tutorials</li>
</ul>
- <p>The latest release of the NDK supports these ARM instruction sets:</p>
+ <p>The latest release of the NDK supports the following instruction sets:</p>
<ul>
<li>ARMv5TE (including Thumb-1 instructions)</li>
diff --git a/docs/html/sdk/oem-usb.jd b/docs/html/sdk/oem-usb.jd
index b81be71..f98257d 100644
--- a/docs/html/sdk/oem-usb.jd
+++ b/docs/html/sdk/oem-usb.jd
@@ -3,9 +3,21 @@
<div id="qv-wrapper">
<div id="qv">
+ <h2>In this document</h2>
+ <ol>
+ <li><a href="#InstallingDriver">Installing a USB Driver</a>
+ <ol>
+ <li><a href="#Win7">Windows 7</a></li>
+ <li><a href="#WinXp">Windows XP</a></li>
+ <li><a href="#WinVista">Windows Vista</a></li>
+ </ol>
+ </li>
+ <li><a href="#Drivers">OEM Drivers</a></li>
+ </ol>
+
<h2>See also</h2>
<ol>
- <li><a href="{@docRoot}guide/developing/device.html">Developing on a Device</a></li>
+ <li><a href="{@docRoot}guide/developing/device.html">Using Hardware Devices</a></li>
<li><a href="{@docRoot}sdk/win-usb.html">Google USB Driver</a></li>
</ol>
</div>
@@ -18,8 +30,8 @@
not exhaustive for all available Android-powered devices.</p>
<p>If you're developing on Mac OS X or Linux, then you probably don't need to install a USB driver.
-Refer to <a href="{@docRoot}guide/developing/device.html#setting-up">Setting up a Device</a> to
-start development with a device.</p>
+To start developing with your device, read <a
+href="{@docRoot}guide/developing/device.html">Using Hardware Devices</a>.</p>
<p class="note"><strong>Note:</strong> If your device is one of the Android Developer Phones
(purchased from the Android Market publisher site), a Nexus One, or a Nexus S, then you need
@@ -28,10 +40,184 @@
href="http://www.samsung.com/us/support/downloads/verizon-wireless/SCH-I515MSAVZW">Samsung</a>
(listed as model SCH-I515).</p>
-<p>For instructions about how to install the driver on Windows, follow the guide for <a
- href="{@docRoot}sdk/win-usb.html#InstallingDriver">Installing the USB Driver</a>.</p>
-<p class="table-caption"><strong>Table 1.</strong> Links to OEM USB drivers</p>
+<h2 id="InstallingDriver">Installing a USB Driver</h2>
+
+<p>First, find the appropriate driver for your device from the <a href="#Drivers">OEM drivers</a>
+table below.</p>
+
+<p>Once you've downloaded your USB driver, follow the instructions below to install or upgrade the
+driver, based on your version of Windows and whether you're installing for the first time
+or upgrading an existing driver.</p>
+
+<p class="note"><strong>Tip:</strong> When you finish the USB driver installation,
+see <a
+href="{@docRoot}guide/developing/device.html">Using Hardware Devices</a> for
+other important information about using an Android-powered device for
+development.</p>
+
+<ol class="nolist">
+ <li><a href="#Win7">Windows 7</a></li>
+ <li><a href="#WinXp">Windows XP</a></li>
+ <li><a href="#WinVista">Windows Vista</a></li>
+</ol>
+
+
+<p class="caution"><strong>Caution:</strong>
+You may make changes to <code>android_winusb.inf</code> file found inside
+<code>usb_driver\</code> (for example, to add support for other devices),
+however, this will lead to security warnings when you install or upgrade the
+driver. Making any other changes to the driver files may break the installation
+process.</p>
+
+
+<h3 id="Win7">Windows 7</h3>
+
+
+<p>To install the Android USB driver on Windows 7 for the first time:</p>
+<ol>
+ <li>Connect your Android-powered device to your computer's USB port.</li>
+ <li>Right-click on <em>Computer</em> from your desktop or Windows Explorer,
+ and select <strong>Manage</strong>.</li>
+ <li>Select <strong>Devices</strong> in the left pane.</li>
+ <li>Locate and expand <em>Other device</em> in the right pane.</li>
+ <li>Right-click the device name (such as <em>Nexus S</em>) and select <strong>Update
+ Driver Software</strong>.
+ This will launch the Hardware Update Wizard.</li>
+ <li>Select <strong>Browse my computer for driver software</strong> and click
+ <strong>Next</strong>.</li>
+ <li>Click <strong>Browse</strong> and locate the USB driver folder. (The Google USB
+Driver is located in {@code <sdk>\extras\google\usb_driver\}.)</li>
+ <li>Click <strong>Next</strong> to install the driver.</li>
+</ol>
+
+<p>Or, to <em>upgrade</em> an existing Android USB driver on Windows 7 with the new
+driver:</p>
+
+<ol>
+ <li>Connect your Android-powered device to your computer's USB port.</li>
+ <li>Right-click on <em>Computer</em> from your desktop or Windows Explorer,
+ and select <strong>Manage</strong>.</li>
+ <li>Select <strong>Device Manager</strong> in the left pane of the Computer Management
+ window.</li>
+ <li>Locate and expand <em>Android Phone</em> in the right pane.</li>
+ <li>Right-click <em>Android Composite ADB Interface</em> and select <strong>Update
+ Driver</strong>.
+ This will launch the Hardware Update Wizard.</li>
+ <li>Select <strong>Install from a list or specific location</strong> and click
+ <strong>Next</strong>.</li>
+ <li>Select <strong>Search for the best driver in these locations</strong>; un-check
+<strong>Search removable media</strong>; and check <strong>Include this location in the
+search</strong>.</li>
+ <li>Click <strong>Browse</strong> and locate the USB driver folder. (The Google USB
+Driver is located in {@code <sdk>\extras\google\usb_driver\}.)</li>
+ <li>Click <strong>Next</strong> to upgrade the driver.</li>
+</ol>
+
+
+
+
+
+<h3 id="WinXp">Windows XP</h3>
+
+<p>To install the Android USB driver on Windows XP for the first time:</p>
+
+<ol>
+ <li>Connect your Android-powered device to your computer's USB port. Windows
+ will detect the device and launch the Hardware Update Wizard.</li>
+ <li>Select <strong>Install from a list or specific location</strong> and click
+ <strong>Next</strong>.</li>
+ <li>Select <strong>Search for the best driver in these locations</strong>; un-check
+<strong>Search
+ removable media</strong>; and check <strong>Include
+this location in the search</strong>.</li>
+ <li>Click <strong>Browse</strong> and locate the USB driver folder. (The Google USB
+Driver is located in {@code <sdk>\extras\google\usb_driver\}.)</li>
+ <li>Click <strong>Next</strong> to install the driver.</li>
+</ol>
+
+<p>Or, to <em>upgrade</em> an existing Android USB driver on Windows XP with the new
+driver:</p>
+
+<ol>
+ <li>Connect your Android-powered device to your computer's USB port.</li>
+ <li>Right-click on <em>My Computer</em> from your desktop or Windows Explorer,
+ and select <strong>Manage</strong>.</li>
+ <li>Select <strong>Device Manager</strong> in the left pane.</li>
+ <li>Locate and expand <em>Android Phone</em> in the right pane.</li>
+ <li>Right-click <em>Android Composite ADB Interface</em> and select <strong>Update
+ Driver</strong>.
+ This will launch the Hardware Update Wizard.</li>
+ <li>Select <strong>Install from a list or specific location</strong> and click
+ <strong>Next</strong>.</li>
+ <li>Select <strong>Search for the best driver in these locations</strong>; un-check <strong>Search
+ removable media</strong>; and check <strong>Include
+this location in the search</strong>.</li>
+ <li>Click <strong>Browse</strong> and locate the USB driver folder. (The Google USB
+Driver is located in {@code <sdk>\extras\google\usb_driver\}.)</li>
+ <li>Click <strong>Next</strong> to upgrade the driver.</li>
+</ol>
+
+
+
+<h3 id="WinVista">Windows Vista</h3>
+
+<p>To install the Android USB driver on Windows Vista for the first time:</p>
+
+<ol>
+ <li>Connect your Android-powered device to your computer's USB port. Windows
+ will detect the device and launch the Found New Hardware wizard.</li>
+ <li>Select <strong>Locate and install driver software</strong>.</li>
+ <li>Select <strong>Don't search online</strong>.</li>
+ <li>Select <strong>I don't have the disk. Show me other options</strong>.</li>
+ <li>Select <strong>Browse my computer for driver software</strong>.</li>
+ <li>Click <strong>Browse</strong> and locate the USB driver folder. (The Google USB
+Driver is located in {@code <sdk>\extras\google\usb_driver\}.) As long as you specified the
+exact location of the
+ installation package, you may leave <strong>Include subfolders</strong> checked or
+ unchecked—it doesn't matter.</li>
+ <li>Click <strong>Next</strong>. Vista may prompt you to confirm the privilege elevation
+ required for driver installation. Confirm it.</li>
+ <li>When Vista asks if you'd like to install the Google ADB Interface device,
+ click <strong>Install</strong> to install the driver.</li>
+</ol>
+
+<p>Or, to <em>upgrade</em> an existing Android USB driver on Windows Vista with the new
+driver:</p>
+
+<ol>
+ <li>Connect your Android-powered device to your computer's USB port.</li>
+ <li>Right-click on <em>Computer</em> from your desktop or Windows Explorer,
+ and select <strong>Manage</strong>.</li>
+ <li>Select <strong>Device Manager</strong> in the left pane.</li>
+ <li>Locate and expand <em>ADB Interface</em> in the right pane.</li>
+ <li>Right-click on <em>HTC Dream Composite ADB Interface</em>, and select <strong>Update
+ Driver Software</strong>.</li>
+ <li>When Vista starts updating the driver, a prompt will ask how you want to
+ search for the driver
+ software. Select <strong>Browse my computer for driver software</strong>.</li>
+ <li>Click <strong>Browse</strong> and locate the USB driver folder. (The Google USB
+Driver is located in {@code <sdk>\extras\google\usb_driver\}.) As long as you specified the
+exact location of the
+ installation package, you may leave <strong>Include subfolders</strong> checked or
+ unchecked—it doesn't matter.</li>
+ <li>Click <strong>Next</strong>. Vista might prompt you to confirm the privilege elevation
+ required for driver installation. Confirm it.</li>
+ <li>When Vista asks if you'd like to install the Google ADB Interface device,
+ click <strong>Install</strong> to upgrade the driver.</li>
+</ol>
+
+
+<h2 id="Drivers">OEM Drivers</h2>
+
+<p class="note"><strong>Note:</strong> If your device is one of the Android Developer Phones
+(purchased from the Android Market publisher site), a Nexus One, or a Nexus S, then you need
+the <a href="{@docRoot}sdk/win-usb.html">Google USB Driver</a>, instead of an OEM driver. The Galaxy
+Nexus driver, however, is distributed by <a
+href="http://www.samsung.com/us/support/downloads/verizon-wireless/SCH-I515MSAVZW">Samsung</a>
+(listed as model SCH-I515).</p>
+
+
<table><tr>
<th>OEM</th>
<th>Driver URL</th></tr>
@@ -92,7 +278,7 @@
</tr>
<tr><td>KT Tech</td> <td><a
-href="http://www.kttech.co.kr/cscenter/download05.asp">http://www.kttech.co.kr/cscenter/download05.asp</a> for EV-S100(Take)</td>
+href="http://www.kttech.co.kr/cscenter/download05.asp">http://www.kttech.co.kr/cscenter/download05.asp</a> for EV-S100 (Take)</td>
</tr>
<tr>
<td>
diff --git a/docs/html/sdk/sdk_toc.cs b/docs/html/sdk/sdk_toc.cs
index 0de477a..f7541f7 100644
--- a/docs/html/sdk/sdk_toc.cs
+++ b/docs/html/sdk/sdk_toc.cs
@@ -195,7 +195,7 @@
<span style="display:none" class="zh-TW"></span>
</span>
<ul>
- <li><a href="<?cs var:toroot ?>sdk/ndk/index.html">Android NDK, r7</a>
+ <li><a href="<?cs var:toroot ?>sdk/ndk/index.html">Android NDK, r7b</a>
<span class="new">new!</span>
</li>
<li><a href="<?cs var:toroot ?>sdk/ndk/overview.html">What is the NDK?</a></li>
diff --git a/docs/html/sdk/win-usb.jd b/docs/html/sdk/win-usb.jd
index 2d1435b..2bd031e 100644
--- a/docs/html/sdk/win-usb.jd
+++ b/docs/html/sdk/win-usb.jd
@@ -7,19 +7,12 @@
<ol>
<li><a href="#notes">Revisions</a></li>
<li><a href="#WinUsbDriver">Downloading the Google USB Driver</a></li>
- <li><a href="#InstallingDriver">Installing the USB Driver</a>
- <ol>
- <li><a href="#Win7">Windows 7</a></li>
- <li><a href="#WinXp">Windows XP</a></li>
- <li><a href="#WinVista">Windows Vista</a></li>
- </ol>
- </li>
</ol>
<h2>See also</h2>
<ol>
- <li><a href="{@docRoot}guide/developing/device.html">Developing on a Device</a></li>
+ <li><a href="{@docRoot}sdk/oem-usb.html#InstallingDriver">Installing a USB Driver</a></li>
+ <li><a href="{@docRoot}guide/developing/device.html">Using Hardware Devices</a></li>
<li><a href="{@docRoot}sdk/adding-components.html">Adding SDK Components</a></li>
- <li><a href="{@docRoot}sdk/oem-usb.html">OEM USB Drivers</a></li>
</ol>
</div>
</div>
@@ -43,9 +36,9 @@
(listed as model SCH-I515).</p>
<p class="note"><strong>Note:</strong>
-If you're developing on Mac OS X or Linux, then you do not need to install a USB driver. Refer to <a
-href="{@docRoot}guide/developing/device.html#setting-up">Setting up a Device</a> to start
-development with a device.</p>
+If you're developing on Mac OS X or Linux, then you do not need to install a USB driver. To start
+developing with your device, also read <a href="{@docRoot}guide/developing/device.html">Using
+Hardware Devices</a>.</p>
<p>The sections below provide instructions on how to download and install the Google USB Driver
for Windows. </p>
@@ -170,174 +163,10 @@
<ol>
<li>Launch the SDK and AVD Manager by double-clicking <code>SDK Manager.exe</code>,
at the root of your SDK directory.</li>
- <li>Expand the <em>Third party Add-ons</em> and <em>Google Inc. add-ons</em>.</li>
- <li>Check <strong>Google Usb Driver package</strong> and click <strong>Install selected</strong>.</li>
+ <li>Expand <em>Extras</em>.</li>
+ <li>Check <strong>Google USB Driver package</strong> and click <strong>Install</strong>.</li>
<li>Proceed to install the package. When done, the driver files are
downloaded into the <code><sdk>\extras\google\usb_driver\</code> directory.</li>
</ol>
-
-
-<h2 id="InstallingDriver">Installing the USB Driver</h2>
-
-<p>Once you've downloaded your USB driver, follow the instructions below to install or upgrade the
-driver, based on your version of Windows and whether you're installing for the first time
-or upgrading an existing driver.</p>
-
-<p class="note"><strong>Tip:</strong> When you finish the USB driver installation,
-see <a
-href="{@docRoot}guide/developing/device.html">Developing on a Device</a> for
-other important information about using an Android-powered device for
-development.</p>
-
-<ol class="nolist">
- <li><a href="#Win7">Windows 7</a></li>
- <li><a href="#WinXp">Windows XP</a></li>
- <li><a href="#WinVista">Windows Vista</a></li>
-</ol>
-
-
-<p class="caution"><strong>Caution:</strong>
-You may make changes to <code>android_winusb.inf</code> file found inside
-<code>usb_driver\</code> (for example, to add support for other devices),
-however, this will lead to security warnings when you install or upgrade the
-driver. Making any other changes to the driver files may break the installation
-process.</p>
-
-
-<h3 id="Win7">Windows 7</h3>
-
-
-<p>To install the Android USB driver on Windows 7 for the first time:</p>
-<ol>
- <li>Connect your Android-powered device to your computer's USB port.</li>
- <li>Right-click on <em>Computer</em> from your desktop or Windows Explorer,
- and select <strong>Manage</strong>.</li>
- <li>Select <strong>Devices</strong> in the left pane.</li>
- <li>Locate and expand <em>Other device</em> in the right pane.</li>
- <li>Right-click the device name (such as <em>Nexus S</em>) and select <strong>Update
- Driver Software</strong>.
- This will launch the Hardware Update Wizard.</li>
- <li>Select <strong>Browse my computer for driver software</strong> and click
- <strong>Next</strong>.</li>
- <li>Click <strong>Browse</strong> and locate the USB driver folder. (The Google USB
-Driver is located in {@code <sdk>\extras\google\usb_driver\}.)</li>
- <li>Click <strong>Next</strong> to install the driver.</li>
-</ol>
-
-<p>Or, to <em>upgrade</em> an existing Android USB driver on Windows 7 with the new
-driver:</p>
-
-<ol>
- <li>Connect your Android-powered device to your computer's USB port.</li>
- <li>Right-click on <em>Computer</em> from your desktop or Windows Explorer,
- and select <strong>Manage</strong>.</li>
- <li>Select <strong>Device Manager</strong> in the left pane of the Computer Management
- window.</li>
- <li>Locate and expand <em>Android Phone</em> in the right pane.</li>
- <li>Right-click <em>Android Composite ADB Interface</em> and select <strong>Update
- Driver</strong>.
- This will launch the Hardware Update Wizard.</li>
- <li>Select <strong>Install from a list or specific location</strong> and click
- <strong>Next</strong>.</li>
- <li>Select <strong>Search for the best driver in these locations</strong>; un-check
-<strong>Search removable media</strong>; and check <strong>Include this location in the
-search</strong>.</li>
- <li>Click <strong>Browse</strong> and locate the USB driver folder. (The Google USB
-Driver is located in {@code <sdk>\extras\google\usb_driver\}.)</li>
- <li>Click <strong>Next</strong> to upgrade the driver.</li>
-</ol>
-
-
-
-
-
-<h3 id="WinXp">Windows XP</h3>
-
-<p>To install the Android USB driver on Windows XP for the first time:</p>
-
-<ol>
- <li>Connect your Android-powered device to your computer's USB port. Windows
- will detect the device and launch the Hardware Update Wizard.</li>
- <li>Select <strong>Install from a list or specific location</strong> and click
- <strong>Next</strong>.</li>
- <li>Select <strong>Search for the best driver in these locations</strong>; un-check
-<strong>Search
- removable media</strong>; and check <strong>Include
-this location in the search</strong>.</li>
- <li>Click <strong>Browse</strong> and locate the USB driver folder. (The Google USB
-Driver is located in {@code <sdk>\extras\google\usb_driver\}.)</li>
- <li>Click <strong>Next</strong> to install the driver.</li>
-</ol>
-
-<p>Or, to <em>upgrade</em> an existing Android USB driver on Windows XP with the new
-driver:</p>
-
-<ol>
- <li>Connect your Android-powered device to your computer's USB port.</li>
- <li>Right-click on <em>My Computer</em> from your desktop or Windows Explorer,
- and select <strong>Manage</strong>.</li>
- <li>Select <strong>Device Manager</strong> in the left pane.</li>
- <li>Locate and expand <em>Android Phone</em> in the right pane.</li>
- <li>Right-click <em>Android Composite ADB Interface</em> and select <strong>Update
- Driver</strong>.
- This will launch the Hardware Update Wizard.</li>
- <li>Select <strong>Install from a list or specific location</strong> and click
- <strong>Next</strong>.</li>
- <li>Select <strong>Search for the best driver in these locations</strong>; un-check <strong>Search
- removable media</strong>; and check <strong>Include
-this location in the search</strong>.</li>
- <li>Click <strong>Browse</strong> and locate the USB driver folder. (The Google USB
-Driver is located in {@code <sdk>\extras\google\usb_driver\}.)</li>
- <li>Click <strong>Next</strong> to upgrade the driver.</li>
-</ol>
-
-
-
-<h3 id="WinVista">Windows Vista</h3>
-
-<p>To install the Android USB driver on Windows Vista for the first time:</p>
-
-<ol>
- <li>Connect your Android-powered device to your computer's USB port. Windows
- will detect the device and launch the Found New Hardware wizard.</li>
- <li>Select <strong>Locate and install driver software</strong>.</li>
- <li>Select <strong>Don't search online</strong>.</li>
- <li>Select <strong>I don't have the disk. Show me other options</strong>.</li>
- <li>Select <strong>Browse my computer for driver software</strong>.</li>
- <li>Click <strong>Browse</strong> and locate the USB driver folder. (The Google USB
-Driver is located in {@code <sdk>\extras\google\usb_driver\}.) As long as you specified the
-exact location of the
- installation package, you may leave <strong>Include subfolders</strong> checked or
- unchecked—it doesn't matter.</li>
- <li>Click <strong>Next</strong>. Vista may prompt you to confirm the privilege elevation
- required for driver installation. Confirm it.</li>
- <li>When Vista asks if you'd like to install the Google ADB Interface device,
- click <strong>Install</strong> to install the driver.</li>
-</ol>
-
-<p>Or, to <em>upgrade</em> an existing Android USB driver on Windows Vista with the new
-driver:</p>
-
-<ol>
- <li>Connect your Android-powered device to your computer's USB port.</li>
- <li>Right-click on <em>Computer</em> from your desktop or Windows Explorer,
- and select <strong>Manage</strong>.</li>
- <li>Select <strong>Device Manager</strong> in the left pane.</li>
- <li>Locate and expand <em>ADB Interface</em> in the right pane.</li>
- <li>Right-click on <em>HTC Dream Composite ADB Interface</em>, and select <strong>Update
- Driver Software</strong>.</li>
- <li>When Vista starts updating the driver, a prompt will ask how you want to
- search for the driver
- software. Select <strong>Browse my computer for driver software</strong>.</li>
- <li>Click <strong>Browse</strong> and locate the USB driver folder. (The Google USB
-Driver is located in {@code <sdk>\extras\google\usb_driver\}.) As long as you specified the
-exact location of the
- installation package, you may leave <strong>Include subfolders</strong> checked or
- unchecked—it doesn't matter.</li>
- <li>Click <strong>Next</strong>. Vista might prompt you to confirm the privilege elevation
- required for driver installation. Confirm it.</li>
- <li>When Vista asks if you'd like to install the Google ADB Interface device,
- click <strong>Install</strong> to upgrade the driver.</li>
-</ol>
-
+<p>For installation information, read <a href="{@docRoot}sdk/oem-usb.html#InstallingDriver">Installing a USB Driver</a>.</p>
diff --git a/docs/html/training/improving-layouts/optimizing-layout.jd b/docs/html/training/improving-layouts/optimizing-layout.jd
index 65c8af7..0eaf199 100644
--- a/docs/html/training/improving-layouts/optimizing-layout.jd
+++ b/docs/html/training/improving-layouts/optimizing-layout.jd
@@ -18,7 +18,7 @@
<ol>
<li><a href="#Inspect">Inspect Your Layout</a></li>
<li><a href="#Revise">Revise Your Layout</a></li>
- <li><a href="#Layoutopt">Use Layoutopt</a></li>
+ <li><a href="#Lint">Use Lint</a></li>
</ol>
<!-- other docs (NOT javadocs) -->
@@ -44,7 +44,7 @@
android.widget.GridView}.</p>
<p>In this lesson you'll learn to use <a
-href="{@docRoot}guide/developing/tools/hierarchy-viewer.html">Heirachy Viewer</a> and <a
+href="{@docRoot}guide/developing/tools/hierarchy-viewer.html">Hierarchy Viewer</a> and <a
href="{@docRoot}guide/developing/tools/layoutopt.html">Layoutopt</a> to examine and optimize your
layout.</p>
@@ -53,7 +53,7 @@
<h2 id="Inspect">Inspect Your Layout</h2>
<p>The Android SDK tools include a tool called <a
-href="{@docRoot}guide/developing/tools/hierarchy-viewer.html">Heirachy Viewer</a> that allows
+href="{@docRoot}guide/developing/tools/hierarchy-viewer.html">Hierarchy Viewer</a> that allows
you to analyze your layout while your application is running. Using this tool helps you discover
bottlenecks in the layout performance.</p>
@@ -130,27 +130,28 @@
layout weight is necessary.</p>
-<h2 id="Layoutopt">Use Layoutopt</h2>
+<h2 id="Lint">Use Lint</h2>
-<p>It is always good practice to also run the <a
-href="{@docRoot}guide/developing/tools/layoutopt.html">layoutopt</a> tool on your final layout files
-to search for places in your view hierarchy that may be optimized. Layoutopt is also in your SDK
-{@code tools/} directory and takes a layout directory name or a space-separated list of layout files
-that you'd like to inspect.</p>
+<p>It is always good practice to run the <a href="http://tools.android.com/tips/lint">Lint</a> tool on your layout files to search for possible view hierarchy optimizations. Lint has replaced the Layoutopt tool and has much greater functionality. Some examples of Lint <a
+href="http://tools.android.com/tips/lint-checks">rules</a> are:</p>
-<p>When you run {@code layoutopt} on a layout file, it prints a line number for each issue found, a
-description of the issue, and for some types of issues it also suggests a resolution. For
-example:</p>
+<ul>
+<li>Use compound drawables - A {@link android.widget.LinearLayout} which contains an {@link android.widget.ImageView} and a {@link android.widget.TextView} can be more efficiently handled as a compound drawable.</li>
+<li>Merge root frame - If a {@link android.widget.FrameLayout} is the root of a layout and does not provide background or padding etc, it can be replaced with a merge tag which is slightly more efficient.</li>
+<li>Useless leaf - A layout that has no children or no background can often be removed (since it is invisible) for a flatter and more efficient layout hierarchy.</li>
+<li>Useless parent - A layout with children that has no siblings, is not a {@link android.widget.ScrollView} or a root layout, and does not have a background, can be removed and have its children moved directly into the parent for a flatter and more efficient layout hierarchy.</li>
+<li>Deep layouts - Layouts with too much nesting are bad for performance. Consider using flatter layouts such as {@link android.widget.RelativeLayout} or {@link android.widget.GridLayout} to improve performance. The default maximum depth is 10.</li>
+</ul>
-<pre class="no-pretty-print classic">
-$ layoutopt samples/
-samples/compound.xml
- 7:23 The root-level <FrameLayout/> can be replaced with <merge/>
- 11:21 This LinearLayout layout or its FrameLayout parent is useless
-samples/simple.xml
- 7:7 The root-level <FrameLayout/> can be replaced with <merge/>
-</pre>
+<p>Another benefit of Lint is that it is integrated into the Android Development Tools for Eclipse (ADT 16+). Lint automatically runs whenever you export an APK, edit and save an XML file or use the Layout Editor. To manually force Lint to run press the Lint button in the Eclipse toolbar.</p>
-<p>After you apply the suggested layout optimizations, run Hierarchy Viewer again to inspect the
-performance changes.</p>
+<img src="{@docRoot}images/training/lint_icon.png" alt="" />
+
+<p>When used inside Eclipse, Lint has the ability to automatically fix some issues, provide suggestions for others and jump directly to the offending code for review. If you don’t use Eclipse for your development, Lint can also be run from the command line. More information about Lint is available at <a href="http://tools.android.com/tips/lint">tools.android.com</a>.</p>
+
+
+
+
+
+
diff --git a/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/MediaRecorderStressTestRunner.java b/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/MediaRecorderStressTestRunner.java
index e5ecd5c..95e7b5e 100755
--- a/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/MediaRecorderStressTestRunner.java
+++ b/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/MediaRecorderStressTestRunner.java
@@ -44,7 +44,9 @@
public static int mVideoHeight = profile.videoFrameHeight;
public static int mBitRate = profile.videoBitRate;
public static boolean mRemoveVideo = true;
- public static int mDuration = 10000;
+ public static int mDuration = 10 * 1000; // 10 seconds
+ public static int mTimeLapseDuration = 180 * 1000; // 3 minutes
+ public static double mCaptureRate = 0.5; // 2 sec timelapse interval
@Override
public TestSuite getAllTests() {
diff --git a/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/stress/MediaRecorderStressTest.java b/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/stress/MediaRecorderStressTest.java
index e6177ba..5e649e0 100644
--- a/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/stress/MediaRecorderStressTest.java
+++ b/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/stress/MediaRecorderStressTest.java
@@ -22,11 +22,13 @@
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileWriter;
+import java.io.IOException;
import java.io.Writer;
import java.util.concurrent.Semaphore;
import java.util.concurrent.TimeUnit;
import android.hardware.Camera;
+import android.media.CamcorderProfile;
import android.media.MediaPlayer;
import android.media.MediaRecorder;
import android.os.Handler;
@@ -39,21 +41,21 @@
/**
* Junit / Instrumentation test case for the media player api
-
- */
-public class MediaRecorderStressTest extends ActivityInstrumentationTestCase2<MediaFrameworkTest> {
-
-
+ */
+public class MediaRecorderStressTest extends ActivityInstrumentationTestCase2<MediaFrameworkTest> {
+
private String TAG = "MediaRecorderStressTest";
private MediaRecorder mRecorder;
private Camera mCamera;
-
+
private static final int NUMBER_OF_CAMERA_STRESS_LOOPS = 100;
private static final int NUMBER_OF_RECORDER_STRESS_LOOPS = 100;
private static final int NUMBER_OF_RECORDERANDPLAY_STRESS_LOOPS = 50;
private static final int NUMBER_OF_SWTICHING_LOOPS_BW_CAMERA_AND_RECORDER = 200;
- private static final long WAIT_TIME_CAMERA_TEST = 3000; // 3 second
- private static final long WAIT_TIME_RECORDER_TEST = 6000; // 6 second
+ private static final int NUMBER_OF_TIME_LAPSE_LOOPS = 25;
+ private static final int TIME_LAPSE_PLAYBACK_WAIT_TIME = 5* 1000; // 5 seconds
+ private static final long WAIT_TIME_CAMERA_TEST = 3 * 1000; // 3 seconds
+ private static final long WAIT_TIME_RECORDER_TEST = 6 * 1000; // 6 seconds
private static final String OUTPUT_FILE = "/sdcard/temp";
private static final String OUTPUT_FILE_EXT = ".3gp";
private static final String MEDIA_STRESS_OUTPUT =
@@ -61,7 +63,7 @@
private final CameraErrorCallback mCameraErrorCallback = new CameraErrorCallback();
private final RecorderErrorCallback mRecorderErrorCallback = new RecorderErrorCallback();
- private final static int WAIT_TIMEOUT = 10000;
+ private final static int WAIT_TIMEOUT = 10 * 1000; // 10 seconds
private Thread mLooperThread;
private Handler mHandler;
@@ -306,7 +308,7 @@
}
}
- public void removeRecodedVideo(String filename){
+ public void removeRecordedVideo(String filename){
File video = new File(filename);
Log.v(TAG, "remove recorded video " + filename);
video.delete();
@@ -363,6 +365,7 @@
mRecorder.setVideoSize(video_width, video_height);
mRecorder.setVideoEncoder(video_encoder);
mRecorder.setAudioEncoder(audio_encoder);
+ mRecorder.setVideoEncodingBitRate(bit_rate);
Log.v(TAG, "mediaRecorder setPreview");
mRecorder.setPreviewDisplay(mSurfaceHolder.getSurface());
mRecorder.prepare();
@@ -381,7 +384,7 @@
mp.release();
validateRecordedVideo(filename);
if (remove_video) {
- removeRecodedVideo(filename);
+ removeRecordedVideo(filename);
}
output.write(", " + i);
}
@@ -392,4 +395,90 @@
output.write("\n\n");
output.close();
}
+
+ // Test case for stressing time lapse
+ @LargeTest
+ public void testStressTimeLapse() throws Exception {
+ SurfaceHolder mSurfaceHolder;
+ mSurfaceHolder = MediaFrameworkTest.mSurfaceView.getHolder();
+ int record_duration = MediaRecorderStressTestRunner.mTimeLapseDuration;
+ boolean remove_video = MediaRecorderStressTestRunner.mRemoveVideo;
+ double captureRate = MediaRecorderStressTestRunner.mCaptureRate;
+ String filename;
+ File stressOutFile = new File(MEDIA_STRESS_OUTPUT);
+ Writer output = new BufferedWriter(new FileWriter(stressOutFile, true));
+ output.write("Start camera time lapse stress:\n");
+ output.write("Total number of loops: " + NUMBER_OF_TIME_LAPSE_LOOPS + "\n");
+
+ try {
+ output.write("No of loop: ");
+ for (int i = 0; i < NUMBER_OF_TIME_LAPSE_LOOPS; i++) {
+ filename = OUTPUT_FILE + i + OUTPUT_FILE_EXT;
+ Log.v(TAG, filename);
+ runOnLooper(new Runnable() {
+ @Override
+ public void run() {
+ mRecorder = new MediaRecorder();
+ }
+ });
+
+ // Set callback
+ mRecorder.setOnErrorListener(mRecorderErrorCallback);
+
+ // Set video source
+ mRecorder.setVideoSource(MediaRecorder.VideoSource.CAMERA);
+
+ // Set camcorder profile for time lapse
+ CamcorderProfile profile =
+ CamcorderProfile.get(CamcorderProfile.QUALITY_TIME_LAPSE_HIGH);
+ mRecorder.setProfile(profile);
+
+ // Set the timelapse setting; 0.1 = 10 sec timelapse, 0.5 = 2 sec timelapse, etc.
+ // http://developer.android.com/guide/topics/media/camera.html#time-lapse-video
+ mRecorder.setCaptureRate(captureRate);
+
+ // Set output file
+ mRecorder.setOutputFile(filename);
+
+ // Set the preview display
+ Log.v(TAG, "mediaRecorder setPreviewDisplay");
+ mRecorder.setPreviewDisplay(mSurfaceHolder.getSurface());
+
+ mRecorder.prepare();
+ mRecorder.start();
+ Thread.sleep(record_duration);
+ Log.v(TAG, "Before stop");
+ mRecorder.stop();
+ mRecorder.release();
+
+ // Start the playback
+ MediaPlayer mp = new MediaPlayer();
+ mp.setDataSource(filename);
+ mp.setDisplay(mSurfaceHolder);
+ mp.prepare();
+ mp.start();
+ Thread.sleep(TIME_LAPSE_PLAYBACK_WAIT_TIME);
+ mp.release();
+ validateRecordedVideo(filename);
+ if(remove_video) {
+ removeRecordedVideo(filename);
+ }
+ output.write(", " + i);
+ }
+ }
+ catch (IllegalStateException e) {
+ assertTrue("Camera time lapse stress test IllegalStateException", false);
+ Log.v(TAG, e.toString());
+ }
+ catch (IOException e) {
+ assertTrue("Camera time lapse stress test IOException", false);
+ Log.v(TAG, e.toString());
+ }
+ catch (Exception e) {
+ assertTrue("Camera time lapse stress test Exception", false);
+ Log.v(TAG, e.toString());
+ }
+ output.write("\n\n");
+ output.close();
+ }
}
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/policy/NetworkController.java b/packages/SystemUI/src/com/android/systemui/statusbar/policy/NetworkController.java
index d46ab6c..506dd9a 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/policy/NetworkController.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/NetworkController.java
@@ -88,6 +88,7 @@
int mLastSignalLevel;
boolean mShowPhoneRSSIForData = false;
boolean mShowAtLeastThreeGees = false;
+ boolean mAlwaysShowCdmaRssi = false;
String mContentDescriptionPhoneSignal;
String mContentDescriptionWifi;
@@ -156,7 +157,7 @@
IBatteryStats mBatteryStats;
public interface SignalCluster {
- void setWifiIndicators(boolean visible, int strengthIcon, int activityIcon,
+ void setWifiIndicators(boolean visible, int strengthIcon, int activityIcon,
String contentDescription);
void setMobileDataIndicators(boolean visible, int strengthIcon, int activityIcon,
int typeIcon, String contentDescription, String typeContentDescription);
@@ -176,6 +177,8 @@
mShowPhoneRSSIForData = res.getBoolean(R.bool.config_showPhoneRSSIForData);
mShowAtLeastThreeGees = res.getBoolean(R.bool.config_showMin3G);
+ mAlwaysShowCdmaRssi = res.getBoolean(
+ com.android.internal.R.bool.config_alwaysUseCdmaRssi);
// set up the default wifi icon, used when no radios have ever appeared
updateWifiIcons();
@@ -287,7 +290,7 @@
// wimax is special
cluster.setMobileDataIndicators(
true,
- mWimaxIconId,
+ mAlwaysShowCdmaRssi ? mPhoneSignalIconId : mWimaxIconId,
mMobileActivityIconId,
mDataTypeIconId,
mContentDescriptionWimax,
@@ -351,7 +354,7 @@
@Override
public void onSignalStrengthsChanged(SignalStrength signalStrength) {
if (DEBUG) {
- Slog.d(TAG, "onSignalStrengthsChanged signalStrength=" + signalStrength +
+ Slog.d(TAG, "onSignalStrengthsChanged signalStrength=" + signalStrength +
((signalStrength == null) ? "" : (" level=" + signalStrength.getLevel())));
}
mSignalStrength = signalStrength;
@@ -469,7 +472,15 @@
} else {
int iconLevel;
int[] iconList;
- mLastSignalLevel = iconLevel = mSignalStrength.getLevel();
+ if (isCdma() && mAlwaysShowCdmaRssi) {
+ mLastSignalLevel = iconLevel = mSignalStrength.getCdmaLevel();
+ if(DEBUG) Slog.d(TAG, "mAlwaysShowCdmaRssi=" + mAlwaysShowCdmaRssi
+ + " set to cdmaLevel=" + mSignalStrength.getCdmaLevel()
+ + " instead of level=" + mSignalStrength.getLevel());
+ } else {
+ mLastSignalLevel = iconLevel = mSignalStrength.getLevel();
+ }
+
if (isCdma()) {
if (isCdmaEri()) {
iconList = TelephonyIcons.TELEPHONY_SIGNAL_STRENGTH_ROAMING[mInetCondition];
@@ -487,7 +498,6 @@
mPhoneSignalIconId = iconList[iconLevel];
mContentDescriptionPhoneSignal = mContext.getString(
AccessibilityContentDescriptions.PHONE_SIGNAL_STRENGTH[iconLevel]);
-
mDataSignalIconId = TelephonyIcons.DATA_SIGNAL_STRENGTH[mInetCondition][iconLevel];
}
}
@@ -908,7 +918,7 @@
mobileLabel = "";
}
} else {
- mobileLabel
+ mobileLabel
= context.getString(R.string.status_bar_settings_signal_meter_disconnected);
}
@@ -1181,7 +1191,7 @@
v.setText(wifiLabel);
}
}
-
+
// mobile label
N = mMobileLabelViews.size();
for (int i=0; i<N; i++) {
diff --git a/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java b/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java
index 59b6626..0de76a7 100755
--- a/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java
+++ b/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java
@@ -2217,13 +2217,21 @@
"Laying out navigation bar window: (%d,%d - %d,%d)",
pf.left, pf.top, pf.right, pf.bottom));
}
- } else if (attrs.type == TYPE_SECURE_SYSTEM_OVERLAY
+ } else if ((attrs.type == TYPE_SECURE_SYSTEM_OVERLAY
+ || attrs.type == TYPE_BOOT_PROGRESS)
&& ((fl & FLAG_FULLSCREEN) != 0)) {
// Fullscreen secure system overlays get what they ask for.
pf.left = df.left = mUnrestrictedScreenLeft;
pf.top = df.top = mUnrestrictedScreenTop;
pf.right = df.right = mUnrestrictedScreenLeft+mUnrestrictedScreenWidth;
pf.bottom = df.bottom = mUnrestrictedScreenTop+mUnrestrictedScreenHeight;
+ } else if (attrs.type == TYPE_BOOT_PROGRESS) {
+ // Boot progress screen always covers entire display.
+ pf.left = df.left = cf.left = mUnrestrictedScreenLeft;
+ pf.top = df.top = cf.top = mUnrestrictedScreenTop;
+ pf.right = df.right = cf.right = mUnrestrictedScreenLeft+mUnrestrictedScreenWidth;
+ pf.bottom = df.bottom = cf.bottom
+ = mUnrestrictedScreenTop+mUnrestrictedScreenHeight;
} else {
pf.left = df.left = cf.left = mRestrictedScreenLeft;
pf.top = df.top = cf.top = mRestrictedScreenTop;
diff --git a/services/java/com/android/server/ConnectivityService.java b/services/java/com/android/server/ConnectivityService.java
index 97fb0b0..b7dc4a2 100644
--- a/services/java/com/android/server/ConnectivityService.java
+++ b/services/java/com/android/server/ConnectivityService.java
@@ -1031,9 +1031,14 @@
if ((ni.isConnectedOrConnecting() == true) &&
!network.isTeardownRequested()) {
if (ni.isConnected() == true) {
- // add the pid-specific dns
- handleDnsConfigurationChange(usedNetworkType);
- if (VDBG) log("special network already active");
+ final long token = Binder.clearCallingIdentity();
+ try {
+ // add the pid-specific dns
+ handleDnsConfigurationChange(usedNetworkType);
+ if (VDBG) log("special network already active");
+ } finally {
+ Binder.restoreCallingIdentity(token);
+ }
return Phone.APN_ALREADY_ACTIVE;
}
if (VDBG) log("special network already connecting");
@@ -1221,6 +1226,7 @@
}
if (!ConnectivityManager.isNetworkTypeValid(networkType)) {
+ if (DBG) log("requestRouteToHostAddress on invalid network: " + networkType);
return false;
}
NetworkStateTracker tracker = mNetTrackers[networkType];
@@ -1233,11 +1239,16 @@
}
return false;
}
+ final long token = Binder.clearCallingIdentity();
try {
InetAddress addr = InetAddress.getByAddress(hostAddress);
LinkProperties lp = tracker.getLinkProperties();
return addRouteToAddress(lp, addr);
- } catch (UnknownHostException e) {}
+ } catch (UnknownHostException e) {
+ if (DBG) log("requestRouteToHostAddress got " + e.toString());
+ } finally {
+ Binder.restoreCallingIdentity(token);
+ }
return false;
}
@@ -1277,7 +1288,10 @@
private boolean modifyRoute(String ifaceName, LinkProperties lp, RouteInfo r, int cycleCount,
boolean doAdd, boolean toDefaultTable) {
- if ((ifaceName == null) || (lp == null) || (r == null)) return false;
+ if ((ifaceName == null) || (lp == null) || (r == null)) {
+ if (DBG) log("modifyRoute got unexpected null: " + ifaceName + ", " + lp + ", " + r);
+ return false;
+ }
if (cycleCount > MAX_HOSTROUTE_CYCLE_COUNT) {
loge("Error modifying route - too much recursion");
@@ -1309,7 +1323,7 @@
}
} catch (Exception e) {
// never crash - catch them all
- if (VDBG) loge("Exception trying to add a route: " + e);
+ if (DBG) loge("Exception trying to add a route: " + e);
return false;
}
} else {
@@ -1323,7 +1337,7 @@
mNetd.removeRoute(ifaceName, r);
} catch (Exception e) {
// never crash - catch them all
- if (VDBG) loge("Exception trying to remove a route: " + e);
+ if (DBG) loge("Exception trying to remove a route: " + e);
return false;
}
} else {
@@ -1335,7 +1349,7 @@
mNetd.removeSecondaryRoute(ifaceName, r);
} catch (Exception e) {
// never crash - catch them all
- if (VDBG) loge("Exception trying to remove a route: " + e);
+ if (DBG) loge("Exception trying to remove a route: " + e);
return false;
}
}
@@ -2004,7 +2018,7 @@
mNetd.removeRoute(ifaceName, r);
} catch (Exception e) {
// never crash - catch them all
- if (VDBG) loge("Exception trying to remove a route: " + e);
+ if (DBG) loge("Exception trying to remove a route: " + e);
}
}
}
@@ -2218,7 +2232,7 @@
mNetd.setDnsServersForInterface(iface, NetworkUtils.makeStrings(dnses));
mNetd.setDefaultInterfaceForDns(iface);
} catch (Exception e) {
- if (VDBG) loge("exception setting default dns interface: " + e);
+ if (DBG) loge("exception setting default dns interface: " + e);
}
}
if (!domains.equals(SystemProperties.get("net.dns.search"))) {
@@ -2248,7 +2262,7 @@
mNetd.setDnsServersForInterface(p.getInterfaceName(),
NetworkUtils.makeStrings(dnses));
} catch (Exception e) {
- if (VDBG) loge("exception setting dns servers: " + e);
+ if (DBG) loge("exception setting dns servers: " + e);
}
// set per-pid dns for attached secondary nets
List pids = mNetRequestersPids[netType];
diff --git a/services/java/com/android/server/InputMethodManagerService.java b/services/java/com/android/server/InputMethodManagerService.java
index f5c4ed4..7d4faea 100644
--- a/services/java/com/android/server/InputMethodManagerService.java
+++ b/services/java/com/android/server/InputMethodManagerService.java
@@ -780,7 +780,7 @@
return flags;
}
- InputBindResult attachNewInputLocked(boolean initial, boolean needResult) {
+ InputBindResult attachNewInputLocked(boolean initial) {
if (!mBoundToMethod) {
executeOrSendMessage(mCurMethod, mCaller.obtainMessageOO(
MSG_BIND_INPUT, mCurMethod, mCurClient.binding));
@@ -798,14 +798,11 @@
if (DEBUG) Slog.v(TAG, "Attach new input asks to show input");
showCurrentInputLocked(getAppShowFlags(), null);
}
- return needResult
- ? new InputBindResult(session.session, mCurId, mCurSeq)
- : null;
+ return new InputBindResult(session.session, mCurId, mCurSeq);
}
InputBindResult startInputLocked(IInputMethodClient client,
- IInputContext inputContext, EditorInfo attribute,
- boolean initial, boolean needResult) {
+ IInputContext inputContext, EditorInfo attribute, int controlFlags) {
// If no method is currently selected, do nothing.
if (mCurMethodId == null) {
return mNoBinding;
@@ -831,6 +828,16 @@
} catch (RemoteException e) {
}
+ return startInputUncheckedLocked(cs, inputContext, attribute, controlFlags);
+ }
+
+ InputBindResult startInputUncheckedLocked(ClientState cs,
+ IInputContext inputContext, EditorInfo attribute, int controlFlags) {
+ // If no method is currently selected, do nothing.
+ if (mCurMethodId == null) {
+ return mNoBinding;
+ }
+
if (mCurClient != cs) {
// If the client is changing, we need to switch over to the new
// one.
@@ -861,7 +868,8 @@
if (cs.curSession != null) {
// Fast case: if we are already connected to the input method,
// then just return it.
- return attachNewInputLocked(initial, needResult);
+ return attachNewInputLocked(
+ (controlFlags&InputMethodManager.CONTROL_START_INITIAL) != 0);
}
if (mHaveConnection) {
if (mCurMethod != null) {
@@ -942,13 +950,11 @@
@Override
public InputBindResult startInput(IInputMethodClient client,
- IInputContext inputContext, EditorInfo attribute,
- boolean initial, boolean needResult) {
+ IInputContext inputContext, EditorInfo attribute, int controlFlags) {
synchronized (mMethodMap) {
final long ident = Binder.clearCallingIdentity();
try {
- return startInputLocked(client, inputContext, attribute,
- initial, needResult);
+ return startInputLocked(client, inputContext, attribute, controlFlags);
} finally {
Binder.restoreCallingIdentity(ident);
}
@@ -991,7 +997,7 @@
mCurClient.curSession = new SessionState(mCurClient,
method, session);
mCurClient.sessionRequested = false;
- InputBindResult res = attachNewInputLocked(true, true);
+ InputBindResult res = attachNewInputLocked(true);
if (res.method != null) {
executeOrSendMessage(mCurClient.client, mCaller.obtainMessageOO(
MSG_BIND_METHOD, mCurClient.client, res));
@@ -1476,36 +1482,45 @@
}
@Override
- public void windowGainedFocus(IInputMethodClient client, IBinder windowToken,
- boolean viewHasFocus, boolean isTextEditor, int softInputMode,
- boolean first, int windowFlags) {
+ public InputBindResult windowGainedFocus(IInputMethodClient client, IBinder windowToken,
+ int controlFlags, int softInputMode, int windowFlags,
+ EditorInfo attribute, IInputContext inputContext) {
+ InputBindResult res = null;
long ident = Binder.clearCallingIdentity();
try {
synchronized (mMethodMap) {
if (DEBUG) Slog.v(TAG, "windowGainedFocus: " + client.asBinder()
- + " viewHasFocus=" + viewHasFocus
- + " isTextEditor=" + isTextEditor
+ + " controlFlags=#" + Integer.toHexString(controlFlags)
+ " softInputMode=#" + Integer.toHexString(softInputMode)
- + " first=" + first + " flags=#"
- + Integer.toHexString(windowFlags));
+ + " windowFlags=#" + Integer.toHexString(windowFlags));
- if (mCurClient == null || client == null
- || mCurClient.client.asBinder() != client.asBinder()) {
- try {
- // We need to check if this is the current client with
- // focus in the window manager, to allow this call to
- // be made before input is started in it.
- if (!mIWindowManager.inputMethodClientHasFocus(client)) {
- Slog.w(TAG, "Client not active, ignoring focus gain of: " + client);
- return;
- }
- } catch (RemoteException e) {
+ ClientState cs = mClients.get(client.asBinder());
+ if (cs == null) {
+ throw new IllegalArgumentException("unknown client "
+ + client.asBinder());
+ }
+
+ try {
+ if (!mIWindowManager.inputMethodClientHasFocus(cs.client)) {
+ // Check with the window manager to make sure this client actually
+ // has a window with focus. If not, reject. This is thread safe
+ // because if the focus changes some time before or after, the
+ // next client receiving focus that has any interest in input will
+ // be calling through here after that change happens.
+ Slog.w(TAG, "Focus gain on non-focused client " + cs.client
+ + " (uid=" + cs.uid + " pid=" + cs.pid + ")");
+ return null;
}
+ } catch (RemoteException e) {
}
if (mCurFocusedWindow == windowToken) {
Slog.w(TAG, "Window already focused, ignoring focus gain of: " + client);
- return;
+ if (attribute != null) {
+ return startInputUncheckedLocked(cs, inputContext, attribute,
+ controlFlags);
+ }
+ return null;
}
mCurFocusedWindow = windowToken;
@@ -1521,6 +1536,14 @@
== WindowManager.LayoutParams.SOFT_INPUT_ADJUST_RESIZE
|| mRes.getConfiguration().isLayoutSizeAtLeast(
Configuration.SCREENLAYOUT_SIZE_LARGE);
+ final boolean isTextEditor =
+ (controlFlags&InputMethodManager.CONTROL_WINDOW_IS_TEXT_EDITOR) != 0;
+
+ // We want to start input before showing the IME, but after closing
+ // it. We want to do this after closing it to help the IME disappear
+ // more quickly (not get stuck behind it initializing itself for the
+ // new focused input, even if its window wants to hide the IME).
+ boolean didStart = false;
switch (softInputMode&WindowManager.LayoutParams.SOFT_INPUT_MASK_STATE) {
case WindowManager.LayoutParams.SOFT_INPUT_STATE_UNSPECIFIED:
@@ -1536,12 +1559,17 @@
WindowManager.LayoutParams.SOFT_INPUT_IS_FORWARD_NAVIGATION) != 0) {
// There is a focus view, and we are navigating forward
// into the window, so show the input window for the user.
- // We only do this automatically if the window an resize
- // to accomodate the IME (so what the user sees will give
+ // We only do this automatically if the window can resize
+ // to accommodate the IME (so what the user sees will give
// them good context without input information being obscured
// by the IME) or if running on a large screen where there
// is more room for the target window + IME.
if (DEBUG) Slog.v(TAG, "Unspecified window will show input");
+ if (attribute != null) {
+ res = startInputUncheckedLocked(cs, inputContext, attribute,
+ controlFlags);
+ didStart = true;
+ }
showCurrentInputLocked(InputMethodManager.SHOW_IMPLICIT, null);
}
break;
@@ -1563,18 +1591,35 @@
if ((softInputMode &
WindowManager.LayoutParams.SOFT_INPUT_IS_FORWARD_NAVIGATION) != 0) {
if (DEBUG) Slog.v(TAG, "Window asks to show input going forward");
+ if (attribute != null) {
+ res = startInputUncheckedLocked(cs, inputContext, attribute,
+ controlFlags);
+ didStart = true;
+ }
showCurrentInputLocked(InputMethodManager.SHOW_IMPLICIT, null);
}
break;
case WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_VISIBLE:
if (DEBUG) Slog.v(TAG, "Window asks to always show input");
+ if (attribute != null) {
+ res = startInputUncheckedLocked(cs, inputContext, attribute,
+ controlFlags);
+ didStart = true;
+ }
showCurrentInputLocked(InputMethodManager.SHOW_IMPLICIT, null);
break;
}
+
+ if (!didStart && attribute != null) {
+ res = startInputUncheckedLocked(cs, inputContext, attribute,
+ controlFlags);
+ }
}
} finally {
Binder.restoreCallingIdentity(ident);
}
+
+ return res;
}
@Override
diff --git a/services/java/com/android/server/NotificationManagerService.java b/services/java/com/android/server/NotificationManagerService.java
index 5039294..3cf447c 100755
--- a/services/java/com/android/server/NotificationManagerService.java
+++ b/services/java/com/android/server/NotificationManagerService.java
@@ -767,7 +767,9 @@
long identity = Binder.clearCallingIdentity();
try {
r.statusBarKey = mStatusBar.addNotification(n);
- mAttentionLight.pulse();
+ if ((n.notification.flags & Notification.FLAG_SHOW_LIGHTS) != 0) {
+ mAttentionLight.pulse();
+ }
}
finally {
Binder.restoreCallingIdentity(identity);
diff --git a/services/java/com/android/server/am/ActivityManagerService.java b/services/java/com/android/server/am/ActivityManagerService.java
index df58e83..87eb65e 100644
--- a/services/java/com/android/server/am/ActivityManagerService.java
+++ b/services/java/com/android/server/am/ActivityManagerService.java
@@ -2730,14 +2730,7 @@
r.task.taskId, r.shortComponentName,
"proc died without state saved");
}
- r.makeFinishing();
- mMainStack.mHistory.remove(i);
- r.takeFromHistory();
- mWindowManager.removeAppToken(r.appToken);
- if (VALIDATE_TOKENS) {
- mMainStack.validateAppTokensLocked();
- }
- r.removeUriPermissionsLocked();
+ mMainStack.removeActivityFromHistoryLocked(r);
} else {
// We have the current state for this activity, so
diff --git a/services/java/com/android/server/am/ActivityStack.java b/services/java/com/android/server/am/ActivityStack.java
index 6c11953..a7bf7e1 100644
--- a/services/java/com/android/server/am/ActivityStack.java
+++ b/services/java/com/android/server/am/ActivityStack.java
@@ -3362,6 +3362,33 @@
return true;
}
+ final void finishActivityResultsLocked(ActivityRecord r, int resultCode, Intent resultData) {
+ // send the result
+ ActivityRecord resultTo = r.resultTo;
+ if (resultTo != null) {
+ if (DEBUG_RESULTS) Slog.v(TAG, "Adding result to " + resultTo
+ + " who=" + r.resultWho + " req=" + r.requestCode
+ + " res=" + resultCode + " data=" + resultData);
+ if (r.info.applicationInfo.uid > 0) {
+ mService.grantUriPermissionFromIntentLocked(r.info.applicationInfo.uid,
+ resultTo.packageName, resultData,
+ resultTo.getUriPermissionsLocked());
+ }
+ resultTo.addResultLocked(r, r.resultWho, r.requestCode, resultCode,
+ resultData);
+ r.resultTo = null;
+ }
+ else if (DEBUG_RESULTS) Slog.v(TAG, "No result destination from " + r);
+
+ // Make sure this HistoryRecord is not holding on to other resources,
+ // because clients have remote IPC references to this object so we
+ // can't assume that will go away and want to avoid circular IPC refs.
+ r.results = null;
+ r.pendingResults = null;
+ r.newIntents = null;
+ r.icicle = null;
+ }
+
/**
* @return Returns true if this activity has been removed from the history
* list, or false if it is still in the list and will be removed later.
@@ -3400,30 +3427,7 @@
}
}
- // send the result
- ActivityRecord resultTo = r.resultTo;
- if (resultTo != null) {
- if (DEBUG_RESULTS) Slog.v(TAG, "Adding result to " + resultTo
- + " who=" + r.resultWho + " req=" + r.requestCode
- + " res=" + resultCode + " data=" + resultData);
- if (r.info.applicationInfo.uid > 0) {
- mService.grantUriPermissionFromIntentLocked(r.info.applicationInfo.uid,
- resultTo.packageName, resultData,
- resultTo.getUriPermissionsLocked());
- }
- resultTo.addResultLocked(r, r.resultWho, r.requestCode, resultCode,
- resultData);
- r.resultTo = null;
- }
- else if (DEBUG_RESULTS) Slog.v(TAG, "No result destination from " + r);
-
- // Make sure this HistoryRecord is not holding on to other resources,
- // because clients have remote IPC references to this object so we
- // can't assume that will go away and want to avoid circular IPC refs.
- r.results = null;
- r.pendingResults = null;
- r.newIntents = null;
- r.icicle = null;
+ finishActivityResultsLocked(r, resultCode, resultData);
if (mService.mPendingThumbnails.size() > 0) {
// There are clients waiting to receive thumbnails so, in case
@@ -3586,8 +3590,9 @@
mHandler.removeMessages(DESTROY_TIMEOUT_MSG, r);
}
- private final void removeActivityFromHistoryLocked(ActivityRecord r) {
+ final void removeActivityFromHistoryLocked(ActivityRecord r) {
if (r.state != ActivityState.DESTROYED) {
+ finishActivityResultsLocked(r, Activity.RESULT_CANCELED, null);
r.makeFinishing();
if (DEBUG_ADD_REMOVE) {
RuntimeException here = new RuntimeException("here");
diff --git a/services/java/com/android/server/wm/DimAnimator.java b/services/java/com/android/server/wm/DimAnimator.java
index a3293e8..a9d4e01 100644
--- a/services/java/com/android/server/wm/DimAnimator.java
+++ b/services/java/com/android/server/wm/DimAnimator.java
@@ -180,7 +180,9 @@
public void printTo(String prefix, PrintWriter pw) {
pw.print(prefix);
- pw.print("mDimSurface="); pw.println(mDimSurface);
+ pw.print("mDimSurface="); pw.print(mDimSurface);
+ pw.print(" "); pw.print(mLastDimWidth); pw.print(" x ");
+ pw.println(mLastDimHeight);
pw.print(prefix);
pw.print("mDimShown="); pw.print(mDimShown);
pw.print(" current="); pw.print(mDimCurrentAlpha);
diff --git a/services/java/com/android/server/wm/WindowManagerService.java b/services/java/com/android/server/wm/WindowManagerService.java
index bd33e0c..3f72dec 100644
--- a/services/java/com/android/server/wm/WindowManagerService.java
+++ b/services/java/com/android/server/wm/WindowManagerService.java
@@ -8593,7 +8593,11 @@
if (mDimAnimator == null) {
mDimAnimator = new DimAnimator(mFxSession);
}
- mDimAnimator.show(innerDw, innerDh);
+ if (attrs.type == WindowManager.LayoutParams.TYPE_BOOT_PROGRESS) {
+ mDimAnimator.show(dw, dh);
+ } else {
+ mDimAnimator.show(innerDw, innerDh);
+ }
mDimAnimator.updateParameters(mContext.getResources(),
w, currentTime);
}
diff --git a/telephony/java/com/android/internal/telephony/DataConnection.java b/telephony/java/com/android/internal/telephony/DataConnection.java
index ffe848d..d0e304f 100644
--- a/telephony/java/com/android/internal/telephony/DataConnection.java
+++ b/telephony/java/com/android/internal/telephony/DataConnection.java
@@ -68,6 +68,8 @@
private List<ApnContext> mApnList = null;
PendingIntent mReconnectIntent = null;
+ private DataConnectionTracker mDataConnectionTracker = null;
+
/**
* Used internally for saving connecting parameters.
*/
@@ -202,6 +204,7 @@
protected static final int EVENT_DEACTIVATE_DONE = BASE + 3;
protected static final int EVENT_DISCONNECT = BASE + 4;
protected static final int EVENT_RIL_CONNECTED = BASE + 5;
+ protected static final int EVENT_DISCONNECT_ALL = BASE + 6;
//***** Tag IDs for EventLog
protected static final int EVENT_LOG_BAD_DNS_ADDRESS = 50100;
@@ -234,10 +237,12 @@
//***** Constructor
- protected DataConnection(PhoneBase phone, String name, int id, RetryManager rm) {
+ protected DataConnection(PhoneBase phone, String name, int id, RetryManager rm,
+ DataConnectionTracker dct) {
super(name);
if (DBG) log("DataConnection constructor E");
this.phone = phone;
+ this.mDataConnectionTracker = dct;
mId = id;
mRetryMgr = rm;
this.cid = -1;
@@ -316,11 +321,19 @@
*
* @param dp is the DisconnectParams.
*/
- private void notifyDisconnectCompleted(DisconnectParams dp) {
+ private void notifyDisconnectCompleted(DisconnectParams dp, boolean sendAll) {
if (VDBG) log("NotifyDisconnectCompleted");
+ ApnContext alreadySent = null;
+ String reason = null;
+
if (dp.onCompletedMsg != null) {
+ // Get ApnContext, but only valid on GSM devices this is a string on CDMA devices.
Message msg = dp.onCompletedMsg;
+ if (msg.obj instanceof ApnContext) {
+ alreadySent = (ApnContext)msg.obj;
+ }
+ reason = dp.reason;
if (VDBG) {
log(String.format("msg=%s msg.obj=%s", msg.toString(),
((msg.obj instanceof String) ? (String) msg.obj : "<no-reason>")));
@@ -328,6 +341,17 @@
AsyncResult.forMessage(msg);
msg.sendToTarget();
}
+ if (sendAll) {
+ for (ApnContext a : mApnList) {
+ if (a == alreadySent) continue;
+ if (reason != null) a.setReason(reason);
+ Message msg = mDataConnectionTracker.obtainMessage(
+ DataConnectionTracker.EVENT_DISCONNECT_DONE, a);
+ AsyncResult.forMessage(msg);
+ msg.sendToTarget();
+ }
+ }
+
if (DBG) log("NotifyDisconnectCompleted DisconnectParams=" + dp);
}
@@ -706,6 +730,13 @@
deferMessage(msg);
break;
+ case EVENT_DISCONNECT_ALL:
+ if (DBG) {
+ log("DcDefaultState deferring msg.what=EVENT_DISCONNECT_ALL" + mRefCount);
+ }
+ deferMessage(msg);
+ break;
+
case EVENT_RIL_CONNECTED:
ar = (AsyncResult)msg.obj;
if (ar.exception == null) {
@@ -771,7 +802,7 @@
}
if (mDisconnectParams != null) {
if (VDBG) log("DcInactiveState: enter notifyDisconnectCompleted");
- notifyDisconnectCompleted(mDisconnectParams);
+ notifyDisconnectCompleted(mDisconnectParams, true);
}
clearSettings();
}
@@ -812,7 +843,13 @@
case EVENT_DISCONNECT:
if (DBG) log("DcInactiveState: msg.what=EVENT_DISCONNECT");
- notifyDisconnectCompleted((DisconnectParams)msg.obj);
+ notifyDisconnectCompleted((DisconnectParams)msg.obj, false);
+ retVal = HANDLED;
+ break;
+
+ case EVENT_DISCONNECT_ALL:
+ if (DBG) log("DcInactiveState: msg.what=EVENT_DISCONNECT_ALL");
+ notifyDisconnectCompleted((DisconnectParams)msg.obj, false);
retVal = HANDLED;
break;
@@ -989,12 +1026,24 @@
transitionTo(mDisconnectingState);
} else {
if (msg.obj != null) {
- notifyDisconnectCompleted((DisconnectParams) msg.obj);
+ notifyDisconnectCompleted((DisconnectParams) msg.obj, false);
}
}
retVal = HANDLED;
break;
+ case EVENT_DISCONNECT_ALL:
+ if (DBG) {
+ log("DcActiveState msg.what=EVENT_DISCONNECT_ALL RefCount=" + mRefCount);
+ }
+ mRefCount = 0;
+ DisconnectParams dp = (DisconnectParams) msg.obj;
+ dp.tag = mTag;
+ tearDownData(dp);
+ transitionTo(mDisconnectingState);
+ retVal = HANDLED;
+ break;
+
default:
if (VDBG) {
log("DcActiveState not handled msg.what=0x" +
@@ -1124,4 +1173,16 @@
public void tearDown(String reason, Message onCompletedMsg) {
sendMessage(obtainMessage(EVENT_DISCONNECT, new DisconnectParams(reason, onCompletedMsg)));
}
+
+ /**
+ * Tear down the connection through the apn on the network. Ignores refcount and
+ * and always tears down.
+ *
+ * @param onCompletedMsg is sent with its msg.obj as an AsyncResult object.
+ * With AsyncResult.userObj set to the original msg.obj.
+ */
+ public void tearDownAll(String reason, Message onCompletedMsg) {
+ sendMessage(obtainMessage(EVENT_DISCONNECT_ALL,
+ new DisconnectParams(reason, onCompletedMsg)));
+ }
}
diff --git a/telephony/java/com/android/internal/telephony/DataConnectionTracker.java b/telephony/java/com/android/internal/telephony/DataConnectionTracker.java
index 04ba42d..863235b 100644
--- a/telephony/java/com/android/internal/telephony/DataConnectionTracker.java
+++ b/telephony/java/com/android/internal/telephony/DataConnectionTracker.java
@@ -1030,7 +1030,8 @@
}
}
if (didDisable) {
- if (enabledCount == 0) {
+ if ((enabledCount == 0) || (apnId == APN_DUN_ID)) {
+ mRequestedApnType = Phone.APN_TYPE_DEFAULT;
onCleanUpConnection(true, apnId, Phone.REASON_DATA_DISABLED);
}
diff --git a/telephony/java/com/android/internal/telephony/cdma/CdmaDataConnection.java b/telephony/java/com/android/internal/telephony/cdma/CdmaDataConnection.java
index d55f346..a93d94f 100644
--- a/telephony/java/com/android/internal/telephony/cdma/CdmaDataConnection.java
+++ b/telephony/java/com/android/internal/telephony/cdma/CdmaDataConnection.java
@@ -20,6 +20,7 @@
import android.util.Log;
import com.android.internal.telephony.DataConnection;
+import com.android.internal.telephony.DataConnectionTracker;
import com.android.internal.telephony.Phone;
import com.android.internal.telephony.RILConstants;
import com.android.internal.telephony.RetryManager;
@@ -32,8 +33,9 @@
private static final String LOG_TAG = "CDMA";
// ***** Constructor
- private CdmaDataConnection(CDMAPhone phone, String name, int id, RetryManager rm) {
- super(phone, name, id, rm);
+ private CdmaDataConnection(CDMAPhone phone, String name, int id, RetryManager rm,
+ DataConnectionTracker dct) {
+ super(phone, name, id, rm, dct);
}
/**
@@ -44,12 +46,13 @@
* @param rm the RetryManager
* @return CdmaDataConnection that was created.
*/
- static CdmaDataConnection makeDataConnection(CDMAPhone phone, int id, RetryManager rm) {
+ static CdmaDataConnection makeDataConnection(CDMAPhone phone, int id, RetryManager rm,
+ DataConnectionTracker dct) {
synchronized (mCountLock) {
mCount += 1;
}
CdmaDataConnection cdmaDc = new CdmaDataConnection(phone, "CdmaDC-" + mCount,
- id, rm);
+ id, rm, dct);
cdmaDc.start();
if (DBG) cdmaDc.log("Made " + cdmaDc.getName());
return cdmaDc;
diff --git a/telephony/java/com/android/internal/telephony/cdma/CdmaDataConnectionTracker.java b/telephony/java/com/android/internal/telephony/cdma/CdmaDataConnectionTracker.java
index e2a4a7a..26a028b 100644
--- a/telephony/java/com/android/internal/telephony/cdma/CdmaDataConnectionTracker.java
+++ b/telephony/java/com/android/internal/telephony/cdma/CdmaDataConnectionTracker.java
@@ -93,6 +93,9 @@
Phone.APN_TYPE_MMS,
Phone.APN_TYPE_HIPRI };
+ private String[] mDunApnTypes = {
+ Phone.APN_TYPE_DUN };
+
private static final int mDefaultApnId = DataConnectionTracker.APN_DEFAULT_ID;
/* Constructor */
@@ -118,11 +121,26 @@
createAllDataConnectionList();
broadcastMessenger();
+
+ Context c = mCdmaPhone.getContext();
+ String[] t = c.getResources().getStringArray(
+ com.android.internal.R.array.config_cdma_dun_supported_types);
+ if (t != null && t.length > 0) {
+ ArrayList<String> temp = new ArrayList<String>();
+ for(int i=0; i< t.length; i++) {
+ if (!Phone.APN_TYPE_DUN.equalsIgnoreCase(t[i])) {
+ temp.add(t[i]);
+ }
+ }
+ temp.add(0, Phone.APN_TYPE_DUN);
+ mDunApnTypes = temp.toArray(t);
+ }
+
}
@Override
public void dispose() {
- cleanUpConnection(false, null);
+ cleanUpConnection(false, null, false);
super.dispose();
@@ -277,7 +295,7 @@
* @param tearDown true if the underlying DataConnection should be disconnected.
* @param reason for the clean up.
*/
- private void cleanUpConnection(boolean tearDown, String reason) {
+ private void cleanUpConnection(boolean tearDown, String reason, boolean doAll) {
if (DBG) log("cleanUpConnection: reason: " + reason);
// Clear the reconnect alarm, if set.
@@ -297,9 +315,15 @@
DataConnectionAc dcac =
mDataConnectionAsyncChannels.get(conn.getDataConnectionId());
if (tearDown) {
- if (DBG) log("cleanUpConnection: teardown, call conn.disconnect");
- conn.tearDown(reason, obtainMessage(EVENT_DISCONNECT_DONE,
- conn.getDataConnectionId(), 0, reason));
+ if (doAll) {
+ if (DBG) log("cleanUpConnection: teardown, conn.tearDownAll");
+ conn.tearDownAll(reason, obtainMessage(EVENT_DISCONNECT_DONE,
+ conn.getDataConnectionId(), 0, reason));
+ } else {
+ if (DBG) log("cleanUpConnection: teardown, conn.tearDown");
+ conn.tearDown(reason, obtainMessage(EVENT_DISCONNECT_DONE,
+ conn.getDataConnectionId(), 0, reason));
+ }
notificationDeferred = true;
} else {
if (DBG) log("cleanUpConnection: !tearDown, call conn.resetSynchronously");
@@ -343,8 +367,7 @@
String[] types;
int apnId;
if (mRequestedApnType.equals(Phone.APN_TYPE_DUN)) {
- types = new String[1];
- types[0] = Phone.APN_TYPE_DUN;
+ types = mDunApnTypes;
apnId = DataConnectionTracker.APN_DUN_ID;
} else {
types = mDefaultApnTypes;
@@ -582,7 +605,7 @@
@Override
protected void onEnableNewApn() {
// No mRequestedApnType check; only one connection is supported
- cleanUpConnection(true, Phone.REASON_APN_SWITCHED);
+ cleanUpConnection(true, Phone.REASON_APN_SWITCHED, false);
}
/**
@@ -764,13 +787,13 @@
@Override
protected void onCleanUpConnection(boolean tearDown, int apnId, String reason) {
// No apnId check; only one connection is supported
- cleanUpConnection(tearDown, reason);
+ cleanUpConnection(tearDown, reason, (apnId == APN_DUN_ID));
}
@Override
protected void onCleanUpAllConnections(String cause) {
// Only one CDMA connection is supported
- cleanUpConnection(true, cause);
+ cleanUpConnection(true, cause, false);
}
private void createAllDataConnectionList() {
@@ -789,7 +812,7 @@
}
int id = mUniqueIdGenerator.getAndIncrement();
- dataConn = CdmaDataConnection.makeDataConnection(mCdmaPhone, id, rm);
+ dataConn = CdmaDataConnection.makeDataConnection(mCdmaPhone, id, rm, this);
mDataConnections.put(id, dataConn);
DataConnectionAc dcac = new DataConnectionAc(dataConn, LOG_TAG);
int status = dcac.fullyConnectSync(mPhone.getContext(), this, dataConn.getHandler());
@@ -816,7 +839,7 @@
notifyDataConnection(Phone.REASON_CDMA_DATA_DETACHED);
} else {
if (mState == State.FAILED) {
- cleanUpConnection(false, Phone.REASON_CDMA_DATA_DETACHED);
+ cleanUpConnection(false, Phone.REASON_CDMA_DATA_DETACHED, false);
mDataConnections.get(0).resetRetryCount();
CdmaCellLocation loc = (CdmaCellLocation)(mPhone.getCellLocation());
@@ -895,7 +918,7 @@
log("onDataStateChanged: No active connection"
+ "state is CONNECTED, disconnecting/cleanup");
writeEventLogCdmaDataDrop();
- cleanUpConnection(true, null);
+ cleanUpConnection(true, null, false);
return;
}
diff --git a/telephony/java/com/android/internal/telephony/gsm/GsmDataConnection.java b/telephony/java/com/android/internal/telephony/gsm/GsmDataConnection.java
index 1f24b58..1f5b7ab 100644
--- a/telephony/java/com/android/internal/telephony/gsm/GsmDataConnection.java
+++ b/telephony/java/com/android/internal/telephony/gsm/GsmDataConnection.java
@@ -22,6 +22,7 @@
import android.text.TextUtils;
import com.android.internal.telephony.DataConnection;
+import com.android.internal.telephony.DataConnectionTracker;
import com.android.internal.telephony.Phone;
import com.android.internal.telephony.PhoneBase;
import com.android.internal.telephony.RILConstants;
@@ -38,8 +39,9 @@
protected int mProfileId = RILConstants.DATA_PROFILE_DEFAULT;
protected String mActiveApnType = Phone.APN_TYPE_DEFAULT;
//***** Constructor
- private GsmDataConnection(PhoneBase phone, String name, int id, RetryManager rm) {
- super(phone, name, id, rm);
+ private GsmDataConnection(PhoneBase phone, String name, int id, RetryManager rm,
+ DataConnectionTracker dct) {
+ super(phone, name, id, rm, dct);
}
/**
@@ -50,11 +52,12 @@
* @param rm the RetryManager
* @return GsmDataConnection that was created.
*/
- static GsmDataConnection makeDataConnection(PhoneBase phone, int id, RetryManager rm) {
+ static GsmDataConnection makeDataConnection(PhoneBase phone, int id, RetryManager rm,
+ DataConnectionTracker dct) {
synchronized (mCountLock) {
mCount += 1;
}
- GsmDataConnection gsmDc = new GsmDataConnection(phone, "GsmDC-" + mCount, id, rm);
+ GsmDataConnection gsmDc = new GsmDataConnection(phone, "GsmDC-" + mCount, id, rm, dct);
gsmDc.start();
if (DBG) gsmDc.log("Made " + gsmDc.getName());
return gsmDc;
diff --git a/telephony/java/com/android/internal/telephony/gsm/GsmDataConnectionTracker.java b/telephony/java/com/android/internal/telephony/gsm/GsmDataConnectionTracker.java
index 9eaf7a0..95ea107 100644
--- a/telephony/java/com/android/internal/telephony/gsm/GsmDataConnectionTracker.java
+++ b/telephony/java/com/android/internal/telephony/gsm/GsmDataConnectionTracker.java
@@ -850,9 +850,28 @@
// Connection is still there. Try to clean up.
if (dcac != null) {
if (apnContext.getState() != State.DISCONNECTING) {
- if (DBG) log("cleanUpConnection: tearing down");
+ boolean disconnectAll = false;
+ if (Phone.APN_TYPE_DUN.equals(apnContext.getApnType())) {
+ ApnSetting dunSetting = fetchDunApn();
+ if (dunSetting != null &&
+ dunSetting.equals(apnContext.getApnSetting())) {
+ if (DBG) log("tearing down dedicated DUN connection");
+ // we need to tear it down - we brought it up just for dun and
+ // other people are camped on it and now dun is done. We need
+ // to stop using it and let the normal apn list get used to find
+ // connections for the remaining desired connections
+ disconnectAll = true;
+ }
+ }
+ if (DBG) {
+ log("cleanUpConnection: tearing down" + (disconnectAll ? " all" :""));
+ }
Message msg = obtainMessage(EVENT_DISCONNECT_DONE, apnContext);
- apnContext.getDataConnection().tearDown(apnContext.getReason(), msg);
+ if (disconnectAll) {
+ apnContext.getDataConnection().tearDownAll(apnContext.getReason(), msg);
+ } else {
+ apnContext.getDataConnection().tearDown(apnContext.getReason(), msg);
+ }
apnContext.setState(State.DISCONNECTING);
}
} else {
@@ -2213,7 +2232,7 @@
RetryManager rm = new RetryManager();
int id = mUniqueIdGenerator.getAndIncrement();
- GsmDataConnection conn = GsmDataConnection.makeDataConnection(mPhone, id, rm);
+ GsmDataConnection conn = GsmDataConnection.makeDataConnection(mPhone, id, rm, this);
mDataConnections.put(id, conn);
DataConnectionAc dcac = new DataConnectionAc(conn, LOG_TAG);
int status = dcac.fullyConnectSync(mPhone.getContext(), this, conn.getHandler());
diff --git a/tools/aapt/XMLNode.cpp b/tools/aapt/XMLNode.cpp
index 95a68d1..8d7acee 100644
--- a/tools/aapt/XMLNode.cpp
+++ b/tools/aapt/XMLNode.cpp
@@ -21,6 +21,7 @@
const char* const RESOURCES_ROOT_NAMESPACE = "http://schemas.android.com/apk/res/";
const char* const RESOURCES_ANDROID_NAMESPACE = "http://schemas.android.com/apk/res/android";
+const char* const RESOURCES_AUTO_PACKAGE_NAMESPACE = "http://schemas.android.com/apk/res-auto";
const char* const RESOURCES_ROOT_PRV_NAMESPACE = "http://schemas.android.com/apk/prv/res/";
const char* const XLIFF_XMLNS = "urn:oasis:names:tc:xliff:document:1.2";
@@ -44,16 +45,21 @@
}
static const String16 RESOURCES_PREFIX(RESOURCES_ROOT_NAMESPACE);
+static const String16 RESOURCES_PREFIX_AUTO_PACKAGE(RESOURCES_AUTO_PACKAGE_NAMESPACE);
static const String16 RESOURCES_PRV_PREFIX(RESOURCES_ROOT_PRV_NAMESPACE);
static const String16 RESOURCES_TOOLS_NAMESPACE("http://schemas.android.com/tools");
-String16 getNamespaceResourcePackage(String16 namespaceUri, bool* outIsPublic)
+String16 getNamespaceResourcePackage(String16 appPackage, String16 namespaceUri, bool* outIsPublic)
{
//printf("%s starts with %s?\n", String8(namespaceUri).string(),
// String8(RESOURCES_PREFIX).string());
size_t prefixSize;
bool isPublic = true;
- if (namespaceUri.startsWith(RESOURCES_PREFIX)) {
+ if(namespaceUri.startsWith(RESOURCES_PREFIX_AUTO_PACKAGE)) {
+ NOISY(printf("Using default application package: %s -> %s\n", String8(namespaceUri).string(), String8(appPackage).string()));
+ isPublic = true;
+ return appPackage;
+ } else if (namespaceUri.startsWith(RESOURCES_PREFIX)) {
prefixSize = RESOURCES_PREFIX.size();
} else if (namespaceUri.startsWith(RESOURCES_PRV_PREFIX)) {
isPublic = false;
@@ -926,7 +932,7 @@
const attribute_entry& e = mAttributes.itemAt(i);
if (e.ns.size() <= 0) continue;
bool nsIsPublic;
- String16 pkg(getNamespaceResourcePackage(e.ns, &nsIsPublic));
+ String16 pkg(getNamespaceResourcePackage(String16(assets->getPackage()), e.ns, &nsIsPublic));
NOISY(printf("Elem %s %s=\"%s\": namespace(%s) %s ===> %s\n",
String8(getElementName()).string(),
String8(e.name).string(),
diff --git a/tools/layoutlib/bridge/src/android/util/BridgeXmlPullAttributes.java b/tools/layoutlib/bridge/src/android/util/BridgeXmlPullAttributes.java
index 0a3cdc6..6ac5b02 100644
--- a/tools/layoutlib/bridge/src/android/util/BridgeXmlPullAttributes.java
+++ b/tools/layoutlib/bridge/src/android/util/BridgeXmlPullAttributes.java
@@ -18,6 +18,7 @@
import com.android.ide.common.rendering.api.RenderResources;
import com.android.ide.common.rendering.api.ResourceValue;
+import com.android.internal.util.XmlUtils;
import com.android.layoutlib.bridge.Bridge;
import com.android.layoutlib.bridge.BridgeConstants;
import com.android.layoutlib.bridge.android.BridgeContext;
@@ -25,9 +26,6 @@
import org.xmlpull.v1.XmlPullParser;
-import android.util.AttributeSet;
-import android.util.XmlPullAttributes;
-
/**
* A correct implementation of the {@link AttributeSet} interface on top of a XmlPullParser
*/
@@ -80,21 +78,40 @@
return 0;
}
- /*
- * (non-Javadoc)
- * @see android.util.XmlPullAttributes#getAttributeResourceValue(int, int)
- */
@Override
- public int getAttributeResourceValue(int index, int defaultValue) {
- String value = getAttributeValue(index);
+ public int getAttributeListValue(String namespace, String attribute,
+ String[] options, int defaultValue) {
+ String value = getAttributeValue(namespace, attribute);
+ if (value != null) {
+ ResourceValue r = getResourceValue(value);
- return resolveResourceValue(value, defaultValue);
+ if (r != null) {
+ value = r.getValue();
+ }
+
+ return XmlUtils.convertValueToList(value, options, defaultValue);
+ }
+
+ return defaultValue;
}
- /*
- * (non-Javadoc)
- * @see android.util.XmlPullAttributes#getAttributeResourceValue(java.lang.String, java.lang.String, int)
- */
+ @Override
+ public boolean getAttributeBooleanValue(String namespace, String attribute,
+ boolean defaultValue) {
+ String value = getAttributeValue(namespace, attribute);
+ if (value != null) {
+ ResourceValue r = getResourceValue(value);
+
+ if (r != null) {
+ value = r.getValue();
+ }
+
+ return XmlUtils.convertValueToBoolean(value, defaultValue);
+ }
+
+ return defaultValue;
+ }
+
@Override
public int getAttributeResourceValue(String namespace, String attribute, int defaultValue) {
String value = getAttributeValue(namespace, attribute);
@@ -102,12 +119,151 @@
return resolveResourceValue(value, defaultValue);
}
- private int resolveResourceValue(String value, int defaultValue) {
+ @Override
+ public int getAttributeIntValue(String namespace, String attribute,
+ int defaultValue) {
+ String value = getAttributeValue(namespace, attribute);
+ if (value != null) {
+ ResourceValue r = getResourceValue(value);
+
+ if (r != null) {
+ value = r.getValue();
+ }
+
+ return XmlUtils.convertValueToInt(value, defaultValue);
+ }
+
+ return defaultValue;
+ }
+
+ @Override
+ public int getAttributeUnsignedIntValue(String namespace, String attribute,
+ int defaultValue) {
+ String value = getAttributeValue(namespace, attribute);
+ if (value != null) {
+ ResourceValue r = getResourceValue(value);
+
+ if (r != null) {
+ value = r.getValue();
+ }
+
+ return XmlUtils.convertValueToUnsignedInt(value, defaultValue);
+ }
+
+ return defaultValue;
+ }
+
+ @Override
+ public float getAttributeFloatValue(String namespace, String attribute,
+ float defaultValue) {
+ String s = getAttributeValue(namespace, attribute);
+ if (s != null) {
+ ResourceValue r = getResourceValue(s);
+
+ if (r != null) {
+ s = r.getValue();
+ }
+
+ return Float.parseFloat(s);
+ }
+
+ return defaultValue;
+ }
+
+ @Override
+ public int getAttributeListValue(int index,
+ String[] options, int defaultValue) {
+ return XmlUtils.convertValueToList(
+ getAttributeValue(index), options, defaultValue);
+ }
+
+ @Override
+ public boolean getAttributeBooleanValue(int index, boolean defaultValue) {
+ String value = getAttributeValue(index);
+ if (value != null) {
+ ResourceValue r = getResourceValue(value);
+
+ if (r != null) {
+ value = r.getValue();
+ }
+
+ return XmlUtils.convertValueToBoolean(value, defaultValue);
+ }
+
+ return defaultValue;
+ }
+
+ @Override
+ public int getAttributeResourceValue(int index, int defaultValue) {
+ String value = getAttributeValue(index);
+
+ return resolveResourceValue(value, defaultValue);
+ }
+
+ @Override
+ public int getAttributeIntValue(int index, int defaultValue) {
+ String value = getAttributeValue(index);
+ if (value != null) {
+ ResourceValue r = getResourceValue(value);
+
+ if (r != null) {
+ value = r.getValue();
+ }
+
+ return XmlUtils.convertValueToInt(value, defaultValue);
+ }
+
+ return defaultValue;
+ }
+
+ @Override
+ public int getAttributeUnsignedIntValue(int index, int defaultValue) {
+ String value = getAttributeValue(index);
+ if (value != null) {
+ ResourceValue r = getResourceValue(value);
+
+ if (r != null) {
+ value = r.getValue();
+ }
+
+ return XmlUtils.convertValueToUnsignedInt(value, defaultValue);
+ }
+
+ return defaultValue;
+ }
+
+ @Override
+ public float getAttributeFloatValue(int index, float defaultValue) {
+ String s = getAttributeValue(index);
+ if (s != null) {
+ ResourceValue r = getResourceValue(s);
+
+ if (r != null) {
+ s = r.getValue();
+ }
+
+ return Float.parseFloat(s);
+ }
+
+ return defaultValue;
+ }
+
+ // -- private helper methods
+
+ /**
+ * Returns a resolved {@link ResourceValue} from a given value.
+ */
+ private ResourceValue getResourceValue(String value) {
// now look for this particular value
RenderResources resources = mContext.getRenderResources();
- ResourceValue resource = resources.resolveResValue(
- resources.findResValue(value, mPlatformFile));
+ return resources.resolveResValue(resources.findResValue(value, mPlatformFile));
+ }
+ /**
+ * Resolves and return a value to its associated integer.
+ */
+ private int resolveResourceValue(String value, int defaultValue) {
+ ResourceValue resource = getResourceValue(value);
if (resource != null) {
Integer id = null;
if (mPlatformFile || resource.isFramework()) {
@@ -124,5 +280,4 @@
return defaultValue;
}
-
}
diff --git a/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/Bridge.java b/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/Bridge.java
index 33bf7bc..ff88209 100644
--- a/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/Bridge.java
+++ b/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/Bridge.java
@@ -24,8 +24,8 @@
import com.android.ide.common.rendering.api.LayoutLog;
import com.android.ide.common.rendering.api.RenderSession;
import com.android.ide.common.rendering.api.Result;
-import com.android.ide.common.rendering.api.SessionParams;
import com.android.ide.common.rendering.api.Result.Status;
+import com.android.ide.common.rendering.api.SessionParams;
import com.android.layoutlib.bridge.impl.FontLoader;
import com.android.layoutlib.bridge.impl.RenderDrawable;
import com.android.layoutlib.bridge.impl.RenderSessionImpl;
@@ -242,6 +242,8 @@
if (fontLoader != null) {
Typeface_Delegate.init(fontLoader);
} else {
+ log.error(LayoutLog.TAG_BROKEN,
+ "Failed create FontLoader in layout lib.", null);
return false;
}
diff --git a/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/BridgeConstants.java b/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/BridgeConstants.java
index 112af1e..eb9e7f1 100644
--- a/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/BridgeConstants.java
+++ b/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/BridgeConstants.java
@@ -39,6 +39,9 @@
/** Namespace for the resource XML */
public final static String NS_RESOURCES = "http://schemas.android.com/apk/res/android";
+ /** App auto namespace */
+ public final static String NS_APP_RES_AUTO = "http://schemas.android.com/apk/res-auto";
+
public final static String R = "com.android.internal.R";
diff --git a/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/BridgeContext.java b/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/BridgeContext.java
index fbbcbc1..9dbe82f 100644
--- a/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/BridgeContext.java
+++ b/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/BridgeContext.java
@@ -49,8 +49,8 @@
import android.content.res.BridgeTypedArray;
import android.content.res.Configuration;
import android.content.res.Resources;
-import android.content.res.TypedArray;
import android.content.res.Resources.Theme;
+import android.content.res.TypedArray;
import android.database.DatabaseErrorHandler;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteDatabase.CursorFactory;
@@ -78,8 +78,8 @@
import java.util.HashMap;
import java.util.IdentityHashMap;
import java.util.Map;
-import java.util.TreeMap;
import java.util.Map.Entry;
+import java.util.TreeMap;
import java.util.concurrent.atomic.AtomicBoolean;
import java.util.concurrent.atomic.AtomicReference;
@@ -615,7 +615,8 @@
}
String namespace = BridgeConstants.NS_RESOURCES;
- if (frameworkAttributes.get() == false) {
+ boolean useFrameworkNS = frameworkAttributes.get();
+ if (useFrameworkNS == false) {
// need to use the application namespace
namespace = mProjectCallback.getNamespace();
}
@@ -628,6 +629,12 @@
String value = null;
if (set != null) {
value = set.getAttributeValue(namespace, name);
+
+ // if this is an app attribute, and the first get fails, try with the
+ // new res-auto namespace as well
+ if (useFrameworkNS == false && value == null) {
+ value = set.getAttributeValue(BridgeConstants.NS_APP_RES_AUTO, name);
+ }
}
// if there's no direct value for this attribute in the XML, we look for default
diff --git a/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/BridgeIInputMethodManager.java b/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/BridgeIInputMethodManager.java
index 2a52888..a37a356 100644
--- a/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/BridgeIInputMethodManager.java
+++ b/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/BridgeIInputMethodManager.java
@@ -160,8 +160,9 @@
return false;
}
- public InputBindResult startInput(IInputMethodClient arg0, IInputContext arg1, EditorInfo arg2,
- boolean arg3, boolean arg4) throws RemoteException {
+
+ public InputBindResult startInput(IInputMethodClient client, IInputContext inputContext,
+ EditorInfo attribute, int controlFlags) throws RemoteException {
// TODO Auto-generated method stub
return null;
}
@@ -176,10 +177,12 @@
}
- public void windowGainedFocus(IInputMethodClient arg0, IBinder arg1, boolean arg2,
- boolean arg3, int arg4, boolean arg5, int arg6) throws RemoteException {
+ @Override
+ public InputBindResult windowGainedFocus(IInputMethodClient client, IBinder windowToken,
+ int controlFlags, int softInputMode, int windowFlags, EditorInfo attribute,
+ IInputContext inputContext) throws RemoteException {
// TODO Auto-generated method stub
-
+ return null;
}
public IBinder asBinder() {