Merge "fix javadocs b/14414251" into klp-modular-dev
diff --git a/core/java/android/app/ActivityView.java b/core/java/android/app/ActivityView.java
index 097c64e..94ea2c5 100644
--- a/core/java/android/app/ActivityView.java
+++ b/core/java/android/app/ActivityView.java
@@ -53,6 +53,7 @@
private int mHeight;
private Surface mSurface;
private int mLastVisibility;
+ private ActivityViewCallback mActivityViewCallback;
// Only one IIntentSender or Intent may be queued at a time. Most recent one wins.
IIntentSender mQueuedPendingIntent;
@@ -254,6 +255,25 @@
}
}
+ /**
+ * Set the callback to use to report certain state changes.
+ * @param callback The callback to report events to.
+ *
+ * @see ActivityViewCallback
+ */
+ public void setCallback(ActivityViewCallback callback) {
+ mActivityViewCallback = callback;
+ }
+
+ public static abstract class ActivityViewCallback {
+ /**
+ * Called when all activities in the ActivityView have completed and been removed. Register
+ * using {@link ActivityView#setCallback(ActivityViewCallback)}. Each ActivityView may
+ * have at most one callback registered.
+ */
+ public abstract void onAllActivitiesComplete(ActivityView view);
+ }
+
private class ActivityViewSurfaceTextureListener implements SurfaceTextureListener {
@Override
public void onSurfaceTextureAvailable(SurfaceTexture surfaceTexture, int width,
@@ -313,14 +333,32 @@
if (DEBUG) Log.v(TAG, "setVisible(): container=" + container + " visible=" + visible +
" ActivityView=" + mActivityViewWeakReference.get());
}
+
+ @Override
+ public void onAllActivitiesComplete(IBinder container) {
+ final ActivityView activityView = mActivityViewWeakReference.get();
+ if (activityView != null) {
+ final ActivityViewCallback callback = activityView.mActivityViewCallback;
+ if (callback != null) {
+ activityView.post(new Runnable() {
+ @Override
+ public void run() {
+ callback.onAllActivitiesComplete(activityView);
+ }
+ });
+ }
+ }
+ }
}
private static class ActivityContainerWrapper {
private final IActivityContainer mIActivityContainer;
private final CloseGuard mGuard = CloseGuard.get();
+ boolean mOpened; // Protected by mGuard.
ActivityContainerWrapper(IActivityContainer container) {
mIActivityContainer = container;
+ mOpened = true;
mGuard.open("release");
}
@@ -388,11 +426,16 @@
}
void release() {
- if (DEBUG) Log.v(TAG, "ActivityContainerWrapper: release called");
- try {
- mIActivityContainer.release();
- mGuard.close();
- } catch (RemoteException e) {
+ synchronized (mGuard) {
+ if (mOpened) {
+ if (DEBUG) Log.v(TAG, "ActivityContainerWrapper: release called");
+ try {
+ mIActivityContainer.release();
+ mGuard.close();
+ } catch (RemoteException e) {
+ }
+ mOpened = false;
+ }
}
}
diff --git a/core/java/android/app/IActivityContainerCallback.aidl b/core/java/android/app/IActivityContainerCallback.aidl
index 7f6d2c3..99d0a6f 100644
--- a/core/java/android/app/IActivityContainerCallback.aidl
+++ b/core/java/android/app/IActivityContainerCallback.aidl
@@ -21,4 +21,5 @@
/** @hide */
interface IActivityContainerCallback {
oneway void setVisible(IBinder container, boolean visible);
+ oneway void onAllActivitiesComplete(IBinder container);
}
diff --git a/core/java/android/app/Notification.java b/core/java/android/app/Notification.java
index 38ab15f..d51c397 100644
--- a/core/java/android/app/Notification.java
+++ b/core/java/android/app/Notification.java
@@ -3102,14 +3102,16 @@
* .build();</pre>
*
* <p>The activity to launch needs to allow embedding, must be exported, and
- * should have an empty task affinity.
+ * should have an empty task affinity. It is also recommended to use the device
+ * default light theme.
*
* <p>Example AndroidManifest.xml entry:
* <pre class="prettyprint">
* <activity android:name="com.example.MyDisplayActivity"
* android:exported="true"
* android:allowEmbedded="true"
- * android:taskAffinity="" /></pre>
+ * android:taskAffinity=""
+ * android:theme="@android:style/Theme.DeviceDefault.Light" /></pre>
*
* @param intent the {@link PendingIntent} for an activity
* @return this object for method chaining
diff --git a/core/java/android/net/ProxyDataTracker.java b/core/java/android/net/ProxyDataTracker.java
index 461e8b8..3eebef9 100644
--- a/core/java/android/net/ProxyDataTracker.java
+++ b/core/java/android/net/ProxyDataTracker.java
@@ -48,6 +48,7 @@
// TODO: investigate how to get these DNS addresses from the system.
private static final String DNS1 = "8.8.8.8";
private static final String DNS2 = "8.8.4.4";
+ private static final String INTERFACE_NAME = "ifb0";
private static final String REASON_ENABLED = "enabled";
private static final String REASON_DISABLED = "disabled";
private static final String REASON_PROXY_DOWN = "proxy_down";
@@ -107,10 +108,11 @@
mLinkCapabilities = new LinkCapabilities();
mNetworkInfo.setIsAvailable(true);
try {
- mLinkProperties.addDns(InetAddress.getByName(DNS1));
- mLinkProperties.addDns(InetAddress.getByName(DNS2));
+ mLinkProperties.addDns(InetAddress.getByName(DNS1));
+ mLinkProperties.addDns(InetAddress.getByName(DNS2));
+ mLinkProperties.setInterfaceName(INTERFACE_NAME);
} catch (UnknownHostException e) {
- Log.e(TAG, "Could not add DNS address", e);
+ Log.e(TAG, "Could not add DNS address", e);
}
}
diff --git a/core/java/android/provider/Browser.java b/core/java/android/provider/Browser.java
index a34d9c3..3853003 100644
--- a/core/java/android/provider/Browser.java
+++ b/core/java/android/provider/Browser.java
@@ -25,6 +25,7 @@
import android.database.DatabaseUtils;
import android.graphics.BitmapFactory;
import android.net.Uri;
+import android.os.Build;
import android.provider.BrowserContract.Bookmarks;
import android.provider.BrowserContract.Combined;
import android.provider.BrowserContract.History;
@@ -155,8 +156,8 @@
* @param title Title for the bookmark. Can be null or empty string.
* @param url Url for the bookmark. Can be null or empty string.
*/
- public static final void saveBookmark(Context c,
- String title,
+ public static final void saveBookmark(Context c,
+ String title,
String url) {
Intent i = new Intent(Intent.ACTION_INSERT, Browser.BOOKMARKS_URI);
i.putExtra("title", title);
@@ -233,10 +234,10 @@
*
* @param cr The ContentResolver used to access the database.
*/
- public static final Cursor getAllBookmarks(ContentResolver cr) throws
+ public static final Cursor getAllBookmarks(ContentResolver cr) throws
IllegalStateException {
return cr.query(Bookmarks.CONTENT_URI,
- new String[] { Bookmarks.URL },
+ new String[] { Bookmarks.URL },
Bookmarks.IS_FOLDER + " = 0", null, null);
}
@@ -397,19 +398,17 @@
// TODO make a single request to the provider to do this in a single transaction
Cursor cursor = null;
try {
-
+
// Select non-bookmark history, ordered by date
cursor = cr.query(History.CONTENT_URI,
new String[] { History._ID, History.URL, History.DATE_LAST_VISITED },
null, null, History.DATE_LAST_VISITED + " ASC");
if (cursor.moveToFirst() && cursor.getCount() >= MAX_HISTORY_COUNT) {
- final WebIconDatabase iconDb = WebIconDatabase.getInstance();
/* eliminate oldest history items */
for (int i = 0; i < TRUNCATE_N_OLDEST; i++) {
cr.delete(ContentUris.withAppendedId(History.CONTENT_URI, cursor.getLong(0)),
- null, null);
- iconDb.releaseIconForPageUrl(cursor.getString(1));
+ null, null);
if (!cursor.moveToNext()) break;
}
}
@@ -469,13 +468,6 @@
cursor = cr.query(History.CONTENT_URI, new String[] { History.URL }, whereClause,
null, null);
if (cursor.moveToFirst()) {
- final WebIconDatabase iconDb = WebIconDatabase.getInstance();
- do {
- // Delete favicons
- // TODO don't release if the URL is bookmarked
- iconDb.releaseIconForPageUrl(cursor.getString(0));
- } while (cursor.moveToNext());
-
cr.delete(History.CONTENT_URI, whereClause, null);
}
} catch (IllegalStateException e) {
@@ -520,7 +512,7 @@
* @param cr The ContentResolver used to access the database.
* @param url url to remove.
*/
- public static final void deleteFromHistory(ContentResolver cr,
+ public static final void deleteFromHistory(ContentResolver cr,
String url) {
cr.delete(History.CONTENT_URI, History.URL + "=?", new String[] { url });
}
@@ -554,7 +546,7 @@
Log.e(LOGTAG, "clearSearches", e);
}
}
-
+
/**
* Request all icons from the database. This call must either be called
* in the main thread or have had Looper.prepare() invoked in the calling
@@ -563,12 +555,12 @@
* @param cr The ContentResolver used to access the database.
* @param where Clause to be used to limit the query from the database.
* Must be an allowable string to be passed into a database query.
- * @param listener IconListener that gets the icons once they are
+ * @param listener IconListener that gets the icons once they are
* retrieved.
*/
public static final void requestAllIcons(ContentResolver cr, String where,
WebIconDatabase.IconListener listener) {
- WebIconDatabase.getInstance().bulkRequestIconForPageUrl(cr, where, listener);
+ // Do nothing: this is no longer used.
}
/**
diff --git a/core/java/android/text/util/Linkify.java b/core/java/android/text/util/Linkify.java
index deb138d..c1341e1 100644
--- a/core/java/android/text/util/Linkify.java
+++ b/core/java/android/text/util/Linkify.java
@@ -465,32 +465,39 @@
String address;
int base = 0;
- while ((address = WebView.findAddress(string)) != null) {
- int start = string.indexOf(address);
+ try {
+ while ((address = WebView.findAddress(string)) != null) {
+ int start = string.indexOf(address);
- if (start < 0) {
- break;
+ if (start < 0) {
+ break;
+ }
+
+ LinkSpec spec = new LinkSpec();
+ int length = address.length();
+ int end = start + length;
+
+ spec.start = base + start;
+ spec.end = base + end;
+ string = string.substring(end);
+ base += end;
+
+ String encodedAddress = null;
+
+ try {
+ encodedAddress = URLEncoder.encode(address,"UTF-8");
+ } catch (UnsupportedEncodingException e) {
+ continue;
+ }
+
+ spec.url = "geo:0,0?q=" + encodedAddress;
+ links.add(spec);
}
-
- LinkSpec spec = new LinkSpec();
- int length = address.length();
- int end = start + length;
-
- spec.start = base + start;
- spec.end = base + end;
- string = string.substring(end);
- base += end;
-
- String encodedAddress = null;
-
- try {
- encodedAddress = URLEncoder.encode(address,"UTF-8");
- } catch (UnsupportedEncodingException e) {
- continue;
- }
-
- spec.url = "geo:0,0?q=" + encodedAddress;
- links.add(spec);
+ } catch (UnsupportedOperationException e) {
+ // findAddress may fail with an unsupported exception on platforms without a WebView.
+ // In this case, we will not append anything to the links variable: it would have died
+ // in WebView.findAddress.
+ return;
}
}
diff --git a/core/java/android/view/View.java b/core/java/android/view/View.java
index 4c53df7..d7dc6a4 100644
--- a/core/java/android/view/View.java
+++ b/core/java/android/view/View.java
@@ -5923,12 +5923,18 @@
*/
protected boolean fitSystemWindows(Rect insets) {
if ((mPrivateFlags3 & PFLAG3_APPLYING_INSETS) == 0) {
+ if (insets == null) {
+ // Null insets by definition have already been consumed.
+ // This call cannot apply insets since there are none to apply,
+ // so return false.
+ return false;
+ }
// If we're not in the process of dispatching the newer apply insets call,
// that means we're not in the compatibility path. Dispatch into the newer
// apply insets path and take things from there.
try {
mPrivateFlags3 |= PFLAG3_FITTING_SYSTEM_WINDOWS;
- return !dispatchApplyWindowInsets(new WindowInsets(insets)).hasInsets();
+ return dispatchApplyWindowInsets(new WindowInsets(insets)).isConsumed();
} finally {
mPrivateFlags3 &= PFLAG3_FITTING_SYSTEM_WINDOWS;
}
diff --git a/core/java/android/view/ViewGroup.java b/core/java/android/view/ViewGroup.java
index dda5a60..cc6f9ab 100644
--- a/core/java/android/view/ViewGroup.java
+++ b/core/java/android/view/ViewGroup.java
@@ -5433,11 +5433,11 @@
@Override
public WindowInsets dispatchApplyWindowInsets(WindowInsets insets) {
insets = super.dispatchApplyWindowInsets(insets);
- if (insets.hasInsets()) {
+ if (!insets.isConsumed()) {
final int count = getChildCount();
for (int i = 0; i < count; i++) {
insets = getChildAt(i).dispatchApplyWindowInsets(insets);
- if (!insets.hasInsets()) {
+ if (insets.isConsumed()) {
break;
}
}
diff --git a/core/java/android/view/WindowInsets.java b/core/java/android/view/WindowInsets.java
index 294f472..1d2f1bf 100644
--- a/core/java/android/view/WindowInsets.java
+++ b/core/java/android/view/WindowInsets.java
@@ -35,6 +35,9 @@
private Rect mTempRect;
private boolean mIsRound;
+ private boolean mSystemWindowInsetsConsumed = false;
+ private boolean mWindowDecorInsetsConsumed = false;
+
private static final Rect EMPTY_RECT = new Rect(0, 0, 0, 0);
/**
@@ -43,7 +46,13 @@
* since it would allow them to inadvertently consume unknown insets by returning it.
* @hide
*/
- public static final WindowInsets EMPTY = new WindowInsets(EMPTY_RECT, EMPTY_RECT);
+ public static final WindowInsets CONSUMED;
+
+ static {
+ CONSUMED = new WindowInsets(EMPTY_RECT, EMPTY_RECT);
+ CONSUMED.mSystemWindowInsetsConsumed = true;
+ CONSUMED.mWindowDecorInsetsConsumed = true;
+ }
/** @hide */
public WindowInsets(Rect systemWindowInsets, Rect windowDecorInsets) {
@@ -52,13 +61,17 @@
/** @hide */
public WindowInsets(Rect systemWindowInsets, boolean isRound) {
- this(systemWindowInsets, EMPTY_RECT, isRound);
+ this(systemWindowInsets, null, isRound);
}
/** @hide */
public WindowInsets(Rect systemWindowInsets, Rect windowDecorInsets, boolean isRound) {
- mSystemWindowInsets = systemWindowInsets;
- mWindowDecorInsets = windowDecorInsets;
+ mSystemWindowInsetsConsumed = systemWindowInsets == null;
+ mSystemWindowInsets = mSystemWindowInsetsConsumed ? EMPTY_RECT : systemWindowInsets;
+
+ mWindowDecorInsetsConsumed = windowDecorInsets == null;
+ mWindowDecorInsets = mWindowDecorInsetsConsumed ? EMPTY_RECT : windowDecorInsets;
+
mIsRound = isRound;
}
@@ -70,12 +83,14 @@
public WindowInsets(WindowInsets src) {
mSystemWindowInsets = src.mSystemWindowInsets;
mWindowDecorInsets = src.mWindowDecorInsets;
+ mSystemWindowInsetsConsumed = src.mSystemWindowInsetsConsumed;
+ mWindowDecorInsetsConsumed = src.mWindowDecorInsetsConsumed;
mIsRound = src.mIsRound;
}
/** @hide */
public WindowInsets(Rect systemWindowInsets) {
- this(systemWindowInsets, EMPTY_RECT);
+ this(systemWindowInsets, null);
}
/**
@@ -87,7 +102,12 @@
if (mTempRect == null) {
mTempRect = new Rect();
}
- mTempRect.set(mSystemWindowInsets);
+ if (mSystemWindowInsets != null) {
+ mTempRect.set(mSystemWindowInsets);
+ } else {
+ // If there were no system window insets, this is just empty.
+ mTempRect.setEmpty();
+ }
return mTempRect;
}
@@ -238,6 +258,24 @@
}
/**
+ * Check if these insets have been fully consumed.
+ *
+ * <p>Insets are considered "consumed" if the applicable <code>consume*</code> methods
+ * have been called such that all insets have been set to zero. This affects propagation of
+ * insets through the view hierarchy; insets that have not been fully consumed will continue
+ * to propagate down to child views.</p>
+ *
+ * <p>The result of this method is equivalent to the return value of
+ * {@link View#fitSystemWindows(android.graphics.Rect)}.</p>
+ *
+ * @return true if the insets have been fully consumed.
+ * @hide Pending API
+ */
+ public boolean isConsumed() {
+ return mSystemWindowInsetsConsumed && mWindowDecorInsetsConsumed;
+ }
+
+ /**
* Returns true if the associated window has a round shape.
*
* <p>A round window's left, top, right and bottom edges reach all the way to the
@@ -258,7 +296,8 @@
*/
public WindowInsets consumeSystemWindowInsets() {
final WindowInsets result = new WindowInsets(this);
- result.mSystemWindowInsets = new Rect(0, 0, 0, 0);
+ result.mSystemWindowInsets = EMPTY_RECT;
+ result.mSystemWindowInsetsConsumed = true;
return result;
}
@@ -276,10 +315,12 @@
boolean right, boolean bottom) {
if (left || top || right || bottom) {
final WindowInsets result = new WindowInsets(this);
- result.mSystemWindowInsets = new Rect(left ? 0 : mSystemWindowInsets.left,
+ result.mSystemWindowInsets = new Rect(
+ left ? 0 : mSystemWindowInsets.left,
top ? 0 : mSystemWindowInsets.top,
right ? 0 : mSystemWindowInsets.right,
bottom ? 0 : mSystemWindowInsets.bottom);
+ result.mSystemWindowInsetsConsumed = !hasSystemWindowInsets();
return result;
}
return this;
@@ -299,6 +340,7 @@
int right, int bottom) {
final WindowInsets result = new WindowInsets(this);
result.mSystemWindowInsets = new Rect(left, top, right, bottom);
+ result.mSystemWindowInsetsConsumed = !hasSystemWindowInsets();
return result;
}
@@ -308,6 +350,7 @@
public WindowInsets consumeWindowDecorInsets() {
final WindowInsets result = new WindowInsets(this);
result.mWindowDecorInsets.set(0, 0, 0, 0);
+ result.mWindowDecorInsetsConsumed = true;
return result;
}
@@ -322,6 +365,7 @@
top ? 0 : mWindowDecorInsets.top,
right ? 0 : mWindowDecorInsets.right,
bottom ? 0 : mWindowDecorInsets.bottom);
+ result.mWindowDecorInsetsConsumed = !hasWindowDecorInsets();
return result;
}
return this;
@@ -333,6 +377,7 @@
public WindowInsets replaceWindowDecorInsets(int left, int top, int right, int bottom) {
final WindowInsets result = new WindowInsets(this);
result.mWindowDecorInsets = new Rect(left, top, right, bottom);
+ result.mWindowDecorInsetsConsumed = !hasWindowDecorInsets();
return result;
}
diff --git a/core/java/com/android/internal/net/VpnConfig.java b/core/java/com/android/internal/net/VpnConfig.java
index 98599d0..420f8a9 100644
--- a/core/java/com/android/internal/net/VpnConfig.java
+++ b/core/java/com/android/internal/net/VpnConfig.java
@@ -17,8 +17,10 @@
package com.android.internal.net;
import android.app.PendingIntent;
+import android.content.ComponentName;
import android.content.Context;
import android.content.Intent;
+import android.content.res.Resources;
import android.os.Parcel;
import android.os.Parcelable;
import android.os.UserHandle;
@@ -47,7 +49,10 @@
public static Intent getIntentForConfirmation() {
Intent intent = new Intent();
- intent.setClassName(DIALOGS_PACKAGE, DIALOGS_PACKAGE + ".ConfirmDialog");
+ ComponentName componentName = ComponentName.unflattenFromString(
+ Resources.getSystem().getString(
+ com.android.internal.R.string.config_customVpnConfirmDialogComponent));
+ intent.setClassName(componentName.getPackageName(), componentName.getClassName());
return intent;
}
diff --git a/core/java/com/android/internal/widget/ActionBarOverlayLayout.java b/core/java/com/android/internal/widget/ActionBarOverlayLayout.java
index c957b67..d4adee1 100644
--- a/core/java/com/android/internal/widget/ActionBarOverlayLayout.java
+++ b/core/java/com/android/internal/widget/ActionBarOverlayLayout.java
@@ -16,6 +16,7 @@
package com.android.internal.widget;
+import android.content.res.Configuration;
import android.graphics.Canvas;
import android.graphics.drawable.Drawable;
import android.os.Build;
@@ -135,6 +136,13 @@
}
@Override
+ protected void onConfigurationChanged(Configuration newConfig) {
+ super.onConfigurationChanged(newConfig);
+ init(getContext());
+ requestApplyInsets();
+ }
+
+ @Override
public void onWindowSystemUiVisibilityChanged(int visible) {
super.onWindowSystemUiVisibilityChanged(visible);
pullChildren();
@@ -219,7 +227,7 @@
// insets in all cases, we need to know the measured size of the various action
// bar elements. onApplyWindowInsets() happens before the measure pass, so we can't
// do that here. Instead we will take this up in onMeasure().
- return WindowInsets.EMPTY;
+ return WindowInsets.CONSUMED;
}
@Override
diff --git a/core/res/res/values-watch/config.xml b/core/res/res/values-watch/config.xml
index 8d82a17..6052fb0 100644
--- a/core/res/res/values-watch/config.xml
+++ b/core/res/res/values-watch/config.xml
@@ -36,4 +36,8 @@
<!-- Maximum velocity to initiate a fling, as measured in dips per second. -->
<dimen name="config_viewMaxFlingVelocity">8000dp</dimen>
+ <!-- Number of notifications to keep in the notification service historical archive.
+ Reduced intentionally for watches to retain minimal memory footprint -->
+ <integer name="config_notificationServiceArchiveSize">1</integer>
+
</resources>
diff --git a/core/res/res/values/config.xml b/core/res/res/values/config.xml
index 99be34a..f239cc5 100644
--- a/core/res/res/values/config.xml
+++ b/core/res/res/values/config.xml
@@ -605,6 +605,9 @@
<!-- Default value for LED off time when the battery is low on charge in miliseconds -->
<integer name="config_notificationsBatteryLedOff">2875</integer>
+ <!-- Number of notifications to keep in the notification service historical archive -->
+ <integer name="config_notificationServiceArchiveSize">250</integer>
+
<!-- Allow the menu hard key to be disabled in LockScreen on some devices -->
<bool name="config_disableMenuKeyInLockScreen">false</bool>
@@ -1394,6 +1397,10 @@
<string name="config_customAdbPublicKeyConfirmationComponent"
>com.android.systemui/com.android.systemui.usb.UsbDebuggingActivity</string>
+ <!-- Name of the CustomDialog that is used for VPN -->
+ <string name="config_customVpnConfirmDialogComponent"
+ >com.android.vpndialogs/com.android.vpndialogs.CustomDialog</string>
+
<!-- Apps that are authorized to access shared accounts, overridden by product overlays -->
<string name="config_appsAuthorizedForSharedAccounts">;com.android.settings;</string>
diff --git a/core/res/res/values/symbols.xml b/core/res/res/values/symbols.xml
index 5b2b394..c5b8a5a 100644
--- a/core/res/res/values/symbols.xml
+++ b/core/res/res/values/symbols.xml
@@ -1511,6 +1511,7 @@
<java-symbol type="integer" name="config_notificationsBatteryLedOn" />
<java-symbol type="integer" name="config_notificationsBatteryLowARGB" />
<java-symbol type="integer" name="config_notificationsBatteryMediumARGB" />
+ <java-symbol type="integer" name="config_notificationServiceArchiveSize" />
<java-symbol type="integer" name="config_radioScanningTimeout" />
<java-symbol type="integer" name="config_screenBrightnessSettingMinimum" />
<java-symbol type="integer" name="config_screenBrightnessSettingMaximum" />
@@ -1638,6 +1639,7 @@
<java-symbol type="integer" name="config_maximumScreenDimDuration" />
<java-symbol type="fraction" name="config_maximumScreenDimRatio" />
<java-symbol type="string" name="config_customAdbPublicKeyConfirmationComponent" />
+ <java-symbol type="string" name="config_customVpnConfirmDialogComponent" />
<java-symbol type="layout" name="resolver_list" />
<java-symbol type="id" name="resolver_list" />
diff --git a/docs/html/about/dashboards/index.jd b/docs/html/about/dashboards/index.jd
index c61a94b..32b9c9e 100644
--- a/docs/html/about/dashboards/index.jd
+++ b/docs/html/about/dashboards/index.jd
@@ -64,7 +64,7 @@
</div>
-<p style="clear:both"><em>Data collected during a 7-day period ending on May 1, 2014.
+<p style="clear:both"><em>Data collected during a 7-day period ending on June 4, 2014.
<br/>Any versions with less than 0.1% distribution are not shown.</em>
</p>
@@ -95,7 +95,7 @@
</div>
-<p style="clear:both"><em>Data collected during a 7-day period ending on May 1, 2014.
+<p style="clear:both"><em>Data collected during a 7-day period ending on June 4, 2014.
<br/>Any screen configurations with less than 0.1% distribution are not shown.</em></p>
@@ -114,7 +114,7 @@
<img alt="" style="float:right"
-src="//chart.googleapis.com/chart?chs=400x250&cht=p&chd=t%3A0.1%2C87.0%2C12.9&chf=bg%2Cs%2C00000000&chl=GL%201.1%20only%7CGL%202.0%7CGL%203.0&chco=c4df9b%2C6fad0c" />
+src="//chart.googleapis.com/chart?chs=400x250&cht=p&chd=t%3A0.1%2C83.6%2C16.3&chf=bg%2Cs%2C00000000&chl=GL%201.1%20only%7CGL%202.0%7CGL%203.0&chco=c4df9b%2C6fad0c" />
<p>To declare which version of OpenGL ES your application requires, you should use the {@code
android:glEsVersion} attribute of the <a
@@ -136,17 +136,17 @@
</tr>
<tr>
<td>2.0</th>
-<td>87.0%</td>
+<td>83.6%</td>
</tr>
<tr>
<td>3.0</th>
-<td>12.9%</td>
+<td>16.3%</td>
</tr>
</table>
-<p style="clear:both"><em>Data collected during a 7-day period ending on May 1, 2014</em></p>
+<p style="clear:both"><em>Data collected during a 7-day period ending on June 4, 2014</em></p>
@@ -164,47 +164,42 @@
var VERSION_DATA =
[
{
- "chart": "//chart.googleapis.com/chart?chs=500x250&cht=p&chd=t%3A1.0%2C16.2%2C0.1%2C13.4%2C60.8%2C8.5&chf=bg%2Cs%2C00000000&chl=Froyo%7CGingerbread%7CHoneycomb%7CIce%20Cream%20Sandwich%7CJelly%20Bean%7CKitKat&chco=c4df9b%2C6fad0c",
+ "chart": "//chart.googleapis.com/chart?chl=Froyo%7CGingerbread%7CIce%20Cream%20Sandwich%7CJelly%20Bean%7CKitKat&chf=bg%2Cs%2C00000000&chd=t%3A0.8%2C14.9%2C12.3%2C58.4%2C13.6&chco=c4df9b%2C6fad0c&cht=p&chs=500x250",
"data": [
{
"api": 8,
"name": "Froyo",
- "perc": "1.0"
+ "perc": "0.8"
},
{
"api": 10,
"name": "Gingerbread",
- "perc": "16.2"
- },
- {
- "api": 13,
- "name": "Honeycomb",
- "perc": "0.1"
+ "perc": "14.9"
},
{
"api": 15,
"name": "Ice Cream Sandwich",
- "perc": "13.4"
+ "perc": "12.3"
},
{
"api": 16,
"name": "Jelly Bean",
- "perc": "33.5"
+ "perc": "29.0"
},
{
"api": 17,
"name": "Jelly Bean",
- "perc": "18.8"
+ "perc": "19.1"
},
{
"api": 18,
"name": "Jelly Bean",
- "perc": "8.5"
+ "perc": "10.3"
},
{
"api": 19,
"name": "KitKat",
- "perc": "8.5"
+ "perc": "13.6"
}
]
}
@@ -226,23 +221,22 @@
"xhdpi": "0.6"
},
"Normal": {
- "hdpi": "33.9",
- "mdpi": "12.5",
- "xhdpi": "19.9",
- "xxhdpi": "13.5"
+ "hdpi": "34.2",
+ "mdpi": "12.0",
+ "xhdpi": "19.6",
+ "xxhdpi": "14.6"
},
"Small": {
- "ldpi": "7.5"
+ "ldpi": "7.2"
},
"Xlarge": {
"hdpi": "0.3",
- "ldpi": "0.1",
- "mdpi": "4.2",
+ "mdpi": "4.0",
"xhdpi": "0.3"
}
},
- "densitychart": "//chart.googleapis.com/chart?chs=400x250&cht=p&chd=t%3A8.2%2C21.1%2C1.6%2C34.8%2C20.8%2C13.5&chf=bg%2Cs%2C00000000&chl=ldpi%7Cmdpi%7Ctvdpi%7Chdpi%7Cxhdpi%7Cxxhdpi&chco=c4df9b%2C6fad0c",
- "layoutchart": "//chart.googleapis.com/chart?chs=400x250&cht=p&chd=t%3A4.9%2C7.8%2C80.0%2C7.5&chf=bg%2Cs%2C00000000&chl=Xlarge%7CLarge%7CNormal%7CSmall&chco=c4df9b%2C6fad0c"
+ "densitychart": "//chart.googleapis.com/chart?chl=ldpi%7Cmdpi%7Ctvdpi%7Chdpi%7Cxhdpi%7Cxxhdpi&chf=bg%2Cs%2C00000000&chd=t%3A7.8%2C20.4%2C1.6%2C35.1%2C20.5%2C14.6&chco=c4df9b%2C6fad0c&cht=p&chs=400x250",
+ "layoutchart": "//chart.googleapis.com/chart?chl=Xlarge%7CLarge%7CNormal%7CSmall&chf=bg%2Cs%2C00000000&chd=t%3A4.6%2C7.8%2C80.4%2C7.2&chco=c4df9b%2C6fad0c&cht=p&chs=400x250"
}
];
diff --git a/docs/html/auto/images/carlogos.png b/docs/html/auto/images/carlogos.png
new file mode 100644
index 0000000..3522aa3
--- /dev/null
+++ b/docs/html/auto/images/carlogos.png
Binary files differ
diff --git a/docs/html/auto/images/figure01.png b/docs/html/auto/images/figure01.png
new file mode 100644
index 0000000..3044020
--- /dev/null
+++ b/docs/html/auto/images/figure01.png
Binary files differ
diff --git a/docs/html/auto/images/figure02.png b/docs/html/auto/images/figure02.png
new file mode 100644
index 0000000..1b87224
--- /dev/null
+++ b/docs/html/auto/images/figure02.png
Binary files differ
diff --git a/docs/html/auto/images/figure03.png b/docs/html/auto/images/figure03.png
new file mode 100644
index 0000000..0c4e20d
--- /dev/null
+++ b/docs/html/auto/images/figure03.png
Binary files differ
diff --git a/docs/html/auto/images/figure04.png b/docs/html/auto/images/figure04.png
new file mode 100644
index 0000000..3e9c894
--- /dev/null
+++ b/docs/html/auto/images/figure04.png
Binary files differ
diff --git a/docs/html/auto/images/figure05.png b/docs/html/auto/images/figure05.png
new file mode 100644
index 0000000..9c1d9b8
--- /dev/null
+++ b/docs/html/auto/images/figure05.png
Binary files differ
diff --git a/docs/html/auto/images/figure06.png b/docs/html/auto/images/figure06.png
new file mode 100644
index 0000000..8140f0c
--- /dev/null
+++ b/docs/html/auto/images/figure06.png
Binary files differ
diff --git a/docs/html/auto/images/figure07.png b/docs/html/auto/images/figure07.png
new file mode 100644
index 0000000..82c1c76
--- /dev/null
+++ b/docs/html/auto/images/figure07.png
Binary files differ
diff --git a/docs/html/auto/images/figure08.png b/docs/html/auto/images/figure08.png
new file mode 100644
index 0000000..f11e3a8
--- /dev/null
+++ b/docs/html/auto/images/figure08.png
Binary files differ
diff --git a/docs/html/auto/images/hero.jpg b/docs/html/auto/images/hero.jpg
new file mode 100644
index 0000000..3f9114f
--- /dev/null
+++ b/docs/html/auto/images/hero.jpg
Binary files differ
diff --git a/docs/html/auto/index.jd b/docs/html/auto/index.jd
new file mode 100644
index 0000000..c7a3a4e
--- /dev/null
+++ b/docs/html/auto/index.jd
@@ -0,0 +1,223 @@
+page.title=Android Auto
+page.viewport_width=970
+fullpage=true
+no_footer_links=true
+page.type=about
+
+@jd:body
+
+<style>
+.fullpage>#footer,
+#jd-content>.content-footer.wrap {
+ display:none;
+}
+</style>
+
+<style>
+#footer {
+ display: none;
+}
+.content-footer {
+ display: none;
+}
+#hero-height {
+ height:calc(100% - 100px);
+}
+</style>
+
+
+<div class="landing-body-content">
+ <div class="landing-hero-container">
+
+ <div id="hero-height" class="landing-section auto-hero">
+ <div class="landing-hero-scrim"></div>
+ <div class="landing-hero-wrap">
+ <div class="vertical-center-outer">
+ <div class="vertical-center-inner">
+
+ <div class="col-10">
+ <div class="landing-section-header">
+ <div class="landing-h1 hero">Android Auto</div>
+ <div class="landing-subhead hero">Entertainment and services on your dashboard</div>
+ <div class="landing-hero-description">
+ <p>Display and control your handheld app in vehicles.
+ Build apps with easy-to-use UI templates that
+ let users keep their eyes on the road.</p>
+ </div>
+
+ <div class="landing-body">
+ <a href="{@docRoot}auto/overview.html" class="landing-button landing-primary" style="margin-top: 40px;">
+ Developer Overview
+ </a>
+ </div>
+ </div>
+ </div>
+ </div>
+ </div> <!-- end .wrap -->
+
+ <div class="landing-scroll-down-affordance">
+ <a class="landing-down-arrow" href="#android-in-car">
+ <img src="{@docRoot}wear/images/carrot.png" alt="Scroll down to read more">
+ </a>
+ </div>
+ </div> <!-- end .landing-section .landing-hero -->
+ </div> <!-- end .landing-hero-container -->
+
+ <div class="landing-rest-of-page">
+
+ <div class="landing-section landing-gray-background" id="android-in-car">
+ <div class="wrap">
+ <div class="landing-section-header">
+ <div class="landing-h1">Bringing Android to Your Car</div>
+ </div>
+
+ <div class="landing-body">
+ <p>When users connect their Android phone to an Android Auto enabled vehicle, the
+ system shows an interface that lets users select compatible apps and services to run.
+ </p>
+ <p>Android Auto provides new APIs and tools that your existing Android apps can
+ leverage to run on any compatible vehicle. Users interact with your apps through the
+ touch screen and the physical buttons on the vehicle’s dashboard. Your apps can also
+ respond to voice commands.
+ </p>
+ </div>
+
+ </div> <!-- end .wrap -->
+ </div> <!-- end .landing-section -->
+
+
+ <div class="landing-section">
+ <div class="wrap">
+ <div class="landing-section-header">
+ <div class="landing-h1">One Platform</div>
+ </div>
+
+ <div class="landing-body">
+ <p>Android Auto is an extension of the Android platform. You can easily adapt
+ existing apps for Android Auto and reuse many of the Android APIs and services you
+ are already familiar with.</p>
+ <p>The Android Auto platform and SDK let you write your apps only once, without having
+ to worry about vehicle-specific hardware differences like screen resolution, software
+ interfaces, knobs and touch controls. Your app runs the same on any compatible
+ vehicle.</p>
+ </div>
+ </div> <!-- end .wrap -->
+ </div> <!-- end .landing-section -->
+
+ <div class="landing-section landing-gray-background" >
+ <div class="wrap">
+ <div class="landing-section-header">
+ <div class="landing-h1">Minimizing Distraction</div>
+ </div>
+
+ <div class="landing-body">
+ <p>We designed Android Auto to minimize driver distraction. Android Auto provides UI
+ templates for several app categories. These templates define the user interaction model
+ for any app and follow international best practices for reducing driver distraction.</p>
+ <p>You can customize these templates to fit your brand and link them to your app’s
+ content and functionality, instead of building new UIs and testing them for driver
+ distraction, which is a lengthy and costly process.</p>
+ <p>Android Auto locks any device that users connect to a compatible vehicle, so drivers
+ interact with the device using voice actions and the vehicle’s input controls.</p>
+ </div>
+ </div> <!-- end .wrap -->
+ </div> <!-- end .landing-section -->
+
+ <div class="landing-section landing-white-background">
+ <div class="wrap">
+ <div class="landing-section-header">
+ <div class="landing-h1">Building an Ecosystem</div>
+ </div>
+ <div class="landing-body landing-align-center">
+ <p style="margin-bottom:20px">
+ Android Auto is coming soon to new cars from these manufacturers:
+ </p>
+ </div>
+ <div style="width:800px;margin:0 auto">
+ <img src="{@docRoot}auto/images/carlogos.png" alt="Partners" />
+ </div>
+ </div> <!-- end .wrap -->
+ </div> <!-- end .landing-section -->
+
+
+ <div class="landing-section" >
+ <div class="wrap">
+ <div class="landing-section-header">
+ <div class="landing-h1">Developer Stories</div>
+ </div>
+
+ <div class="landing-body">
+ <p>We're working with developers to bring many popular apps to Android Auto:</p>
+ <p>
+
+ </p>
+ </div>
+
+ </div> <!-- end .wrap -->
+ </div> <!-- end .landing-section -->
+
+
+ <div class="landing-section" style="background-color:#f5f5f5">
+ <div class="wrap">
+ <div class="landing-section-header">
+ <div class="landing-pre-h1">Coming soon</div>
+ <div class="landing-h1">Android Auto SDK</div>
+ <div style="text-align:center;margin-top:20px;font-size:14pt;margin-bottom:-5px">
+ <a href="https://docs.google.com/a/google.com/forms/d/1ANgYOoYLkfyZ2JRPSU34Nep5yNaU-Ha2syXJ9b4xLrA/viewform">Sign up for updates</a>
+ </div>
+ </div>
+
+ <div class="landing-body">
+ <p>In the coming months, we’ll be releasing the Android Auto SDK, which includes APIs
+ and tools to make your existing apps compatible with Android Auto. The first version
+ of the SDK will provide templates and APIs for music, podcast, live radio, and audio
+ news apps, as well as limited voice actions.</p>
+ <p style="margin-bottom:40px">
+ Future versions of the Android Auto SDK will include support for a selection of
+ Android notifications, additional voice actions, and templates and APIs for
+ messaging, communication, local search, and more.</p>
+
+ <a target="_blank" href="http://g.co/androidautodev">
+ <img class="landing-social-image" src="//www.google.com/images/icons/product/gplus-128.png" alt="+Android Auto Developers">
+ </a>
+ <p style="margin-bottom:5px">G+ Community</p>
+ <p class="landing-small">
+ Join the Android Auto developer community on Google+ to stay involved, get the
+ latest updates, and exchange experiences with other developers.
+ <a target="_blank" href="http://g.co/androidautodev">+Android Auto Developers</a>
+ </p>
+ </div>
+
+ </div> <!-- end .wrap -->
+ </div> <!-- end .landing-section -->
+
+ </div> <!-- end .landing-rest-of-page -->
+
+
+ <div class="content-footer wrap" itemscope="" itemtype="http://schema.org/SiteNavigationElement">
+ <div class="layout-content-col col-16" style="padding-top:4px">
+ <style>#___plusone_0 {float:right !important;}</style>
+ <div class="g-plusone" data-size="medium"></div>
+ </div>
+ </div>
+ <div id="footer" class="wrap" style="width:940px;position:relative;top:-35px;z-index:-1">
+ <div 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>. For details and
+ restrictions, see the <a href="/license.html">Content
+ License</a>.
+ </div>
+ </div>
+
+
+ </div> <!-- end landing-body-content -->
+
+ <script>
+ $("a.landing-down-arrow").on("click", function(e) {
+ $("body").animate({
+ scrollTop: $(".auto-hero").height() + 120
+ }, 1000, "easeOutQuint");
+ e.preventDefault();
+ });
+ </script>
diff --git a/docs/html/auto/overview.jd b/docs/html/auto/overview.jd
new file mode 100644
index 0000000..8748bff
--- /dev/null
+++ b/docs/html/auto/overview.jd
@@ -0,0 +1,363 @@
+fullpage=true
+page.viewport_width=970
+no_footer_links=true
+excludeFromSuggestions=true
+page.metaDescription=Android Auto
+
+@jd:body
+
+<style>
+.jd-descr {
+ height:auto;
+}
+#copyright {
+ margin-top:-35px;
+}
+</style>
+
+<div style="width:780px; margin:0 auto;">
+
+<div id="qv-wrapper">
+<div id="qv">
+<h2>In this document</h2>
+<ol>
+ <li><a href="#design">Design</a>
+ <ol>
+ <li><a href="#designprinciples">Design Principles</a></li>
+ <li><a href="#uioverview">UI Overview</a></li>
+ </ol>
+ </li>
+ <li><a href="#architecture">Architecture</a></li>
+ <li><a href="#uitemplates">UI Templates</a>
+ <ol>
+ <li><a href="#launchapp">Launch App</a></li>
+ <li><a href="#useractions">User Actions</a></li>
+ <li><a href="#drawertransitions">Drawer Transitions</a></li>
+ <li><a href="#daynighttransitions">Day and Night Transitions</a></li>
+ <li><a href="#customizetemplates">Customizing Templates</a></li>
+ </ol>
+ </li>
+ <li><a href="#devprocess">Development Process</a></li>
+ <li><a href="#emulator">Testing Your App</a></li>
+ <li><a href="#running">Running Your App</a></li>
+</ol>
+</div>
+</div>
+
+<h1>Android Auto Developer Overview</h1>
+
+<p>Android Auto extends the Android platform to car entertainment systems. When users connect
+their Android handheld device to a compatible vehicle, Android Auto lets users project apps on
+the vehicle’s touchscreen and interact with them using the vehicle’s controls.</p>
+
+<dl>
+<dt style="margin-bottom:10px"><strong>UI Templates</strong></dt>
+<dd style="margin-bottom:20px">
+Android Auto defines interaction models and UI templates for several app categories. The
+first version of Android Auto supports media apps, such as music, podcast, live radio, and
+audio news apps. Future versions will support messaging, communication, local search apps,
+and more.
+</dd>
+<dt style="margin-bottom:10px"><strong>Notifications</strong></dt>
+<dd style="margin-bottom:20px">
+The platform will integrate with existing Android APIs for notifications. Users will get
+some notifications from Android apps on the vehicle’s screen.</dd>
+
+<dt style="margin-bottom:10px"><strong>Voice Actions</strong></dt>
+<dd style="margin-bottom:20px">
+Android Auto supports voice search and voice actions for media apps. Future versions
+will support additional voice actions.</dd>
+
+<dt style="margin-bottom:10px"><strong>Easy Development Workflow</strong></dt>
+<dd style="margin-bottom:20px">
+To extend an existing Android app for Android Auto, you implement a set of interfaces and
+services defined in the platform. You can reuse existing functionality and many Android APIs
+you already know.</dd>
+</dl>
+
+<p>We’ll release the Android Auto SDK in the coming months, which will let you test your
+Android Auto experience on a regular Android device.</p>
+
+
+<h2 id="design" style="margin-top:30px">Design</h2>
+
+<p>Digital experiences for cars should complement and augment driving, not demand the driver's
+attention. Designing these experiences for cars is fundamentally different than in the case of
+phones and tablets. It requires rethinking how these experiences unfold.</p>
+
+<h3 id="designprinciples" style="margin-top:25px">Design Principles</h3>
+
+<p><strong>Glanceable</strong>. We designed Android Auto to reduce UI complexity, optimize user
+interactions, and lower cognitive load. Effective apps show just enough information
+and only provide features that do not require excessive menu interaction and navigation.</p>
+
+<p><strong>Predictive, yet predictable</strong>. Android Auto leverages rich, contextual awareness
+to keep the driver informed about important situations. Timely help is combined with predictable
+functions. Effective apps use patterns for common tasks and show timely information only when
+relevant.</p>
+
+<p><strong>Connected</strong>. Android Auto works with apps that drivers already use in other
+devices. Android Auto promotes a continuous app experience from phones and tablets to cars,
+providing access to user's existing settings, subscriptions, and digital libraries. Experiences
+that bring personal content and context from other devices are part of Android Auto.</p>
+
+<p><strong>Integrated</strong>. Android Auto blends your apps with the vehicle's entertainment
+system, creating a truly integrated experience in every car. By using the vehicle's screen and
+controls, apps feel tailored to each car.</p>
+
+<h3 id="uioverview" style="margin-top:25px">UI Overview</h3>
+
+<p>Android Auto is a new environment that leverages existing UI models where appropiate and adds
+new models based on constrains and context. There are three primary concepts for Android Auto:
+<strong>Suggest</strong>, a unified place for predictive content; <strong>Demand</strong>, a
+pervasive way to interact with voice; and the <strong>Facets</strong>, organized spaces for
+primary activities, apps and content.</p>
+
+<dl>
+<dt style="margin-bottom:10px"><strong>Suggest: The Google Facet</strong></dt>
+<dd style="margin-bottom:20px">
+Core of continuity and extensibility is contextual stream of Now-like cards, powered by your
+apps and notifications. Relevant, timely, and dynamic, the stream organizes likely people, media,
+places, and information so drivers can quickly continue their activities or start something new.
+Google Now and notifications enable drivers to use the apps and services they know when they are
+most relevant.
+</dd>
+<dt style="margin-bottom:10px"><strong>Demand: The Voice Layer</strong></dt>
+<dd style="margin-bottom:20px">
+Voice-enabled tasks lets drivers accomplish their goals without taking their eyes off the road.
+Android Auto defines actions and intents that your app can register for.
+These are accessible through both persistent UI elements and dedicated hardware controls.
+</dd>
+<dt style="margin-bottom:10px"><strong>Facets and Templates: App-powered activities</strong></dt>
+<dd style="margin-bottom:20px">
+In the car, pages of app icons and different UIs create a distracting and dangerous situation.
+Instead, Android Auto apps power templates which help provide simple but customizable UIs
+for common interactions such as media or communications. Templates incorporate common behaviors,
+such as play/pause or reply to a message, while still letting your app promote its value
+and its brand. Apps are organized into facets (or activities) to enable quick access.
+</dd>
+</dl>
+
+<p>Android Auto uses the input and output mechanisms in each vehicle to tailor the interactions.
+Some vehicles have dedicated hardware controls, while others have primarily touch-based systems.
+Android Auto maps common actions and intents across these diverse sets of controls and outputs to
+enable you to concentrate on your unique app experience.</p>
+
+
+<h2 id="architecture" style="margin-top:30px">Architecture</h2>
+
+<p>The Android Auto app projects your app's customized UI on the vehicle's screen. To communicate
+with the Android Auto app, your media app implements a set of media interfaces.</p>
+
+<div style="width:750px;margin:0 auto">
+<img src="/auto/images/figure01.png" alt="" id="figure1" />
+<p class="img-caption">
+ <strong>Figure 1</strong> - Architecture of Android Auto.
+</p>
+</div>
+
+<p>The architecture consists of the following components:</p>
+
+<p><strong>Media App</strong> - Runs a media service that exposes content through browsing and
+playback APIs. The service provides content to the Android Auto app. This is your Android app.</p>
+
+<p><strong>Android Auto App</strong> - Creates a templated UI and handles user interactions.
+This app uses a media client to request content from the media service running in the media
+app. The client requests data from the media service and monitors service states.</p>
+
+<p><strong>Vehicle Display</strong> - Shows app content and supports user interaction via
+on-screen soft buttons and other components, such as physical buttons or steering
+wheel controls.</p>
+
+<p>Android media apps must implement binders to these APIs:</p>
+
+<ul>
+<li><strong>Browsing</strong> - Enables a media client to browse a hierarchy of a user’s
+media collection, presented as a virtual file system with containers (similar to directories)
+and items (similar to files).</li>
+<li><strong>Playback</strong> - Enables a media client to control media playback and monitor
+playback state through callbacks.</li>
+</ul>
+
+
+<h2 id="uitemplates" style="margin-top:30px">UI Templates</h2>
+
+<p>The Android Auto app uses a templated UI to display content and user interaction
+opportunities. Android Auto provides you with a set of standard UI templates that follow
+international guidelines for minimizing driving distraction. You do not have to test your
+app's UI for for driver distraction, which is a lengthy and expensive process involving
+multiple legislations across the globe and different standards for each vehicle OEM.</p>
+
+<p>The UI templates define interfaces for browsing, searching, and listening to content from
+media apps. Although you cannot change the standard template format or layout, you can customize
+the template colors, action icons, background images, and more.</p>
+
+<h3 id="launchapp" style="margin-top:25px">Launch App Template</h3>
+
+<p>The Launcher template shows all the compatible media apps installed on the user’s
+Android device and lets users select one of them from an scrollable list:</p>
+
+<div style="width:500px;margin:0 auto">
+<img src="/auto/images/figure02.png" alt="" id="figure2" />
+<p class="img-caption">
+ <strong>Figure 2.</strong> The Launcher template.
+</p>
+</div>
+
+<h3 style="margin-top:25px">Primary App Template</h3>
+
+<p>After the user selects a media app, the display shows the primary app template. Figure
+3 shows the elements of this template that you can customize:</p>
+
+<div style="width:428px;margin:0 auto">
+<img src="/auto/images/figure03.png" alt="" id="figure3" />
+<p class="img-caption">
+ <strong>Figure 3.</strong> The main application template.
+</p>
+</div>
+
+<p>You can customize the primary app template to show your own icons, app name, and
+background images. Figure 4 shows an example of a customized template:</p>
+
+<div style="width:787px;margin:0 auto">
+<img src="/auto/images/figure04.png" alt="" id="figure4" />
+<p class="img-caption">
+ <strong>Figure 4.</strong> A customized template.
+</p>
+</div>
+
+<h3 id="useractions" style="margin-top:25px">User Actions</h3>
+
+<p>The primary app template supports four main actions on the action bar, four auxiliary actions
+on the overflow bar, and the <em>Return</em> action. You can use standard controls and customize
+the actions and icons, as shown in Figure 5.</p>
+
+<div style="width:500px;margin:0 auto">
+<img src="/auto/images/figure05.png" alt="" id="figure5" />
+<p class="img-caption">
+ <strong>Figure 5.</strong> Custom icons for auxiliary actions.
+</p>
+</div>
+
+<h3 id="drawertransitions" style="margin-top:25px">Drawer Transitions</h3>
+
+<p>For browse actions, the display shows the drawer transition and template:</p>
+
+<div style="width:750px;margin:0 auto">
+<img src="/auto/images/figure06.png" alt="" id="figure6" />
+<p class="img-caption">
+ <strong>Figure 6.</strong> The drawer transition.
+</p>
+</div>
+
+<p>After the transition from the primary app template to the drawer template, the drawer
+appears on the center. The customized drawer template shows the media containers and
+media files provided by the media service in your app. You can also customize drawers
+with icons for list items.</p>
+
+<div style="width:500px;margin:0 auto">
+<img src="/auto/images/figure07.png" alt="" id="figure7" />
+<p class="img-caption">
+ <strong>Figure 7.</strong> A customized drawer template.
+</p>
+</div>
+
+<h3 id="daynighttransitions" style="margin-top:25px">Day and Night Transitions</h3>
+
+<p>All the templates support different color schemes for day and night, as shown in
+Figure 8. The platform provides the state (day or night) and makes adjustments automatically.</p>
+
+<div style="width:780px;margin:0 auto">
+<img src="/auto/images/figure08.png" alt="" id="figure8" />
+<p class="img-caption">
+ <strong>Figure 8.</strong> Day and night transitions.
+</p>
+</div>
+
+<h3 id="customizetemplates" style="margin-top:25px">Customizing Templates</h3>
+
+<p>To customize the templates, provide the following app-specific resources and actions
+to the Android Auto media client.</p>
+
+<ul>
+<li><strong>Resources</strong> - App logo, app name, theme colors, and background images.</li>
+<li><strong>Actions</strong> - Multiple custom actions; for example: <em>Thumbs Up/Down</em>,
+<em>Favorite</em>, and <em>Bookmark</em>. These actions are app-specific.</li>
+</ul>
+
+<p>If provided, the media client automatically uses them in the templated UI.</p>
+
+
+<h2 id="devprocess" style="margin-top:30px">Development Process</h2>
+
+<p class="note"><strong>Note:</strong> When released, the Android Auto SDK will provide
+media service interfaces, an APK for handheld devices that simulates the Android Auto
+app, and other tools for Android Auto development.</p>
+
+<p>To create a media app for Android Auto, you include an Android service in your app
+that implements the media service interfaces provided by the Android Auto SDK. These
+interfaces define functionality for browsing and finding content, playing media,
+customizing the UI template, and performing app-specific actions.</p>
+
+<p>The media service interfaces present the content library as a navigable tree and enable
+clients to play media, get album art, obtain theme resources for the UI template, and
+invoke app-specific actions.</p>
+
+<p>You don’t have to create a new app for Android Auto: you can extend your existing
+Android app with implementations of the media service interfaces. Your service exposes
+your app’s media content, theme resources, and app-specific actions using the methods and
+data types specified by the media service interfaces. This simplifies the development
+cycle because:</p>
+
+<ul>
+<li>You do not have to maintain a separate project for Android Auto</li>
+<li>You can reuse existing functionality from your Android app</li>
+</ul>
+
+<p>The Android Auto client presents the customized UI to users and invokes the
+functionality from your service as needed. This has two additional advantages:</p>
+
+<ul>
+<li>Your app does not implement a UI for Android Auto</li>
+<li>Your app does not manage user interactions directly</li>
+</ul>
+
+<p>This also means that you do not have to worry about vehicle-specific hardware
+differences such as screen resolutions, software interfaces, knobs and touch
+controls.</p>
+
+
+<h2 id="emulator" style="margin-top:30px">Testing Your App on an Android Device</h2>
+
+<p>The Android Auto SDK includes an APK with a media client implementation, which is
+similar to those available in compatible vehicles. To test your app with this
+client:</p>
+
+<ol>
+<li>Get an Android device with a similar form factor to a dashboard screen (like a
+Nexus 7).</li>
+<li>Configure the device for Android development.</li>
+<li>Install the APK for the media client from the Android Auto SDK on the device.</li>
+<li>Install the APK for your app on the device.</li>
+<li>Open the media client app from the Android Auto SDK on the device.</li>
+<li>Select your app from the list of available services.</li>
+</ol>
+
+<p>The customized UI for your app appears on the client. You can navigate the content
+library and play media. If your app provides app-specific actions, these actions appear
+in the UI controls.</p>
+
+
+<h2 id="running" style="margin-top:30px">Running Your App on Android Auto</h2>
+
+<p>Media apps are available on the Google Play Store for compatible Android devices.
+When users connect their Android device to a compatible vehicle, the
+Android Auto media client shows a list of all the Android apps installed on the phone
+that implement the media service interfaces.</p>
+
+<p>When users select one of these apps, the Android Auto media client uses the app’s
+service to respond to user input and invoke the methods in the media service interfaces
+to build the UI, navigate the content library, and play media.</p>
+
+<div style="margin-bottom:40px"> </div>
+</div>
diff --git a/docs/html/design/design_toc.cs b/docs/html/design/design_toc.cs
index 4c2aab2..2bd0bf9 100644
--- a/docs/html/design/design_toc.cs
+++ b/docs/html/design/design_toc.cs
@@ -67,6 +67,25 @@
</li>
<li class="nav-section">
+ <div class="nav-section-header"><a href="<?cs var:toroot ?>design/devices.html">Devices</a></div>
+ <ul>
+ <!-- wear design goes here -->
+ <li class="nav-section">
+ <div class="nav-section-header">
+ <a href="<?cs var:toroot ?>design/tv/index.html">TV</a></div>
+ <ul>
+ <li><a href="<?cs var:toroot ?>design/tv/principles.html">Design Principles</a></li>
+ <li><a href="<?cs var:toroot ?>design/tv/ui-overview.html">UI Overview</a></li>
+ <li><a href="<?cs var:toroot ?>design/tv/style.html">Style</a></li>
+ <li><a href="<?cs var:toroot ?>design/tv/patterns.html">Patterns</a></li>
+ </ul>
+ </li>
+
+ </ul>
+ </li>
+
+
+ <li class="nav-section">
<div class="nav-section-header empty"><a href="<?cs var:toroot ?>design/downloads/index.html">Downloads</a></div>
</li>
diff --git a/docs/html/design/tv/images/apps-games-rows.png b/docs/html/design/tv/images/apps-games-rows.png
new file mode 100644
index 0000000..1724147
--- /dev/null
+++ b/docs/html/design/tv/images/apps-games-rows.png
Binary files differ
diff --git a/docs/html/design/tv/images/atv-home.png b/docs/html/design/tv/images/atv-home.png
new file mode 100644
index 0000000..2c18827
--- /dev/null
+++ b/docs/html/design/tv/images/atv-home.png
Binary files differ
diff --git a/docs/html/design/tv/images/atv.png b/docs/html/design/tv/images/atv.png
new file mode 100644
index 0000000..cd96164
--- /dev/null
+++ b/docs/html/design/tv/images/atv.png
Binary files differ
diff --git a/docs/html/design/tv/images/overscan.png b/docs/html/design/tv/images/overscan.png
new file mode 100644
index 0000000..bf08dd8
--- /dev/null
+++ b/docs/html/design/tv/images/overscan.png
Binary files differ
diff --git a/docs/html/design/tv/images/recommendations.png b/docs/html/design/tv/images/recommendations.png
new file mode 100644
index 0000000..579b3907
--- /dev/null
+++ b/docs/html/design/tv/images/recommendations.png
Binary files differ
diff --git a/docs/html/design/tv/images/search.png b/docs/html/design/tv/images/search.png
new file mode 100644
index 0000000..be0d778
--- /dev/null
+++ b/docs/html/design/tv/images/search.png
Binary files differ
diff --git a/docs/html/design/tv/images/settings.png b/docs/html/design/tv/images/settings.png
new file mode 100644
index 0000000..f9f45fa
--- /dev/null
+++ b/docs/html/design/tv/images/settings.png
Binary files differ
diff --git a/docs/html/design/tv/index.jd b/docs/html/design/tv/index.jd
new file mode 100644
index 0000000..2519e25
--- /dev/null
+++ b/docs/html/design/tv/index.jd
@@ -0,0 +1,31 @@
+page.title=Design for TV
+header.justLinks=1
+footer.hide=1
+@jd:body
+
+<style>
+#landing-graphic-container {
+ position: relative;
+}
+
+#text-overlay {
+ position: absolute;
+ left: 0;
+ top: 402px;
+ width: 220px;
+}
+</style>
+
+<div id="landing-graphic-container">
+ <div id="text-overlay">
+ <span itemprop="description">
+ Build beautiful apps for the biggest screen in the house.</span>
+ <br><br>
+ <a href="{@docRoot}design/tv/principles.html"
+ class="landing-page-link">Design Principles</a>
+ </div>
+
+ <a href="{@docRoot}design/tv/principles.html">
+ <img src="{@docRoot}design/tv/images/atv.png" style="margin-left: 70px;">
+ </a>
+</div>
diff --git a/docs/html/design/tv/patterns.jd b/docs/html/design/tv/patterns.jd
new file mode 100644
index 0000000..c8cc0b0
--- /dev/null
+++ b/docs/html/design/tv/patterns.jd
@@ -0,0 +1,100 @@
+page.title=Patterns for TV
+page.tags="design"
+@jd:body
+
+<p>As a developer of apps for TV, you should follow certain patterns to enable users to
+ quickly understand and efficiently your app. This section describes recommended design patterns
+ for TV apps.</p>
+
+<h2>Navigation</h2>
+
+<p>Users typically navigate TV devices using a directional pad (D-Pad). This type of controller
+ limits movement to up, down, left, and right. In a typical D-Pad remote, hardware keys that
+ correspond to those directions are present and an additional action key is available to make a
+ selection. As you design your Android application for TVs, pay special attention to how users
+ navigate your application when using a remote control instead of a touchscreen.</p>
+
+<p>[add visual: D-Pad image or illustration]</p>
+
+<p>A key aspect of making your application work well with a D-Pad controller is to make sure
+ that there is always a object that is obviously in focus. If a user cannot see what is in focus,
+ they will not be able to navigate your app intuitively with this type of controller.</p>
+
+<p>Optimize your app screen layouts for D-Pad navigation. Align objects in your app lists and
+ grids to make navigation within each screen intuitive. Design your layout so it takes advantage of
+ two-axis navigation.</p>
+
+
+<h2>Home and Back Buttons</h2>
+
+<p>
+ In addition to the D-Pad buttons, Android TV devices always include Home and Back buttons on their
+ controllers. Make sure the Back button functions within your app in a way that is consistent with
+ the general <a href="{@docRoot}design/patterns/navigation.html">Android Design guidelines</a>.
+</p>
+
+
+<h2>Focus and Selection</h2>
+
+<p>Providing good focus and selection indicators is key to making your app useable on TV. As
+ mentioned previously, making sure that an object is always selected in your app is critical for
+ effective navigation using a D-Pad. This requirement also means that you must use focus indicators
+ that are easy to recognize and should be consistent throughout your app.</p>
+
+<p>
+ [add visual of selected item on screen]
+</p>
+
+<p>The default focus indicator used in Android TV use a combination of scale, shadow,
+ brightness, and opacity. The focus feedback is enhanced by displaying an animation going from a
+ non-focused to a focused state and back. Instead of immediately applying the focus transformation,
+ it is animated into place to reduce abrupt changes and help users notice how the object changed.</p>
+
+<h2>Audio Feedback</h2>
+
+<p>Sounds on Android TV bring a cinematic quality to the interaction experience. You should
+ consider adding sounds for user actions or to provide feedback when a user is only partially
+ visually engaged with the screen (e.g., because they have their hands full or are multitasking).
+ You should also consider using sounds as alternatives to error messages, for example to indicate
+ that a user has reached the end of a list or is trying to navigate to an undefined location.</p>
+
+<h2>Banners</h2>
+
+<p>
+ App Banners represent your app on the home screen of TV devices and serves and as a way for
+ users to launch your app. Here are specific requirements for the banner image:
+</p>
+
+<ul>
+ <li>Size: 320 x 180 px, xhdpi resource</li>
+ <li>Text should be included in the image. If your app is available in more than one
+ language, you must provide version of the banner image for each supported language.</li>
+</ul>
+
+
+<h2>App Icons</h2>
+
+<p>The app icon is shown in recommendation cards on the Home screen, search results and the main
+ Browse screen of your app if you use {@code BrowseFragment}. Here are the specific
+ requirements for the app icon:</p>
+
+<ul>
+ <li><p>Full color: size: 52x52dp, PNG</p></li>
+ <li><p>Monocolor: size 52x52dp, white(#fff) icon with transparent background, PNG</p></li>
+</ul>
+
+
+<h2>Background Images</h2>
+
+<p>Background images are displayed in the background of your app to provide additional visual
+ interest, information or branding. The BrowseFragment and DetailsFragment classes in the Leanback
+ support library provide specific support for background images and updating them as items are
+ brought into and out of focus. Here are the specific requirements for background images:</p>
+
+<ul>
+ <li>2016x1134 (1920x1080 + 5% extra margin for motion)</li>
+</ul>
+
+<p>
+ <strong>Note:</strong> If the image does not meet this requirement, it is scaled to fit.
+</p>
\ No newline at end of file
diff --git a/docs/html/design/tv/principles.jd b/docs/html/design/tv/principles.jd
new file mode 100644
index 0000000..5c0ce10
--- /dev/null
+++ b/docs/html/design/tv/principles.jd
@@ -0,0 +1,45 @@
+page.title=Design Principles for TV
+@jd:body
+
+<p>Users bring a specific set of expectations to the experience of watching TV, versus
+ interacting with a phone or tablet. These principles have been developed by the Android User
+ Experience Team to guide creation of the Android TV platform and the apps that run on it.</p>
+
+<h2>Casual Consumption</h2>
+
+<p>The TV is an entertainment interface, not a computer or mobile device. Optimize for
+ activities that put content at the center: from the casual posture of movie-watching, to
+ edge-of-seat, immersive gameplay, to hanging out with friends in a living room.</p>
+
+<p>Users expect immediate access to to content when they turn on a TV. Get users into the action
+ fast, be it the big game, their favorite show, or a game with friends. The next piece of content
+ to watch or play should only be a click or two away.</p>
+
+<p>
+ [add a visual]
+</p>
+
+
+<h2>Cinematic Experience</h2>
+
+<p>Create immersive experiences for the user. Design for as little user interface and as much
+ content as possible on each screen. Use visual imagery, movement and sound to inform and delight
+ users. Avoid using on-screen text to convey information and purpose. Tell your story with pictures
+ and sound.</p>
+
+<p>
+ [add a visual]
+</p>
+
+
+<h2>Simplicity</h2>
+
+<p>An Android TV should be simple and magical. It’s all about finding and enjoying content and
+ apps with the least amount of friction. Minimize the number of navigation steps required to
+ perform actions. Build apps with the fewest screens possible between app entry and content
+ immersion. Avoid making users enter text whenever possible, and use voice interfaces when you
+ require text input.</p>
+
+<p>
+ [add a visual]
+</p>
diff --git a/docs/html/design/tv/style.jd b/docs/html/design/tv/style.jd
new file mode 100644
index 0000000..479ed91
--- /dev/null
+++ b/docs/html/design/tv/style.jd
@@ -0,0 +1,108 @@
+page.title=Style for TV
+page.tags="design"
+@jd:body
+
+
+<p>Follow these style guidelines to create beautiful, functional apps for TV.</p>
+
+
+<h2>Layouts</h2>
+
+<p>The difference between a TV experience that feels right and one that does not greatly depends
+ on the number, spacing and size of on-screen elements. Although TV sizes and resolutions have
+ steadily increased over time, users expect TV experiences to be relatively simple and
+ uncluttered.</p>
+
+<p>The additional resolution and screen area afforded by modern displays is best used to display
+ things at better quality, rather than greater quantity. For example, use your layouts to show
+ large, beautiful pieces of content, or resize type for both easy reading and generous spacing.</p>
+
+<p>If you are creating an app for browsing and playing content, use the prebuilt fragments in the
+ Leanback support library. These layouts have been built specifically for use on TV devices with
+ the guidance of the Android User Experience team. For more information on using these classes,
+ see the <a href="{@docRoot}preview/tv/build-ui/index.html">User Interfaces</a> guide.
+</p>
+
+<p>Here are some additional recommendations for creating functional and attractive layout for TV
+ apps:</p>
+
+<ul>
+ <li><p>Build layouts designed for landscape orientation. TV screens always use in this
+ orientation.</p></li>
+ <li><p>Put on-screen navigational controls on the left or right side of the screen and
+ save the vertical space for content.</p></li>
+ <li><p>Create UIs that are divided into sections, by using Fragments and use view groups
+ like GridView instead of ListView to make better use of the horizontal screen space.</p></li>
+ <li><p>Add sufficient margins between layout controls to avoid a cluttered interface.</p></li>
+</ul>
+
+
+<h3>Screen Size</h3>
+
+<p>TV devices running Android are intended to operate at HD resolution (1920 x 1080 pixels) or
+ higher. Design your artwork assets for best viewing at this resolution.</p>
+
+
+<h3>Overscan</h3>
+
+<p>During the evolution of TV technology, overscan originally described an area of TV content
+ outside of a safe zone that most TVs could reliably display. Even on some of today’s HDTV flat
+ screens, areas outside that zone may not be visible.</p>
+
+<img src="{@docRoot}design/tv/images/overscan.png" alt="image alt text" />
+
+<p>Build a 10% margin into your TV screen designs to account for overscan area the TV may not
+ display correctly. On a 1920 x 1080 pixel screen, this margin should be a minimum of 27px from the
+ top and bottom edges and a minimum of 48px from the right and left edges of the picture.</p>
+
+
+<h2>Color</h2>
+
+<p>Color rendering on televisions can be imprecise compared to computer monitors or mobile
+ devices. LCD and Plasma TVs often apply smoothing and sharpening filters, and color rendering may
+ not match what you see on a computer screen.</p>
+
+<p>Subtle hue or brightness differences between elements may disappear or be over-emphasized on
+ TV screens. Some color gradient combinations will show bands. You should avoid pure whites and
+ highly saturated colors in large areas of the screen (especially reds, greens and blues). You
+ should also avoid using very dark or muddy colors, as TV settings may display these colors with
+ exaggerated contrast, causing them to be indistinguishable.</p>
+
+
+<h2>Typography</h2>
+
+<p>The text and controls in a TV application's UI should be easily visible and navigable from a
+ distance. The minimum recommended font size for TV is 12sp. The default text size setting should
+ be 18sp. We recommend the following guidelines for TV apps:</p>
+
+<ul>
+ <li>Browse Titles: Regular 44sp</li>
+ <li>Browse Menu Category Text: 20sp at 50% transparency</li>
+ <li>Browse Focused Menu Category Text: 24sp with no transparency</li>
+ <li>Row Category Titles focused: 20sp with no transparency</li>
+ <li>Row Category Titles focused: 20sp at 50% transparency</li>
+ <li>Details Content Titles: 34sp</li>
+ <li>Details Subtext: 14sp</li>
+</ul>
+
+<p>[visual showing text on a TV screen (sidebar position)]</p>
+
+<p>Some TVs have strong sharpness and contrast settings as their defaults. These picture
+ settings make thin and light typefaces look jagged and make the text difficult for people to read.
+ Therefore you should avoid thin or light typefaces on TV.</p>
+
+<h2>Text</h2>
+
+<p>Use text in TV apps sparingly. The position of users relative to a TV screen
+ (typically about 10 away) makes it harder for users to read text and the expectation of users in a
+ TV environment not conducive to reading. Follow these tips for the best handling of text in your
+ app:</p>
+
+<ul>
+ <li>Break text into small chunks that users can quickly scan.</li>
+ <li>Use light text on a dark background. This style is easier to read on a TV.</li>
+ <li>Avoid lightweight fonts or fonts that have both very narrow and very broad
+ strokes. Use simple sans-serif fonts and use anti-aliasing to increase readability.</li>
+ <li>Use layout-relative sizing rather than absolute sizing and density-independent
+ pixel units instead of absolute pixel units.</li>
+</ul>
\ No newline at end of file
diff --git a/docs/html/design/tv/ui-overview.jd b/docs/html/design/tv/ui-overview.jd
new file mode 100644
index 0000000..c58c9cd
--- /dev/null
+++ b/docs/html/design/tv/ui-overview.jd
@@ -0,0 +1,63 @@
+page.title=UI Overview for TV
+page.tags="design"
+@jd:body
+
+<p>The Android TV system user interface provides the launch pad for your app's big screen
+ experience. It's important to understand how your app is presented in the main user interface and
+ how your app can help users get to the content they want quickly, including contributing content
+ suggestions to the recommendations row.</p>
+
+<p>This section provides quick overview of the Android TV user interface.</p>
+
+
+<h2>Home Screen</h2>
+
+<p>The Home Screen is the start of a TV user's experience, providing search, content
+ recommendations, access to apps and settings. The Home Screen provides a rich and cinematic
+ overview of apps and content.</p>
+
+<img src="{@docRoot}design/tv/images/atv-home.png" alt="TV Home screen" />
+
+
+<h2>Search</h2>
+
+<p>By bringing the power of Google search to the big screen, Android TV makes new, dynamic
+ connections between content - a favorite movie may connect to the discovery of a new music artist,
+ planning trip to Paris might surface new YouTube content and photos.</p>
+
+<img src="{@docRoot}design/tv/images/search.png" alt="Recommendations Row" />
+
+
+<h2>Recommendations</h2>
+
+<p>The recommendation row on Android TV is a central feature of the Home Screen that allows
+ users quick access to dynamic and relevant content for their media consumption activities. The
+ stream is optimized for quick browsing of personalized content and activity resumption (on the
+ device and across devices), while also providing a way for users to act on meaningful new content.</p>
+
+<img src="{@docRoot}design/tv/images/recommendations.png" alt="Recommendations Row" />
+
+<p>
+ The recommendations are based on the user’s recent and frequent usage behaviors, as well as
+ expressed content preferences. They are presented as cards that represent a system or app action,
+ notification, activity, or piece of actionable media. Your app can provide suggestions for the
+ recommendations row to help get your content noticed. To learn more, see
+ <a href="{@docRoot}preview/tv/build-ui/recommendations.html">Recommendations</a>.
+</p>
+
+
+<h2>Apps and Games</h2>
+
+<p>Apps and Games rows both have special areas on the Home Screen. Within these respective
+ areas, Apps and Games titles are reordered to reflect the user’s recent usage.</p>
+
+<img src="{@docRoot}design/tv/images/apps-games-rows.png" alt="Apps and Games Rows" />
+
+
+<h2>Settings</h2>
+
+<p>Access to Settings is found at the bottom of the Home Screen. From here, the user can access
+ Android and device-specific settings. Please see the "Settings" section for more detailed
+ information.</p>
+
+<img src="{@docRoot}design/tv/images/settings.png" alt="Settings Row" />
diff --git a/docs/html/distribute/engage/analytics.jd b/docs/html/distribute/engage/analytics.jd
new file mode 100644
index 0000000..5f7cade
--- /dev/null
+++ b/docs/html/distribute/engage/analytics.jd
@@ -0,0 +1,50 @@
+page.title=Understand User Behavior
+page.metaDescription=Use Google Analytics to learn what your users like and what keeps them coming back.
+page.tags="analytics, user behavior"
+page.image=/images/gp-analytics.jpg
+
+@jd:body
+
+<div class="figure">
+ <img src="{@docRoot}images/gp-analytics.jpg" style="width:320px">
+</div>
+
+
+<p>
+ Link your Google Play Developer Console with Google Analytics to learn much
+ more about how users interact with your app — before and after they
+ download it.
+</p>
+
+<p>
+ Start by discovering how many people visit your Google Play listing page,
+ where they come from, and how many go on to install your app. Once the app is
+ launched, use Google Analytics to see which of your features are most
+ popular, where power users spend their time, who tends to make in-app
+ purchases, and more.
+</p>
+
+<p>
+ Google Analytics delivers the numbers in real time, so you can act fast to
+ update your landing page and your app. <a href=
+ "http://www.google.com/analytics/mobile/">Learn more</a>.
+</p>
+
+<p>
+ If you have a Google Analytics account already, linking it to Google Play
+ takes just a few moments. You can also link your Google Analytics account to
+ Admob to start gaining more user insights to improve your in-app marketing.
+</p>
+
+ <div class="headerLine clearfloat">
+ <h2 id="related-resources">
+ Related Resources
+ </h2>
+</div>
+
+<div class="resource-widget resource-flow-layout col-13"
+ data-query="collection:distribute/engage/analytics"
+ data-sortorder="-timestamp"
+ data-cardsizes="9x3"
+ data-maxresults="6">
+</div>
\ No newline at end of file
diff --git a/docs/html/distribute/engage/deep-linking.jd b/docs/html/distribute/engage/deep-linking.jd
index 0417ba1..a25c3c6 100644
--- a/docs/html/distribute/engage/deep-linking.jd
+++ b/docs/html/distribute/engage/deep-linking.jd
@@ -1,13 +1,13 @@
page.title=Deep Link to Bring Users Back
-page.metaDescription=Use deep links to bring your users into your apps from social posts or search.
+page.metaDescription=Use deep links to bring your users into your apps from social posts, search, or ads.
page.tags="app indexing, google+ signin"
page.image=/images/gp-listing-4.jpg
@jd:body
<p>
- Use deep links to bring your users into your apps from social posts or
- search.
+ Use deep links to bring your users into your apps from social posts,
+ search, or ads.
</p>
<div class="headerLine">
@@ -47,6 +47,11 @@
<h2>Deep Linking from Google Search — App Indexing</h2>
</div>
+
+<div style="float:right;">
+ <img src="/images/gp-listing-4.jpg" style="padding-top:1em;padding-left:2em;">
+</div>
+
<p>
Another way to bring users back to your apps is to apply for app indexing.
</p>
@@ -60,11 +65,29 @@
content</a>.
</p>
-<div>
- <img src="{@docRoot}images/gp-listing-4.jpg" style="padding-top:1em;">
+<div class="clearfloat" style="margin-top:2em;"></div>
+
+<div style="float:right;width:340px;padding-left:2em;">
+ <img src="/images/gp-ads-linking2.jpg" style="padding-top:1em;">
</div>
-<div class="headerLine">
+<div class="headerLine ">
+<h2>Deep Linking from Google Ads</h2>
+</div>
+<p>
+ Ads can remind users about the apps they already have.
+</p>
+
+<p>
+ As with deep links from Google's organic search results, AdWords deep links
+ send users directly to the relevant pages in apps they already have on their
+ mobile device. A mobile search for "flights to London," for instance, could
+ take a user straight to the London page in a travel app. <a href=
+ "http://www.thinkwithgoogle.com/products/ads-apps.html"
+ class="external-link">Learn more</a>.
+</p>
+
+<div class="headerLine clearfloat">
<h2 id="related-resources">
Related Resources
</h2>
diff --git a/docs/html/distribute/engage/engage_toc.cs b/docs/html/distribute/engage/engage_toc.cs
index 0314f8c..596051a 100644
--- a/docs/html/distribute/engage/engage_toc.cs
+++ b/docs/html/distribute/engage/engage_toc.cs
@@ -37,6 +37,12 @@
</li>
<li class="nav-section">
<div class="nav-section empty" style="font-weight:normal"><a href="<?cs
+ var:toroot?>distribute/engage/analytics.html">
+ <span class="en">Understand User Behavior</span></a>
+ </div>
+ </li>
+ <li class="nav-section">
+ <div class="nav-section empty" style="font-weight:normal"><a href="<?cs
var:toroot?>distribute/engage/app-updates.html">
<span class="en">Update Regularly</span></a>
</div>
diff --git a/docs/html/distribute/engage/index.jd b/docs/html/distribute/engage/index.jd
index f8cd1ee..2b103c3 100644
--- a/docs/html/distribute/engage/index.jd
+++ b/docs/html/distribute/engage/index.jd
@@ -15,8 +15,8 @@
<div class="resource-widget resource-flow-layout landing col-16"
data-query="collection:distribute/engagelanding"
- data-cardSizes="6x6"
- data-maxResults="9">
+ data-cardSizes="9x6,9x6,6x6,6x6,6x6,9x6,9x6,6x6,6x6,6x6"
+ data-maxResults="10">
</div>
<h3>Related Resources</h3>
diff --git a/docs/html/distribute/engage/widgets.jd b/docs/html/distribute/engage/widgets.jd
index 286adea..6adb55c 100644
--- a/docs/html/distribute/engage/widgets.jd
+++ b/docs/html/distribute/engage/widgets.jd
@@ -1,5 +1,5 @@
page.title=Build Useful Widgets
-page.metaDescription=Use widgets to remind users about important information in your apps and games, even when your apps are closed.
+page.metaDescription=Use home screen widgets to remind users about important information in your apps and games, even when your apps are closed.
page.tags=""
page.image=/images/gp-engage-0.jpg
diff --git a/docs/html/distribute/monetize/ads.jd b/docs/html/distribute/monetize/ads.jd
index bcb1e52..9a847ff 100644
--- a/docs/html/distribute/monetize/ads.jd
+++ b/docs/html/distribute/monetize/ads.jd
@@ -10,17 +10,32 @@
</div>
<p>
- In-app advertising offers a quick and easy way to incorporate a monetization
- option into both your <a href=
+ Ads can be a quick and easy way to earn more from your <a href=
"{@docRoot}distribute/monetize/freemium.html">freemium</a>, <a href=
"{@docRoot}distribute/monetize/premium.html">premium</a>, and <a href=
- "{@docRoot}distribute/monetize/subscriptions.html">subscription</a> apps. </p>
+ "{@docRoot}distribute/monetize/subscriptions.html">subscription</a> apps.
+ AdMob and the Google Mobile Ads SDK let you add advertising to your apps with
+ just a few lines of code.
+</p>
-<p>Using <a href=
+<p>
+ The question is: which model gets the best results for your app? Google's ad
+ tools are made to help you figure out what combination works best for both
+ your audience and your bottom line. </p>
+
+<p>Start by linking your AdMob and Google
+ Analytics accounts to get better insights and more earning power: for
+ instance, AdMob can promote in-app purchases to the people who buy them most
+ often, while showing income-generating ads to those less likely to buy right
+ now.
+</p>
+
+<p>
+ Using <a href=
"http://www.google.com/ads/admob/monetize.html#subid=us-en-et-dac">AdMob</a>
- and the <a href="{@docRoot}google/play-services/ads.html">Google
- Mobile Ads SDK</a> included in Google Play Services, you’re able to add
- advertising into your apps, with just a few lines of code.
+ and the <a href="{@docRoot}google/play-services/ads.html">Google Mobile Ads
+ SDK</a> included in Google Play Services, you’re able to add advertising into
+ your apps, with just a few lines of code.
</p>
<p>
@@ -30,36 +45,33 @@
<ul>
<li>
<p>
- <strong>Placement within your apps</strong> — Well placed ads will
- optimize your revenue by making it more likely that users will ‘click
- through’. Poorly placed ads can result in low click-through rates, and in
- the worse cases poor rating and users rapidly abandoning your apps. You
- can get advice on how to best place ads from the developer training on
- <a href=
- "{@docRoot}training/monetization/ads-and-ux.html">using
- ads</a>.
+ <strong>Placement within your apps</strong> — Well-placed ads make
+ it more likely that users will click through and convert. Poorly-placed
+ ads lead to lower click-through rates, and even poor ratings and users
+ abandoning your apps. Our <a href=
+ "{@docRoot}training/monetization/ads-and-ux.html">developer training</a>
+ on using ads shows some of the best ways to place ads.
</p>
</li>
<li>
<p>
<strong>Ad formats</strong> — Every app offers a different type of
- experience for users, so it’s important to consider the format of ads
- you’re using to ensure it’s compatible with the experience. While banner
- ads may work well for a flashlight utility app, an immersive gaming app
- may benefit more from a video interstitial. Mismatched ad formats may
- negatively affect your users’ experience and ad revenue, so try to select
- formats that fit well with the content and flow of your apps.
+ experience for users, so it’s important that your ad formats match that
+ experience. While banner ads may work well for a flashlight utility app,
+ an immersive gaming app may benefit more from a video interstitial.
+ Mismatched ad formats can make users unhappy and leave money on the
+ table.
</p>
</li>
<li>
<p>
- <strong>Maximizing your performance</strong> — Ensure you’re optimizing
- your advertising revenue by maximizing your CPMs <em>and</em> fill rate.
- Often ad providers will cite very high CPMs but will have a low fill rate
- that can severely decrease your effective CPM, so look at both of these
- figures. Also consider using a <a href=
+ <strong>Maximizing your performance</strong> — Make sure you’re
+ optimizing your advertising revenue by maximizing your CPMs and fill
+ rate. Ad providers often cite their very high CPMs but don't mention low
+ fill rates that can severely decrease your effective CPM. Be sure to look
+ at both of these figures. Consider using a <a href=
"https://support.google.com/admob/v2/answer/3063564?hl=en&ref_topic=3063091#subid=us-en-et-dac">
mediation</a> solution if you’d like to use multiple ad providers in your
apps. Look for solutions that offer yield management or <a href=
@@ -71,30 +83,43 @@
<li>
<p>
- <strong>Exercising control options</strong> — A variety of ads promoting a
- broad selection of other services or apps may show up within you apps.
- Depending on your goals and the type of experience you want to provide
- your users, it may make sense to <a href=
+ <strong>Exercising control options</strong> — A variety of ads may
+ show up within your app. It may make sense to <a href=
"https://support.google.com/admob/v2/answer/3150235?hl=enl#subid=us-en-et-dac">
- block</a> certain advertisements from appearing. Some developers don’t
- want apps in a similar category showing to their users, but some don’t
- mind.
+ block</a> certain of those advertisements from appearing, depending on
+ your goals and the type of experience you want to provide. Some
+ developers, for instance, don’t want ads for apps in their same category
+ showing to their users, while others don’t mind at all.
</p>
</li>
<li>
<p>
- <strong>Cross promoting your other apps</strong> — Ads can be used for
- more than just earning revenue. Consider using <a href=
+ <strong>Cross promoting your other apps</strong> — Ads can do more
+ than earn revenue. Consider running <a href=
"https://support.google.com/admob/v2/answer/3210452?hl=en#subid=us-en-et-dac">
- house ads</a> within your apps to create awareness and promote your
- entire portfolio of apps. When launching new apps, an easy way to quickly
- attract users is to promote directly to your existing customers.
+ house ads</a> within your apps to promote other apps in your portfolio.
+ When you launch a new app, this kind of promotion is a free and easy way
+ to attract new users quickly.
</p>
</li>
</ul>
<p>
+ Don't forget that paid channels like AdWords and YouTube can help you cast a
+ wider net by reaching targeted audiences outside the app ecosystem. They're a
+ great way to find new users at a price that you control. <a href=
+ "https://support.google.com/adwords/answer/2549053">Learn more</a>.
+</p>
+
+<p>
+ To start monetizing with ads, sign up for AdMob and integrate the Google
+ Mobile Ads SDK into your apps. If you also need to manage direct deals with
+ advertisers, consider using DoubleClick for Publishers Small Business.
+</p>
+
+
+<p>
To start monetizing with ads sign up for <a href=
"http://www.google.com/ads/admob/#subid=us-en-et-dac">AdMob</a> and integrate
the <a href="https://developers.google.com/mobile-ads-sdk/download">Google
diff --git a/docs/html/distribute/users/index.jd b/docs/html/distribute/users/index.jd
index 77ef609..a810f36 100644
--- a/docs/html/distribute/users/index.jd
+++ b/docs/html/distribute/users/index.jd
@@ -14,8 +14,8 @@
<div class="resource-widget resource-flow-layout landing col-16"
data-query="collection:distribute/users"
- data-cardSizes="6x6, 6x6, 6x6, 9x6, 9x6, 6x6, 6x6, 6x6"
- data-maxResults="8">
+ data-cardSizes="6x6"
+ data-maxResults="6">
</div>
<h3>Related resources</h3>
diff --git a/docs/html/distribute/users/promote-with-ads.jd b/docs/html/distribute/users/promote-with-ads.jd
new file mode 100644
index 0000000..1e28ae1
--- /dev/null
+++ b/docs/html/distribute/users/promote-with-ads.jd
@@ -0,0 +1,45 @@
+page.title=Promote Your App with Ads
+page.metaDescription=Promote your app through AdMob, AdWords, and YouTube to find new users at the right moment.
+page.image=/images/gp-ads-console.jpg
+page.tags="users, ads, analytics"
+
+@jd:body
+
+<p>
+ AdMob is Google's advertising platform for mobile apps. You can use it to
+ monetize your app and promote your apps, and you can link your Google
+ Analytics account to AdMob so you can analyze your apps — all in one
+ place.
+</p>
+
+<p>
+ <a href="http://www.google.com/ads/admob/">AdMob</a> is the largest mobile ad
+ app network. But you get more than just massive scale: AdMob will soon help
+ you find the right users in related apps. If your app is for bicycling, AdMob
+ can promote your app on other fitness and cycling-related apps worldwide.
+ <a href=
+ "https://apps.admob.com/admob/signup?subid=us-en-et-dac&_adc=ww-ww-et-admob2&hl=en">
+ Sign up for AdMob</a>.
+</p>
+
+<p>
+ AdMob also offers new solutions to help you achieve app-related goals such as
+ downloads, re-engagement and in-app purchases using Google search and the
+ Google Display Network. These solutions include streamlined campaign creation
+ flows and tools to track performance across the entire app lifecycle.
+ <a href="https://support.google.com/adwords/answer/2549053?hl=en">Learn
+ More</a>.
+</p>
+<div style="margin-top:2em;">
+ <img src="{@docRoot}images/gp-ads-console.jpg">
+</div>
+
+<div class="headerLine">
+<h2 id="related-resources">Related Resources</h2>
+</div>
+
+<div class="resource-widget resource-flow-layout col-13"
+ data-query="collection:distribute/users/promotewithads"
+ data-sortOrder="-timestamp"
+ data-cardSizes="9x3"
+ data-maxResults="6"></div>
\ No newline at end of file
diff --git a/docs/html/distribute/users/users_toc.cs b/docs/html/distribute/users/users_toc.cs
index a2437a6..1f173cb 100644
--- a/docs/html/distribute/users/users_toc.cs
+++ b/docs/html/distribute/users/users_toc.cs
@@ -28,7 +28,12 @@
</a>
</div>
</li>
-
+ <li class="nav-section">
+ <div class="nav-section empty" style="font-weight:normal"><a href="<?cs var:toroot?>distribute/users/promote-with-ads.html">
+ <span class="en">Promote with Ads</span>
+ </a>
+ </div>
+ </li>
</ul>
diff --git a/docs/html/google/auth/api-client.jd b/docs/html/google/auth/api-client.jd
index 402a95f..5331d1e 100644
--- a/docs/html/google/auth/api-client.jd
+++ b/docs/html/google/auth/api-client.jd
@@ -1,4 +1,4 @@
-page.title=Accessing Google Play Services APIs
+page.title=Accessing Google APIs
page.tags="oauth 2.0","GoogleAuthUtil"
trainingnavtop=true
diff --git a/docs/html/google/google_toc.cs b/docs/html/google/google_toc.cs
index 6ff00c0..b4028bd 100644
--- a/docs/html/google/google_toc.cs
+++ b/docs/html/google/google_toc.cs
@@ -3,11 +3,11 @@
######## ATTENTION ###############
######## ###############
#########################################################
-
+
IF YOU MAKE CHANGES TO THIS FILE, YOU MUST GENERATE THE
GMS REFERENCE DOCS, BECAUSE THEY ARE NOT INCLUDED IN THE
DOCS BUILD RULE.
-
+
#########################################################
#########################################################
?>
@@ -73,11 +73,11 @@
</div>
<ul>
<li><a href="<?cs var:toroot?>google/play-services/setup.html">
- <span class="en">Setup</span></a>
+ <span class="en">Setting Up Google Play Services</span></a>
</li>
<li class="nav-section">
<div class="nav-section-header"><a href="<?cs var:toroot?>google/auth/api-client.html">
- <span class="en">Accessing Google Play Services APIs</span></a>
+ <span class="en">Accessing Google APIs</span></a>
</div>
<ul>
<li>
diff --git a/docs/html/google/play-services/setup.jd b/docs/html/google/play-services/setup.jd
index d502e8d..4332953 100644
--- a/docs/html/google/play-services/setup.jd
+++ b/docs/html/google/play-services/setup.jd
@@ -1,4 +1,4 @@
-page.title=Set Up Google Play Services SDK
+page.title=Setting Up Google Play Services
@jd:body
@@ -8,8 +8,7 @@
<h2>In this document</h2>
<ol>
- <li><a href="#Install">Install the Google Play Services SDK</a></li>
- <li><a href="#Setup">Set Up a Project that Uses Google Play Services</a></li>
+ <li><a href="#Setup">Add Google Play Services to Your Project</a></li>
<li><a href="#Proguard">Create a Proguard Exception</a></li>
<li><a href="#ensure">Ensure Devices Have the Google Play services APK</a></li>
</ol>
@@ -18,12 +17,17 @@
</div>
</div>
+<script>
+$(document).ready(function() {
+ setupIdeDocToggle();
+});
+</script>
-
+
<p>To develop an app using the <a href="{@docRoot}reference/gms-packages.html">Google
-Play services APIs</a>, you must download the Google Play services SDK
-from the <a href="{@docRoot}tools/help/sdk-manager.html">SDK Manager</a>.
-The download includes the client library and code samples.</p>
+Play services APIs</a>, you need to set up your project with the Google Play services SDK.
+<p>If you haven't installed the Google Play services SDK yet, go get it now by following the guide
+to <a href="{@docRoot}sdk/installing/adding-packages.html">Adding SDK Packages</a>.</p>
<p>To test your app when using the Google Play services SDK, you must use either:</p>
<ul>
@@ -33,69 +37,28 @@
that runs the Google APIs platform based on Android 4.2.2 or higher.</li>
</ul>
-<p>Ideally, you should develop and test your app on a variety of devices, including
-both phones and tablets.</p>
-<h2 id="Install">Install the Google Play Services SDK</h2>
+<h2 id="Setup">Add Google Play Services to Your Project</h2>
-<p>To install the Google Play services SDK for development:</p>
+<p>
+<select class="ide">
+ <option value="eclipse">Using Eclipse with ADT</option>
+ <option value="studio">Using Android Studio</option>
+ <option value="other">Using something else</option>
+</select>
+</p>
+
+
+<div class="select-ide studio">
<ol>
- <li>Launch the SDK Manager in one of the following ways:
- <ul>
- <li>In Android Studio, click <strong>SDK Manager</strong>
-<img src="{@docRoot}images/tools/sdk-manager-studio.png" style="vertical-align:bottom;margin:0;height:19px" />
-in the toolbar.</li>
- <li>In Eclipse (with <a href="{@docRoot}tools/help/adt.html">ADT</a>),
- select <strong>Window</strong> > <strong>Android SDK Manager</strong>.</li>
- <li>On Windows, double-click the <code>SDK Manager.exe</code> file at the root of the Android
- SDK directory.</li>
- <li>On Mac or Linux, open a terminal and navigate to the <code>tools/</code> directory in the
- Android SDK, then execute <code>android sdk</code>.</li>
- </ul>
- </li>
- <li>Install the Google Play services SDK.
- <p>Scroll to the bottom of the package list, expand <b>Extras</b>, select
- <b>Google Play services</b>, and install it. If you're using Android Studio, also install
- <b>Google Repository</b> (it provides the Maven repository used for Gradle builds).</p>
- <p>The Google Play services SDK is saved in your Android SDK environment at
- <code><android-sdk>/extras/google/google_play_services/</code>.</p>
-
-<p class="note"><strong>Note:</strong> Google Play services 4.0.30 (released
-November 2013) and newer versions require Android 2.3 or higher. If your app supports Android 2.2,
-you can continue development with the Google Play services SDK, but must instead install
-<b>Google Play services for Froyo</b> from the SDK Manager.</p>
-
- </li>
- <li>Install a compatible version of the Google APIs platform.
- <p>If you want to test your app on the emulator, expand the directory for <b>Android 4.2.2
- (API 17)</b> or a higher version, select <b>Google APIs</b>, and install it. Then create a
- new <a href="{@docRoot}tools/devices/index.html">AVD</a> with Google APIs as
- the platform target.</p>
- </li>
- <li>Make a copy of the Google Play services library project.
- <p class="note"><strong>Note:</strong> If you are using Android Studio, skip this step.</p>
- <p>Copy the library project at
- <code><android-sdk>/extras/google/google_play_services/libproject/google-play-services_lib/</code>
- to the location where you maintain your Android app projects.
- <p>If you are using Eclipse, import the library project into your workspace.
- Click <b>File > Import</b>, select <b>Android > Existing
- Android Code into Workspace</b>, and browse to the copy of the library project to import it.</p>
- </li>
-</ol>
-
-
-
-<h2 id="Setup">Set Up a Project that Uses Google Play Services</h2>
-
-<p><b>Using Android Studio:</b></p>
-
-<ol>
- <li>Open the <code>build.gradle</code> file inside your application module directory.
- <p class="note"><strong>Note:</strong> Android Studio projects contain a top-level
- <code>build.gradle</code> file and a <code>build.gradle</code> file for each module.
- Be sure to edit the file for your application module.</p></li>
+ <li>Open the <code>build.gradle</code> file inside your application module directory.
+ <p class="note"><strong>Note:</strong> Android Studio projects contain a top-level
+ <code>build.gradle</code> file and a <code>build.gradle</code> file for each module.
+ Be sure to edit the file for your application module. See
+ <a href="{@docRoot}sdk/installing/studio-build.html">Building Your Project with
+ Gradle</a> for more information about Gradle.</p></li>
<li>Add a new build rule under <code>dependencies</code> for the latest version of
<code>play-services</code>. For example:
<pre class="no-pretty-print">
@@ -126,8 +89,11 @@
<p>You can now begin developing features with the
<a href="{@docRoot}reference/gms-packages.html">Google Play services APIs</a>.</p>
+</div><!-- end studio -->
-<p><b>Using Eclipse or another IDE:</b></p>
+
+
+<div class="select-ide eclipse other">
<p>To make the Google Play services APIs available to your app, you must reference the library
project you created in step 4 of the <a href="#Install">installation instructions</a>.</p>
@@ -154,6 +120,9 @@
you can begin developing features with the
<a href="{@docRoot}reference/gms-packages.html">Google Play services APIs</a>.</p>
+</div><!-- end eclipse and other -->
+
+
<h2 id="Proguard">Create a Proguard Exception</h2>
@@ -234,5 +203,6 @@
that takes the user to Google Play Store to install the update.</p>
-<p>To then begin a connection to Google Play services, read <a
-href="{@docRoot}google/auth/api-client.html">Accessing Google Play Services APIs</a>.</p>
+<p>To then begin a connection to Google Play services (required by most Google APIs such
+as Google Drive, Google+, and Games), read <a
+href="{@docRoot}google/auth/api-client.html">Accessing Google APIs</a>.</p>
diff --git a/docs/html/guide/components/activities.jd b/docs/html/guide/components/activities.jd
index 1cbaa79..3de7eea 100644
--- a/docs/html/guide/components/activities.jd
+++ b/docs/html/guide/components/activities.jd
@@ -4,12 +4,6 @@
<div id="qv-wrapper">
<div id="qv">
-<h2>Quickview</h2>
-<ul>
- <li>An activity provides a user interface for a single screen in your application</li>
- <li>Activities can move into the background and then be resumed with their state restored</li>
-</ul>
-
<h2>In this document</h2>
<ol>
<li><a href="#Creating">Creating an Activity</a>
diff --git a/docs/html/guide/components/bound-services.jd b/docs/html/guide/components/bound-services.jd
index 653c7a0..4215f0f2 100644
--- a/docs/html/guide/components/bound-services.jd
+++ b/docs/html/guide/components/bound-services.jd
@@ -6,12 +6,6 @@
<div id="qv-wrapper">
<ol id="qv">
-<h2>Quickview</h2>
-<ul>
- <li>A bound service allows other components to bind to it, in order to interact with it and
-perform interprocess communication</li>
- <li>A bound service is destroyed once all clients unbind, unless the service was also started</li>
-</ul>
<h2>In this document</h2>
<ol>
<li><a href="#Basics">The Basics</a></li>
diff --git a/docs/html/guide/components/fragments.jd b/docs/html/guide/components/fragments.jd
index 32c9f99..0cc5f72 100644
--- a/docs/html/guide/components/fragments.jd
+++ b/docs/html/guide/components/fragments.jd
@@ -5,15 +5,6 @@
<div id="qv-wrapper">
<div id="qv">
-
- <h2>Quickview</h2>
- <ul>
- <li>Fragments decompose application functionality and UI into reusable modules</li>
- <li>Add multiple fragments to a screen to avoid switching activities</li>
- <li>Fragments have their own lifecycle, state, and back stack</li>
- <li>Fragments require API Level 11 or greater</li>
- </ul>
-
<h2>In this document</h2>
<ol>
<li><a href="#Design">Design Philosophy</a></li>
diff --git a/docs/html/guide/components/fundamentals.jd b/docs/html/guide/components/fundamentals.jd
index 9ac063e..fd1a7a8 100644
--- a/docs/html/guide/components/fundamentals.jd
+++ b/docs/html/guide/components/fundamentals.jd
@@ -335,8 +335,8 @@
{@link android.content.Intent} to start activities, services, and broadcast receivers. You can do so
by explicitly naming the target component (using the component class name) in the intent. However,
the real power of intents lies in the concept of <em>implicit intents</em>. An implicit intent
-simply describe the type of action to perform (and optionally, the data upon which you’d like to
-perform the action) and allow the system to find a component on the device that can perform the
+simply describes the type of action to perform (and, optionally, the data upon which you’d like to
+perform the action) and allows the system to find a component on the device that can perform the
action and start it. If there are multiple components that can perform the action described by the
intent, then the user selects which one to use.</p>
diff --git a/docs/html/guide/components/processes-and-threads.jd b/docs/html/guide/components/processes-and-threads.jd
index 1fed712c..e297205 100644
--- a/docs/html/guide/components/processes-and-threads.jd
+++ b/docs/html/guide/components/processes-and-threads.jd
@@ -5,13 +5,6 @@
<div id="qv-wrapper">
<div id="qv">
-<h2>Quickview</h2>
-<ul>
- <li>Every application runs in its own process and all components of the application run in that
-process, by default</li>
- <li>Any slow, blocking operations in an activity should be done in a new thread, to avoid slowing
-down the user interface</li>
-</ul>
<h2>In this document</h2>
<ol>
diff --git a/docs/html/guide/components/services.jd b/docs/html/guide/components/services.jd
index da01d2c..6e22be8 100644
--- a/docs/html/guide/components/services.jd
+++ b/docs/html/guide/components/services.jd
@@ -3,14 +3,6 @@
<div id="qv-wrapper">
<ol id="qv">
-<h2>Quickview</h2>
-<ul>
- <li>A service can run in the background to perform work even while the user is in a different
-application</li>
- <li>A service can allow other components to bind to it, in order to interact with it and
-perform interprocess communication</li>
- <li>A service runs in the main thread of the application that hosts it, by default</li>
-</ul>
<h2>In this document</h2>
<ol>
<li><a href="#Basics">The Basics</a></li>
diff --git a/docs/html/guide/components/tasks-and-back-stack.jd b/docs/html/guide/components/tasks-and-back-stack.jd
index f818873..e054313 100644
--- a/docs/html/guide/components/tasks-and-back-stack.jd
+++ b/docs/html/guide/components/tasks-and-back-stack.jd
@@ -5,14 +5,6 @@
<div id="qv-wrapper">
<div id="qv">
-<h2>Quickview</h2>
-<ul>
- <li>All activities belong to a task</li>
- <li>A task contains a collection of activities in the order in which the user interacts with
-them</li>
- <li>Tasks can move to the background and retain the state of each activity in order for users
-to perform other tasks without losing their work</li>
-</ul>
<h2>In this document</h2>
<ol>
diff --git a/docs/html/guide/guide_toc.cs b/docs/html/guide/guide_toc.cs
index 0a234aa..ff08312 100644
--- a/docs/html/guide/guide_toc.cs
+++ b/docs/html/guide/guide_toc.cs
@@ -564,7 +564,11 @@
<li><a href="<?cs var:toroot ?>guide/practices/tablets-and-handsets.html">
<span class="en">Supporting Tablets and Handsets</span>
</a></li>
-
+ <li>
+ <a href="<?cs var:toroot ?>guide/practices/verifying-apps-art.html">
+ <span class="en">Verifying App Behavior on ART</span>
+ </a>
+ </li>
</ul>
</li>
diff --git a/docs/html/guide/practices/verifying-apps-art.jd b/docs/html/guide/practices/verifying-apps-art.jd
new file mode 100644
index 0000000..0eedfaf
--- /dev/null
+++ b/docs/html/guide/practices/verifying-apps-art.jd
@@ -0,0 +1,296 @@
+page.title=Verifying App Behavior on the Android Runtime (ART)
+@jd:body
+
+<div id="qv-wrapper">
+<div id="qv">
+<h2>Quickview</h2>
+ <ul>
+ <li>The new Android runtime (ART) is available on some of the newest Android
+ devices, though all of them currently have Dalvik as the default
+ runtime.</li>
+ <li>App developers should make sure their apps are compatible with ART,
+ especially if you use JNI to run native code or if you use certain tools
+ that produce non-standard code (such as some obfuscators).</li>
+ </ul>
+
+ <h2 id="Contents">In this document</h2>
+ <ol>
+ <li><a href="#GC_Migration">Addressing Garbage Collection (GC) Issues</a></li>
+ <li><a href="#JNI_Issues">Preventing JNI Issues</a>
+ <ol>
+ <li><a href="#JNI_and_GC">Checking JNI code for garbage-collection
+ issues</a></li>
+ <li><a href="#Error_Handling">Error handling</a></li>
+ <li><a href="#Object_Model_Changes">Object model changes</a></li>
+ </ol>
+ </li>
+ <li><a href="#Stack_Size">Preventing Stack Size Issues</a></li>
+ <li><a href="#AOT_Fails">Fixing AOT Compilation Issues</a></li>
+ <li><a href="#Reporting_Problems">Reporting Problems</a></li>
+ </ol>
+ <h2>See also</h2>
+ <ol>
+ <li><a href="http://source.android.com/devices/tech/dalvik/art.html">Introducing ART</a></li>
+ <li><a
+href="http://android-developers.blogspot.com/2011/07/debugging-android-jni-with-checkjni.html">Debugging
+Android JNI with CheckJNI</a></li>
+ </ol>
+</div>
+</div>
+
+<p>With Android 4.4, we are beginning to roll out a new Android runtime,
+<strong>ART</strong>. This runtime offers a number of new features that improve
+performance and smoothness of the Android platform and apps. (You can find more
+information about ART's new features in <a
+href="http://source.android.com/devices/tech/dalvik/art.html">Introducing
+ART</a>.)</p>
+
+<p>Currently, ART is available on a number of Android 4.4 devices, such as the
+Nexus 4, Nexus 5, Nexus 7, and Google Play edition devices.
+At this time, all devices still use Dalvik as the default runtime. We encourage
+you to test your apps for ART compatibility and to take advantage of ART's new
+features. However, for the time being, you should also take care to maintain
+compatibility with Dalvik.</p>
+
+<p>This document lets you know about things to watch for when migrating an
+existing app to be compatible with ART. Most apps should just work when
+running with ART. However, some techniques that work on Dalvik do not work on
+ART. This document discusses some of these issues.</p>
+
+<h2 id="GC_Migration">Addressing Garbage Collection (GC) Issues</h2>
+
+<p>Under Dalvik, apps frequently find it useful to explicitly call {@link
+java.lang.System#gc() System.gc()} to prompt garbage collection (GC). This should be
+far less necessary with ART, particularly if you're invoking garbage collection
+to prevent <a
+href="{@docRoot}/tools/debugging/debugging-memory.html#LogMessages"><code>GC_FOR_ALLOC</code></a>-type
+occurrences or to reduce fragmentation. You can verify which runtime is in use
+by calling {@link java.lang.System#getProperty(java.lang.String)
+System.getProperty("dalvik.vm.version")}. If ART is in use, the property's value
+is <code>"2.0.0"</code> or higher.</p>
+
+<p>Furthermore, a compacting garbage collector is under development in the <a
+href="https://source.android.com">Android Open-Source Project (AOSP)</a> to
+improve memory management. Because of this, you should avoid using techniques
+that are incompatible with compacting GC (such as saving pointers to object
+instance data). This is particularly important for apps that make use of the
+Java Native Interface (JNI). For more information, see <a
+href="#JNI_Issues">Preventing JNI Issues</a>.</p>
+
+<h2 id="JNI_Issues">Preventing JNI Issues</h2>
+
+<p>ART's JNI is somewhat stricter than Dalvik's. It is an especially good idea
+to use CheckJNI mode to catch common problems. If your app makes use of C/C++
+code, you should review the following article:</p>
+
+<p><a
+href="http://android-developers.blogspot.com/2011/07/debugging-android-jni-with-checkjni.html">Debugging
+Android JNI with CheckJNI</a></p>
+
+<h3 id="JNI_and_GC">Checking JNI code for garbage-collection issues</h3>
+
+<p>ART has a compacting garbage collector under development on the
+Android Open Source Project (AOSP). Once the compacting garbage collector is in
+use, objects may be moved in memory. If you use C/C++ code, do not
+perform operations that are incompatible with compacting GC. We have enhanced
+CheckJNI to identify some potential issues (as described in <a
+href="http://android-developers.blogspot.com/2011/11/jni-local-reference-changes-in-ics.html">JNI
+Local Reference Changes in ICS</a>).</p>
+
+<p>One area to watch for in particular is the use of
+<code>Get...ArrayElements()</code> and <code>Release...ArrayElements()</code>
+functions. In runtimes with non-compacting GC, the
+<code>Get...ArrayElements()</code> functions typically return a reference to the
+actual memory backing the array object. If you make a change to one of the
+returned array elements, the array object is itself changed (and the arguments
+to <code>Release...ArrayElements()</code> are usually ignored). However, if
+compacting GC is in use, the <code>Get...ArrayElements()</code> functions may
+return a copy of the memory. If you misuse the reference when compacting GC is
+in use, this can lead to memory corruption or other problems. For example:</p>
+
+<ul>
+
+ <li>If you make any changes to the returned array elements, you must call the
+ appropriate <code>Release...ArrayElements()</code> function when you are done,
+ to make sure the changes you made are correctly copied back to the underlying
+ array object.</li>
+
+ <li>When you release the memory array elements, you must use the appropriate
+ mode, depending on what changes you made:
+
+ <ul>
+
+ <li>If you did not make any changes to the array elements, use
+ <code>JNI_ABORT</code> mode, which releases the memory without copying
+ changes back to the underlying array object.</li>
+
+ <li>If you made changes to the array, and do not need the reference any
+ more, use code <code>0</code> (which updates the array object and frees
+ the copy of the memory).</li>
+
+ <li>If you made changes to the array that you want to commit, and you want
+ to keep the copy of the array, use <code>JNI_COMMIT</code> (which updates
+ the underlying array object and retains the copy).</li>
+
+ </ul>
+
+ </li>
+
+ <li>When you call <code>Release...ArrayElements()</code>, return the same
+ pointer that was originally returned by <code>Get...ArrayElements()</code>. For
+ example, it's not safe to increment the original pointer (to scan through the
+ returned array elements) then pass the incremented pointer to
+ <code>Release...ArrayElements()</code>. Passing this modified pointer can cause
+ the wrong memory to be freed, resulting in memory corruption.</li>
+
+</ul>
+
+<h3 id="Error_Handling">Error handling</h3>
+
+<p>ART's JNI throws errors in a number of cases where Dalvik didn’t. (Once
+again, you can catch many such cases by testing with CheckJNI.)</p>
+
+<p>For example, if <code>RegisterNatives</code> is called with a method that
+does not exist (perhaps because the method was removed by a tool such as
+<strong>ProGuard</strong>), ART now properly throws {@link
+java.lang.NoSuchMethodError}:</p>
+
+<pre class="no-pretty-print">
+08-12 17:09:41.082 13823 13823 E AndroidRuntime: FATAL EXCEPTION: main
+08-12 17:09:41.082 13823 13823 E AndroidRuntime: java.lang.NoSuchMethodError:
+ no static or non-static method
+ "Lcom/foo/Bar;.native_frob(Ljava/lang/String;)I"
+08-12 17:09:41.082 13823 13823 E AndroidRuntime:
+ at java.lang.Runtime.nativeLoad(Native Method)
+08-12 17:09:41.082 13823 13823 E AndroidRuntime:
+ at java.lang.Runtime.doLoad(Runtime.java:421)
+08-12 17:09:41.082 13823 13823 E AndroidRuntime:
+ at java.lang.Runtime.loadLibrary(Runtime.java:362)
+08-12 17:09:41.082 13823 13823 E AndroidRuntime:
+ at java.lang.System.loadLibrary(System.java:526)
+</pre>
+
+<p>ART also logs an error (visible in logcat) if <code>RegisterNatives</code> is
+called with no methods:</p>
+
+<pre class="no-pretty-print">
+W/art ( 1234): JNI RegisterNativeMethods: attempt to register 0 native
+methods for <classname>
+</pre>
+
+<p>In addition, the JNI functions <code>GetFieldID()</code> and
+<code>GetStaticFieldID()</code> now properly throw {@link java.lang.NoSuchFieldError}
+instead of simply returning null. Similarly, <code>GetMethodID()</code> and
+<code>GetStaticMethodID()</code> now properly throw {@link java.lang.NoSuchMethodError}.
+This can lead to CheckJNI failures because of the unhandled exceptions or the
+exceptions being thrown to Java callers of native code. This makes it
+particularly important to test ART-compatible apps with CheckJNI mode.</p>
+
+<p>ART expects users of the JNI <code>CallNonvirtual...Method()</code> methods
+(such as <code>CallNonvirtualVoidMethod()</code>) to use the method's declaring
+class, not a subclass, as required by the JNI specification.</p>
+
+<h2 id="Stack_Size">Preventing Stack Size Issues</h2>
+
+<p>Dalvik had separate stacks for native and Java code, with a default Java
+stack size of 32KB and a default native stack size of 1MB. ART has a unified
+stack for better locality. Ordinarily, the ART {@link java.lang.Thread} stack
+size should be approximately the same as for Dalvik. However, if you explicitly
+set stack sizes, you may need to revisit those values for apps running in
+ART.</p>
+
+<ul>
+
+ <li>In Java, review calls to the {@link
+ java.lang.Thread#Thread(java.lang.ThreadGroup, java.lang.Runnable,
+ java.lang.String, long) Thread} constructor that specify an explicit stack
+ size. For example, you will need to increase the size if {@link
+ java.lang.StackOverflowError} occurs.</li>
+
+ <li>In C/C++, review use of <code>pthread_attr_setstack()</code> and
+ <code>pthread_attr_setstacksize()</code> for threads that also run Java code via
+ JNI. Here is an example of the error logged when an app attempts to call JNI
+ <code>AttachCurrentThread()</code> when the pthread size is too small:
+
+<pre class="no-pretty-print">F/art: art/runtime/thread.cc:435]
+ Attempt to attach a thread with a too-small stack (16384 bytes)</pre>
+ </li>
+
+</ul>
+
+<h2 id="Object_Model_Changes">Object model changes</h2>
+
+<p>Dalvik incorrectly allowed subclasses to override package-private methods.
+ART issues a warning in such cases:</p>
+
+<pre class="no-pretty-print">
+Before Android 4.1, method void com.foo.Bar.quux()
+would have incorrectly overridden the package-private method in
+com.quux.Quux
+</pre>
+
+<p>If you intend to override a class's method in a different package, declare the
+method as <code>public</code> or <code>protected</code>.</p>
+
+<p>{@link java.lang.Object} now has private fields. Apps that reflect on fields
+in their class hierarchies should be careful not to attempt to look at the
+fields of {@link java.lang.Object}. For example, if you are iterating up a class
+hierarchy as part of a serialization framework, stop when
+
+<pre>Class.getSuperclass() == java.lang.Object.class</pre>
+
+instead of continuing until the method returns <code>null</code>.</p>
+
+<p>Proxy {@link
+java.lang.reflect.InvocationHandler#invoke(java.lang.Object,java.lang.reflect.Method,java.lang.Object[])
+InvocationHandler.invoke()} now receives <code>null</code> if there are no
+arguments instead of an empty array. This behavior was documented previously but
+not correctly handled in Dalvik. Previous versions of <a
+href="https://code.google.com/p/mockito/">Mockito</a> have difficulties with
+this, so use an updated Mockito version when testing with ART.</p>
+
+<h2 id="AOT_Fails">Fixing AOT Compilation Issues</h2>
+
+<p>ART's Ahead-Of-Time (AOT) Java compilation should work for all standard Java
+code. Compilation is performed by ART's
+<code>dex2oat</code> tool; if you encounter any issues related to
+<code>dex2oat</code> at install time, let us know (see <a
+href="#Reporting_Problems">Reporting Problems</a>) so we can fix them as quickly
+as possible. A couple of issues to note:</p>
+
+<ul>
+
+ <li>ART does tighter bytecode verification at install time than Dalvik does.
+ Code produced by the Android build tools should be fine. However, some
+ post-processing tools (especially tools that perform obfuscation) may produce
+ invalid files that are tolerated by Dalvik but rejected by ART. We have been
+ working with tool vendors to find and fix such issues. In many cases, getting
+ the latest versions of your tools and regenerating the DEX files can fix these
+ problems.</li>
+
+ <li>Some typical problems that are flagged by the ART verifier include:
+ <ul>
+ <li>invalid control flow</li>
+ <li>unbalanced <code>moniterenter</code>/<code>moniterexit</code></li>
+ <li>0-length parameter type list size</li>
+ </ul>
+ </li>
+
+ <li>Some apps have dependencies on the installed <code>.odex</code> file
+ format in <code>/system/framework</code>, <code>/data/dalvik-cache</code>, or
+ in {@link dalvik.system.DexClassLoader}’s optimized output directory. These
+ files are now ELF files and not an extended form of DEX files. While ART tries
+ to follow the same naming and locking rules as Dalvik, apps should not depend
+ on the file format; the format is subject to change without notice.</li>
+
+
+
+<h2 id="Reporting_Problems">Reporting Problems</h2>
+
+<p>If you run into any issues that aren’t due to app JNI issues, report
+them via the Android Open Source Project Issue Tracker at <a
+href="https://code.google.com/p/android/issues/list">https://code.google.com/p/android/issues/list</a>.
+Include an <code>"adb bugreport"</code> and a link to the app in the Google
+Play store if available. Otherwise, if possible, attach an APK that reproduces
+the issue. Note that issues (including attachments) are publicly
+visible.</p>
diff --git a/docs/html/images/gp-ads-console.jpg b/docs/html/images/gp-ads-console.jpg
new file mode 100644
index 0000000..158e31d
--- /dev/null
+++ b/docs/html/images/gp-ads-console.jpg
Binary files differ
diff --git a/docs/html/images/gp-ads-linking2.jpg b/docs/html/images/gp-ads-linking2.jpg
new file mode 100644
index 0000000..0c2f731
--- /dev/null
+++ b/docs/html/images/gp-ads-linking2.jpg
Binary files differ
diff --git a/docs/html/images/gp-analytics.jpg b/docs/html/images/gp-analytics.jpg
new file mode 100644
index 0000000..e1a92c7
--- /dev/null
+++ b/docs/html/images/gp-analytics.jpg
Binary files differ
diff --git a/docs/html/images/tools-home.png b/docs/html/images/tools-home.png
index 291a361..86a7414 100644
--- a/docs/html/images/tools-home.png
+++ b/docs/html/images/tools-home.png
Binary files differ
diff --git a/docs/html/images/training/volley-request.png b/docs/html/images/training/volley-request.png
new file mode 100644
index 0000000..85f0681
--- /dev/null
+++ b/docs/html/images/training/volley-request.png
Binary files differ
diff --git a/docs/html/index.jd b/docs/html/index.jd
index a4b0683..de2980b 100644
--- a/docs/html/index.jd
+++ b/docs/html/index.jd
@@ -1,159 +1,95 @@
fullpage=true
page.viewport_width=970
-no_footer_links=true
-carousel=true
excludeFromSuggestions=true
page.metaDescription=The official site for Android developers. Provides the Android SDK and documentation for app developers and designers.
page.customHeadTag=<meta name="google-site-verification" content="sa-bIAI6GKvct3f61-WpRguHq-aNjtF7xJjMTSi79as" />
@jd:body
+<!-- Top full-bleed carousel -->
+<div class="home-new-carousel-1">
+ <div class="fullscreen-carousel-content">
+ <div class="vcenter">
+ <div class="wrap clearfix">
+ <div class="resource-widget resource-flow-layout wrap col-16"
+ data-query="collection:index/primary"
+ data-resourceStyle="card"
+ data-sortOrder="-timestamp"
+ data-numStacks="3"
+ data-maxResults="4"
+ data-cardSizes="18x6,6x2,6x2,6x2">
+ </div> <!-- end .resource-widget -->
+ </div> <!-- end .wrap -->
+ </div> <!-- end .vcenter -->
+ </div> <!-- end .fullscreen-carousel-content -->
+</div> <!-- end .fullscreen-carousel -->
-<div class="wrap">
- <!-- Slideshow -->
- <div class="slideshow-container slideshow-home col-16">
- <a href="" class="slideshow-prev">Prev</a>
- <a href="" class="slideshow-next">Next</a>
- <div class="frame">
- <ul>
- <!-- set explicit widths as needed to prevent overflow issues -->
+<div class="actions-bar">
+ <div class="wrap">
+ <div class="actions">
+ <div><a href="{@docRoot}sdk/index.html">Get the SDK</a></div>
+ <div><a href="{@docRoot}samples/index.html">Browse Samples</a></div>
+ <div><a href="//www.youtube.com/user/androiddevelopers">Watch Videos</a></div>
+ <div><a href="{@docRoot}distribute/googleplay/developer-console.html">Manage Your Apps</a></div>
+ </div><!-- end .actions -->
+ </div><!-- end .wrap -->
+</div><!-- end .actions-bar -->
- <li class="item carousel-home">
- <div class="content-left col-10" style="width:580px;">
- <a href="{@docRoot}wear/index.html">
- <img src="{@docRoot}images/home/aw_dac.png" style="margin-top:50px" >
- </a>
- </div>
- <div class="content-right col-5" style="width:280px;">
- <h1>Introducing Android Wear</h1>
- <p>We’re extending the Android platform to wearables. You can start building richer wearable experiences for your apps today using the enhanced Notification APIs in this Developer Preview.</p>
- <p>We can’t wait to see what you will create.</p>
- <p><a href="{@docRoot}wear/index.html" class="button">Learn more</a></p>
- </div>
- </li>
-
- <li class="item carousel-home">
- <div class="content-left col-11" style="padding-top:65px;">
- <script src="//ajax.googleapis.com/ajax/libs/swfobject/2.2/swfobject.js"></script>
- <div style="box-shadow: 3px 10px 18px 1px #999;width:600px;height:336px">
- <div id="ytapiplayer">
- <a href="http://www.youtube.com/watch?v=WWArLD6nqrk"><img width=600 src="{@docRoot}images/video-kiwi.jpg"></a><!--You need Flash player 8+ and JavaScript enabled to view this video. -->
- </div>
- <script type="text/javascript">
- var params = { allowScriptAccess: "always" };
- var atts = { id: "ytapiplayer" };
- swfobject.embedSWF("//www.youtube.com/v/WWArLD6nqrk?enablejsapi=1&playerapiid=ytplayer&version=3&HD=1;rel=0;showinfo=0;modestbranding;origin=developer.android.com;autohide=1",
- "ytapiplayer", "600", "336", "8", null, null, params, atts);
-
- // Callback used to pause/resume carousel based on video state
- function onytplayerStateChange(newState) {
- var isPaused = $("#pauseButton").hasClass("paused");
- if ((newState == 1) || (newState == 3)) {
- // if playing or buffering, pause the carousel
- if (!isPaused) {
- $("#pauseButton").click();
- }
- } else {
- // otherwise, make sure carousel is running
- if (isPaused) {
- $("#pauseButton").click();
- }
- }
- }
-
- // Callback received when YouTube player loads to setup callback (above)
- function onYouTubePlayerReady(playerId) {
- var ytplayer = document.getElementById("ytapiplayer");
- ytplayer.addEventListener("onStateChange", "onytplayerStateChange");
- }
-
- </script>
- </div>
- </div>
- <div class="content-right col-4">
- <h1 style="white-space:nowrap;line-height:1.2em;">Developer Story: <br />Kiwi, Inc.</h1>
- <p>Game developer Kiwi has had five titles in the top 25 grossing on Google Play. Hear how Google Play
- has helped them double revenue every six months.</p>
- <p><a href="{@docRoot}distribute/stories/index.html" class="button">Watch more videos </a></p>
- </div>
- </li>
-
- <li class="item carousel-home">
- <div class="content-left col-7" style="width:400px;">
- <a href="{@docRoot}about/versions/kitkat.html">
- <img src="{@docRoot}images/home/kk-hero.jpg" width="242" style="padding-top:72px;">
- </a>
- </div>
- <div class="content-right col-4" style="width:340px;">
- <h1>Android 4.4 KitKat!</h1>
- <p>A new version of Android is here, with great new features, APIs, and tools for developers.</p>
- <p>Android 4.4 is built to run on more devices than ever before, and gives you more ways to showcase your content and create beautiful, useful, and innovative apps.</p>
- <p>Learn about what's new in the Platform Highlights and see the API Overview for details.</p>
- <p><a href="{@docRoot}about/versions/kitkat.html" class="button">Check out the highlights</a></p>
- </div>
- </li>
-
- <li class="item carousel-home">
- <div class="content-left col-11" style="padding-top:65px;">
- <a href="https://www.youtube.com/watch?v=sONcojECWXs&list=PLWz5rJ2EKKc-2quE-o0enpILZF3nBZg_K&index=1">
- <img src="{@docRoot}images/title-devbytes-kk.jpg" style="margin-top:0px;width:600px;">
- </a>
- </div>
- <div class="content-right col-4">
- <h1 style="white-space:nowrap;line-height:1.2em;">DevBytes: <br />Android 4.4</h1>
- <p>Join the DevBytes team for a look at what's new in Android 4.4 KitKat — new ways to make your apps beautiful, printing, storage access framework, and more.</p>
- <p><a href="https://www.youtube.com/watch?v=sONcojECWXs&list=PLWz5rJ2EKKc-2quE-o0enpILZF3nBZg_K&index=1" class="button">Watch the video </a></p>
- </div>
- </li>
-
- <li class="item carousel-home">
- <div class="content-left col-19" style="width:580px;">
- <a href="{@docRoot}design/patterns/new.html">
- <img src="{@docRoot}design/media/design_elements_landing.png" style="margin-top:30px">
- </a>
- </div>
- <div class="content-right col-4" style="width:280px;">
- <h1>Design for Android KitKat</h1>
- <p>Android KitKat brings a refreshed UI with updated styles, patterns, and gestures to use in your apps. </p>
- <p>We've updated the Android Design guidelines and added new pages on branding, fullscreen, and more. </p>
- <p><a href="{@docRoot}design/patterns/new.html" class="button">See what's new</a></p>
- </div>
- </li>
-
- <li class="item carousel-home">
- <div class="content-left col-11" style="padding-top:65px;">
- <a href="http://www.youtube.com/watch?v=6QHkv-bSlds&list=PLWz5rJ2EKKc8j2B95zGMb8muZvrIy-wcF&index=1">
- <img src="{@docRoot}images/title-adia-kk.png" style="margin-top:0px;width:600px;">
- </a>
- </div>
- <div class="content-right col-4">
- <h1 style="white-space:nowrap;line-height:1.2em;">ADIA: <br />Android 4.4</h1>
- </p>Join the Android Design in Action team for a walkthrough of new developer features, UX changes, and updates to design guidelines in Android 4.4.</p>
- <p><a href="http://www.youtube.com/watch?v=6QHkv-bSlds&list=PLWz5rJ2EKKc8j2B95zGMb8muZvrIy-wcF&index=1" class="button">Watch the video </a></p>
- </div>
- </li>
- </ul>
+<div class="landing-rest-of-page">
+ <div class="landing-section" style="background-color:#f5f5f5">
+ <div class="wrap">
+ <div class="landing-section-header">
+ <div class="landing-h1">Android, Everywhere You Need It</div>
+ <div class="landing-subhead">
+ Android runs on hundreds of millions of handheld devices around the world, <br /> and it now supports these exciting, new form-factors.
</div>
- </div>
+ </div>
+ <div class="landing-body">
+ <div class="landing-breakout cols">
-<!-- /End slideshow -->
+ <!-- <div class="resource-widget resource-flow-layout col-16" data-query="collection:index/devices"
+ data-sortorder="" data-cardsizes="6x6, 6x6, 6x6" data-maxresults="3"></div>-->
- <a href="" id="pauseButton" style="display:none">pause</a>
+ <div class="col-3-wide">
+ <img src="" alt="">
+ <p>Wear</p>
+ <p class="landing-small">
+ Provide information on-the-go for your users, whenever they need it.
+ </p>
+ <p class="landing-small">
+ <a href="{@docRoot}wear">Learn about Android Wear</a>
+ </p>
+ </div>
-</div>
-<div class="wrap" style="padding-bottom:20px">
- <!-- Section links -->
- <div class="home-sections">
- <ul>
- <li><a href="{@docRoot}about/index.html">About Android</a></li>
- <li><a href="{@docRoot}sdk/index.html">Get the SDK</a></li>
- <li><a href="http://source.android.com">Open Source</a></li>
- <li><a href="{@docRoot}support.html">Support</a></li>
- <li class="last"><a href="{@docRoot}legal.html">Legal</a></li>
- </ul>
- </div>
- <!-- /Section links -->
-</div>
+ <div class="col-3-wide">
+ <img src="" alt="">
+
+ <p>TV</p>
+ <p class="landing-small">
+ Build your apps for the big screen and bring your content to life.
+ </p>
+ <p class="landing-small">
+ <a href="{@docRoot}tv">Learn about Android TV</a>
+ </p>
+ </div>
+
+ <div class="col-3-wide">
+ <img src="" alt="">
+
+ <p>Auto</p>
+ <p class="landing-small">
+ Extend your music apps to automobile
+ entertainment systems.
+ </p>
+ <p class="landing-small">
+ <a href="{@docRoot}auto">Learn about Android Auto</a>
+ </p>
+ </div>
+
+ </div>
+ </div>
+ </div> <!-- end .wrap -->
+ </div> <!-- end .landing-section -->
\ No newline at end of file
diff --git a/docs/html/jd_collections.js b/docs/html/jd_collections.js
index 8a4ac47..ca19c02 100644
--- a/docs/html/jd_collections.js
+++ b/docs/html/jd_collections.js
@@ -1,4 +1,21 @@
var RESOURCE_COLLECTIONS = {
+ "index/primary": {
+ "title": "",
+ "resources": [
+ "preview/index.html",
+ "preview/material/index.html",
+ "preview/material/index.html",
+ "preview/material/index.html"
+ ]
+ },
+ "index/devices": {
+ "title": "",
+ "resources": [
+ "wear/index.html",
+ "tv/index.html",
+ "auto/index.html"
+ ]
+ },
"launch/static": {
"title": "",
"resources": [
@@ -49,7 +66,8 @@
"distribute/users/your-listing.html",
"distribute/users/build-buzz.html",
"distribute/users/build-community.html",
- "distribute/users/expand-to-new-markets.html"
+ "distribute/users/expand-to-new-markets.html",
+ "distribute/users/promote-with-ads.html"
]
},
"distribute/engagelanding": {
@@ -60,6 +78,7 @@
"distribute/engage/easy-signin.html",
"distribute/engage/deep-linking.html",
"distribute/engage/game-services.html",
+ "distribute/engage/analytics.html",
"distribute/engage/app-updates.html",
"distribute/engage/community.html",
"distribute/engage/video.html"
@@ -214,6 +233,13 @@
"distribute/stories/localization.html"
]
},
+ "distribute/users/promotewithads": {
+ "title": "",
+ "resources": [
+ "http://www.google.com/ads/admob/#subid=us-en-et-dac",
+ "distribute/essentials/optimizing-your-app.html"
+ ]
+ },
"distribute/users/buildbuzz": {
"title": "",
"resources": [
@@ -394,6 +420,14 @@
"http://play.google.com/about/developer-content-policy.html"
]
},
+ "distribute/engage/analytics": {
+ "title": "",
+ "resources": [
+ "http://www.google.com/analytics/mobile/",
+ "http://android-developers.blogspot.com/2013/10/improved-app-insight-by-linking-google.html",
+ "https://developers.google.com/analytics/devguides/collection/android/"
+ ]
+ },
"distribute/engage/widgets": {
"title": "",
"resources": [
diff --git a/docs/html/jd_extras.js b/docs/html/jd_extras.js
index f26b747b..d8db5bf 100644
--- a/docs/html/jd_extras.js
+++ b/docs/html/jd_extras.js
@@ -726,6 +726,21 @@
"tags": [
"#engagement",
],
+ "url": "http://www.google.com/analytics/mobile/",
+ "timestamp": 1383243492000,
+ "image": "http://www.google.com//analytics/images/heros/mobile-index.jpg",
+ "title": "Google Mobile App Analytics",
+ "summary": "Mobile App Analytics measures what matters most at all key stages: from first discovery and download to in-app purchases. ",
+ "keywords": ["analytics,user behavior"],
+ "type": "guide",
+ "titleFriendly": ""
+ },
+ {
+ "lang": "en",
+ "group": "",
+ "tags": [
+ "#engagement",
+ ],
"url": "https://developers.google.com/app-indexing/",
"timestamp": 1383243492000,
"image": "https://developers.google.com/app-indexing/images/allthecooks_srp.png",
@@ -1101,4 +1116,17 @@
"type": "Google+",
"titleFriendly": ""
},
+ {
+ "lang": "en",
+ "group": "",
+ "tags": ["analytics"],
+ "url": "https://developers.google.com/analytics/devguides/collection/android/",
+ "timestamp": null,
+ "image": "https://developers.google.com/analytics/images/home/gear-logo.png",
+ "title": "Google Mobile App Analytics SDK",
+ "summary": "The Google Analytics for Mobile Apps SDKs make it easy for you to implement Google Analytics in your mobile application.",
+ "keywords": ["analytics, user behavior"],
+ "type": "sdk",
+ "titleFriendly": ""
+ }
]);
\ No newline at end of file
diff --git a/docs/html/jd_tag_helpers.js b/docs/html/jd_tag_helpers.js
index ca01386..b0fe67a 100644
--- a/docs/html/jd_tag_helpers.js
+++ b/docs/html/jd_tag_helpers.js
@@ -7,6 +7,7 @@
}
var ALL_RESOURCES = mergeArrays(
+ ABOUT_RESOURCES,
DESIGN_RESOURCES,
DISTRIBUTE_RESOURCES,
GOOGLE_RESOURCES,
diff --git a/docs/html/preview/api-overview.jd b/docs/html/preview/api-overview.jd
new file mode 100644
index 0000000..40618a3
--- /dev/null
+++ b/docs/html/preview/api-overview.jd
@@ -0,0 +1,698 @@
+page.title=L Developer Preview APIs
+excludeFromSuggestions=true
+sdk.platform.apiLevel=20
+@jd:body
+
+
+<div id="qv-wrapper">
+<div id="qv">
+
+<h2>In this document
+ <a href="#" onclick="hideNestedItems('#toc44',this);return false;" class="header-toggle">
+ <span class="more">show more</span>
+ <span class="less" style="display:none">show less</span></a></h2>
+
+<ol id="toc44" class="hide-nested">
+ <li><a href="#Behaviors">Important Behavior Changes</a>
+ <ol>
+ <li><a href="#BehaviorNotifications">If your app implements notifications...</a></li>
+ <li><a href="#BehaviorFullscreen">If your app uses fullScreenIntent...</a></li>
+ <li><a href="#BehaviorGetRecentTasks">If your app uses ActivityManager.getRecentTasks()...</a></li>
+ </ol>
+ </li>
+ <li><a href="#UI">User Interface</a>
+ <ol>
+ <li><a href="#MaterialDesign">Material design support</a></li>
+ <li><a href="#LockscreenNotifications">Lockscreen notifications</a></li>
+ <li><a href="#NotificationsMetadata">Notifications metadata</a></li>
+ <li><a href="#Recents">Concurrent documents and activities in Recents screen</a></li>
+ <li><a href="#WebView">WebView updates</a></li>
+ </ol>
+ </li>
+ <li><a href="#UserInput">User Input</a>
+ <ol>
+ <li><a href="#IME">IME bug fixes and improvements</a></li>
+ </ol>
+ </li>
+ <li><a href="#Animations">Animation & Graphics</a>
+ <ol>
+ <li><a href="#OpenGLES-3-1">Support for OpenGL ES 3.1</a></li>
+ </ol>
+ </li>
+ <li><a href="#Multimedia">Multimedia</a>
+ <ol>
+ <li><a href="#Camera-v2">Camera V2</a></li>
+ <li><a href="#AudioPlayback">Audio playback</a></li>
+ <li><a href="#MediaPlaybackControl">Media playback control</a></li>
+ </ol>
+ </li>
+ <li><a href="#Storage">Storage</a>
+ <ol>
+ <li><a href="#DirectorySelection">Directory selection</a></li>
+ </ol>
+ </li>
+ <li><a href="#Wireless">Wireless and Connectivity</a>
+ <ol>
+ <li><a href="#Multinetwork">Dynamic network selection and seamless handoff</a></li>
+ <li><a href="#BluetoothBroadcasting">Bluetooth broadcasting</a></li>
+ <li><a href="#NFCEnhancements">NFC enhancements for payments</a></li>
+ </ol>
+ </li>
+ <li><a href="#Power">Power Efficiency</a>
+ <ol>
+ <li><a href="#JobScheduler">Scheduling Jobs</a></li>
+ <li><a href="#PowerMeasurementTools">Developer tools and APIs for power measurement</a>
+ </ol>
+ </li>
+ <li><a href="#Enterprise">Enterprise</a>
+ <ol>
+ <li><a href="#ManagedProvisioning">Managed provisioning</a></li>
+ </ol>
+ </li>
+ <li><a href="#Printing">Printing Framework</a>
+ <ol>
+ <li><a href="#PDFRender">PDF rendering</a></li>
+ </ol>
+ </li>
+ <li><a href="#TestingA11y">Testing & Accessibility</a>
+ <ol>
+ <li><a href="#TestingA11yImprovements">Testing and accessibility improvements</a></li>
+ </ol>
+ </li>
+ <li><a href="#Manifest">Manifest Declarations</a>
+ <ol>
+ <li><a href="#ManifestFeatures">Declarable required features</a></li>
+ <li><a href="#ManifestPermissions">User permissions</a></li>
+ </ol>
+ </li>
+</ol>
+
+<h2>See also</h2>
+<ol>
+<li><a href="{@docRoot}sdk/api_diff/20/changes.html">API
+Differences Report »</a> </li>
+</ol>
+
+</div>
+</div>
+
+<p>L is an upcoming release for the Android platform
+that offers new features for users and app developers. This document provides
+an introduction to the most notable new APIs.</p>
+
+<p>L is currently available as a <strong>developer preview</strong> intended
+for early adopters and testers. If you are interested in influencing the
+direction of the Android framework,
+<a href="{@docRoot}preview/setup-sdk.html">give the L Developer Preview a
+try</a> and send us your feedback!</p>
+
+<p class="caution"><strong>Caution:</strong>You should not publish apps
+using L Developer Preview to the Google Play store.</p>
+
+<h2 id="Behaviors">Important Behavior Changes</h2>
+
+<p>If you have previously published an app for Android, be aware that your app
+ might be affected by changes in L.</p>
+
+<h3 id="BehaviorNotifications">If your app implements notifications...</h3>
+
+<p>Notifications will be drawn with dark text atop white (or very light)
+backgrounds to match the new material design widgets. Make sure that all your
+notifications look right with the new color scheme. You should remove or update
+assets and text styles that involve color. The system will automatically invert
+action icons in notifications. Use
+{@code android.app.Notification.Builder.setColor()} to set an accent color
+in a circle behind your {@code Notification.icon} image.</p>
+
+<p>The system will ignore all non-alpha channels in action icons and the main
+notification icon, so you should assume that these icons will be alpha-only.
+</p>
+
+<p>If you are currently adding sounds and vibrations to your notifications by
+using the {@link android.media.Ringtone}, {@link android.media.MediaPlayer},
+or {@link android.os.Vibrator} classes, make sure to remove this code so that
+the system can present notifications correctly in Do not disturb mode. You
+should use the {@link android.app.Notification.Builder} methods instead to add
+sounds and vibration.
+</p>
+
+<h3 id="BehaviorMediaControl">If your app uses RemoteControlClient...</h3>
+
+<p>Lockscreens in L will not show transport controls for your
+{@link android.media.RemoteControlClient}. Instead, your app can provide
+media playback control from the lockscreen through a media notification. This
+gives your app more control over the presentation of media buttons, while
+providing a consistent experience for users across the lockscreen and
+unlocked device.</p>
+
+<p>You must call {@code Notification.Builder.setVisibility(Notification.VISIBILITY_PUBLIC)} to mark your media notification as safe to reveal, even when the lockscreen is secured
+with a PIN, pattern, or password.</p>
+
+<h3 id="BehaviorFullscreen">If your app uses fullScreenIntent...</h3>
+
+<p>Notifications now appear in a small floating window if all these conditions
+are met: the user’s activity is in fullscreen mode, the screen is on, and the
+device is unlocked. If your app implements fullscreen activities, make sure that
+these heads-up notifications are presented correctly.</p>
+
+<h3 id="BehaviorGetRecentTasks">If your app uses ActivityManager.getRecentTasks()...</h3>
+
+<p>With the introduction of the new document tasks feature in L (see below),
+the {@code android.app.ActivityManager.getRecentTasks()} method is now
+deprecated to improve user privacy. For backwards
+compatibility, it will still return a small subset of its data including the
+calling application’s own tasks and possibly some other non-sensitive tasks
+such as home. If your app is using this method to retrieve its own tasks,
+use {@code android.app.ActivityManager.getAppTasks()} instead to retrieve that
+information.</p>
+
+<h2 id="UI">User Interface</h2>
+
+<h3 id="MaterialDesign">Material design support</h3>
+
+<p>The L Developer Preview adds support for the material design style. You can create
+material design apps that are visually dynamic and have UI element transitions
+which feel natural and delightful to users. This support includes:</p>
+<ul>
+ <li>The Material theme</li>
+ <li>View shadows</li>
+ <li>The {@code RecyclerView} widget</li>
+ <li>Drawable animation and styling effects</li>
+ <li>Material design animation and activity transition effects</li>
+ <li>Animators for view properties based on the state of a view</li>
+ <li>Customizable UI widgets and app bars with color palettes that you control</li>
+</ul>
+<p>To learn more about adding material design functionality to your app, see
+<a href="{@docRoot}preview/material/index.html">Material design on Android</a>.</p>
+
+<h3 id="LockscreenNotifications">Lockscreen notifications</h3>
+<p>Lockscreens in the L Developer Preview have the ability to present notifications.
+Users can choose via <em>Settings</em> whether to allow sensitive notification
+content to be shown over a secure lockscreen.</p>
+
+<p>Your app can control the level of detail visible when its notifications are
+displayed over the secure lockscreen. To control the visibility level, call
+{@code android.app.Notification.Builder.setVisibility()} and specify one of these
+values:</p>
+<ul>
+<li>{@code VISIBILITY_PRIVATE}. Shows basic information, such as the
+notification’s icon, but hides the notification’s full content. If you want to
+provide a redacted public version of your notification for the system to display
+on a secure lockscreen, set the public notification object in the <code>publicVersion</code>
+field.</li>
+<li>{@code VISIBILITY_PUBLIC}. Shows the notification’s full content. This is
+ the system default if visibility is left unspecified.</li>
+<li>{@code VISIBILITY_SECRET}. Shows only the most minimal information,
+excluding even the notification’s icon.</li>
+</ul>
+
+<h3 id="NotificationsMetadata">Notifications metadata</h3>
+<p>The L Developer Preview uses metadata associated with your app notifications
+to more intelligently sort your notifications. The metadata you set also
+controls how the system presents your app notifications when the user is in <em>Do
+not disturb</em> mode. When constructing your notification, you can call the
+following methods in {@code android.app.Notification.Builder}:</p>
+
+<ul>
+<li>{@code setCategory()}. Allows the system to handle your app notifications
+in <em>Do not disturb mode</em> (for example, if your notification represents an
+incoming call, instant message, or alarm).</li>
+<li>{@code setPriority()}. Notifications with the priority field set to
+{@code PRIORITY_MAX} or {@code PRIORITY_HIGH} will appear in a small floating
+window if the notification also has sound or vibration.</li>
+<li>{@code addPerson()}. Allows you to add a list of people to a notification.
+Your app can use this to signal to the system that it should group together
+notifications from the specified people, or rank notifications from these
+people as being more important.</li>
+</ul>
+
+<h3 id="Recents">Concurrent documents and activities in the Recents screen</h3>
+
+<p>In previous releases, the
+<a href="{@docRoot}design/get-started/ui-overview.html">Recents screen</a>
+could only display a single task for each app that the user interacted with
+most recently. The L Developer Preview allows your app to open additional tasks
+for concurrent activities or documents. This feature facilitates multitasking
+by letting users quickly switch between individual activities and documents
+from the Recents screen. Examples of such concurrent tasks might include web
+pages in a browser app, documents in a productivity app, concurrent matches in
+a game, or chats in a messaging app. Your app can manage its tasks
+through the {@code android.app.ActivityManager.AppTask} class.</p>
+
+<p>To insert a logical break so that the system treats your activity as a new
+document, use {@code android.content.Intent.FLAG_ACTIVITY_NEW_DOCUMENT} when
+launching the activity with {@link android.app.Activity#startActivity(android.content.Intent) startActivity()}. You can also get this behavior by declaring the
+<a href="{@docRoot}guide/topics/manifest/activity-element.html"><activity></a>
+attribute {@code documentLaunchMode="intoExisting"} or {@code ="always"} in your
+manifest.</p>
+
+<p>You can also mark that a task should be removed from the Recents screen
+when all its activities are closed by using {@code android.content.Intent.FLAG_ACTIVITY_AUTO_REMOVE_FROM_RECENTS} when starting the root activity for
+the task. You can also set this behavior for an activity by declaring the
+<a href="{@docRoot}guide/topics/manifest/activity-element.html"><activity></a>
+attribute {@code autoRemoveFromRecents=“true”} in your manifest.</p>
+
+<p>To avoid cluttering the Recents screen, you can set the maximum number of
+tasks from your app that can appear in the Recents screen through the
+<a href="{@docRoot}guide/topics/manifest/application-element.html"><application></a> attribute {@code android:maxRecent}. The current maximum that can be specified
+is 100 tasks per user.</a></p>
+
+<h3 id="WebView">WebView updates</h3>
+<p>The L Developer Preview updates the {@link android.webkit.WebView}
+implementation to Chromium M36, bringing security and stability enhancements,
+as well as bug fixes. The default user-agent string for a
+{@link android.webkit.WebView} running on the L Developer Preview has
+been updated to incorporate 36.0.0.0 as the version number.</p>
+
+<p>Additionally, this release brings support for the
+<a href="https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html">WebAudio</a>, <a href="https://www.khronos.org/webgl/">WebGL</a>, and
+<a href="http://www.webrtc.org/">WebRTC</a> open standards. To learn more about
+the new features included in this release, see <a href="https://developer.chrome.com/multidevice/webview/overview">WebView for Android</a>.</p>
+
+<h2 id="UserInput">User Input</h2>
+
+<h3 id="IME">IME bug fixes and improvements</h3>
+
+<p>Beginning in the L Developer Preview, users can more easily switch between
+all input method editors (IME) <a href="{@docRoot}guide/topics/text/creating-input-method.html">supported by the platform</a>. Performing the designated
+switching action (usually touching a Globe icon on the soft keyboard) will cycle
+among all such IMEs. This change takes place in
+{@code android.view.inputmethod.InputMethodManager.shouldOfferSwitchingToNextInputMethod()}.</p>
+
+<p>In addition, the framework will now check whether the next IME includes a
+switching mechanism at all, thus supporting switching to the IME after it. An
+IME with a switching mechanism will not cycle to an IME without one. This
+change takes place in
+{@code android.view.inputmethod.InputMethodManager.switchToNextInputMethod()}.
+
+<p>To see an example of how to use the updated IME-switching APIs, refer to the
+updated soft-keyboard implementation sample in this release.</p>
+
+<h2 id="Animations">Animation & Graphics</h2>
+
+<h3 id="OpenGLES-3-1">Support for OpenGL ES 3.1</h3>
+<p>The L Developer Preview adds Java interfaces and native support for OpenGL
+ES 3.1. Key new functionality provided in OpenGL ES 3.1 includes:</p>
+
+<ul>
+<li>Compute shaders
+<li>Separate shader objects
+<li>Indirect draw commands
+<li>Enhanced texturing functionality
+<li>Shading language improvements
+<li>Optional extensions for per-sample shading, advanced blending modes, and more
+<li>Backward compatibility with OpenGL ES 2.0 and 3.0
+</ul>
+
+<p>The Java interface for OpenGL ES 3.1 on Android is provided with GLES31. When using OpenGL ES 3.1, be sure that you declare it in your manifest file with the
+<a href="{@docRoot}guide/topics/manifest/uses-feature-element.html">{@code <uses-feature>}</a> tag and the {@code android:glEsVversion} attribute. For example:</p>
+
+<pre>
+<manifest>
+ <uses-feature android:glEsVersion="0x00030001" />
+ ...
+</manifest>
+</pre>
+
+<p>For more information about using OpenGL ES, including how to check the device’s supported OpenGL ES version at runtime, see the <a href="{@docRoot}/guide/topics/graphics/opengl.html">OpenGL ES API guide</a>.</p>
+
+<h2 id="Multimedia">Multimedia</h2>
+
+<h3 id="Camera=v2">Camera v2 API</h3>
+
+<p>The L Developer Preview introduces the new {@code android.hardware.camera2}
+API to facilitate fine grain photo capture and image processing. You can now programmatically access the camera devices available to the system with {@code CameraManager.getCameraIdList()} and connect to a specific device with {@code CameraManager.openCamera()}. To start capturing images, you
+need to create a {@code CameraCaptureSession} and specify the
+{@link android.view.Surface} objects to send the captured images. The {@code CameraCaptureSession} can be configured to take single shots or multiple images
+in a burst.</p>
+
+<p>To be notified when new images are captured, implement the
+{@code CameraCaptureSession.CaptureListener()} interface and set it in your
+capture request. Now when the system completes the image capture request, your
+{@code CameraCaptureSession.CaptureListener()} receives a call to
+{@code onCaptureCompleted()}, providing you with the image capture metadata in a
+{@code CaptureResult}.</p>
+
+<h3 id="AudioPlayback">Audio playback</h3>
+<p>This release includes the following changes for
+ {@code android.media.AudioTrack}:</p>
+<ul>
+ <li>Your app can now supply audio data in floating-point format
+({@code android.media.AudioFormat.ENCODING_PCM_FLOAT}). This permits greater
+dynamic range, more consistent precision, and greater headroom. Floating-point arithmetic is especially useful during intermediate calculations. Playback
+end-points use integer format for audio data, and with lower bit-depth. In L
+Developer Preview, portions of the internal pipeline are not yet floating-point.
+ <li>Your app can now supply audio data as a {@code ByteBuffer}, in the same
+format as provided by {@code MediaCodec}.
+ <li>The {@code WRITE_NON_BLOCKING} option can simplify buffering and
+ multithreading for some apps.
+</ul>
+
+<h3 id="MediaPlaybackControl">Media playback control</h3>
+<p>You can now build your own media controller app with the new
+{@code android.media.session.MediaController} class, which provides
+simplified transport controls APIs that replace those in
+{@code android.media.RemoteControlClient}. The {@code MediaController} class
+allows thread-safe control of playback from a non UI process, making it easier
+to control your media playback service from your app’s user interface.
+
+<p>You can also create multiple controllers to send playback commands,
+media keys, and other events to the same ongoing
+{@code android.media.session.MediaSession}. When you add a controller, you must
+call {@code MediaSession.getSessionToken()} to request an access
+token in order for your app to interact with the session.</p>
+
+<p>Send transport commands such as "play", "stop", "skip", and
+"set rating" by using {@code MediaController.TransportControls}. To handle
+in-bound media transport commands from controllers attached to the session, you
+should override the callback methods in
+{@code MediaSession.TransportControlsCallback}.</p>
+
+<p>You can also create rich notifications that allow playback control tied to a
+media session with the new {@code android.app.Notification.MediaStyle} class.</p>
+
+<h2 id="Storage">Storage</h2>
+
+<h3 id="DirectorySelection">Directory selection</h3>
+
+<p>The L Developer Preview extends the <a href="{@docRoot}guide/topics/providers/document-provider.html">Storage Access Framework</a> to let users
+select an entire directory, rather than individual files, to give your app
+read/write access to media files. When a directory is selected, your app also
+has access to all its child directories and content.</p>
+
+<p>To get the absolute paths to directories on external storage devices where
+applications can store media files, call the
+{@code android.content.Context.getExternalMediaDirs()} method. No additional
+permissions are needed by your app to read or write to the returned paths.
+External storage devices here are those considered by the system to be a
+permanent part of the device, and includes emulated external storage and
+physical media slots such as SD cards in battery compartments.</p>
+
+<p>If you want to access a document in an existing directory, call the
+{@code android.provider.DocumentsContract.buildDocumentViaUri()} method and pass
+in a Uri representing the path to the parent directory and the target document
+ID. The method returns a new {@link android.net.Uri} with which your app can
+use to write media content with {@code DocumentsContract.createDocument()}.
+
+<h2 id="Wireless">Wireless & Connectivity</h2>
+
+<h3 id="Multinetwork">Dynamic network selection and seamless handoff</h3>
+<p>The L Developer Preview provides new multi-networking APIs for your app to
+dynamically scan for available networks with specific capabilities, and
+establish a connection to them. This is useful when your app requires a
+specialized network, such as an SUPL, MMS, or carrier-billing network, or if
+you want to send data using a particular type of transport protocol.</p>
+
+<p>To select and connect to a network dynamically from your app, first
+instantiate a {@code android.net.ConnectivityManager}. Next, create a
+{@code android.net.NetworkRequest} to specify the network features and transport
+type your app is interested in. To start scanning for suitable networks, call
+{@code ConnectivityManager.requestNetwork()} or
+{@code ConnectivityManager.registerNetworkCallback(), and pass in the
+{@code NetworkRequest} object and an implementation of
+{@code ConnectivityManager.NetworkCallbackListener}.</p>
+
+<p>When the system detects a suitable network, it connects to the network and
+invokes the {@code NetworkCallbackListener.onAvailable()} callback. You can use
+the {@code android.net.Network} object from the callback to get additional
+information about the network, or to establish a socket connection.</p>
+
+<h3 id="BluetoothBroadcasting">Bluetooth broadcasting</h3>
+<p>Android 4.3 introduced platform support for <a href="{@docRoot}guide/topics/connectivity/bluetooth-le.html">Bluetooth Low Energy</a>
+(BLE) in the central role. In the L Developer Preview, an Android device can now
+act as a Bluetooth LE <em>peripheral device</em> and make its presence known to
+nearby devices. For instance, you can build apps that allow a device to
+function as a pedometer or health monitor and communicate its data with another
+BLE device.</p>
+
+<p>The new {@code android.bluetooth.le} APIs enable your apps to broadcast advertisements, scan for responses, and form connections with nearby BLE devices.
+You must add the {@code android.permission.BLUETOOTH_ADMIN} permission in your
+manifest in order for your app to use the new advertising and scanning features.</a>
+
+<p>To begin Bluetooth LE advertising so that other devices can discover the
+device running your app, call {@code android.bluetooth.le.BluetoothAdvertiser.startAdvisertising()} and pass in an implementation of the
+{@code android.bluetooth.le.AdvertiseCallback} class to report the success
+or failure of the advertising operation.</p>
+
+<p>Conversely, if you want to scan for Bluetooth LE devices nearby, call
+{@code android.bluetooth.le.BluetoothLeScanner.startScan()} and pass in an
+implementation of {@code android.bluetooth.le.ScanCallback} to report if a
+Bluetooth LE advertisement is found. Optionally, you can pass in filters to scan
+for a specific type of device.</p>
+
+<h3 id="NFCEnhancements">NFC enhancements</h3>
+<p>The L Developer Preview adds these enhancements to enable wider and more
+flexible use of NFC:</p>
+
+<ul>
+<li>Android Beam is now available in the share menu.
+<li>Support for the <a href="http://www.wi-fi.org/discover-wi-fi/wi-fi-direct">Wi-fi Direct standard</a>.
+<li>Your app can invoke the Android Beam on the user’s device to share data by
+calling {@code android.nfc.NfcAdapter.invokeBeam()}. This avoids the need for
+the user to manually tap the device against another NFC-capable device to
+complete the data transfer.
+<li>Use the new {@code android.nfc.NdefRecord.createTextRecord()} method if
+ you want to create an NDEF record containing UTF-8 text data.
+<li>If you are developing a payment app, you now have the ability to
+register an NFC application ID (AID) dynamically by calling
+{@code android.nfc.cardemulation.CardEmulation.registerAidsForService()}.
+You can also use {@code android.nfc.cardemulation.CardEmulation.setPreferredService()}
+to set the preferred card emulation service that should be used when a specific
+activity is in the foreground.
+</ul>
+
+<h2 id="Power">Power Efficiency</h2>
+
+<h3 id="JobScheduler">Scheduling jobs</h3>
+<p>The L Developer Preview provides a new {@code android.app.job.JobScheduler}
+API that lets you optimize battery life by defining jobs for the system to run
+asynchronously at a later time, such as when the device is charging. This is
+useful when you want to defer non user-facing units of work, have application
+code that accesses the network, or want to run a number of tasks as a batch on
+a regular schedule.</p>
+
+<p>A {@code android.app.job.JobInfo} object encapsulates such a unit of work,
+and provides an exact description of the criteria you are scheduling.</p>
+
+<p>Use the {@code android.app.job.JobInfo.Builder} to configure how the
+scheduled task should run. You can schedule the task to run under specific
+conditions such as only while the device is charging, when connected to an
+unmetered network, or when the system deems the device is idle.</p>
+
+<p>For example, you can add code like this to run your task on an
+unmetered network:</p>
+
+<pre>
+JobInfo uploadTask = new JobInfo.Builder(mJobId, mServiceComponent)
+ .setRequiredNetworkCapabilities(JobInfo.NetworkType.UNMETERED)
+ .build();
+
+JobScheduler jobScheduler =
+ (JobScheduler) context.getSystemService(Context.JOB_SCHEDULER_SERVICE)
+jobScheduler.schedule(uploadTask);
+</pre>
+
+<h3 id="PowerMeasurementTools">Developer tools and APIs for power measurement</h3>
+<p>The L Developer Preview provides several new developer tools and APIs to help
+you better measure and understand your app's power usage.</p>
+
+<dl>
+<dt><strong>batterystats</strong></dt>
+<dd>
+<p>The {@code dumpsys batterystats} command allows you to generate interesting
+statistical data about battery usage on a device, organized by unique user ID
+(UID). The statistics generated by the tool include:</p>
+
+<ul>
+<li>History of battery related events
+<li>Global statistics for the device
+<li>Approximated power use per UID and system component
+<li>Per-app mobile ms per packet
+<li>System UID aggregated statistics
+<li>App UID aggregated statistics
+</ul>
+
+<p>Use the {@code --help} option to learn about the various options for
+tailoring the output. For example, to run the tool to print battery usage
+statistics since the device was last charged for a given app package, run this
+command:
+<pre>
+$ adb shell dumpsys batterystats --charged <package-name>
+</pre>
+</dd>
+
+<dt><strong>Battery Historian</strong></dt>
+<dd>
+<p>The Battery Historian tool ({@code historian.par}) analyzes L-based Android
+bug reports and creates an HTML visualization of power-related events. It can
+also visualize power consumption data from a power monitor, and will attempt to
+map power usage to the wakelocks seen. You can find the Battery Historian tool
+in {@code <sdk>/tools}.</p>
+
+<p>For best results, you should first enable full wakelock reporting to allow
+the Battery Historian tool to monitor uninterrupted over an extended period of
+time:</p>
+<pre>
+$ adb shell dumpsys batterystats --enable full-wake-history
+</pre>
+
+<p>You should also reset battery statistics at the beginning of a
+measurement:</p>
+<pre>
+$ adb shell dumpsys batterystats --reset
+</pre>
+
+<p>To generate an HTML visualization:</p>
+<pre>
+$ historian.par [-p powerfile] bugreport.txt > out.html
+</pre>
+</dd>
+
+<dt><strong>On-device power management</strong></dt>
+<dd>
+<p>You can use the {@code android.os.BatteryManager} API to obtain power
+consumption information based on the battery fuel gauge included in Android
+phones and tablets. This is useful in cases when it is not convenient to
+connect external measurement equipment to the Android device.</p>
+<p>To retrieve the battery properties, call {@code BatteryManager.getIntProperty()}
+or {@code BatteryManager.getLongProperty()}. The properties available, the
+exact resolution of the values of each, and other characteristics such as
+update frequency depend on the particular device being tested.</p>
+
+<p>The following properties can be inspected on all Android devices:</p>
+
+<table>
+ <tr>
+ <th>Property</th>
+ <th>Description</th>
+ </tr>
+ <tr>
+ <td>{@code BatteryManager.BATTERY_PROPERTY_CHARGE_COUNTER}</td>
+ <td>Remaining battery capacity in microampere-hours.</td>
+ </tr>
+ <tr>
+ <td>{@code BatteryManager.BATTERY_PROPERTY_CURRENT_NOW}</td>
+ <td>Instantaneous battery current in microamperes.</td>
+ </tr>
+ <tr>
+ <td>{@code BatteryManager.BATTERY_PROPERTY_CURRENT_AVERAGE}</td>
+ <td>Average battery current in microamperes</td>
+ </tr>
+ <tr>
+ <td>{@code BatteryManager.BATTERY_PROPERTY_CAPACITY}</td>
+ <td>Remaining battery capacity as an integer percentage.</td>
+ </tr>
+ <tr>
+ <td>{@code BatteryManager.BATTERY_PROPERTY_ENERGY_COUNTER}</td>
+ <td>Remaining energy in nanowatt-hours.</td>
+ </tr>
+</table>
+<dd>
+</dl>
+
+<h2 id="Enterprise">Enterprise</h2>
+<h3 id="ManagedProvisioning">Managed provisioning</h3>
+
+<p>The L Developer Preview provides new functionality for running apps within
+an enterprise environment:</p>
+<ul>
+<li><strong>Create managed user profiles</strong>. A device administrator can
+initiate a managed provisioning process to enroll a user device with an
+existing personal account into a co-present but separate managed profile that
+the administrator controls.
+<li><strong>Set device owner scope</strong>. Device administrators can also
+apply managed provisioning to configure a device that has no previous user
+accounts installed, so that they have full control over the device.
+</ul>
+
+<p>To start the manged provisioning process, send
+{@code ACTION_PROVISION_MANAGED_PROFILE} in an {@link android.content.Intent}. A
+user may be associated with more than one managed profile. To get a list of the
+managed profiles associated with the user, call
+{@code android.os.UserManager.getUserProfiles()}.</p>
+
+<p>Once a managed profile is created for a user, apps that are managed by the
+device administrator will appear alongside non-managed apps in the user’s
+Launcher, Recent apps screen, and notifications. A device policy management app
+can make the managed apps visually prominent by appending a “work” badge to the
+icon drawable with {@code android.os.UserManager.getBadgeDrawableForUser()}.</p>
+
+<p>If you are developing a Launcher app, you can use the new {@code android.content.pm.LauncherApps} class to get a list of launchable activities for the current user
+and any associated managed profiles.</p>
+
+<h2 id="Printing">Printing Framework</h2>
+
+<h3 id="PDFRender">Render PDF as bitmap</h3>
+<p>You can now render PDF document pages into bitmap images for printing by
+using the new {@code android.graphics.pdf.PdfRenderer} class. You must specify a
+{@code ParcelFileDescriptor} that is seekable (that is, the file can be randomly
+accessed) on which the system writes the the printable content. Your app can
+obtain a page for rendering with {@code openPage()}, then call {@code render()}
+to turn the opened {@code PdfRenderer.Page} into a bitmap. You can also set
+additional parameters if you only wan to convert a portion of the document into
+a bitmap image (for example, to implement <a href="http://en.wikipedia.org/wiki/Tiled_rendering">tile rendering</a> in order to zoom in on the document).</p>
+
+<h2 id="TestingA11y">Testing & Accessibility </h2>
+
+<h3 id="Testing A11yImprovements">Testing and accessibility improvements</h3>
+<p>The L Developer Preview adds the following support for testing and
+accessibility:</p>
+
+<ul>
+<li>You can use the new {@code android.app.UiAutomation.getWindowAnimationFrameStats()}
+and {@code android.app.UiAutomation.getWindowContentFrameStats()} methods to
+capture frame statistics for window animations and content. This lets you
+write instrumentation tests to evaluate if the app under test is rendering
+frames at a sufficient refresh frequency to provide a smooth user experience.
+<li>You can execute shell commands from your instrumentation test with the new
+{@code android.app.UiAutomation.executeShellCommand()}. The command execution
+is similar to running 'adb shell' from a host connected to the device. This
+allows you to use shell based tools such as {@code dumpsys}, {@code am},
+{@code content}, and {@code pm}.
+<li>Accessibility services and test tools that use the accessibility APIs
+(such as <a href="{@docRoot}tools/help/uiautomator/index.html">UiAutomator</a>)
+can now retrieve detailed information about the properties of windows on the
+screen that sighted users can interact with. To retrieve a list of
+{@code android.view.accessibility.AccessibilityWindowInfo} representing the
+windows information, call the new
+{@code android.accessibilityservice.AccessibilityService.getWindows()} method.
+<li>You can use the new {@code android.view.accessibility.AccessibilityNodeInfo.AccessibilityAction} to define standard or customized
+actions to perform on an {@code android.view.accessibility.AccessibilityNodeInfo}.
+The new {@code AccessibilityAction} class replaces the actions-related APIs
+previously found in {@code AccessibilityNodeInfo}.
+</ul>
+
+<h2 id="manifest">Manifest Declarations</h2>
+
+<h3 id="ManifestFeatures">Declarable required features</h3>
+<p>The following values are now supported in the <a href="{@docRoot}guide/topics/manifest/uses-feature-element.html">{@code <uses-feature>}</a> element so you
+can ensure that your app is installed only on devices that provide the features
+your app needs.</p>
+
+<ul>
+<li>{@code FEATURE_LEANBACK}. Declares that your app must be installed only on devices that support the <a href="{@docRoot}tv}">Android TV</a> user interface. Example:
+<pre>
+<uses-feature android:name="android.software.leanback"
+ android:required="true" />
+</pre>
+
+<li>{@code FEATURE_MANAGEDPROFILES}. Declares that your app must only be installed on devices that support managed profiles for enterprise users. Example:
+<pre>
+<uses-feature android:name="android.software.managedprofiles"
+ android:required="true" />
+</pre>
+<li>{@code FEATURE_WEBVIEW}. Declares that your app must only be installed on devices that fully implement the android.webkit.* APIs. Example:
+<pre>
+<uses-feature android:name="android.software.webview"
+ android:required="true" />
+</pre>
+</ul>
+
+<h3 id="ManifestPermissions">User permissions</h3>
+<p>The following values are now supported in the <a href="{@docRoot}guide/topics/manifest/uses-permission-element.html">{@code <uses-permission>}</a> to declare the
+permissions your app requires in order to access certain APIs.
+
+<ul>
+<li>{@code SIM_COMMUNICATION}. Required to communicate with a SIM card using
+ logical channels.
+</ul>
diff --git a/docs/html/preview/images/android.png b/docs/html/preview/images/android.png
new file mode 100644
index 0000000..3aeaa98
--- /dev/null
+++ b/docs/html/preview/images/android.png
Binary files differ
diff --git a/docs/html/preview/images/art.png b/docs/html/preview/images/art.png
new file mode 100644
index 0000000..c48f039
--- /dev/null
+++ b/docs/html/preview/images/art.png
Binary files differ
diff --git a/docs/html/preview/images/bugs.png b/docs/html/preview/images/bugs.png
new file mode 100644
index 0000000..46adf056
--- /dev/null
+++ b/docs/html/preview/images/bugs.png
Binary files differ
diff --git a/docs/html/preview/images/hero.jpg b/docs/html/preview/images/hero.jpg
new file mode 100644
index 0000000..1c52989
--- /dev/null
+++ b/docs/html/preview/images/hero.jpg
Binary files differ
diff --git a/docs/html/preview/images/material.png b/docs/html/preview/images/material.png
new file mode 100644
index 0000000..2d807d4
--- /dev/null
+++ b/docs/html/preview/images/material.png
Binary files differ
diff --git a/docs/html/preview/images/notifications.png b/docs/html/preview/images/notifications.png
new file mode 100644
index 0000000..2fb2fea
--- /dev/null
+++ b/docs/html/preview/images/notifications.png
Binary files differ
diff --git a/docs/html/preview/images/updates.png b/docs/html/preview/images/updates.png
new file mode 100644
index 0000000..f165c5a
--- /dev/null
+++ b/docs/html/preview/images/updates.png
Binary files differ
diff --git a/docs/html/preview/images/volta.png b/docs/html/preview/images/volta.png
new file mode 100644
index 0000000..9125081
--- /dev/null
+++ b/docs/html/preview/images/volta.png
Binary files differ
diff --git a/docs/html/preview/index.jd b/docs/html/preview/index.jd
new file mode 100644
index 0000000..e44e9f3
--- /dev/null
+++ b/docs/html/preview/index.jd
@@ -0,0 +1,236 @@
+page.title=Android L Developer Preview
+page.viewport_width=970
+fullpage=true
+no_footer_links=true
+page.type=about
+page.metaDescription=Test and build your apps against the next version of Android to ensure they're ready when the platform officially launches.
+page.image={@docRoot}preview/images/hero.jpg
+@jd:body
+
+<style>
+.fullpage>#footer,
+#jd-content>.content-footer.wrap {
+ display:none;
+}
+</style>
+
+<style>
+#footer {
+ display: none;
+}
+.content-footer {
+ display: none;
+}
+</style>
+
+<div class="landing-body-content">
+ <div class="landing-hero-container">
+ <div class="landing-section preview-hero">
+ <div class="landing-hero-scrim"></div>
+ <div class="landing-hero-wrap">
+ <div class="vertical-center-outer">
+ <div class="vertical-center-inner">
+
+ <div class="col-12">
+ <div class="landing-section-header">
+
+ <div class="landing-h1 hero">L Developer Preview</div>
+ <div class="landing-subhead hero">
+ <p>An early look at the next release</p>
+ </div>
+ <div class="landing-hero-description">
+ <p>Test and build your apps against the next<br />
+ version of Android to ensure they're ready<br/>
+ when the platform officially launches.</p>
+ </div>
+
+ <div class="landing-body">
+ <a href="/preview/setup-sdk.html" class="landing-button landing-primary" style="margin-top: 40px;">
+ Get Started
+ </a>
+ </div>
+ </div>
+
+ </div>
+ </div>
+ </div> <!-- end .wrap -->
+ <div class="landing-scroll-down-affordance">
+ <a class="landing-down-arrow" href="#extending-android-to-landingables">
+ <img src="/wear/images/carrot.png" alt="Scroll down to read more">
+ </a>
+ </div>
+ </div> <!-- end .landing-section .landing-hero -->
+ </div> <!-- end .landing-hero-container -->
+
+
+ <div class="landing-rest-of-page">
+ <div class="landing-section" id="extending-android-to-landingables">
+ <div class="wrap">
+ <div class="landing-section-header">
+ <div class="landing-h1">See What's New</div>
+ <div class="landing-subhead">
+ Take advantage of all the new capabilities, which are focused on design and performance.
+ </div>
+ </div>
+
+ <div class="landing-body">
+
+ <div class="landing-breakout cols">
+ <div class="col-4">
+ <img src="/preview/images/material.png" style="opacity:.6" alt="">
+ <p>A New UI Design</p>
+ <p class="landing-small">
+ Create a consistent experience across mobile and the web with
+ material design, the new Google-wide standard.
+ </p>
+ <p class="landing-small">
+ <a href="/preview/material/index.html">Learn about material</a>
+ </p>
+ </div>
+ <div class="col-4">
+ <img src="/preview/images/art.png" alt="">
+ <p>A Rehauled Runtime</p>
+ <p class="landing-small">
+ Test your apps and get them ready for <b>ART</b> (<b>A</b>ndroid <b>R</b>un<b>t</b>ime),
+ the default runtime in the next release.
+
+ </p>
+ <p class="landing-small">
+ <a href="/preview/api-overview.html#ART">Learn about ART</a>
+ </p>
+ </div>
+ <div class="col-4">
+ <img src="/preview/images/notifications.png" alt="">
+ <p style="width:230px">Enhanced Notifications</p>
+ <p class="landing-small">
+ Get more control over where notifications appear,
+ how they look, and automatic syncing to non-handheld devices.
+ </p>
+ <p class="landing-small">
+ <a href="/preview/api-overview.html#UI">Learn more</a>
+ </p>
+ </div>
+ <div class="col-4">
+ <img src="/preview/images/volta.png" alt="">
+ <p>Project Volta</p>
+ <p class="landing-small">
+ We've tuned the platform to be more energy efficient and
+ to give you more control over resource usage.
+ </p>
+ <p class="landing-small">
+ <a href="/preview/api-overview.html#Power">Learn more</a>
+ </p>
+ </div>
+ </div>
+ <p>See the <a href="{@docRoot}preview/api-overview.html">API overview</a> for more information
+ on the rest of the new and updated features.</p>
+ </div>
+ </div> <!-- end .wrap -->
+ </div> <!-- end .landing-section -->
+
+
+
+ <div class="landing-section landing-gray-background">
+ <div class="wrap">
+ <div class="landing-section-header">
+ <div class="landing-h1">Get Your Apps Ready</div>
+ <div class="landing-subhead">
+ <p>We're giving you an early look at the SDK, so you can test your apps and build in new features.</p>
+ </div>
+ </div>
+ <div class="landing-body">
+ <p>You'll get the system images for the Nexus 5, Nexus 7 (v2),
+ and the emulator to take the new platform for a spin. In addition, you'll have
+ access to all the APIs with a preview build of the SDK.
+ </p>
+
+ <p>Check out the getting started, developer guides, and reference documentation
+ for all the information you need to get up and running.</p>
+
+ <a href="/preview/setup-sdk.html" class="landing-button landing-secondary" style="margin-top: 20px;">
+ Get Started
+ </a>
+ </div>
+ </div>
+ </div>
+ <div class="landing-section">
+ <div class="wrap">
+ <div class="cols">
+ <div class="landing-body">
+ <div class="col-3-wide">
+ <a target="_blank" href="http://submit-bugs!">
+ <img class="landing-social-image" src="{@docRoot}preview/images/bugs.png" alt="">
+ </a>
+ <div class="landing-social-copy">
+ <p>Issue Tracker</p>
+ <p class="landing-small">
+ Let us know when you encounter problems, so we can fix them and make
+ the platform better for you and your users.
+ </p><p class="landing-small">
+ <a target="_blank" href="http://submit-bugs!">
+ Report Issues</a>
+ </p>
+ <p></p>
+ </div>
+ </div>
+ <div class="col-3-wide">
+ <a target="_blank" href="http://plus.google.com">
+ <img class="landing-social-image" src="//www.google.com/images/icons/product/gplus-128.png" alt="">
+ </a>
+ <div class="landing-social-copy">
+ <p>Google+ </p>
+ <p class="landing-small">
+ Join the community of Android developers testing out the L Developer Preview and
+ share your thoughts and experiences.
+ </p><p class="landing-small">
+ <a target="_blank" href="http://plus.google.com">
+ Discuss on Google+</a>
+ </p>
+ </div>
+ </div>
+ <div class="col-3-wide">
+ <a target="_blank" href="{@docRoot}preview/release-notes.html">
+ <img class="landing-social-image" src="{@docRoot}preview/images/updates.png" alt="">
+ </a>
+ <div class="landing-social-copy">
+ <p>Support and Updates</p>
+ <p class="landing-small">
+ Updates to the L Developer Preview are delivered
+ in the Android SDK Manager. Check back periodically
+ for news about the changes.
+ </p>
+ <p class="landing-small">
+ <a target="_blank" href="{@docRoot}preview/support.html">Get Support</a>
+ </p>
+ </div>
+ </div>
+ </div>
+ </div>
+ </div> <!-- end .wrap -->
+ </div>
+
+ <div class="content-footer wrap" itemscope="" itemtype="http://schema.org/SiteNavigationElement">
+ <div class="layout-content-col col-16" style="padding-top:4px">
+ <style>#___plusone_0 {float:right !important;}</style>
+ <div class="g-plusone" data-size="medium"></div>
+ </div>
+ </div>
+ <div id="footer" class="wrap" style="width:940px;position:relative;top:-35px;z-index:-1">
+ <div 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>. For details and
+ restrictions, see the <a href="/license.html">Content
+ License</a>.
+ </div>
+ </div>
+ </div> <!-- end landing-body-content -->
+
+ <script>
+ $("a.landing-down-arrow").on("click", function(e) {
+ $("body").animate({
+ scrollTop: $(".preview-hero").height() + 76
+ }, 1000, "easeOutQuint");
+ e.preventDefault();
+ });
+ </script>
\ No newline at end of file
diff --git a/docs/html/preview/material/animations.jd b/docs/html/preview/material/animations.jd
new file mode 100644
index 0000000..cee782a
--- /dev/null
+++ b/docs/html/preview/material/animations.jd
@@ -0,0 +1,378 @@
+page.title=Animations
+
+@jd:body
+
+<div id="qv-wrapper">
+<div id="qv">
+<h2>In this document</h2>
+<ol>
+ <li><a href="#touch">Touch Feedback</a></li>
+ <li><a href="#reveal">Reveal Effect</a></li>
+ <li><a href="#transitions">Activity Transitions</a></li>
+ <li><a href="#curvedmotion">Curved Motion</a></li>
+ <li><a href="#viewstate">View State Changes</a></li>
+ <li><a href="#drawabletint">Drawable Tinting</a></li>
+</ol>
+</div>
+</div>
+
+<p>Animations in material design give users feedback on their actions and provide visual
+continuity as users interact with your app. The material theme provides some default animations
+for buttons and activity transitions, and the Android L Developer Preview provides additional
+APIs that let you customize these animations and create new ones:</p>
+
+<ul>
+<li>Touch feedback</li>
+<li>Reveal effect</li>
+<li>Activity transitions</li>
+<li>Curved motion</li>
+<li>View state changes</li>
+</ul>
+
+
+<h2 id="touch">Touch Feedback</h2>
+
+<p>In the Android L Developer Preview the default touch feedback animations for buttons use the new
+<code>RippleDrawable</code> class, which transitions between different states with a ripple
+effect.</p>
+
+<p>To use this functionality in your custom views, create a <code>RippleDrawable</code> and set
+it as the background of your view. You can define a <code>RippleDrawable</code> as an XML resource
+using the <code>ripple</code> element.</p>
+
+
+<h2 id="reveal">Reveal Effect</h2>
+
+<p>The <code>View.createRevealAnimator</code> method enables you to animate a clipping circle
+to reveal or hide a view.</p>
+
+<p>To reveal a previously invisible view using this effect:</p>
+
+<pre>
+// previously invisible view
+View myView = findViewById(R.id.my_view);
+
+// get the center for the clipping circle
+int cx = (myView.getLeft() + myView.getRight()) / 2;
+int cy = (myView.getTop() + myView.getBottom()) / 2;
+
+// get the final radius for the clipping circle
+int finalRadius = myView.getWidth();
+
+// create and start the animator for this view
+// (the start radius is zero)
+ValueAnimator anim = myView.createRevealAnimator(cx, cy, 0, finalRadius);
+anim.start();
+</pre>
+
+<p>To hide a previously visible view using this effect:</p>
+
+<pre>
+// previously visible view
+final View myView = findViewById(R.id.my_view);
+
+// get the center for the clipping circle
+int cx = (myView.getLeft() + myView.getRight()) / 2;
+int cy = (myView.getTop() + myView.getBottom()) / 2;
+
+// get the initial radius for the clipping circle
+int initialRadius = myView.getWidth();
+
+// create the animation (the final radius is zero)
+ValueAnimator anim = myView.createRevealAnimator(cx, cy, initialRadius, 0);
+
+// make the view invisible when the animation is done
+anim.addListener(new AnimatorListenerAdapter() {
+ @Override
+ public void onAnimationEnd(Animator animation) {
+ super.onAnimationEnd(animation);
+ myView.setVisibility(View.INVISIBLE);
+ }
+});
+
+// start the animation
+anim.start();
+</pre>
+
+
+<h2 id="transitions">Activity Transitions</h2>
+
+<p>The Android L Developer Preview enables your app to customize the default animations for
+activity transitions. You can specify custom animations for enter and exit transitions and for
+transitions of shared elements between activities.</p>
+
+<ul>
+ <li>An <strong>enter</strong> transition determines how views in an activity enter the scene.
+ For example, in the <em>explode</em> enter transition the views enter the scene from outside
+ and fly in towards the center of the screen.</li>
+
+ <li>An <strong>exit</strong> transition determines how views in an activity exit the scene. For
+ example, in the <em>explode</em> exit transition the views exit the scene away from the
+ center.</li>
+
+ <li>A <strong>shared elements</strong> transition determines how views that are shared between
+ two activities transition between these activities. For example, if two activities have the same
+ image in different positions and sizes, the <em>moveImage</em> shared element transition
+ translates and scales the image smoothly between these activities.</li>
+</ul>
+
+<img src="/preview/material/images/SceneTransition.png" alt=""
+ id="figure1" style="width:600px;margin-top:20px"/>
+<p class="img-caption">
+ <strong>Figure 1</strong> - A scene transition with one shared element.
+</p>
+
+<h3>Specify custom transitions</h3>
+
+<p>First, enable window content transitions with the <code>android:windowContentTransitions</code>
+attribute when you define a style that inherits from the material theme:</p>
+
+<pre>
+<style name="BaseAppTheme" parent="android:Theme.Material">
+ <!-- enable window content transitions -->
+ <item name="android:windowContentTransitions">true</item>
+
+ <!-- specify enter and exit transitions -->
+ <item name="android:windowEnterTransition">@transition/explode</item>
+ <item name="android:windowExitTransition">@transition/explode</item>
+
+ <!-- specify shared element transitions -->
+ <item name="android:windowSharedElementEnterTransition">
+ @transition/move_image</item>
+ <item name="android:windowSharedElementExitTransition">
+ @transition/move_image</item>
+</style>
+</pre>
+
+<p>You can also specify enter, exit, and shared element transitions in your style definition.
+The <code>move_image</code> transition in this example is defined as follows:</p>
+
+<pre>
+<!-- res/transition/move_image.xml -->
+<!-- (see also Shared Transitions below) -->
+<transitionSet xmlns:android="http://schemas.android.com/apk/res/android">
+ <moveImage>
+ <targets>
+ <!-- shared view in the first activity -->
+ <target android:targetId="@id/image_small" />
+ <!-- shared view in the second activity -->
+ <target android:targetId="@id/image_big" />
+ </targets>
+ </moveImage>
+</transitionSet>
+</pre>
+
+<p>The <code>moveImage</code> element corresponds to the <code>android.transition.MoveImage</code>
+class. For more information, see the API reference for <code>android.transition.Transition</code>.
+</p>
+
+<p>To enable window content transitions in your code instead, call the
+<code>Window.requestFeature</code> method:</p>
+
+<pre>
+// inside your activity
+getWindow().requestFeature(Window.FEATURE_CONTENT_TRANSITIONS);
+
+// set an exit transition
+getWindow().setExitTransition(new Explode());
+</pre>
+
+<p>To specify transitions in your code, call these methods with a <code>Transition</code>
+object:</p>
+
+<ul>
+ <li><code>Window.setEnterTransition</code></li>
+ <li><code>Window.setExitTransition</code></li>
+ <li><code>Window.setSharedElementEnterTransition</code></li>
+ <li><code>Window.setSharedElementExitTransition</code></li>
+</ul>
+
+<h3>Start an activity using transitions</h3>
+
+<p>If you enable transitions and set an exit transition for an activity, the transition is activated
+when you launch another activity with the <code>startActivity</code> method. If you have set an
+enter transition for the second activity, the transition is also activated when the activity
+starts.</p>
+
+<h3>Shared elements transitions</h3>
+
+<p>To make a screne transition animation between two activities that have a shared element:</p>
+
+<ol>
+<li>Enable window content transitions in your style.</li>
+<li>Specify a shared elements transition in your style.</li>
+<li>Define your transition as an XML resource specifying the IDs of the target views.</li>
+<li>Assign a common name to the shared elements in both layouts with the
+ <code>android:viewName</code> attribute.</li>
+<li>Use the <code>ActivityOptions.makeSceneTransitionAnimation</code> method.</li>
+</ol>
+
+<pre>
+// get the element that receives the click event
+final View imgContainerView = findViewById(R.id.img_container);
+
+// get the common element for the transition in this activity
+final View androidRobotView = findViewById(R.id.android_robot_img);
+
+// define a click listener
+imgContainerView.setOnClickListener(new View.OnClickListener() {
+ @Override
+ public void onClick(View view) {
+ Intent intent = new Intent(this, Activity2.class);
+ // create the transition animation - the images in the layouts
+ // of both activities are defined with android:viewName="robot"
+ ActivityOptions options = ActivityOptions
+ .makeSceneTransitionAnimation(this, androidRobotView, "robot");
+ // start the new activity
+ startActivity(intent, options.toBundle());
+ }
+});
+</pre>
+
+<p>For shared dynamic views that you generate in your code, use the <code>View.setViewName</code>
+method to specify a common element name in both activities.</p>
+
+<h3>Multiple shared elements</h3>
+
+<p>To make a scene transition animation between two activities that have more than one shared
+element, define the shared elements in both layouts with the <code>android:viewName</code>
+attribute (or use the <code>View.setViewName</code> in both activities), and create an
+<code>ActivityOptions</code> object as follows:</p>
+
+<pre>
+ActivityOptions options = ActivityOptions.makeSceneTransitionAnimation(this,
+ new Pair[] {
+ Pair.create(view1, "agreedName1"),
+ Pair.create(view2, "agreedName2"),
+ ...
+ }
+);
+</pre>
+
+
+<h2 id="curvedmotion">Curved Motion</h2>
+
+<p>Animations in material design rely on curves for time interpolation and spatial movement
+patterns. The Android L Developer Preview provides new APIs that enable you to define custom
+timing curves and curved motion patterns for animations.</p>
+
+<p>The <code>PathInterpolator</code> class is a new interpolator based on a Bézier curve or a
+<code>Path</code> object. This interpolator specifies a motion curve in a 1x1 square, with anchor
+points at (0,0) and (1,1) and control points as specified using the constructor arguments. You can
+also define a <code>PathInterpolator</code> as an XML resource:</p>
+
+<pre>
+<pathInterpolator xmlns:android="http://schemas.android.com/apk/res/android"
+ android:controlX1="0.4"
+ android:controlY1="0"
+ android:controlX2="1"
+ android:controlY2="1"/>
+</pre>
+
+<p>The Android L Developer Preview provides XML resources for the three basic curves in the
+material design specification:</p>
+
+<ul>
+ <li><code>@interpolator/fast_out_linear_in.xml</code></li>
+ <li><code>@interpolator/fast_out_slow_in.xml</code></li>
+ <li><code>@interpolator/linear_out_slow_in.xml</code></li>
+</ul>
+
+<p>You can pass a <code>PathInterpolator</code> object to the
+<code>Animation.setInterpolation</code> method.</p>
+
+<p>The <code>ObjectAnimator</code> class has new constructors that enable you to animate
+coordinates along a path using two or more properties at once. For example, the following animator
+uses a <code>Path</code> object to animate the X and Y properties of a view:</p>
+
+<pre>
+ObjectAnimator mAnimator;
+mAnimator = ObjectAnimator.ofFloat(view, View.X, View.Y, path);
+...
+mAnimator.start();
+</pre>
+
+
+<h2 id="viewstate">View State Changes</h2>
+
+<p>The new <code>StateListAnimator</code> class lets you define animators that run when the state
+of a view changes. The following example shows how to define an <code>StateListAnimator</code> as
+an XML resource:</p>
+
+<pre>
+<!-- animate the elevation property of a view when pressed -->
+<selector xmlns:android="http://schemas.android.com/apk/res/android">
+ <item android:state_pressed="true">
+ <set>
+ <objectAnimator android:propertyName="elevation"
+ android:duration="100"
+ android:valueTo="60"
+ android:valueType="floatType"/>
+ <!-- you could have other objectAnimator elements
+ here for "x" and "y", or other properties -->
+ </set>
+ </item>
+ <item android:state_enabled="true"
+ android:state_pressed="false"
+ android:state_focused="true">
+ <set>
+ <objectAnimator android:propertyName="elevation"
+ android:duration="100"
+ android:valueTo="10"
+ android:valueType="floatType"/>
+ </set>
+ </item>
+</selector>
+</pre>
+
+<p>The new <code>AnimatedStateListDrawable</code> class lets you create drawables that show
+animations between state changes of the associated view. Some of the system widgets in the
+Android L Developer Preview use these animations by default. The following example shows how
+to define an <code>AnimatedStateListDrawable</code> as an XML resource:</p>
+
+<pre>
+<!-- res/drawable/myanimstatedrawable.xml -->
+<animated-selector
+ xmlns:android="http://schemas.android.com/apk/res/android">
+
+ <!-- provide a different drawable for each state-->
+ <item android:id="@+id/pressed" android:drawable="@drawable/drawableP"
+ android:state-pressed="true"/>
+ <item android:id="@+id/focused" android:drawable="@drawable/drawableF"
+ android:state-focused="true"/>
+ <item android:id="@id/default"
+ android:drawable="@drawable/drawableD"/>
+
+ <!-- specify a transition -->
+ <transition android:fromId="@+id/default" android:toId="@+id/pressed">
+ <animation-list>
+ <item android:duration="15" android:drawable="@drawable/dt1"/>
+ <item android:duration="15" android:drawable="@drawable/dt2"/>
+ ...
+ </animation-list>
+ </transition>
+ ...
+</animated-selector>
+</pre>
+
+
+<h2 id="drawabletint">Drawable Tinting</h2>
+
+<p>The Android L Developer Preview enables you to define bitmaps as an alpha mask and to tint
+them using a color resource or a theme attribute that resolves to a color resource. You can
+create these assets only once and color them automatically to match your theme.</p>
+
+<p>To apply a tint to a bitmap in your code, use the <code>setTint</code> method in these
+classes:</p>
+
+<ul>
+<li><code>PaintDrawable</code></li>
+<li><code>NinePatchDrawable</code></li>
+<li><code>RippleDrawable</code></li>
+</ul>
+
+<p>In your layouts, use the <code>android:tint</code> attribute instead.</p>
+
+<p>The <code>setTint</code> method also lets you set the tint blending mode for
+<code>NinePatchDrawable</code> and <code>RippleDrawable</code> objects in your code. To set the
+tint mode in your layouts, use the <code>android:tintMode</code> attribute.</p>
diff --git a/docs/html/preview/material/compatibility.jd b/docs/html/preview/material/compatibility.jd
new file mode 100644
index 0000000..ce04e9e
--- /dev/null
+++ b/docs/html/preview/material/compatibility.jd
@@ -0,0 +1,63 @@
+page.title=Compatibility
+
+@jd:body
+
+<div id="qv-wrapper">
+<div id="qv">
+<h2>In this document</h2>
+<ol>
+ <li><a href="#materialtheme">Material Theme</a></li>
+ <li><a href="#layouts">Layouts</a></li>
+ <li><a href="#widgets">UI Widgets</a></li>
+ <li><a href="#animation">Animation APIs</a></li>
+</ol>
+</div>
+</div>
+
+<p>The new material design features (like the material theme and custom animations) are only
+available in the Android L Developer Preview. However, you can design your apps to make use of
+these features when running on devices with the Android L Developer Preview and still be
+compatible with previous releases of Android.</p>
+
+
+<h2 id="materialtheme">Material Theme</h2>
+
+<p>The material theme is only available in the Android L Developer Preview. To configure your
+app to use the material theme on devices running the Android L Developer Preview and an older
+theme on devices running earlier versions of Android:</p>
+
+<ol>
+<li>Define a theme that inherits from an older theme (like Holo) in
+<code>res/values/styles.xml</code>.</li>
+<li>Define a theme with the same name that inherits from the material theme in
+<code>res/values-v21/styles.xml</code>.</li>
+<li>Set this theme as your app's theme in the manifest file.</li>
+</ol>
+
+<p class="note"><strong>Note:</strong> If you do not provide an alternative theme in this manner,
+your app will not run on earlier versions of Android.</p>
+
+
+<h2 id="layouts">Layouts</h2>
+
+<p>If the layouts that you design according to the material design guidelines do not use any
+of the new XML attributes from the Android L Developer Preview, they will work on previous
+versions of Android. Otherwise, you can provide alternative layouts. You can also provide
+alternative layouts to customize how your app looks on earlier versions of Android.</p>
+
+<p>Create your layout files for the Android L Developer Preview inside <code>res/layout-v21/</code>
+and your alternative layout files for earlier versions of Android inside <code>res/layout/</code>.
+Alternative layouts have the same file name.</p>
+
+
+<h2 id="widgets">UI Widgets</h2>
+
+<p>The <code>RecyclerView</code> and <code>CardView</code> widgets are included in the Android L
+Developer Preview Support Library, so they are available in earlier versions of Android.</p>
+
+
+<h2 id="animation">Animation APIs</h2>
+
+<p>The new APIs for custom animations are only available in the Android L Developer Preview. To
+preserve compatibility with earlier verisons of Android, check the system version at runtime before
+you invoke these APIs.</p>
\ No newline at end of file
diff --git a/docs/html/preview/material/get-started.jd b/docs/html/preview/material/get-started.jd
new file mode 100644
index 0000000..9c0e55d
--- /dev/null
+++ b/docs/html/preview/material/get-started.jd
@@ -0,0 +1,146 @@
+page.title=Get Started
+
+@jd:body
+
+<div id="qv-wrapper">
+<div id="qv">
+<h2>In this document</h2>
+<ol>
+ <li><a href="#applytheme">Apply the Material Theme</a></li>
+ <li><a href="#layouts">Design Your Layouts</a></li>
+ <li><a href="#depth">Specify Depth in Your Views</a></li>
+ <li><a href="#widgets">Use the New UI Widgets</a></li>
+ <li><a href="#apis">Use the New APIs</a></li>
+</ol>
+</div>
+</div>
+
+<p>To create apps with material design:</p>
+
+<ol>
+ <li style="margin-bottom:10px">
+ Take a look at the <a href="">material design specification</a>.</li>
+ <li style="margin-bottom:10px">
+ Apply the material <strong>theme</strong> to your app.</li>
+ <li style="margin-bottom:10px">
+ Define additional <strong>styles</strong> to customize the material theme.</li>
+ <li style="margin-bottom:10px">
+ Create your <strong>layouts</strong> following material design guidelines.</li>
+ <li style="margin-bottom:10px">
+ Specify the <strong>depth</strong> for views to cast appropriate shadows.</li>
+ <li style="margin-bottom:10px">
+ Use the new <strong>widgets</strong> for complex views, such as lists and cards.</li>
+ <li style="margin-bottom:10px">
+ Use the new <strong>APIs</strong> to customize the animations in your app.</li>
+</ol>
+
+<h3>Update Your App for the Android L Developer Preview</h3>
+
+<p>To update an existing app for the Android L Developer Preview, design new layouts following
+material design guidelines and consider how you can improve the user experience for your app by
+incorporating depth, touch feedback and animations in your UI.</p>
+
+<h3>Create New Apps for the Android L Developer Preview</h3>
+
+<p>If you are creating a new app for the Android L Developer Preview, the material design
+guidelines provide you with a solid design framework for your app. Follow these guidelines and
+use the new functionality in the Android framework to design and develop your app.</p>
+
+
+<h2 id="applytheme">Apply the Material Theme</h2>
+
+<p>To apply the material theme in your app, specify a style that inherits from
+<code>android:theme.Material</code>:</p>
+
+<pre>
+<!-- res/values/styles.xml -->
+<resources>
+ <!-- your app's theme inherits from the Material theme -->
+ <style name="AppTheme" parent="android:Theme.Material">
+ <!-- theme customizations -->
+ </style>
+</resources>
+</pre>
+
+<p>The material theme provides new system widgets that let you set their color palette and default
+animations for touch feedback and activity transitions. For more details, see
+<a href="{@docRoot}preview/material/theme.html">Material Theme</a>.</p>
+
+
+<h2 id="layouts">Design Your Layouts</h2>
+
+<p>In addition to applying and customizing the material theme, your layouts should conform to
+the material design guidelines. When you design your layouts, pay special attention to the
+following:</p>
+
+<ul>
+<li>Baseline grids</li>
+<li>Keylines</li>
+<li>Spacing</li>
+<li>Touch target size</li>
+<li>Layout structure</li>
+</ul>
+
+<p>You still define layouts inside XML files using the standard tools from the Android framework.
+For details on the material design guidelines, see the <a href="">material design
+specification</a>.</p>
+
+
+<h2 id="depth">Specify Depth in Your Views</h2>
+
+<p>In the Android L Developer Preview, views can cast shadows. The elevation value of a view
+determines the size of its shadow. To set the elevation of a view, use the
+<code>android:elevation</code> attribute in your layouts:</p>
+
+<pre>
+<Button
+ android:id="@+id/my_button"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:text="@string/next"
+ <strong>android:elevation</strong>="10dp" />
+</pre>
+
+<p>For more details, see <a href="{@docRoot}preview/material/views-shadows.html">Views and
+Shadows</a>.</p>
+
+
+<h2 id="widgets">Use the New UI Widgets</h2>
+
+<p>The Android L Developer Preview includes two new UI widgets for complex views,
+<code>RecyclerView</code> and <code>CardView</code>. <code>RecyclerView</code> is a more advanced
+version of <code>ListView</code> that provides performance improvements and is easier to use.
+<code>CardView</code> lets you show pieces of information inside cards with a consistent look
+across apps. To include a <code>CardView</code> in your layout:</p>
+
+<pre>
+<android.support.v7.widget.CardView
+ android:id="@+id/card_view"
+ android:layout_width="200dp"
+ android:layout_height="200dp"
+ card_view:cardCornerRadius="3dp">
+ ...
+</android.support.v7.widget.CardView>
+</pre>
+
+<p>For more information, see <a href="{@docRoot}preview/material/ui-widgets.html">UI Widgets</a>.</p>
+
+
+<h2 id="apis">Use the APIs to Customize Your Animations</h2>
+
+<p>The Android L Developer Preview includes new APIs to create custom animations in your app.
+For example, you can enable activity transitions and define an exit transition inside an
+activity:</p>
+
+<pre>
+// inside your activity
+getWindow().requestFeature(Window.FEATURE_CONTENT_TRANSITIONS);
+
+// set an exit transition
+getWindow().setExitTransition(new Explode());
+</pre>
+
+<p>When you start another activity from this activity, the exit transition is activated.</p>
+
+<p>To learn about all the features in the new APIs, see <a
+href="{@docRoot}preview/material/animations.html">Animations</a>.</p>
\ No newline at end of file
diff --git a/docs/html/preview/material/images/MaterialDark.png b/docs/html/preview/material/images/MaterialDark.png
new file mode 100644
index 0000000..6a72280
--- /dev/null
+++ b/docs/html/preview/material/images/MaterialDark.png
Binary files differ
diff --git a/docs/html/preview/material/images/MaterialLight.png b/docs/html/preview/material/images/MaterialLight.png
new file mode 100644
index 0000000..0e85528
--- /dev/null
+++ b/docs/html/preview/material/images/MaterialLight.png
Binary files differ
diff --git a/docs/html/preview/material/images/RecyclerView.png b/docs/html/preview/material/images/RecyclerView.png
new file mode 100644
index 0000000..364951d
--- /dev/null
+++ b/docs/html/preview/material/images/RecyclerView.png
Binary files differ
diff --git a/docs/html/preview/material/images/SceneTransition.png b/docs/html/preview/material/images/SceneTransition.png
new file mode 100644
index 0000000..ecaf472
--- /dev/null
+++ b/docs/html/preview/material/images/SceneTransition.png
Binary files differ
diff --git a/docs/html/preview/material/images/ThemeColors.png b/docs/html/preview/material/images/ThemeColors.png
new file mode 100644
index 0000000..bbcecf2
--- /dev/null
+++ b/docs/html/preview/material/images/ThemeColors.png
Binary files differ
diff --git a/docs/html/preview/material/images/card_travel.png b/docs/html/preview/material/images/card_travel.png
new file mode 100644
index 0000000..a804ca0
--- /dev/null
+++ b/docs/html/preview/material/images/card_travel.png
Binary files differ
diff --git a/docs/html/preview/material/images/list_mail.png b/docs/html/preview/material/images/list_mail.png
new file mode 100644
index 0000000..ca53ee1
--- /dev/null
+++ b/docs/html/preview/material/images/list_mail.png
Binary files differ
diff --git a/docs/html/preview/material/index.jd b/docs/html/preview/material/index.jd
new file mode 100644
index 0000000..b7abcb4
--- /dev/null
+++ b/docs/html/preview/material/index.jd
@@ -0,0 +1,117 @@
+page.title=Material Design
+page.type=design
+
+@jd:body
+
+<p itemprop="description">The Android L Developer Preview includes support for material design apps. Material design
+is a comprehensive guide for visual, motion, and interaction design across platforms and devices.
+To use material design in your Android apps, follow the guidelines defined in the
+<a href="">material design specification</a> and use the new components and functionality
+available in the Android L Developer Preview.</p>
+
+<p>The Android L Developer Preview provides the following elements for you to build material
+design apps:</p>
+
+<ul>
+ <li>A new theme</li>
+ <li>New widgets for complex views</li>
+ <li>New APIs for custom shadows and animations</li>
+</ul>
+
+
+<h3>Material Theme</h3>
+
+<p>The material theme provides a new style for your app, system widgets that let you set
+their color palette, and default animations for touch feedback and activity transitions.</p>
+
+<!-- two columns -->
+<div style="width:700px;margin-top:25px;margin-bottom:20px">
+<div style="float:left;width:250px;margin-left:40px;margin-right:60px;">
+ <img src="{@docRoot}preview/material/images/MaterialDark.png" style="width:250px;"/>
+ <div style="width:140px;margin:0 auto">
+ <p style="margin-top:8px">Dark Material theme</p>
+ </div>
+</div>
+<div style="float:left;width:250px;margin-right:0px;">
+ <img src="{@docRoot}preview/material/images/MaterialLight.png" style="width:250px;"/>
+ <div style="width:140px;margin:0 auto">
+ <p style="margin-top:8px">Light Material theme</p>
+ </div>
+</div>
+<br style="clear:left"/>
+</div>
+
+
+<h3>New Widgets</h3>
+
+<p>The Android L Developer Preview includes two new widgets for displaying complex views:</p>
+
+<!-- two columns -->
+<div style="width:700px;margin-top:25px;margin-bottom:20px">
+<div style="float:left;width:250px;margin-left:40px;margin-right:60px;">
+ <img src="{@docRoot}preview/material/images/list_mail.png" style="width:250px;"/>
+ <p>The new <code>RecyclerView</code> widget is a more advanced version of <code>ListView</code>
+ provides performance improvements for dynamic views and is easier to use.</p>
+</div>
+<div style="float:left;width:250px;margin-right:0px;">
+ <img src="{@docRoot}preview/material/images/card_travel.png" style="width:250px;"/>
+ <p>The new <code>CardView</code> widget lets you display important pieces of information inside
+ cards that have a consistent look and feel.</p>
+</div>
+<br style="clear:left"/>
+</div>
+
+
+<h3>View Shadows</h3>
+
+<p>In addition to the X and Y components, views in the Android L Developer Preview have a Z
+component. This new component represents the elevation of a view, which determines the size of
+its shadow: views with higher Z values cast bigger shadows.</p>
+
+<div style="width:290px;margin-left:35px;float:right">
+ <div class="framed-nexus5-port-span-5">
+ <video class="play-on-hover" autoplay>
+ <source src="/preview/material/videos/ContactsAnim.mp4"/>
+ <source src="/preview/material/videos/ContactsAnim.webm"/>
+ <source src="/preview/material/videos/ContactsAnim.ogv"/>
+ </video>
+ </div>
+ <div style="font-size:10pt;margin-left:20px;margin-bottom:30px">
+ <em>Click on the device screen to replay the movie</em>
+ </div>
+</div>
+
+<h3>Animations</h3>
+
+<p>The Android L Developer Preview provides new APIs that let you create custom animations for
+touch feedback in UI controls, view state changes, and activity transitions.</p>
+
+<p>The new animation APIs in the Android L Developer Preview let you:</p>
+
+<ul>
+<li style="margin-bottom:15px">
+Respond to touch events in your views with <strong>touch feedback</strong> animations.
+</li>
+<li style="margin-bottom:15px">
+Hide and show views with <strong>reveal effect</strong> animations.
+</li>
+<li style="margin-bottom:15px">
+Switch between activities with custom <strong>activity transition</strong> animations.
+</li>
+<li style="margin-bottom:15px">
+Create custom animation patterns with <strong>curved motion</strong>.
+</li>
+<li style="margin-bottom:15px">
+Animate changes in one or more view properties with <strong>view state change</strong> animations.
+</li>
+<li style="margin-bottom:15px">
+Show animations in <strong>state list drawables</strong> between view state changes.
+</li>
+</ul>
+
+
+<h3>New Capabilities for Drawables</h3>
+
+<p>The Android L Developer Preview supports <strong>drawable tinting</strong>: you can define
+bitmaps as an alpha mask and tint them using a color resource. You can create these assets only
+once and color each instance to match your theme.</p>
diff --git a/docs/html/preview/material/theme.jd b/docs/html/preview/material/theme.jd
new file mode 100644
index 0000000..b954960
--- /dev/null
+++ b/docs/html/preview/material/theme.jd
@@ -0,0 +1,100 @@
+page.title=Material Theme
+
+@jd:body
+
+<div id="qv-wrapper">
+<div id="qv">
+<h2>In this document</h2>
+<ol>
+ <li><a href="#colorpalette">Customize the Colot Palette</a></li>
+ <li><a href="#statusbar">Customize the Status Bar</a></li>
+ <li><a href="#inheritance">Theme Inheritance</a></li>
+</ol>
+</div>
+</div>
+
+<p>The new material theme provides:</p>
+
+<ul>
+ <li>System widgets that let you set their color palette</li>
+ <li>Touch feedback animations for the system widgets</li>
+ <li>Activity transition animations</li>
+</ul>
+
+<p>The Android L Developer Preview lets you easily customize the look of the material theme
+according to your brand identity with a color palette you control. You can tint the app bar and
+the status bar using theme attributes, as shown in Figure 1.</p>
+
+<div style="float:right;margin-left:25px;margin-top:-25px">
+<img src="{@docRoot}preview/material/images/ThemeColors.png" style="width:250px"/>
+<p class="img-caption"><strong>Figure 1.</strong> Customizing the material theme.</p>
+</div>
+
+<p>The system widgets have a new design and touch feedback animations. Activity transitions help
+users navigate your app by providing visual continuity. You can customize the color palette,
+the touch feedback animations, and the activity transitions for your app.</p>
+
+<p>The material theme is defined as:</p>
+
+<ul>
+ <li><code>@android:style/Theme.Material</code> (dark version)</li>
+ <li><code>@android:style/Theme.Material.Light</code> (light version)</li>
+ <li><code>@android:style/Theme.Material.Light.DarkActionBar</code></li>
+</ul>
+
+<p>For a list of material styles that you can use, see the API reference for
+<code>android.R.styles</code>.</p>
+
+<p class="note">
+<strong>Note:</strong> The material theme is only available in the Android L Developer Preview.
+For more information, see <a href="{@docRoot}preview/material/compatibility.html">Compatibility</a>.
+</p>
+
+
+<h2 id="colorpalette">Customize the Color Palette</h2>
+
+<p>To customize the theme's base colors to fit your brand, define your custom colors using
+theme attributes when you inherit from the material theme:</p>
+
+<pre>
+<resources>
+ <!-- inherit from the material theme -->
+ <style name="AppTheme" parent="android:Theme.Material">
+ <!-- Main theme colors -->
+ <!-- your app's branding color (for the app bar) -->
+ <item name="android:colorPrimary">@color/primary</item>
+ <!-- darker variant of colorPrimary (for contextual app bars) -->
+ <item name="android:colorPrimaryDark">@color/primary_dark</item>
+
+ <!-- other theme colors -->
+ <item name="android:colorButtonNormal">@color/button_normal</item>
+ <item name="android:windowBackground">@color/wbackground</item>
+ </style>
+</resources>
+</pre>
+
+
+<h2 id="statusbar">Customize the Status Bar</h2>
+
+<p>The material theme lets you easily customize the status bar, so you can specify a
+color which fits your brand and provides enough contrast to show the white status icons. To
+set a custom color for the status bar, use the <code>android:statusBarColor</code> attribute when
+you extend the material theme.</p>
+
+<p>To handle the color of the status bar yourself (for example, by adding a gradient in the
+background), set the <code>android:statusBarColor</code> attribute to
+<code>@android:color/transparent</code>. You can also use the
+<code>Window.setStatusBarColor</code> method for animations or fading.</p>
+
+<p class="note"><strong>Note:</strong>
+The status bar should almost always have a clear delineation from the primary toolbar, except for
+full-bleed imagery cases and when you use a gradient as a protection.
+</p>
+
+
+<h2 id="inheritance">Theme Inheritance</h3>
+
+<p>In the Android L Developer Preview, elements in XML layout definitions can specify the
+<code>android:theme</code> attribute, which references a theme resource. This attribute modifies
+the theme for the element and any elements inflated below it, which is useful to alter theme
+color palettes in a specific portion of an interface.</p>
\ No newline at end of file
diff --git a/docs/html/preview/material/ui-widgets.jd b/docs/html/preview/material/ui-widgets.jd
new file mode 100644
index 0000000..f18bff9
--- /dev/null
+++ b/docs/html/preview/material/ui-widgets.jd
@@ -0,0 +1,197 @@
+page.title=UI Widgets
+
+@jd:body
+
+<div id="qv-wrapper">
+<div id="qv">
+<h2>In this document</h2>
+<ol>
+ <li><a href="#recyclerview">RecyclerView</a></li>
+ <li><a href="#cardview">CardView</a></li>
+</ol>
+</div>
+</div>
+
+<p>The support library in the Android L Developer Preview contains two new widgets,
+<code>RecyclerView</code> and <code>CardView</code>. Use these widgets to show complex lists
+and cards in your app. These widgets have material design styles and animations by default.</p>
+
+
+<h2 id="recyclerview">RecyclerView</h2>
+
+<p><code>RecyclerView</code> is a more advanced version of <code>ListView</code>. This widget is
+a container for large sets of views that can be recycled and scrolled very efficiently. Use the
+<code>RecyclerView</code> widget when you have lists with elements that change dynamically.</p>
+
+<p><code>RecyclerView</code> is easy to use, because it provides:</p>
+
+<ul>
+ <li>A set of layout managers for positioning items</li>
+ <li>Default animations for common item operations</li>
+</ul>
+
+<p>You also have the flexibility to define custom layout managers and animations for this
+widget.</p>
+
+<p>To use the <code>RecyclerView</code> widget, you have to specify an adapter and a layout
+manager. An <strong>adapter</strong> provides a binding from a dataset to views that are displayed
+within a <code>RecyclerView</code>. For example, if your dataset is an array of strings displayed
+as <code>TextView</code> items, the layout manager asks the adapter to:
+</p>
+
+<ul>
+ <li>Set the text of an existing <code>TextView</code> to one of the strings in the dataset</li>
+ <li>Create new <code>TextView</code> objects</li>
+ <li>Determine the size of the dataset</li>
+</ul>
+
+<p>To create an adapter, you extend the <code>RecyclerView.Adapter</code> class. The details of
+the implementation depend on the specifics of your dataset and the type of views. Fore more
+information, see the examples below.</p>
+
+<img src="/preview/material/images/RecyclerView.png" alt="" id="figure1" style="width:550px"/>
+<p class="img-caption">
+ <strong>Figure 1</strong> - The <code>RecyclerView</code> widget.
+</p>
+
+<p>A <strong>layout manager</strong> positions item views inside a <code>RecyclerView</code> and
+determines when to reuse item views that are no longer visible to the user. To reuse (or
+<em>recycle</em>) a view, a layout manager may ask the adapter to replace the content of the
+view with a different element from the dataset. Recycling views in this manner improves
+performance by avoiding the creation of unnecessary views or performing expensive
+<code>findViewById</code> lookups.
+</p>
+
+<p><code>RecyclerView</code> provides two layout managers you can use:</p>
+
+<ul>
+ <li><code>LinearLayoutManager</code> shows the items in a vertically scrolling list.</li>
+ <li><code>GridLayoutManager</code> shows the items in a rectangular grid.</li>
+</ul>
+
+<p>To create a custom layout, you extend the <code>RecyclerView.LayoutManager</code> class.</p>
+
+<h3>Examples</h3>
+
+<p>To include a <code>RecyclerView</code> in your layout:</p>
+
+<pre>
+<!-- A RecyclerView with some commonly used attributes -->
+<android.support.v7.widget.RecyclerView
+ android:id="@+id/my_recycler_view"
+ android:scrollbars="vertical"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"/>
+</pre>
+
+<p>To get the <code>RecyclerView</code> object in your activity:</p>
+
+<pre>
+public class MyActivity extends ActionBarActivity {
+ private RecyclerView mRecyclerView;
+ private RecyclerView.Adapter mAdapter;
+ private RecyclerView.LayoutManager mLayoutManager;
+
+ @Override
+ protected void onCreate(Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+ setContentView(R.layout.my_activity);
+ mRecyclerView = (RecyclerView) findViewById(R.id.my_recycler_view);
+
+ // improve performance if the size is fixed
+ mRecyclerView.setHasFixedSize(true);
+
+ // use a linear layout manager
+ mLayoutManager = new LinearLayoutManager(this);
+ mRecyclerView.setLayoutManager(mLayoutManager);
+
+ // specify an adapter (see also next example)
+ mAdapter = new MyAdapter(myDataset);
+ mRecyclerView.setAdapter(mAdapter);
+ }
+ ...
+}
+</pre>
+
+<p>To create a simple adapter:</p>
+
+<pre>
+public class MyAdapter extends RecyclerView.Adapter<MyAdapter.ViewHolder> {
+ private String[] mDataset;
+
+ // Provide a reference to the type of views that you are using
+ // (custom viewholder)
+ public static class ViewHolder extends RecyclerView.ViewHolder {
+ public TextView mTextView;
+ public ViewHolder(TextView v) {
+ super(v);
+ mTextView = v;
+ }
+ }
+
+ // Provide a suitable constructor (depends on the kind of dataset)
+ public MyAdapter(String[] myDataset) {
+ mDataset = myDataset;
+ }
+
+ // Create new views (invoked by the layout manager)
+ @Override
+ public MyAdapter.ViewHolder onCreateViewHolder(ViewGroup parent,
+ int viewType) {
+ // create a new view
+ View v = new TextView(parent.getContext());
+ // set the view's size, margins, paddings and layout parameters
+ ...
+ ViewHolder vh = new ViewHolder(v);
+ return vh;
+ }
+
+ // Replace the contents of a view (invoked by the layout manager)
+ @Override
+ public void onBindViewHolder(ViewHolder holder, int position) {
+ // - get element from your dataset at this position
+ // - replace the contents of the view with that element
+ holder.mTextView.setText(mDataset[position]);
+
+ }
+
+ // Return the size of your dataset (invoked by the layout manager)
+ @Override
+ public int getItemCount() {
+ return mDataset.length;
+ }
+}
+</pre>
+
+
+<h2 id="cardview">CardView</h2>
+
+<p><code>CardView</code> extends the <code>FrameLayout</code> class and lets you show information
+inside a card with optional rounded corners:</p>
+
+<ul>
+ <li>To set the corner radius in your layouts, use the <code>android:cardCornerRadius</code>
+ attribute.</li>
+ <li>To set the corner radius in your code, use the <code>CardView.setRadius</code> method.</li>
+</ul>
+
+<p>To set the background color of a card, use the <code>android:cardBackgroundColor</code>
+attribute.</p>
+
+<p>To include a <code>CardView</code> in your layout:</p>
+
+<pre>
+<!-- A CardView that contains a TextView -->
+<android.support.v7.widget.CardView
+ android:id="@+id/card_view"
+ android:layout_gravity="center"
+ android:layout_width="200dp"
+ android:layout_height="200dp"
+ card_view:cardCornerRadius="4dp">
+
+ <TextView
+ android:id="@+id/info_text"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent" />
+</android.support.v7.widget.CardView>
+</pre>
\ No newline at end of file
diff --git a/docs/html/preview/material/videos/ContactsAnim.mp4 b/docs/html/preview/material/videos/ContactsAnim.mp4
new file mode 100644
index 0000000..073f9dc
--- /dev/null
+++ b/docs/html/preview/material/videos/ContactsAnim.mp4
Binary files differ
diff --git a/docs/html/preview/material/videos/ContactsAnim.ogv b/docs/html/preview/material/videos/ContactsAnim.ogv
new file mode 100644
index 0000000..c5e751b
--- /dev/null
+++ b/docs/html/preview/material/videos/ContactsAnim.ogv
Binary files differ
diff --git a/docs/html/preview/material/videos/ContactsAnim.webm b/docs/html/preview/material/videos/ContactsAnim.webm
new file mode 100644
index 0000000..2a15ff5
--- /dev/null
+++ b/docs/html/preview/material/videos/ContactsAnim.webm
Binary files differ
diff --git a/docs/html/preview/material/views-shadows.jd b/docs/html/preview/material/views-shadows.jd
new file mode 100644
index 0000000..c5884d6
--- /dev/null
+++ b/docs/html/preview/material/views-shadows.jd
@@ -0,0 +1,86 @@
+page.title=Views and Shadows
+
+@jd:body
+
+<div id="qv-wrapper">
+<div id="qv">
+<h2>In this document</h2>
+<ol>
+ <li><a href="#elevation">View Elevation</a></li>
+ <li><a href="#shadows">Shadows and Outlines</a></li>
+ <li><a href="#clip">Clipping Views</a></li>
+</ol>
+</div>
+</div>
+
+<p>In apps with material design, depth has meaning. You should assign higher elevation values to more
+important UI elements in your app. The elevation value of a view determines the size of its
+shadow: views with higher Z values cast bigger shadows. Views only cast shadows on the Z=0 plane
+under an orthographic projection (the views do not scale for different values of Z).</p>
+
+
+<h2 id="elevation">View Elevation</h2>
+
+<p>The Z value for a view has two components, elevation and translation. The elevation is the
+static component, and the translation is used for animations:</p>
+
+<p><code>Z = elevation + translationZ</code></p>
+
+<p>To set the elevation of a view:</p>
+
+<ul>
+ <li>In a layout definition, use the <code>android:elevation</code> attribute.</li>
+ <li>In the code of an activity, use the <code>View.setElevation</code> method.</li>
+</ul>
+
+<p>To set the translation of a view, use the <code>View.setTranslationZ</code> method.</p>
+
+<p>The Z values are measured in the same units as the X and Y values (like <code>dp</code> or
+<code>px</code>).</p>
+
+
+<h2 id="shadows">Shadows and Outlines</h2>
+
+<p>The bounds of a view's background drawable determine the default shape of its shadow. To define
+a custom shape for a shadow, such as an oval, use the <code>View.setOutline</code> method:</p>
+
+<pre>
+View v = findViewById(R.id.my_view);
+
+// add 10px to the static elevation
+v.setTranslationZ(10);
+
+// set an oval shadow
+Outline outline = new Outline();
+outline.setOval(v.getLeft(), v.getTop(), v.getRight(), v.getBottom());
+myView.setOutline(outline);
+</pre>
+
+<p>An <code>Outline</code> represents the outer shape of a graphics object. You can create
+<code>Outline</code> objects as in this example, or you can obtain the outline from a
+<code>Drawable</code> object with the <code>getOutline</code> method.</p>
+
+<p>The outline of a view also defines the ripple area for touch feedback.</p>
+
+<p>To prevent a view from casting a shadow, set its outline to <code>null</code>.</p>
+
+
+<h2 id="clip">Clipping Views</h2>
+
+<p>The Android L Developer Preview lets you clip a view to its outline area using the
+<code>View.setClipToOutline</code> method. Only rectangle, circle, and round rectangle outlines
+support clipping, as determined by the <code>Outline.canClip</code> method.</p>
+
+<p>To determine if a view has been clipped, use the <code>View.getClipToOutline</code> method.</p>
+
+<pre>
+// clip a view to an oval
+View v = findViewById(R.id.my_view);
+outline.setOval(v.getLeft(), v.getTop(), v.getRight(), v.getBottom());
+myView.setOutline(outline);
+
+// if the view is not already clipped
+if (v.getClipToOutline() == false) {
+ v.setClipToOutline(true);
+}
+</pre>
\ No newline at end of file
diff --git a/docs/html/preview/preview_toc.cs b/docs/html/preview/preview_toc.cs
new file mode 100644
index 0000000..5920ecc
--- /dev/null
+++ b/docs/html/preview/preview_toc.cs
@@ -0,0 +1,87 @@
+<ul id="nav">
+
+
+ <li class="nav-section">
+ <div class="nav-section-header empty"><a href="<?cs var:toroot ?>preview/setup-sdk.html">Set up the Preview SDK
+ </a></div>
+ </li>
+ <li class="nav-section">
+ <div class="nav-section-header empty"><a href="<?cs var:toroot ?>preview/setup-devices.html">Set Up Hardware and AVDs
+ </a></div>
+ </li>
+ <li class="nav-section">
+ <div class="nav-section-header empty"><a href="<?cs var:toroot ?>preview/api-overview.html">API Overview
+ </a></div>
+ </li>
+ <li class="nav-section">
+
+ <div class="nav-section-header"><a href="<?cs var:toroot ?>preview/material/index.html">Material Design
+ </a></div>
+ <ul>
+ <li><a href="<?cs var:toroot ?>preview/material/get-started.html">Get Started</a></li>
+ <li><a href="<?cs var:toroot ?>preview/material/theme.html">Material Theme</a></li>
+ <li><a href="<?cs var:toroot ?>preview/material/ui-widgets.html">UI Widgets</a></li>
+ <li><a href="<?cs var:toroot ?>preview/material/views-shadows.html">Views and Shadows</a></li>
+ <li><a href="<?cs var:toroot ?>preview/material/animations.html">Animations</a></li>
+ <li><a href="<?cs var:toroot ?>preview/material/compatibility.html">Compatibility</a></li>
+ </ul>
+ </li>
+
+ <li class="nav-section">
+ <div class="nav-section-header">
+ <a href="<?cs var:toroot ?>preview/tv/index.html">TV</a>
+ </div>
+ <ul>
+ <li><a href="<?cs var:toroot ?>preview/tv/start/index.html">
+ Get Started</a></li>
+ <li class="nav-section">
+ <div class="nav-section-header">
+ <a href="<?cs var:toroot ?>preview/tv/ui/index.html">
+ User Interface</a></div>
+ <ul>
+ <li><a href="<?cs var:toroot ?>preview/tv/ui/layouts.html">
+ Layouts</a></li>
+ <li><a href="<?cs var:toroot ?>preview/tv/ui/navigation.html">
+ Navigation</a></li>
+ <li><a href="<?cs var:toroot ?>preview/tv/ui/browse.html">
+ BrowseFragment</a></li>
+ <li><a href="<?cs var:toroot ?>preview/tv/ui/details.html">
+ DetailsFragment</a></li>
+ <li><a href="<?cs var:toroot ?>preview/tv/ui/in-app-search.html">
+ In-App Search</a></li>
+ <li><a href="<?cs var:toroot ?>preview/tv/ui/recommendations.html">
+ Recommendations</a></li>
+ </ul>
+ </li>
+ <li><a href="<?cs var:toroot ?>preview/tv/games/index.html">
+ Games on TV</a></li>
+ <li><a href="<?cs var:toroot ?>preview/tv/start/hardware-features.html">
+ Hardware Features</a></li>
+ <li><a href="<?cs var:toroot ?>preview/tv/adt-1/index.html">
+ ADT-1</a></li>
+ </ul>
+ </li>
+
+ <li class="nav-section">
+ <div class="nav-section-header empty">
+ <a href="<?cs var:toroot ?>preview/samples.html">Samples</a>
+ </div>
+ </li>
+ <li class="nav-section">
+ <div class="nav-section-header empty">
+
+ <a href="<?cs var:toroot ?>preview/l-developer-preview-reference.zip">Reference</a>
+
+ </div>
+ </li>
+ <li class="nav-section">
+ <div class="nav-section-header empty">
+ <a href="<?cs var:toroot ?>preview/support.html">Support</a>
+ </div>
+ </li>
+ <li class="nav-section">
+ <div class="nav-section-header empty">
+ <a href="<?cs var:toroot ?>preview/tos.html">Terms of Service</a>
+ </div>
+ </li>
+</ul>
diff --git a/docs/html/preview/samples.jd b/docs/html/preview/samples.jd
new file mode 100644
index 0000000..67404b6
--- /dev/null
+++ b/docs/html/preview/samples.jd
@@ -0,0 +1,16 @@
+page.title=Samples
+
+@jd:body
+
+<p>The code samples for the L Developer Preview are available in the Android SDK Manager under the
+L Preview section. Here is a summary of everything that is available:</p>
+
+<ul>
+ <li></li>
+ <li></li>
+ <li></li>
+ <li></li>
+ <li></li>
+ <li></li>
+ <li></li>
+ </ul>
diff --git a/docs/html/preview/setup-devices.jd b/docs/html/preview/setup-devices.jd
new file mode 100644
index 0000000..86e4845
--- /dev/null
+++ b/docs/html/preview/setup-devices.jd
@@ -0,0 +1,90 @@
+page.title=Setting Up Hardware and AVDs
+@jd:body
+
+<p>The Android L developer preview provides you with 32-bit system images
+to flash the following devices:
+</p>
+
+<ul>
+ <li>Nexus 5</li>
+ <li>Nexus 7 Wi-Fi (version 2, released in 2013)</li>
+</ul>
+
+<p>In addition, you also get the emulator system images, which includes
+experimental 64-bit system images along with standard 32-bit system images.
+</p>
+
+<h2>Installing the L Preview System Image</h2>
+
+<!-- Will we get an official warning text from the lawyercats? Is this it? -->
+<p class="warning"><b>Warning</b>: This is a preview version of the Android
+system image, and is subject to change. Your use of this system image is
+governed by the Android SDK Preview License Agreement. The Android preview
+system image is not a stable release, and may contain errors and defects that
+can result in damage to your computer systems, devices, and data. The preview
+Android system image is not subject to the same testing as the factory OS and
+can cause your phone and installed services and applications to stop working.
+</p>
+
+
+<ol>
+ <li>Download and extract the Android Developer Preview package to a directory
+ (which we'll call <code><l_download_dir></code> in these
+ instructions).</li>
+ <li>Connect your powered-off Android device to your development machine. Put
+ the device in fastboot mode by pressing and holding the following buttons:
+ <ul>
+ <li><strong>Nexus 5:</strong> <i>volume down</i> + <i>volume up</i> +
+ <i>power</i></li>
+ <li><strong>Nexus 7:</strong> <i>volume down</i> + <i>power</i> </li>
+ </ul>
+ <p class="note">Alternatively, you can enter fastboot mode by booting up
+ the device and running <code>adb reboot bootloader</code> with USB debugging
+ turned on.</p>
+ </li>
+ <li>Follow the instructions at
+ <a href="https://developers.google.com/android/nexus/images#instructions">developers.google.com/android</a>
+ to set up your system for flashing devices.</li>
+ <li>Run the <code><l_download_dir>/flash-all</code> script
+ corresponding to your platform. This script flashes all of the system data
+ onto the phone.</li> <!-- Confirm names of flash scripts -->
+ <li>(Optional) After flashing is complete, lock your device's bootloader by
+ putting it in fastboot mode and running <code>fastboot oem lock</code>.
+ (This does not wipe your device.) Once you do this, you will not be able to
+ flash your device until you run run <code>fastboot oem unlock</code>,
+ which unlocks the bootloader and wipes your device. We recommend you leave the
+ bootloader unlocked until you are done with flashing the device.</li>
+</ol>
+
+<h3>Reverting a Device to Factory Specifications</h3>
+
+ <p>If you want to uninstall the L Preview and revert the device to factory
+specifications, go to <a href="http://developers.google.com/android
+/nexus/images">developers.google.com/android</a> and download the image you want
+to flash to for your device. Follow the instructions on that page to flash the
+image to your device.</p>
+
+
+<h2>Setting up an AVD</h2>
+
+<p>You can set up <a href="{@docRoot}tools/devices/">Android Virtual Devices
+(AVD)</a> and use the emulator to build and test apps with the L Preview.</p>
+
+<p>To create an AVD with the AVD Manager:</p>
+
+<ol>
+ <li>Install the L Preview SDK in your development environment, as described
+ in <a href="{@docRoot}preview/setup-sdk.html">Setting Up the Preview
+ SDK.</a></li>
+ <li>Follow the steps in
+ <a href="{@docRoot}tools/devices/managing-avds.html">Managing AVDs with AVD
+ Manager</a>. Use the following settings:
+ <ul>
+ <li><b>Device:</b> Either Nexus 5 or Nexus 7</li>
+ <li><b>Target:</b> <!-- Confirm exact text when we have final distro -->
+ Android L (Preview) - API Level L</li>
+ </ul>
+ <!-- Confirm this works when you can download image through SDK manager! -->
+ </li>
+</ol>
+
diff --git a/docs/html/preview/setup-sdk.jd b/docs/html/preview/setup-sdk.jd
new file mode 100644
index 0000000..32a33b6
--- /dev/null
+++ b/docs/html/preview/setup-sdk.jd
@@ -0,0 +1,36 @@
+page.title=Setting Up the Preview SDK
+@jd:body
+
+<p>The Preview SDK is available from the Android SDK Manager. <!-- Not yet! -->
+This document assumes that you are familiar with Android app development, such
+as using the Android SDK Manager and creating projects. If you're new to
+Android, see <a href="/training/basics/firstapp/index.html">Building Your First
+App</a> training lesson first.</a></p>
+
+<h2>Download the SDK</h2>
+
+<ol>
+ <li>Start the Android SDK Manager.</li>
+ <li>In the <b>Tools</b> section, select the latest Android <b>SDK Tools</b>,
+ <b>Platform-tools</b>, and <b>Build-tools</b>.</li>
+ <!-- Android L not yet showing up in Android SDK Manager... -->
+ <li>Select everything under the <b>Android L Developer Preview</b> section and
+ click <b>Install packages...</b></li>
+ <li>Accept the Licensing Agreement for all of the packages and click
+ <b>Install</b>.</li>
+</ol>
+
+<h2>Set up your environment</h2>
+
+<ol>
+ <li>Create a new Android project with the following properties:
+ <ul>
+ <li>Minimum SDK Version: L</li>
+ <li>Target SDK Version: L</li>
+ <li>Build Target: L</li>
+ </ul>
+ </li>
+ <li>Choose the theme <code>Theme.Material</code>
+ <!-- put in name as it appears in Eclipse menu? -->
+
+</ol>
diff --git a/docs/html/preview/support.jd b/docs/html/preview/support.jd
new file mode 100644
index 0000000..23ce6ff
--- /dev/null
+++ b/docs/html/preview/support.jd
@@ -0,0 +1,22 @@
+page.title=Support
+
+@jd:body
+
+<p>If you've encountered bugs or have feedback about the L Developer Preview, create
+an issue on our bug tracker</p>
+
+<p>Go to the Bug Tracker</p>
+
+<h2>Release Notes</h2>
+
+<p>June 25, 2014 - Initial Release of the L Developer Preview</p>
+
+<ul>
+ <li></li>
+ <li></li>
+ <li></li>
+ <li></li>
+ <li></li>
+ <li></li>
+ <li></li>
+ </ul>
diff --git a/docs/html/preview/tos.jd b/docs/html/preview/tos.jd
new file mode 100644
index 0000000..602439f
--- /dev/null
+++ b/docs/html/preview/tos.jd
@@ -0,0 +1,9 @@
+page.title=License Agreement
+
+@jd:body
+
+<p><!-- Will this link change before we publish (to a clean version of the doc)?
+ Or will we scrub the doc's comments & revision history? -->
+<a href="https://docs.google.com/a/google.com/document/d/1OixnM1Q890ExOzDB3Z-FDD6Sb2kF4uZQiMxsYVII8F0/edit?usp=sharing">L
+Preview Terms of Service</a>
+</p>
\ No newline at end of file
diff --git a/docs/html/sdk/exploring.jd b/docs/html/sdk/exploring.jd
index 7749060..b34c1cf 100644
--- a/docs/html/sdk/exploring.jd
+++ b/docs/html/sdk/exploring.jd
@@ -5,163 +5,6 @@
@jd:body
-<p>The Android SDK is composed of modular packages that you can download separately using
-the Android SDK Manager. For example, when the SDK Tools are updated or a new version of
-the Android platform is released, you can use the SDK Manager to quickly download them to
-your environment. Simply follow the procedures described in <a
-href="{@docRoot}sdk/installing/adding-packages.html">Adding Platforms and Packages</a>.</p>
-
-<p>There are several different packages available for the Android SDK. The table below describes
-most of the available packages and where they're located once you download them.</p>
-
-
-<h2 id="Packages">Available Packages</h2>
-
-
-<table>
- <tr><th>Package</th><th>Description</th><th>File Location</th></tr>
- <tr>
- <td><a href="{@docRoot}tools/sdk/tools-notes.html">SDK Tools</a></td>
- <td>Contains tools for debugging and testing, plus other
-utilities that are required to develop an app. If you've just installed the SDK starter package,
-then you already have the latest version of this package. Make sure you keep this up to date.</td>
- <td>{@code <sdk>/tools/}</td></tr>
- <tr><td>SDK Platform-tools</td>
- <td>Contains platform-dependent tools for developing and debugging
-your application. These tools support the latest features of the Android platform and are typically
-updated only when a new platform becomes available. These tools are always backward compatible with
-older platforms, but you must be sure that you have the latest version of these tools when you
-install a new SDK platform.</td>
- <td>{@code <sdk>/platform-tools/}</td>
- </tr>
-
- <tr>
- <td>Documentation</td>
- <td>An offline copy of the latest documentation for the Android
-platform APIs.</td>
- <td>{@code <sdk>/docs/}</td>
- </tr>
- <tr><td>SDK Platform</td>
- <td>There's one SDK Platform available for each version of Android. It includes an {@code
-android.jar} file with a fully compliant Android library. In order to build an Android app, you must
-specify an SDK platform as your build target.</td>
- <td>{@code <sdk>/platforms/<android-version>/}</td>
- </tr>
- <tr>
- <td>System Images</td>
- <td>Each platform version offers one or more different system images (such as for ARM
-and x86). The Android emulator requires a system image to operate. You should always test your
-app on the latest version of Android and using the emulator with the latest system image is a
-good way to do so.</td>
- <td>{@code <sdk>/platforms/<android-version>/}</td>
- </tr>
- <tr>
- <td>Sources for Android SDK</td>
- <td>A copy of the Android platform source code that's useful for
-stepping through the code while debugging your app.</td>
- <td>{@code <sdk>/sources/}</td>
- </tr>
- <tr>
- <td><a href="{@docRoot}tools/samples/index.html">Samples for SDK</a></td>
- <td>A collection of sample apps that demonstrate a variety of the
-platform APIs. These are a great resource to browse Android app code. The API Demos app in
-particular provides a huge number of small demos you should explore.</td>
- <td>{@code <sdk>/platforms/<android-version>/samples/}</td>
- </tr>
- <tr>
- <td><a href="http://developers.google.com/android">Google APIs</a></td>
- <td>An SDK add-on that provides both a platform you can use to develop an app
-using special Google APIs and a system image for the emulator so you can test your app using the
-Google APIs.</td>
- <td>{@code <sdk>/add-ons/}</td>
- </tr>
-
- <tr>
- <td><a href="{@docRoot}tools/support-library/index.html">Android Support</a></td>
- <td>A static library you can include in your app sources in order to use powerful
-APIs that aren't available in the standard platform. For example, the support library
-contains versions of the {@link android.support.v4.app.Fragment} class that's compatible with
-Android 1.6 and higher (the class was originally introduced in Android 3.0) and the {@link
-android.support.v4.view.ViewPager} APIs that allow you to easily build a side-swipeable UI.</td>
- <td>{@code <sdk>/extras/android/support/}</td>
- </tr>
- <tr>
- <td><a href="{@docRoot}google/play/billing/index.html">Google Play Billing</a></td>
- <td>Provides the static libraries and samples that allow you to
-integrate billing services in your app with Google Play.</td>
- <td>{@code <sdk>/extras/google/}</td>
- </tr>
- <tr>
- <td><a href="{@docRoot}google/play/licensing/index.html">Google Play Licensing</a></td>
- <td>Provides the static libraries and samples that allow you to perform license verification for
-your app when distributing with Google Play.</td>
- <td>{@code <sdk>/extras/google/}</td>
- </tr>
-</table>
-
-<p>The above table is not comprehensive and you can <a
-href="#AddingSites">add new sites</a> to download additional packages from third-parties.</p>
-
-<p>In some cases, an SDK package may require a specific minimum revision of
-another package or SDK tool. For example, there may be a dependency between the ADT Plugin for
-Eclipse and
-the SDK Tools package. When you install the SDK Tools
-package, you should also upgrade to the required version of ADT (if you
-are developing in Eclipse). In this case, the major version number for your ADT plugin should
-always match the revision number of your SDK Tools (for example, ADT 8.x requires SDK Tools r8).
-</p>
-
-<p>The development tools will notify you with debug warnings if there is dependency that you need to
-address. The Android SDK Manager also enforces dependencies by requiring that you download any
-packages that are needed by those you have selected.</p>
-
-
-
-
-
-<h2 id="AddingSites">Adding New Sites</h2>
-
-<p>By default, <strong>Available Packages</strong> displays packages available from the
-<em>Android Repository</em> and <em>Third party Add-ons</em>. You can add other sites that host
-their own Android SDK add-ons, then download the SDK add-ons
-from those sites.</p>
-
-<p>For example, a mobile carrier or device manufacturer might offer additional
-API libraries that are supported by their own Android-powered devices. In order
-to develop using their libraries, you must install their Android SDK add-on, if it's not already
-available under <em>Third party Add-ons</em>. </p>
-
-<p>If a carrier or device manufacturer has hosted an SDK add-on repository file
-on their web site, follow these steps to add their site to the Android SDK
-Manager:</p>
-
-<ol>
- <li>Select <strong>Available Packages</strong> in the left panel.</li>
- <li>Click <strong>Add Add-on Site</strong> and enter the URL of the
-<code>repository.xml</code> file. Click <strong>OK</strong>.</li>
-</ol>
-<p>Any SDK packages available from the site will now be listed under a new item named
-<strong>User Add-ons</strong>.</p>
-
-
-
-
-<h2 id="troubleshooting">Troubleshooting</h2>
-
-<p><strong>Problems connecting to the SDK repository</strong></p>
-
-<p>If you are using the Android SDK Manager to download packages and are encountering
-connection problems, try connecting over http, rather than https. To switch the
-protocol used by the Android SDK Manager, follow these steps: </p>
-
-<ol>
- <li>With the Android SDK Manager window open, select "Settings" in the
- left pane. </li>
- <li>On the right, in the "Misc" section, check the checkbox labeled "Force
- https://... sources to be fetched using http://..." </li>
- <li>Click <strong>Save & Apply</strong>.</li>
-</ol>
-
diff --git a/docs/html/sdk/index.jd b/docs/html/sdk/index.jd
index 9ee1cca..aa4fd68 100644
--- a/docs/html/sdk/index.jd
+++ b/docs/html/sdk/index.jd
@@ -206,12 +206,10 @@
<div id="next-steps" style="display:none;position:absolute;width:inherit">
- <p>Now that you've downloaded the Android SDK, you don't need to return here
- for SDK updates. The SDK tools allow you to
- install additional packages and future updates from the SDK Manager.</p>
- <p>For instructions about setting up your Android SDK for the first time,
- read <a id="next-link" href="{@docRoot}sdk/installing/bundle.html">Setting
- Up the ADT Bundle</a>.</p>
+ <p>You're just a few steps away from building apps for Android!</p>
+ <p>In a moment, you'll be redirected to <a
+ id="next-link" href="{@docRoot}sdk/installing/index.html">Installing the
+ Android SDK</a>.</p>
</div><!-- end next-steps -->
@@ -232,7 +230,6 @@
</div>
-
</div><!-- end TOS -->
@@ -255,16 +252,30 @@
<b>ADT (Android Developer Tools)</b> to
streamline your Android app development.</p>
-<p>With a single download, the ADT Bundle
+
+<!-- this appears when viewing the online docs -->
+<div class="online" style="margin-bottom:85px">
+
+<a class="big button subtitle" id="download-bundle-button"
+href="" style="width:295px;display:block;margin:25px 0" ></a>
+
+<p id="not-supported">Choose the SDK package for your OS from the table below.</p>
+
+
+ <p>With a single download, the Eclipse ADT bundle
includes everything you need to begin developing apps:</p>
<ul>
<li>Eclipse + ADT plugin</li>
<li>Android SDK Tools</li>
<li>Android Platform-tools</li>
-<li>The latest Android platform</li>
-<li>The latest Android system image for the emulator</li>
+<li>A version of the Android platform</li>
+<li>A version of the Android system image for the emulator</li>
</ul>
+</div>
+<!-- end online -->
+
+
<!-- this appears when viewing the offline docs -->
<p class="offline">
@@ -277,52 +288,44 @@
<div class="col-7" style="margin-right:0;">
- <img src="{@docRoot}images/sdk-cube.png" alt="" height=264 />
+ <img src="{@docRoot}images/tools-home.png" alt="" height="347" width="400" />
-<!-- this appears when viewing the online docs -->
-<div class="online">
-
-<a class="big button subtitle" id="download-bundle-button"
-href="" style="display:none;width:265px;margin:0 auto;display:block" ></a>
-
-
-
-
-<p id="not-supported">Choose the SDK package for your OS from the table below.</p>
-
-</div>
-<!-- end online -->
</div><!-- end col-7 -->
+<div class="col-7" style="background: #ddd;
+ padding: 30px 20px; width:350px; margin:20px 0 0 20px;">
+
+ <h3 style="margin-top:0">
+ <a href="/sdk/installing/studio.html">Get Android Studio Beta</a>
+ </h3>
+
+ <p>
+ Android Studio is a new IDE powered by IntelliJ that provides new features and improvements
+ over ADT. It's currently in beta but will be the official Android IDE once it's ready.</p>
+ <p style="margin: 0;">
+ <a href="/sdk/installing/studio.html">Learn more about Android Studio</a></p>
+ </div>
+
+
<!-- alternative SDK options -->
-<div class="col-13" style="margin:0;">
+<div class="col-13" style="margin:-70px 0 0;">
-<!-- this appears only when viewing the online docs -->
-<div class="online caution">
-<h3 style="margin:0 0 10px 0;font-size:14px">Android Studio Early Access Preview</h3>
+<p style="width:340px">If you prefer to use an existing version of Eclipse or another IDE,
+you can instead download the stand-alone Android SDK Tools:</p>
-<p>A new Android development environment called Android Studio,
-based on IntelliJ IDEA, is now available as an <strong>early access preview</strong>.
-For more information, see
-<a href="{@docRoot}sdk/installing/studio.html">Getting Started with Android Studio</a>.</p>
-</div>
-
-<p>If you prefer to use an existing version of Eclipse or another IDE,
-you can instead take a more customized approach to installing
-the Android SDK. See the following instructions:</p>
<h4 id="ExistingIDE"><a href='' class="expandable"
onclick="toggleExpandable(this,'.myide');hideExpandable('.pax,.reqs');return false;"
- >USE AN EXISTING IDE</a></h4>
+ >GET THE SDK FOR AN EXISTING IDE</a></h4>
<div class="col-13 myide" style="margin:0 0 15px;display:none;">
@@ -335,13 +338,11 @@
<a class="button subtitle" id="download-tools-button" href="" style="display:none" ></a>
</p>
-
</div>
-
<h4 id="Requirements"><a href='' class="expandable"
onclick="toggleExpandable(this,'.reqs');hideExpandable('.pax,.myide');return false;"
>SYSTEM REQUIREMENTS</a></h4>
@@ -361,23 +362,9 @@
</ul>
</div>
-<div class="col-6 reqs" style="margin:0 0 15px 20px;display:none;">
-<h5>Eclipse IDE</h5>
- <ul>
- <li><a href="http://eclipse.org/mobile/">Eclipse</a> 3.7.2 (Indigo) or greater
-<p class="note"><strong>Note:</strong> Eclipse 3.6 (Helios) is no longer
-supported with the latest version of ADT.</p></li>
- <li>Eclipse <a href="http://www.eclipse.org/jdt">JDT</a> plugin (included
-in most Eclipse IDE packages) </li>
- <li><a href="http://www.oracle.com/technetwork/java/javase/downloads/index.html">JDK 6</a>
- (JRE alone is not sufficient)</li>
- <li><a href="{@docRoot}tools/sdk/eclipse-adt.html">Android Development Tools plugin</a>
-(recommended)</li>
- <li><strong>Not</strong> compatible with GNU Compiler for Java (gcj)</li>
- </ul>
+<div class="col-7 reqs" style="margin:0 0 80px 20px;display:none;">
-
-<h5>Other development environments</h5>
+<h5>Development tools</h5>
<ul>
<li><a href="http://www.oracle.com/technetwork/java/javase/downloads/index.html">JDK 6</a>
(JRE alone is not sufficient)</li>
@@ -387,6 +374,4 @@
<p class="note"><strong>Note:</strong> Some Linux distributions may include JDK 1.4 or Gnu Compiler
for Java, both of which are <em>not</em> supported for Android development. </p>
-</div><!-- end col-7 reqs -->
-
-
+</div><!-- end reqs -->
\ No newline at end of file
diff --git a/docs/html/sdk/installing/adding-packages.jd b/docs/html/sdk/installing/adding-packages.jd
index bba936e..e6c0118 100644
--- a/docs/html/sdk/installing/adding-packages.jd
+++ b/docs/html/sdk/installing/adding-packages.jd
@@ -1,63 +1,226 @@
-page.title=Adding Platforms and Packages
+page.title=Adding SDK Packages
@jd:body
+<style>
+ol.large {
+ margin-left:0;
+}
+ol.large > li {
+ list-style-position: inside;
+ list-style-type:none;
+ margin:30px 0 0 0;
+ padding:30px 20px;
+ background:#eee;
+}
+ol.large > li:nth-child(odd) {
+}
+ol.large > li:before {
+ display:inline;
+ left:-40px;
+ float:left;
+ width:20px;
+ font-size:20px;
+ line-height:20px;
+}
+ol.large > li > h2 {
+ font-size:20px;
+ line-height:20px;
+ padding:0 0 0 20px;
+ margin:0 0 20px 0;
+ display:inline-block;
+ font-weight:normal;
+}
+ol.large > li:nth-child(1):before {
+ content:"1. ";
+}
+ol.large > li:nth-child(2):before {
+ content:"2. ";
+}
+ol.large > li:nth-child(3):before {
+ content:"3. ";
+}
+ol.large > li:nth-child(4):before {
+ content:"4. ";
+}
+ol.large > li:nth-child(5):before {
+ content:"5. ";
+}
+ol.large > li:nth-child(6):before {
+ content:"6. ";
+}
+</style>
-<p>The Android SDK separates tools, platforms, and other components into packages you can
- download using the Android SDK Manager. The original
-SDK package you've downloaded includes only the SDK Tools. To develop an Android app,
-you also need to download at least one Android platform and the latest SDK Platform-tools.</p>
-<ol>
-<li>Launch the SDK Manager.
-<p>If you've used the Windows installer to install the SDK tools, you should already have the
-Android SDK Manager open. Otherwise, you can launch the Android SDK Manager in one of the following
-ways:</p>
+<p>
+By default, the Android SDK does not include everything you need to start developing.
+The SDK separates tools, platforms, and other components into packages you can
+download as needed using the
+<a href="{@docRoot}tools/help/sdk-manager.html">Android SDK Manager</a>.
+So before you can start, there are a few packages you should add to your Android SDK.</p>
+
+<p>To start adding packages, launch the Android SDK Manager in one of the following ways:</p>
<ul>
- <li>On Windows, double-click the <code>SDK Manager.exe</code> file at the root of the Android
-SDK directory.</li>
- <li>On Mac or Linux, open a terminal and navigate to the <code>tools/</code> directory in the
-Android SDK, then execute <code>android sdk</code>.</li>
+ <li>In Eclipse or Android Studio, click <strong>SDK Manager</strong>
+<img src="{@docRoot}images/tools/sdk-manager-studio.png"
+style="vertical-align:bottom;margin:0;height:17px" /> in the toolbar.</li>
+ <li>If you're not using Eclipse or Android Studio:
+ <ul>
+ <li>Windows: Double-click the <code>SDK Manager.exe</code> file at the root of the Android
+ SDK directory.</li>
+ <li>Mac/Linux: Open a terminal and navigate to the <code>tools/</code> directory in the
+ Android SDK, then execute <code>android sdk</code>.</li>
+ </ul>
+ </li>
</ul>
+
+<p>When you open the SDK Manager for the first time, several packages will be selected by
+default. Leave these selected, but be sure you have everything you need
+to get started by following these steps:</p>
+
+
+<ol class="large">
+<li>
+ <h2 id="GetTools" class="norule">Get the latest SDK tools</h2>
+
+<img src="/images/sdk_manager_packages.png" alt="" width="350" style="float:right;margin-left:20px" />
+
+ <p>As a minimum when setting up the Android SDK,
+ you should download the latest tools and Android platform:</p>
+ <ol>
+ <li>Open the Tools directory and select:
+ <ul>
+ <li><strong>Android SDK Tools</strong></li>
+ <li><strong>Android SDK Platform-tools</strong></li>
+ <li><strong>Android SDK Build-tools</strong> (highest version)</li>
+ </ul>
+ </li>
+ <li>Open the first Android X.X folder (the latest version) and select:
+ <ul>
+ <li><strong>SDK Platform</strong></li>
+ <li>A system image for the emulator, such as <br>
+ <strong>ARM EABI v7a System Image</strong></li>
+ </ul>
+ </li>
+ </ol>
</li>
-<li>The SDK Manager shows all the SDK packages available for you to add to your Android SDK.
-As a minimum configuration for your SDK, we recommend you install the following:
-<ul>
- <li>The latest Tools packages (check the <strong>Tools</strong> folder).</li>
- <li>The latest version of Android (check the first <strong>Android</strong> folder).</li>
- <li>The Android Support Library (open the <strong>Extras</strong> folder and check
- <strong>Android Support Library</strong>).</li>
-</ul>
+<li>
+ <h2 id="GetSupportLib" class="norule">Get the support library for additional APIs</h2>
-<p>Once you've chosen your packages, click <strong>Install</strong>. The Android SDK Manager
-installs the selected packages into your Android SDK environment.</li>
+ <div class="sidebox">
+ <p>The support library is required for:</p>
+ <ul>
+ <li><a href="{@docRoot}wear/index.html">Android Wear</a></li>
+ <li><a href="{@docRoot}tv/index.html">Android TV</a></li>
+ <li><a href="{@docRoot}google/play-services/cast.html">Google Cast</a></li>
+ </ul>
+
+ <p>It also provides these popular APIs:</p>
+ <ul>
+ <li><a href="{@docRoot}reference/android/support/v4/widget/DrawerLayout.html">Navigation
+ drawer</a></li>
+ <li><a href="{@docRoot}reference/android/support/v4/view/ViewPager.html">Swipe views</a></li>
+ <li><a href="{@docRoot}reference/android/support/v7/app/ActionBar.html">Backward-compatible
+ action bar</a></li>
+ </ul>
+ </div>
+
+ <p>The <a href="{@docRoot}tools/support-library/features.html">Android Support Library</a>
+ provides an extended set of APIs that are compatible with most versions of Android.</p>
+
+ <p>Open the <strong>Extras</strong> directory and select:</p>
+ <ul>
+ <li><strong>Android Support Repository</strong></li>
+ <li><strong>Android Support Library</strong></li>
+ </ul>
+
+ <p> </p>
+ <p> </p>
+
+</li>
+
+
+<li>
+ <h2 id="GetGoogle" class="norule">Get Google Play services for even more APIs</h2>
+
+ <div class="sidebox">
+
+ <p>The Google Play services APIs provide a variety of features and services for your Android
+ apps, such as:</p>
+ <ul>
+ <li><a href="{@docRoot}google/play-services/plus.html">User authentication</a></li>
+ <li><a href="{@docRoot}google/play-services/maps.html">Google Maps</a></li>
+ <li><a href="{@docRoot}google/play-services/cast.html">Google Cast</a></li>
+ <li><a href="{@docRoot}google/play-services/games.html">Games achievements and
+ leaderboards</a></li>
+ <li><a href="{@docRoot}google/play-services/index.html">And much more</a></li>
+ </ul>
+ </div>
+
+ <p>To develop with Google APIs, you need the Google Play services package:</p>
+ <p>Open the <strong>Extras</strong> directory and select:</p>
+ <ul>
+ <li><strong>Google Repository</strong></li>
+ <li><strong>Google Play services</strong></li>
+ </ul>
+
+ <p class="note"><strong>Note:</strong> Google Play services APIs are not available on all
+ Android-powered devices, but are available on all devices with Google Play Store. To use these
+ APIs in the Android emulator, you must also install the the <strong>Google APIs</strong>
+ system image from the latest Android X.X directory in the SDK Manager.</p>
+</li>
+
+
+<li>
+ <h2 id="Install" class="norule">Install the packages</h2>
+ <p>Once you've selected all the desired packages, continue to install:</p>
+ <ol>
+ <li>Click <strong>Install X packages</strong>.</li>
+ <li>In the next window, double-click each package name on the left
+ to accept the license agreement for each.</li>
+ <li>Click <strong>Install</strong>.</li>
+ </ol>
+ <p>The download progress is shown at the bottom of the SDK Manager window.
+ <strong>Do not exit the SDK Manager</strong> or it will cancel the download.</p>
+</li>
+
+<li>
+ <h2 id="Build" class="norule">Build something!</h2>
+
+<p>With the above packages now in your Android SDK, you're ready to build apps
+for Android. As new tools and other APIs become available, simply launch the SDK Manager
+ to download the new packages for your SDK.</p>
+
+<p>Here are a few options for how you should proceed:</p>
+
+<div class="cols" style="padding:10px 0">
+<div class="col-4">
+<h3>Get started</h3>
+<p>If you're new to Android development, learn the basics of Android apps by following
+the guide to <strong><a href="{@docRoot}training/basics/firstapp/index.html"
+>Building Your First App</a></strong>.</p>
+
+</div>
+<div class="col-4 box">
+<h3>Build for wearables</h3>
+<p>If you're ready to start building apps for Android wearables, see the guide to
+<strong><a href="{@docRoot}wear/preview/start.html">Building Apps for Android Wear</a></strong>.</p>
+
+</div>
+<div class="col-4 box">
+<h3>Use Google APIs</h3>
+<p>To start using Google APIs, such as Maps or
+Play Game services, see the guide to
+<strong><a href="{@docRoot}google/play-services/setup.html">Setting Up Google Play
+Services</a></strong>.</p>
+
+</div>
+</div><!-- end cols -->
+
+
+</li>
+
</ol>
-<p>With these packages installed, you're ready to start developing.
-To get started, read <a href="{@docRoot}training/basics/firstapp/index.html"
->Building Your First App</a>.</p>
-
-<img src="/images/sdk_manager_packages.png" alt="" height="396" />
-<p class="img-caption"><strong>Figure 1.</strong> The Android SDK Manager shows the
-SDK packages that are available, already installed, or for which an update is available.</p>
-
-
-
-<h3>Additional information</h3>
-
-<ul>
- <li>For more information about using the SDK Manager and some of the available packages,
-see the <a href="{@docRoot}tools/help/sdk-manager.html">SDK Manager</a> document.</li>
- <li>This web site provides all information you need to develop Android apps, including <a
-href="{@docRoot}design/index.html">design guidelines</a>,
-<a href="{@docRoot}training/index.html">developer training</a>, <a
-href="{@docRoot}reference/packages.html">API reference</a>, and information
-about how you can <a href="{@docRoot}distribute/index.html">distribute your app</a>. We recommend
-you begin by reading <a href="{@docRoot}training/basics/firstapp/index.html"
->Building Your First App</a>.</li>
- <li>For additional resources about developing and distributing your app, see the
-<a href="{@docRoot}support.html">Developer Support Resources</a>.</li>
-</ul>
-
diff --git a/docs/html/sdk/installing/bundle.jd b/docs/html/sdk/installing/bundle.jd
index 1f7da55..22bdd11 100644
--- a/docs/html/sdk/installing/bundle.jd
+++ b/docs/html/sdk/installing/bundle.jd
@@ -1,45 +1,3 @@
page.title=Setting Up the ADT Bundle
@jd:body
-
-
-<p>The ADT Bundle provides everything you need to start developing apps, including
-a version of the Eclipse IDE with built-in <b>ADT (Android Developer Tools)</b> to
-streamline your Android app development.
-If you haven't already, go download the <a href="{@docRoot}sdk/index.html"
->Android ADT Bundle</a>. (If you downloaded the SDK Tools only, for use with an
-existing IDE, you should instead read
-<a href="{@docRoot}sdk/installing/index.html">Setting Up an Existing IDE</a>.)</p>
-
-<h3>Install the SDK and Eclipse IDE</h3>
-<ol>
-<li>Unpack the ZIP file
-(named {@code adt-bundle-<os_platform>.zip}) and save it to an appropriate location,
-such as a "Development" directory in your home directory.</li>
-<li>Open the {@code adt-bundle-<os_platform>/eclipse/} directory and launch
-<strong>eclipse</strong>.</li>
-</ol>
-
-<p>That's it! The IDE is already loaded with the Android Developer Tools plugin and
-the SDK is ready to go. To start developing, read <a href="{@docRoot}training/basics/firstapp/index.html"
->Building Your First App</a>.</p>
-
-<p class="caution"><strong>Caution:</strong> Do not move any of the files or directories
-from the {@code adt-bundle-<os_platform>} directory. If you move the {@code eclipse}
-or {@code sdk} directory, ADT will not be able to locate the SDK and you'll
-need to manually update the ADT preferences.</p>
-
-<h3>Additional information</h3>
-
-<p>As you continue developing apps, you may need to install additional versions
-of Android for the emulator and other packages such as the library for
-Google Play In-app Billing. To install more packages, use
-the <a href="{@docRoot}tools/help/sdk-manager.html">SDK Manager</a>.</p>
-
-<p>Everything you need to develop Android apps is on this web site, including <a
-href="{@docRoot}design/index.html">design guidelines</a>,
-<a href="{@docRoot}training/index.html">developer training</a>, <a
-href="{@docRoot}reference/packages.html">API reference</a>, and information
-about how you can <a href="{@docRoot}distribute/index.html">distribute your app</a>.
-For additional resources about developing and distributing your app, see the
-<a href="{@docRoot}support.html">Developer Support Resources</a>.</p>
\ No newline at end of file
diff --git a/docs/html/sdk/installing/index.jd b/docs/html/sdk/installing/index.jd
index 6b63ba7..3671726 100644
--- a/docs/html/sdk/installing/index.jd
+++ b/docs/html/sdk/installing/index.jd
@@ -1,19 +1,213 @@
-page.title=Setting Up an Existing IDE
+page.title=Installing the Android SDK
@jd:body
-
-<p>You should have already downloaded the <a href="{@docRoot}sdk/index.html#ExistingIDE"
->Android SDK Tools</a>. (If you downloaded the ADT Bundle, you should instead read
-<a href="{@docRoot}sdk/installing/bundle.html">Setting Up the ADT Bundle</a>.)</p>
-
-<p>The SDK Tools package is not the complete SDK environment. It includes only the core SDK tools, which you can
-use to download the rest of the SDK packages (such as the latest system image).</p>
+<style>
+.paging-links {
+ margin:0 0 80px;
+}
+.paging-links .next-page-link {
+ right:initial;
+}
+.procedure-box {
+ padding:20px 20px 5px;
+ margin-bottom:1em;
+ background:#eee;
+}
+</style>
-<div id="win" class="docs" style="display:none">
-<h3>Getting started on Windows</h3>
+<!-- ################### ADT BUNDLE ####################### -->
+<div id="adt" heading="Installing the Eclipse ADT Bundle" style="display:none">
+
+
+<p>The Eclipse ADT Bundle provides everything you need to start developing apps, including
+the Android SDK tools and a version of the Eclipse IDE with built-in ADT
+(Android Developer Tools) to streamline your Android app development.</p>
+
+<p>If you didn't download the Eclipse ADT bundle, go <a href="{@docRoot}sdk/index.html"
+><b>download the Eclipse ADT bundle now</b></a>, or switch to the
+<a href="{@docRoot}sdk/installing/index.html?pkg=studio">Android Studio
+install</a> or <a href="{@docRoot}sdk/installing/index.html?pkg=tools">stand-alone SDK Tools
+install</a> instructions</i>.</p>
+
+<div class="procedure-box">
+<p><b>To set up the ADT Bundle:</b></p>
+<ol>
+<li>Unpack the ZIP file
+(named {@code adt-bundle-<os_platform>.zip}) and save it to an appropriate location,
+such as a "Development" directory in your home directory.</li>
+<li>Open the {@code adt-bundle-<os_platform>/eclipse/} directory and launch
+<strong>Eclipse</strong>.</li>
+</ol>
+
+<p class="caution"><strong>Caution:</strong> Do not move any of the files or directories
+from the {@code adt-bundle-<os_platform>} directory. If you move the {@code eclipse/}
+or {@code sdk/} directory, ADT will not be able to locate the SDK and you'll
+need to manually update the ADT preferences.</p>
+</div>
+
+<p>Eclipse with ADT is now ready and loaded with the Android developer tools, but there are still
+a couple packages you should add to make your Android SDK complete.</p>
+
+<p class="paging-links">
+<a href="{@docRoot}sdk/installing/adding-packages.html" class="next-page-link">
+Continue: Adding SDK Packages</a></p>
+
+
+</div>
+<!-- ################ END ADT BUNDLE ##################### -->
+
+
+
+
+
+
+<!-- ################ STUDIO ##################### -->
+<div id="studio" heading="Installing Android Studio" style="display:none">
+
+<p>Android Studio provides everything you need to start developing apps, including
+the Android SDK tools and the Android Studio IDE (powered by IntelliJ) to
+streamline your Android app development.</p>
+
+<p>If you didn't download Android Studio, go <a href="{@docRoot}sdk/installing/studio.html"
+><b>download Android Studio now</b></a>, or switch to the
+<a href="{@docRoot}sdk/installing/index.html?pkg=adt">Eclipse ADT
+install</a> or <a href="{@docRoot}sdk/installing/index.html?pkg=tools">stand-alone SDK Tools
+install</a> instructions.</p>
+
+
+<p>Before you set up Android Studio, be sure you have installed
+JDK 6 or greater (the JRE alone is not sufficient). To check if you
+have JDK installed (and which version), open a terminal and type <code>javac -version</code>.
+If the JDK is not available or the version is lower than 6,
+<a href="http://www.oracle.com/technetwork/java/javase/downloads/index.html" class="external-link"
+>go download JDK</a>.</p>
+
+
+<div class="procedure-box">
+
+<p id="instructions-toggle"
+style="float:right;font-size:13px"><a href='' onclick='showAll();return false;'
+>[ Show instructions for all platforms ]</a></p>
+
+<div class="win docs" style="display:none">
+
+<p><b>To set up Android Studio on Windows:</b></p>
+ <ol>
+ <li>Launch the downloaded EXE file, {@code android-studio-bundle-<version>.exe}.</li>
+ <li>Follow the setup wizard to install Android Studio.
+
+ <p>On some Windows systems, the launcher script does not find where Java is installed.
+ If you encounter this problem,
+ you need to set an environment variable indicating the correct location.</p>
+ <p>Select <strong>Start menu > Computer > System Properties >
+ Advanced System Properties</strong>. Then open <strong>Advanced tab > Environment
+ Variables</strong> and add a new system variable <code>JAVA_HOME</code> that points to
+ your JDK folder, for example <code>C:\Program Files\Java\jdk1.7.0_21</code>.</p>
+ </p>
+ </li>
+
+ </ol>
+
+
+<p>The individual tools and
+other SDK packages are saved within the Android Studio application directory.
+If you need to access the tools directly, use a terminal to navigate into the application and locate
+the {@code sdk/} directory. For example:</p>
+<p><code>\Users\<user>\AppData\Local\Android\android-studio\sdk\</code></p>
+
+
+
+</div><!-- end windows -->
+
+
+<div class="mac docs" style="display:none">
+
+<p><b>To set up Android Studio on Mac OSX:</b></p>
+ <ol>
+ <li>Open the downloaded DMG file, {@code android-studio-bundle-<version>.dmg}.</li>
+ <li>Drag and drop Android Studio into the Applications folder.
+ <p>
+ Depending on your security settings, when you attempt to open Android Studio, you might
+ see a warning that says the package is damaged and should be moved to the trash. If this
+ happens, go to <strong>System Preferences > Security & Privacy</strong> and under
+ <strong>Allow applications downloaded from</strong>, select <strong>Anywhere</strong>.
+ Then open Android Studio again.</p>
+ </li>
+ </ol>
+
+<p>The individual tools and
+other SDK packages are saved within the Android Studio application directory.
+If you need access the tools directly, use a terminal to navigate into the application and locate
+the {@code sdk/} directory. For example:</p>
+<p><code>/Applications/Android\ Studio.app/sdk/</code></p>
+
+
+</div><!-- end mac -->
+
+
+<div class="linux docs" style="display:none">
+
+<p><b>To set up Android Studio on Linux:</b></p>
+
+ <ol>
+ <li>Unpack the downloaded Tar file, {@code android-studio-bundle-<version>.tgz}, into an appropriate
+ location for your applications.
+ <li>To launch Android Studio, navigate to the {@code android-studio/bin/} directory
+ in a terminal and execute {@code studio.sh}.
+ <p>You may want to add {@code android-studio/bin/} to your PATH environmental
+ variable so that you can start Android Studio from any directory.</p>
+ </li>
+ </ol>
+
+</div><!-- end linux -->
+</div><!-- end procedure box -->
+
+<p>Android Studio is now ready and loaded with the Android developer tools, but there are still a
+couple packages you should add to make your Android SDK complete.</p>
+
+<p class="paging-links">
+<a href="{@docRoot}sdk/installing/adding-packages.html" class="next-page-link">
+Continue: Adding SDK Packages</a></p>
+
+
+</div>
+<!-- ################ END STUDIO ##################### -->
+
+
+
+
+
+
+
+
+
+<!-- ################ JUST SDK TOOLS ##################### -->
+<div id="tools" heading="Installing the Stand-alone SDK Tools" style="display:none">
+
+
+<p>The stand-alone SDK Tools package does not include a complete Android development environment.
+It includes only the core SDK tools, which you can access from a command line or with a plugin
+for your favorite IDE (if available).</p>
+
+<p>If you didn't download the SDK tools, go <a href="{@docRoot}sdk/index.html"
+><b>download the SDK now</b></a>,
+or switch to the <a href="{@docRoot}sdk/installing/index.html?pkg=adt">Eclipse ADT
+install</a> or <a href="{@docRoot}sdk/installing/index.html?pkg=studio">Android Studio
+install</a> instructions.</p>
+
+
+<div class="procedure-box">
+<p id="instructions-toggle"
+style="float:right;font-size:13px"><a href='' onclick='showAll();return false;'
+>[ Show instructions for all platforms ]</a></p>
+
+<div class="win docs" style="display:none">
+
+<p><b>To get started on Windows:</b></p>
+
<p>Your download package is an executable file that starts an installer. The installer checks your machine
for required tools, such as the proper Java SE Development Kit (JDK) and installs it if necessary.
The installer then saves the Android SDK Tools into a default location (or you can specify the location).</p>
@@ -21,15 +215,9 @@
<ol>
<li>Double-click the executable ({@code .exe} file) to start the install.</li>
<li>Make a note of the name and location in which it saves the SDK on your system—you will need to
-refer to the SDK directory later, when setting up the ADT plugin and when using
+refer to the SDK directory later when using
the SDK tools from the command line.</li>
-<li>Once the installation completes, the installer offers to start the Android SDK Manager.
-If you'll be using Eclipse, <strong>do not</strong> start the Android SDK Manager,
-and instead move on to <a href="{@docRoot}sdk/installing/installing-adt.html"
->Installing the Eclipse Plugin</a>.
-<p>If you're using a different IDE,
-start the SDK Manager and read <a href="{@docRoot}sdk/installing/adding-packages.html"
->Adding Platforms and Packages</a>.</p>
+<li>Once the installation completes, the installer starts the Android SDK Manager.
</li>
</ol>
@@ -37,51 +225,37 @@
-<div id="mac" class="docs" style="display:none">
+<div class="mac docs" style="display:none">
-<h3>Getting started on Mac</h3>
+<p><b>To get started on Mac OSX:</b></p>
-<ol>
-<li>Unpack the ZIP file you've downloaded. By default, it's unpacked
+<p>Unpack the ZIP file you've downloaded. By default, it's unpacked
into a directory named <code>android-sdk-mac_x86</code>. Move it to an appropriate location on your machine,
-such as a "Development" directory in your home directory.
+such as a "Development" directory in your home directory.</p>
<p>Make a note of the name and location of the SDK directory on your system—you will need to
-refer to the SDK directory later, when setting up the ADT plugin and when using
+refer to the SDK directory later when using
the SDK tools from the command line.</p>
-</li>
-<li>If you're using Eclipse, move on to <a href="{@docRoot}sdk/installing/installing-adt.html"
->Installing the Eclipse Plugin</a>. Otherwise, if you're using a different IDE,
-read <a href="{@docRoot}sdk/installing/adding-packages.html"
->Adding Platforms and Packages</a>.</li>
-</ol>
</div>
-<div id="linux" class="docs" style="display:none">
+<div class="linux docs" style="display:none">
-<h3>Getting started on Linux</h3>
+<p><b>To get started on Linux:</b></p>
-<ol>
-<li>Unpack the {@code .tgz} file you've downloaded. By default, the SDK files are unpacked
+<p>Unpack the {@code .tgz} file you've downloaded. By default, the SDK files are unpacked
into a directory named <code>android-sdk-linux_x86</code>. Move it to an appropriate location on your machine,
-such as a "Development" directory in your home directory.
+such as a "Development" directory in your home directory.</p>
<p>Make a note of the name and location of the SDK directory on your system—you will need to
-refer to the SDK directory later, when setting up the ADT plugin and when using
+refer to the SDK directory later when using
the SDK tools from the command line.</p>
-</li>
-<li>If you're using Eclipse, move on to <a href="{@docRoot}sdk/installing/installing-adt.html"
->Installing the Eclipse Plugin</a>. Otherwise, if you're using a different IDE,
-read <a href="{@docRoot}sdk/installing/adding-packages.html"
->Adding Platforms and Packages</a>.</li>
-</ol>
-<h5 id="Troubleshooting"><a href='' class="expandable"
+<h5 id="Troubleshooting" style="margin-bottom:15px"><a href='' class="expandable"
onclick="toggleExpandable(this,'#ubuntu-trouble');return false;"
>Troubleshooting Ubuntu</a></h5>
@@ -122,38 +296,129 @@
</div><!-- end ubuntu trouble -->
+</div><!-- end linux -->
+</div><!-- end procedure box -->
+
+
+<p>The Android SDK tools are now ready to begin developing apps, but there are still a
+couple packages you should add to make your Android SDK complete.</p>
+
+<p class="paging-links">
+<a href="{@docRoot}sdk/installing/adding-packages.html" class="next-page-link">
+Continue: Adding SDK Packages</a></p>
+
+
+</div>
+<!-- ################ END JUST TOOLS ##################### -->
+
+
+
+
+
+<!-- ################ DEFAULT ##################### -->
+<style>
+h3.large-link {
+ display:inline-block;
+ width:100%;
+ text-align:center;
+ border:1px solid #258aaf;
+ padding:10px 0;
+ color:inherit;
+}
+</style>
+
+<div id="default" style="display:none">
+
+<p>If you haven't already done so, <b><a href="{@docRoot}sdk/index.html">click here to download
+the Android SDK</a></b>. </p>
+
+<p>Otherwise, select which SDK package you want to install:</p>
+
+<div class="cols" style="margin-bottom:60px">
+<div class="col-4">
+<a href="{@docRoot}sdk/installing/index.html?pkg=adt">
+<h3 class="large-link">Eclipse ADT</h3>
+</a>
</div>
-<p style="margin-top:2em;"><a href='' onclick='showAll();return false;'>Information for other platforms</a></p>
+<div class="col-4">
+<a href="{@docRoot}sdk/installing/index.html?pkg=studio">
+<h3 class="large-link">Android Studio</h3></a>
+</div>
+
+<div class="col-4">
+<a href="{@docRoot}sdk/installing/index.html?pkg=tools">
+<h3 class="large-link">Stand-alone SDK Tools</h3></a>
+</div>
+</div>
+
+
+</div>
+<!-- ################ END DEFAULT ##################### -->
+
+
+
+
+
<script>
- var $osDocs;
- if (navigator.appVersion.indexOf("Win")!=-1) {
- $osDocs = $('#win');
- } else if (navigator.appVersion.indexOf("Mac")!=-1) {
- $osDocs = $('#mac');
- } else if (navigator.appVersion.indexOf("Linux")!=-1) {
- $osDocs = $('#linux');
- }
- if ($osDocs.length) {
- // reveal only the docs for this OS
- $osDocs.show();
- } else {
- // not running a compatible OS, so just show all the docs
- $('.docs').show();
- }
+// Show proper instructions based on downloaded SDK package
+var package = getUrlParam("pkg");
+if (package == "tools") {
+ // Show the SDK Tools (other IDE) instructions
+ $("h1").text($("#tools").attr('heading'));
+ $("#tools").show();
+} else if (package == "adt") {
+ // Show the ADT instructions
+ $("h1").text($("#adt").attr('heading'));
+ $("#adt").show();
+} else if (package == "studio") {
+ // Show the Android Studio instructions
+ $("h1").text($("#studio").attr('heading'));
+ $("#studio").show();
+} else {
+ // Show the default page content so user can select their setup
+ $("#default").show();
+}
- function showAll() {
- $('.docs').each(function() {
- if (!$(this).is(':visible')) {
- console.log('show')
- $(this).show();
- } else {
- console.log('hide')
- $(this).hide();
- $osDocs.show();
- }
- });
+// Show the proper instructions based on machine OS
+var $osDocs;
+if (navigator.appVersion.indexOf("Win")!=-1) {
+ $osDocs = $('.win');
+} else if (navigator.appVersion.indexOf("Mac")!=-1) {
+ $osDocs = $('.mac');
+} else if (navigator.appVersion.indexOf("Linux")!=-1) {
+ $osDocs = $('.linux');
+}
+
+if ($osDocs.length) {
+ // reveal only the docs for this OS
+ $osDocs.show();
+} else {
+ // not running a compatible OS, so just show all the docs
+ $('.docs').show();
+}
+
+
+/* Shows all the machine OS instructions */
+function showAll() {
+ $('.docs').show();
+ $("#instructions-toggle").hide();
+}
+
+/* Returns the value for the given URL parameter */
+function getUrlParam(param) {
+ var url = window.location.search.substring(1);
+ var variables = url.split('&');
+ for (var i = 0; i < variables.length; i++) {
+ var paramName = variables[i].split('=');
+ if (escape(paramName[0]) == param) {
+ return escape(paramName[1]);
+ }
}
+}
+
+
+
</script>
diff --git a/docs/html/sdk/installing/installing-adt.jd b/docs/html/sdk/installing/installing-adt.jd
index 7bf366c..1e87cd8 100644
--- a/docs/html/sdk/installing/installing-adt.jd
+++ b/docs/html/sdk/installing/installing-adt.jd
@@ -15,19 +15,28 @@
UI, debug your app, and export signed (or unsigned) app packages (APKs) for distribution.
</p>
-<p>If you need to install Eclipse, you can download it from <a href=
-"http://www.eclipse.org/downloads/">eclipse.org/downloads/</a>.</p>
+<p class="note"><strong>Note:</strong> You should install the ADT plugin
+only if you already have an Eclipse installation that you want to continue using. If you do not
+have Eclipse installed, you should instead <b><a href="{@docRoot}sdk/index.html">install
+the complete Android SDK</a></b>, which includes the latest IDE for Android developers.</p>
-
-<p class="note"><strong>Note:</strong> If you prefer to work in a different IDE, you do not need to
-install Eclipse or ADT. Instead, you can directly use the SDK tools to build and
-debug your application.</p>
-
+<p>Your existing Eclipse installation must meet these requirements:</p>
+ <ul>
+ <li><a href="http://eclipse.org/mobile/">Eclipse</a> 3.7.2 (Indigo) or greater
+<p class="note"><strong>Note:</strong> Eclipse 3.6 (Helios) is no longer
+supported with the latest version of ADT.</p></li>
+ <li>Eclipse <a href="http://www.eclipse.org/jdt">JDT</a> plugin (included
+in most Eclipse IDE packages) </li>
+ <li><a href="http://www.oracle.com/technetwork/java/javase/downloads/index.html">JDK 6</a>
+ (JRE alone is not sufficient)</li>oid Development Tools plugin</a>
+(recommended)</li>
+ <li><strong>Not</strong> compatible with GNU Compiler for Java (gcj)</li>
+ </ul>
<h2 id="Download">Download the ADT Plugin</h2>
-
+<p>To add the ADT plugin to Eclipse:</p>
<ol>
<li>Start Eclipse, then select <strong>Help</strong> > <strong>Install New
Software</strong>.</li>
diff --git a/docs/html/sdk/installing/studio.jd b/docs/html/sdk/installing/studio.jd
index 2ad5808..8ac6163 100644
--- a/docs/html/sdk/installing/studio.jd
+++ b/docs/html/sdk/installing/studio.jd
@@ -1,4 +1,4 @@
-page.title=Getting Started with Android Studio
+page.title=Android Studio
page.tags="studio"
@jd:body
@@ -7,7 +7,7 @@
<div style="position:relative;min-height:660px;">
-<h3 style="color:#f80">EARLY ACCESS PREVIEW</h3>
+<h3 style="color:#FF4444;margin:-30px 0 20px">BETA</h3>
<div id="tos" style="position:absolute;display:none;width:inherit;">
<div class="col-13" style="margin:0;"> </div><!-- provides top margin for content -->
@@ -183,23 +183,21 @@
-
-
<div id="main">
-<div class="figure" style="width:400px;margin-top:-20px">
+<div class="figure" style="width:400px;margin-top:-75px">
<img src="{@docRoot}images/tools/android-studio.png" height="330" width="400" style="margin-bottom:20px" />
<a class="big button subtitle" id="download-ide-button"
-href="" style="display:none;width:265px;margin:0 auto;display:block;font-size:18px" ></a>
-<div style="width:290px;padding:10px 40px 0 60px;font-size:12px;line-height:16px">
+href="" style="display:none;width:368px;margin:0 auto;display:block;font-size:18px" ></a>
+<div style="margin:20px 0 0 0">
<p style="margin-bottom:8px">This download includes:</p>
-<ul>
-<li>Android Studio <b>early access preview</b></li>
-<li>All the Android SDK Tools to design, test, debug, and profile your app</li>
-<li>The latest Android platform to compile your app</li>
-<li>The latest Android system image to run your app in the emulator</li>
+<ul style="margin-bottom:20px">
+<li>Android Studio Beta</li>
+<li>All the Android SDK Tools to design, test, and debug your app</li>
+<li>A version of the Android platform to compile your app</li>
+<li>A version of the Android system image to run your app in the emulator</li>
</ul>
</div>
@@ -208,36 +206,34 @@
<p>Android Studio is a new Android development environment based on IntelliJ
-IDEA. Similar to Eclipse with the
-ADT Plugin, Android Studio provides integrated Android developer tools
-for development and debugging. On top of the
+IDEA. It provides new features and improvements over Eclipse ADT
+and will be the official Android IDE once it's ready. On top of the
capabilities you expect from IntelliJ, Android Studio offers:</p>
<ul>
- <li>Gradle-based build support.</li>
- <li>Android-specific refactoring and quick fixes.</li>
- <li>Lint tools to catch performance, usability, version compatibility and other problems.</li>
- <li>ProGuard and app-signing capabilities. </li>
- <li>Template-based wizards to create common Android designs and components.</li>
- <li>A rich layout editor that allows you to drag-and-drop UI components, preview layouts on
- multiple screen configurations, and much more.</li>
+ <li>Flexible Gradle-based build system.</li>
+ <li>Build variants and multiple APK generation.</li>
+ <li>Expanded template support for Google Services and various device types.</li>
+ <li>Rich layout editor with support for theme editing.</li>
+ <li>Lint tools to catch performance, usability, version compatibility, and other problems.</li>
+ <li>ProGuard and app-signing capabilities.</li>
<li>Built-in support for <a
href="http://android-developers.blogspot.com/2013/06/adding-backend-to-your-app-in-android.html"
class="external-link">Google Cloud Platform</a>, making it easy to integrate Google Cloud
- Messaging and App Engine as server-side components.
+ Messaging and App Engine.
</ul>
-<p class="caution"><strong>Caution:</strong> Android Studio is currently available as
-an <strong>early access preview</strong>. Several features
-are either incomplete or not yet implemented and you may encounter bugs. If you are not
+<p class="caution"><strong>Caution:</strong> Android Studio is currently in
+<strong>beta</strong>. Some features
+are not yet implemented and you may encounter bugs. If you are not
comfortable using an unfinished product, you may want to instead
-download (or continue to use) the
-<a href="{@docRoot}sdk/index.html">ADT Bundle</a> (Eclipse with the ADT Plugin).</p>
+download (or continue to use)
+<a href="{@docRoot}sdk/index.html">Eclipse with ADT</a>.</p>
-<h4 style="clear:right;text-align:right;margin-right:50px"><a href='' class="expandable"
+<h4 style="margin-top: 20px;"><a href='' class="expandable"
onclick="toggleExpandable(this,'.pax');return false;"
- >DOWNLOAD FOR OTHER PLATFORMS</a></h4>
+ >VIEW ALL DOWNLOADS AND SIZES</a></h4>
<div class="pax col-13 online" style="display:none;margin:0;">
@@ -290,6 +286,73 @@
+<h2 style="margin-bottom: 0px;">Android Studio vs. Eclipse ADT Comparison</h2>
+
+<p>
+The following table lists some key differences between Android Studio Beta and
+<a href="{@docRoot}sdk/index.html">Eclipse with ADT</a>.
+</p>
+
+<style>
+td.yes {
+ color: #669900;
+}
+td.no {
+ color: #CC0000;
+}
+</style>
+
+<table>
+ <tbody><tr>
+ <th>Feature</th>
+ <th>Android Studio</th>
+ <th>ADT</th>
+ </tr>
+ <tr>
+ <td>Build system</td>
+ <td><a href="http://www.gradle.org/" class="external-link">Gradle</a></td>
+ <td><a href="http://ant.apache.org/" class="external-link">Ant</a></td>
+ </tr>
+ <tr>
+
+ <td>Maven-based build dependencies</td>
+ <td class="yes">Yes</td>
+ <td class="no">No</td>
+ </tr>
+
+ <td>Build variants and multiple-APK generation (great for Android Wear)</td>
+ <td class="yes">Yes</td>
+ <td class="no">No</td>
+ </tr>
+
+ <tr>
+ <td>Advanced Android code completion and refactoring</td>
+ <td class="yes">Yes</td>
+ <td class="no">No</td>
+ </tr>
+ <tr>
+ <td>Graphical layout editor</td>
+ <td class="yes">Yes</td>
+ <td class="yes">Yes</td>
+ </tr>
+ <tr>
+ </tr>
+
+ <tr>
+ <td>APK signing and keystore management</td>
+ <td class="yes">Yes</td>
+ <td class="yes">Yes</td>
+ </tr>
+
+ <tr>
+ <td>NDK support</td>
+ <td class="no">Coming soon</td>
+ <td class="yes">Yes</td>
+ </tr>
+ </tbody></table>
+
+
+
<h2 id="Updating">Updating from older versions</h2>
<p>If you already have Android Studio installed, in most cases, you can upgrade to the latest
@@ -298,7 +361,7 @@
Check for updates</strong>) to see whether an update is available.</p>
<p>If an update is not available,
-follow the <a href="#Installing">installation instructions</a> below and replace your existing
+click the button above to download and replace your existing
installation.</p>
<div class="caution">
@@ -311,98 +374,6 @@
the Android SDK Manager.</p>
</div>
-
-<h2 id="Installing">Installing Android Studio</h2>
-<p>Android Studio requires JDK 6 or greater (JRE alone is not sufficient). To check if you
-have JDK installed (and which version), open a terminal and type <code>javac -version</code>.
-If JDK is not available or the version is lower than 6,
-<a href="http://www.oracle.com/technetwork/java/javase/downloads/index.html">download
-JDK from here</a>.</p>
-<p>To install Android Studio:</p>
-<ol>
-<li>Download the <strong>Android Studio</strong> package from above.</li>
-<li>Install Android Studio and the SDK tools:
- <p><b>Windows:</b></p>
- <ol>
- <li>Launch the downloaded EXE file, {@code android-studio-bundle-<version>.exe}.</li>
- <li>Follow the setup wizard to install Android Studio.
-
- <div class="caution"><p><strong>Known issue:</strong>
- On some Windows systems, the launcher script does not find where Java is installed.
- If you encounter this problem,
- you need to set an environment variable indicating the correct location.</p>
- <p>Select <strong>Start menu > Computer > System Properties >
- Advanced System Properties</strong>. Then open <strong>Advanced tab > Environment
- Variables</strong> and add a new system variable <code>JAVA_HOME</code> that points to
- your JDK folder, for example <code>C:\Program Files\Java\jdk1.7.0_21</code>.</p>
- </div>
- </li>
-
- </ol>
- <p><b>Mac OS X:</b></p>
- <ol>
- <li>Open the downloaded DMG file, {@code android-studio-bundle-<version>.dmg}.</li>
- <li>Drag and drop Android Studio into the Applications folder.
-
- <div class="caution"><p><strong>Known issue:</strong>
- Depending on your security settings, when you attempt to open Android Studio, you might
- see a warning that says the package is damaged and should be moved to the trash. If this
- happens, go to <strong>System Preferences > Security & Privacy</strong> and under
- <strong>Allow applications downloaded from</strong>, select <strong>Anywhere</strong>.
- Then open Android Studio again.</p>
- </div>
- </li>
-
- </ol>
- <p><b>Linux:</b></p>
- <ol>
- <li>Unpack the downloaded Tar file, {@code android-studio-bundle-<version>.tgz}, into an appropriate
- location for your applications.
- <li>To launch Android Studio, navigate to the {@code android-studio/bin/} directory
- in a terminal and execute {@code studio.sh}.
- <p>You may want to add {@code android-studio/bin/} to your PATH environmental
- variable so that you can start Android Studio from any directory.</p>
- </li>
- </ol>
-</li>
-</ol>
-
-<p>That's it! You're ready to start developing apps with Android Studio.</p>
-
-<div class="note">
-<p><strong>Note:</strong> On Windows and Mac, the individual tools and
-other SDK packages are saved within the Android Studio application directory.
-To access the tools directly, use a terminal to navigate into the application and locate
-the {@code sdk/} directory. For example:</p>
-<p>Windows: <code>\Users\<user>\AppData\Local\Android\android-studio\sdk\</code></p>
-<p>Mac: <code>/Applications/Android\ Studio.app/sdk/</code></p>
-</div>
-
-<p>For a list of some known issues, see <a
-href="http://tools.android.com/knownissues">tools.android.com/knownissues</a>.</p>
-
-
-<h2 id="Start">Starting a Project</h2>
-
-<p>When you launch Android Studio for the first time, you'll see a Welcome
-screen that offers several ways to get started:</p>
-
-<ul>
- <li>To start building a new app, click <strong>New Project</strong>.
- <p>This starts the New Project wizard, which helps you set up a project using an app template.
- </li>
- <li>To import an existing Android app project, click <strong>Import Project</strong>.
- <p class="note"><strong>Note:</strong> If you previously developed your Android project
- with Eclipse, you should first use the new export feature in the ADT plugin to prepare
- your project with the new Gradle build system. For more information, read
- <a href="{@docRoot}sdk/installing/migrate.html">Migrating from Eclipse</a>.</p>
- </li>
-</ul>
-
-<p>For additional help using Android Studio, read <a
-href="{@docRoot}sdk/installing/studio-tips.html">Tips and Tricks</a>.</p>
-
-
<p>As you continue developing apps, you may need to install additional versions
of Android for the emulator and other packages such as the <a
href="{@docRoot}tools/support-library/index.html">Android Support Library</a>.
@@ -599,8 +570,8 @@
if (os) {
/* set up primary ACE download button */
$('#download-ide-button').show();
- $('#download-ide-button').append("Download Android Studio <span class='small'>v0.5.2</span>"
- + "<br/> <span class='small'>for " + os + "</span>");
+ $('#download-ide-button').append("Download Android Studio Beta <span class='small'>v0.5.2</span>"
+ + "<br/> <span class='small'>with the Android SDK for " + os + "</span>");
$('#download-ide-button').click(function() {return onDownload(this,true);}).attr('href', bundlename);
} else {
@@ -642,9 +613,13 @@
function onDownloadForRealz(link) {
if ($("input#agree").is(':checked')) {
- $("#tos").hide();
- $("#main").show();
- location.hash = "Updating";
+ $("h1").text('Now redirecting to the install instructions...');
+ $("#tos").slideUp();
+ $("#jd-content .jd-descr").fadeOut('slow', function() {
+ setTimeout(function() {
+ window.location = "/sdk/installing/index.html?pkg=studio";
+ }, 1000);
+ });
_gaq.push(['_trackEvent', 'SDK', 'Android Studio', $("#downloadForRealz").html()]);
return true;
} else {
diff --git a/docs/html/tools/device.jd b/docs/html/tools/device.jd
index e748b12..89b3857 100644
--- a/docs/html/tools/device.jd
+++ b/docs/html/tools/device.jd
@@ -5,6 +5,7 @@
<div id="qv">
<h2>In this document</h2>
<ol>
+ <li><a href="#device-developer-options">Enabling On-device Developer Options</a></li>
<li><a href="#setting-up">Setting up a Device for Development</a>
<ol>
<li><a href="#VendorIds">USB Vendor IDs</a></li>
@@ -43,6 +44,29 @@
platform, in different screen sizes and orientations, and more.</p>
+<h2 id="developer-device-options" style="margin-bottom: 0px;">Enabling On-device Developer Options</h2>
+
+<img src="/images/tools/dev-options-inmilk.png" alt="" style="float:right;margin-left:30px">
+
+<p>Android-powered devices have a host of developer options that you can
+access on the phone, which let you:</p>
+<ul>
+ <li>Enable debugging over USB.</li>
+ <li>Quickly capture bug reports onto the device.</li>
+ <li>Show CPU usage on screen.</li>
+ <li>Draw debugging information on screen such as layout bounds,
+ updates on GPU views and hardware layers, and other information.</li>
+ <li>Plus many more options to simulate app stresses or enable debugging options.</li>
+</ul>
+<p>To access these settings, open the <em>Developer options</em> in the
+system Settings. On Android 4.2 and higher, the Developer options screen is
+hidden by default. To make it visible, go to
+<b>Settings > About phone</b> and tap <b>Build number</b> seven times. Return to the previous
+screen to find Developer options at the bottom.</p>
+
+
+
+
<h2 id="setting-up">Setting up a Device for Development</h2>
<p>With an Android-powered device, you can develop and debug your Android applications just as you
diff --git a/docs/html/tools/help/sdk-manager.jd b/docs/html/tools/help/sdk-manager.jd
index 57271bb..b084237 100644
--- a/docs/html/tools/help/sdk-manager.jd
+++ b/docs/html/tools/help/sdk-manager.jd
@@ -3,7 +3,9 @@
<p>The Android SDK separates tools, platforms, and other components into packages you can
- download using the SDK Manager.</p>
+ download using the SDK Manager. For example, when the SDK Tools are updated or a new version of
+the Android platform is released, you can use the SDK Manager to quickly download them to
+your environment.</p>
<p>You can launch the SDK Manager in one of the following ways:</p>
<ul>
@@ -25,6 +27,14 @@
SDK packages that are available, already installed, or for which an update is available.</p>
+<p>There are several different packages available for the Android SDK. The table below describes
+most of the available packages and where they're located in your SDK directory
+once you download them.</p>
+
+
+
+
+
<h2 id="Recommended">Recommended Packages</h2>
<p>Here's an outline of the packages required and those we recommend you use:
@@ -69,3 +79,77 @@
<p class="note"><strong>Tip:</strong> For easy access to the SDK tools from a command line, add the
location of the SDK's <code>tools/</code> and
<code>platform-tools</code> to your <code>PATH</code> environment variable.</p>
+
+
+<p>The above list is not comprehensive and you can <a
+href="#AddingSites">add new sites</a> to download additional packages from third-parties.</p>
+
+<p>In some cases, an SDK package may require a specific minimum revision of
+another package or SDK tool.
+The development tools will notify you with warnings if there is dependency that you need to
+address. The Android SDK Manager also enforces dependencies by requiring that you download any
+packages that are needed by those you have selected.</p>
+
+
+
+
+
+<h2 id="AddingSites">Adding New Sites</h2>
+
+<p>By default, <strong>Available Packages</strong> displays packages available from the
+<em>Android Repository</em> and <em>Third party Add-ons</em>. You can add other sites that host
+their own Android SDK add-ons, then download the SDK add-ons
+from those sites.</p>
+
+<p>For example, a mobile carrier or device manufacturer might offer additional
+API libraries that are supported by their own Android-powered devices. In order
+to develop using their libraries, you must install their Android SDK add-on, if it's not already
+available under <em>Third party Add-ons</em>. </p>
+
+<p>If a carrier or device manufacturer has hosted an SDK add-on repository file
+on their web site, follow these steps to add their site to the Android SDK
+Manager:</p>
+
+<ol>
+ <li>Select <strong>Available Packages</strong> in the left panel.</li>
+ <li>Click <strong>Add Add-on Site</strong> and enter the URL of the
+<code>repository.xml</code> file. Click <strong>OK</strong>.</li>
+</ol>
+<p>Any SDK packages available from the site will now be listed under a new item named
+<strong>User Add-ons</strong>.</p>
+
+
+
+
+<h2 id="troubleshooting">Troubleshooting</h2>
+
+<p><strong>Problems connecting to the SDK repository</strong></p>
+
+<p>If you are using the Android SDK Manager to download packages and are encountering
+connection problems, try connecting over http, rather than https. To switch the
+protocol used by the Android SDK Manager, follow these steps: </p>
+
+<ol>
+ <li>With the Android SDK Manager window open, select "Settings" in the
+ left pane. </li>
+ <li>On the right, in the "Misc" section, check the checkbox labeled "Force
+ https://... sources to be fetched using http://..." </li>
+ <li>Click <strong>Save & Apply</strong>.</li>
+</ol>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/docs/html/tools/sdk/tools-notes.jd b/docs/html/tools/sdk/tools-notes.jd
index 9b06a9d..f490053 100644
--- a/docs/html/tools/sdk/tools-notes.jd
+++ b/docs/html/tools/sdk/tools-notes.jd
@@ -28,6 +28,39 @@
<div class="toggle-content opened">
<p><a href="#" onclick="return toggleContent(this)">
<img src="{@docRoot}assets/images/triangle-opened.png" class="toggle-content-img"
+ alt=""/>SDK Tools, Revision 22.6.4</a> <em>(June 2014)</em>
+ </p>
+
+ <div class="toggle-content-toggleme">
+
+ <dl>
+ <dt>Dependencies:</dt>
+
+ <dd>
+ <ul>
+ <li>Android SDK Platform-tools revision 18 or later.</li>
+ <li>If you are developing in Eclipse with ADT, note that this version of SDK Tools is
+ designed for use with ADT 22.6.3 and later. If you haven't already, update your
+ <a href="{@docRoot}tools/sdk/eclipse-adt.html">ADT Plugin</a> to 22.6.3.</li>
+ <li>If you are developing outside Eclipse, you must have
+ <a href="http://ant.apache.org/">Apache Ant</a> 1.8 or later.</li>
+ </ul>
+ </dd>
+
+ <dt>General Notes:</dt>
+ <dd>
+ <ul>
+ <li>Fixed an issue with the x86 emulator that caused Google Maps to crash.
+ (<a href="http://b.android.com/69385">Issue 69385</a>)</li>
+ <li>Fixed minor OpenGL issues.</li>
+ </ul>
+ </dd>
+ </div>
+</div>
+
+<div class="toggle-content closed">
+ <p><a href="#" onclick="return toggleContent(this)">
+ <img src="{@docRoot}assets/images/triangle-closed.png" class="toggle-content-img"
alt=""/>SDK Tools, Revision 22.6.3</a> <em>(April 2014)</em>
</p>
diff --git a/docs/html/tools/tools_toc.cs b/docs/html/tools/tools_toc.cs
index b29b87c..fb4659f 100644
--- a/docs/html/tools/tools_toc.cs
+++ b/docs/html/tools/tools_toc.cs
@@ -1,53 +1,35 @@
<ul id="nav">
<li class="nav-section">
- <div class="nav-section-header empty">
- <a href="<?cs var:toroot ?>tools/index.html"><span class="en">Developer Tools</span></a>
- </div>
- </li>
-
- <li class="nav-section">
<div class="nav-section-header"><a href="<?cs var:toroot
?>sdk/index.html"><span class="en">Download</span></a></div>
<ul>
- <li><a href="<?cs var:toroot ?>sdk/installing/bundle.html">
- <span class="en">Setting Up the ADT Bundle</span></a></li>
+ <li><a href="<?cs var:toroot ?>sdk/installing/index.html">
+ <span class="en">Installing the SDK</span></a></li>
- <li class="nav-section">
- <div class="nav-section-header">
- <a href="<?cs var:toroot ?>sdk/installing/index.html"><span class="en">Setting Up
- an Existing IDE</span></a></div>
- <ul>
- <li><a href="<?cs var:toroot ?>sdk/installing/installing-adt.html">
- <span class="en">Installing the Eclipse Plugin</span></a></li>
- <li><a href="<?cs var:toroot ?>sdk/installing/adding-packages.html">
- <span class="en">Adding Platforms and Packages</span></a></li>
- </ul>
- </li>
-
- <li class="nav-section">
- <div class="nav-section-header">
- <a href="<?cs var:toroot ?>sdk/installing/studio.html">Android Studio</a>
- </div>
- <ul>
- <li><a href="<?cs var:toroot ?>sdk/installing/migrate.html">
- Migrating from Eclipse</a></li>
- <li><a href="<?cs var:toroot ?>sdk/installing/studio-tips.html">
- Tips and Tricks</a></li>
- <li><a href="<?cs var:toroot ?>sdk/installing/studio-layout.html">
- Using the Layout Editor</a></li>
- <li><a href="<?cs var:toroot ?>sdk/installing/studio-build.html">
- Building Your Project with Gradle</a></li>
- <li><a href="<?cs var:toroot ?>sdk/installing/studio-debug.html">
- Debugging with Android Studio</a></li>
- </ul>
- </li>
- <li><a href="<?cs var:toroot ?>sdk/exploring.html">
- <span class="en">Exploring the SDK</span></a></li>
- <li><a href="<?cs var:toroot ?>tools/sdk/ndk/index.html">Download the NDK</a>
- </li>
+ <li><a href="<?cs var:toroot ?>sdk/installing/adding-packages.html">
+ <span class="en">Adding SDK Packages</span></a></li>
</ul>
</li>
+
+
+ <li class="nav-section">
+ <div class="nav-section-header">
+ <a href="<?cs var:toroot ?>sdk/installing/studio.html">Android Studio</a>
+ </div>
+ <ul>
+ <li><a href="<?cs var:toroot ?>sdk/installing/migrate.html">
+ Migrating from Eclipse</a></li>
+ <li><a href="<?cs var:toroot ?>sdk/installing/studio-tips.html">
+ Tips and Tricks</a></li>
+ <li><a href="<?cs var:toroot ?>sdk/installing/studio-layout.html">
+ Using the Layout Editor</a></li>
+ <li><a href="<?cs var:toroot ?>sdk/installing/studio-build.html">
+ Building Your Project with Gradle</a></li>
+ <li><a href="<?cs var:toroot ?>sdk/installing/studio-debug.html">
+ Debugging with Android Studio</a></li>
+ </ul>
+ </li>
<li class="nav-section">
<div class="nav-section-header">
@@ -174,7 +156,13 @@
class="en">Tools Help</span></a></div>
<ul>
<li><a href="<?cs var:toroot ?>tools/help/adb.html">adb</a></li>
- <li><a href="<?cs var:toroot ?>tools/help/adt.html">ADT</a></li>
+ <li class="nav-section">
+ <div class="nav-section-header"><a href="<?cs var:toroot ?>tools/help/adt.html">ADT</a></div>
+ <ul>
+ <li><a href="<?cs var:toroot ?>sdk/installing/installing-adt.html">
+ <span class="en">Installing the Eclipse Plugin</span></a></li>
+ </ul>
+ </li>
<li><a href="<?cs var:toroot ?>tools/help/android.html">android</a></li>
<li><a href="<?cs var:toroot ?>tools/help/avd-manager.html">AVD Manager</a></li>
<li><a href="<?cs var:toroot ?>tools/help/bmgr.html">bmgr</a>
@@ -244,6 +232,11 @@
</ul>
</li>
+ <li class="nav-section">
+ <div class="nav-section-header empty">
+ <a href="<?cs var:toroot ?>tools/sdk/ndk/index.html">NDK</a>
+ </div>
+ </li>
<li class="nav-section">
<div class="nav-section-header">
diff --git a/docs/html/training/articles/keystore.jd b/docs/html/training/articles/keystore.jd
new file mode 100644
index 0000000..bbbda67
--- /dev/null
+++ b/docs/html/training/articles/keystore.jd
@@ -0,0 +1,107 @@
+page.title=Android Keystore System
+@jd:body
+
+<div id="qv-wrapper">
+ <div id="qv">
+ <h2>In this document</h2>
+ <ol>
+ <li><a href="#WhichShouldIUse">Choosing Between a Keychain or the Android Keystore Provider</a></li>
+ <li><a href="#UsingAndroidKeyStore">Using Android Keystore Provider
+ </a></li>
+ <ol>
+ <li><a href="#GeneratingANewPrivateKey">Generating a New Private Key</a></li>
+ <li><a href="#WorkingWithKeyStoreEntries">Working with Keystore Entries</a></li>
+ <li><a href="#ListingEntries">Listing Entries</a></li>
+ <li><a href="#SigningAndVerifyingData">Signing and Verifying Data</a></li>
+ </ol>
+ </ol>
+
+ <h2>Blog articles</h2>
+ <ol>
+ <li><a
+ href="http://android-developers.blogspot.com/2012/03/unifying-key-store-access-in-ics.html">
+ <h4>Unifying Key Store Access in ICS</h4>
+ </a></li>
+ </ol>
+ </div>
+</div>
+
+<p>The Android Keystore system lets you store private keys
+ in a container to make it more difficult to extract from the
+ device. Once keys are in the keystore, they can be used for
+ cryptographic operations with the private key material remaining
+ non-exportable.</p>
+
+<p>The Keystore system is used by the {@link
+ android.security.KeyChain} API as well as the Android
+ Keystore provider feature that was introduced in Android 4.3
+ (API level 18). This document goes over when and how to use the
+ Android Keystore provider.</p>
+
+<h2 id="WhichShouldIUse">Choosing Between a Keychain or the
+Android Keystore Provider</h2>
+
+<p>Use the {@link android.security.KeyChain} API when you want
+ system-wide credentials. When an app requests the use of any credential
+ through the {@link android.security.KeyChain} API, users get to
+ choose, through a system-provided UI, which of the installed credentials
+ an app can access. This allows several apps to use the
+ same set of credentials with user consent.</p>
+
+<p>Use the Android Keystore provider to let an individual app store its own
+ credentials that only the app itself can access.
+ This provides a way for apps to manage credentials that are usable
+ only by itself while providing the same security benefits that the
+ {@link android.security.KeyChain} API provides for system-wide
+ credentials. This method requires no user interaction to select the credentials.</p>
+
+<h2 id="UsingAndroidKeyStore">Using Android Keystore Provider</h2>
+
+<p>
+To use this feature, you use the standard {@link java.security.KeyStore}
+and {@link java.security.KeyPairGenerator} classes along with the
+{@code AndroidKeyStore} provider introduced in Android 4.3 (API level 18).</p>
+
+<p>{@code AndroidKeyStore} is registered as a {@link
+ java.security.KeyStore} type for use with the {@link
+ java.security.KeyStore#getInstance(String) KeyStore.getInstance(type)}
+ method and as a provider for use with the {@link
+ java.security.KeyPairGenerator#getInstance(String, String)
+ KeyPairGenerator.getInstance(algorithm, provider)} method.</p>
+
+<h3 id="GeneratingANewPrivateKey">Generating a New Private Key</h3>
+
+<p>Generating a new {@link java.security.PrivateKey} requires that
+ you also specify the initial X.509 attributes that the self-signed
+ certificate will have. You can replace the certificate at a later
+ time with a certificate signed by a Certificate Authority.</p>
+
+<p>To generate the key, use a {@link java.security.KeyPairGenerator}
+ with {@link android.security.KeyPairGeneratorSpec}:</p>
+
+{@sample development/samples/ApiDemos/src/com/example/android/apis/security/KeyStoreUsage.java generate}
+
+<h3 id="WorkingWithKeyStoreEntries">Working with Keystore Entries</h3>
+
+<p>Using the {@code AndroidKeyStore} provider takes place through
+ all the standard {@link java.security.KeyStore} APIs.</p>
+
+<h4 id="ListingEntries">Listing Entries</h4>
+
+<p>List entries in the keystore by calling the {@link
+ java.security.KeyStore#aliases()} method:</p>
+
+{@sample development/samples/ApiDemos/src/com/example/android/apis/security/KeyStoreUsage.java list}
+
+<h4 id="SigningAndVerifyingData">Signing and Verifying Data</h4>
+
+<p>Sign data by fetching the {@link
+ java.security.KeyStore.Entry} from the keystore and using the
+ {@link java.security.Signature} APIs, such as {@link
+ java.security.Signature#sign()}:</p>
+
+{@sample development/samples/ApiDemos/src/com/example/android/apis/security/KeyStoreUsage.java sign}
+
+<p>Similarly, verify data with the {@link java.security.Signature#verify(byte[])} method:</p>
+
+{@sample development/samples/ApiDemos/src/com/example/android/apis/security/KeyStoreUsage.java verify}
diff --git a/docs/html/training/basics/network-ops/connecting.jd b/docs/html/training/basics/network-ops/connecting.jd
index 50a9e1b..1452ded 100644
--- a/docs/html/training/basics/network-ops/connecting.jd
+++ b/docs/html/training/basics/network-ops/connecting.jd
@@ -25,6 +25,7 @@
<h2>You should also read</h2>
<ul>
+ <li><a href="{@docRoot}training/volley/index.html">Transmitting Network Data Using Volley</a></li>
<li><a href="{@docRoot}training/monitoring-device-state/index.html">Optimizing Battery Life</a></li>
<li><a href="{@docRoot}training/efficient-downloads/index.html">Transferring Data Without Draining the Battery</a></li>
<li><a href="{@docRoot}guide/webapps/index.html">Web Apps Overview</a></li>
diff --git a/docs/html/training/basics/network-ops/index.jd b/docs/html/training/basics/network-ops/index.jd
index cb3a390..db64fe9 100644
--- a/docs/html/training/basics/network-ops/index.jd
+++ b/docs/html/training/basics/network-ops/index.jd
@@ -24,6 +24,7 @@
<li><a href="{@docRoot}training/monitoring-device-state/index.html">Optimizing Battery Life</a></li>
<li><a href="{@docRoot}training/efficient-downloads/index.html">Transferring Data Without Draining the Battery</a></li>
<li><a href="{@docRoot}guide/webapps/index.html">Web Apps Overview</a></li>
+ <li><a href="{@docRoot}training/volley/index.html">Transmitting Network Data Using Volley</a></li>
</ul>
@@ -51,6 +52,14 @@
fundamental building blocks for creating Android applications that download
content and parse data efficiently, while minimizing network traffic.</p>
+<p class="note"><strong>Note:</strong> See the class <a href="{@docRoot}
+training/volley/index.html">Transmitting Network Data Using Volley</a>
+for information on Volley, an HTTP library that makes networking for Android apps
+easier and faster. Volley is available through the open
+<a href="https://android.googlesource.com/platform/frameworks/volley">AOSP</a>
+repository. Volley may be able to help you streamline and improve the performance
+of your app's network operations.</p>
+
<h2>Lessons</h2>
diff --git a/docs/html/training/cloudsync/backupapi.jd b/docs/html/training/cloudsync/backupapi.jd
index a5436c6..fd35ada 100644
--- a/docs/html/training/cloudsync/backupapi.jd
+++ b/docs/html/training/cloudsync/backupapi.jd
@@ -41,7 +41,7 @@
<h2 id="register">Register for the Android Backup Service</h2>
<p>This lesson requires the use of the <a
- href="http://code.google.com/android/backup/index.html">Android Backup
+ href="{@docRoot}google/backup/index.html">Android Backup
Service</a>, which requires registration. Go ahead and <a
href="http://code.google.com/android/backup/signup.html">register here</a>. Once
that's done, the service pre-populates an XML tag for insertion in your Android
diff --git a/docs/html/training/cloudsync/index.jd b/docs/html/training/cloudsync/index.jd
index 55b275b..8679009 100644
--- a/docs/html/training/cloudsync/index.jd
+++ b/docs/html/training/cloudsync/index.jd
@@ -6,6 +6,16 @@
@jd:body
+<div id="tb-wrapper">
+<div id="tb">
+
+<h2>Dependencies and prerequisites</h2>
+<ul>
+ <li>Android 2.2 (API level 8) and higher</li>
+</ul>
+</div>
+</div>
+
<p>By providing powerful APIs for internet connectivity, the Android framework
helps you build rich cloud-enabled apps that sync their data to a remote web
service, making sure all your devices always stay in sync, and your valuable
diff --git a/docs/html/training/contacts-provider/retrieve-names.jd b/docs/html/training/contacts-provider/retrieve-names.jd
index b034a6a..7106889a 100644
--- a/docs/html/training/contacts-provider/retrieve-names.jd
+++ b/docs/html/training/contacts-provider/retrieve-names.jd
@@ -102,9 +102,9 @@
<p>
To display the search results in a {@link android.widget.ListView}, you need a main layout file
that defines the entire UI including the {@link android.widget.ListView}, and an item layout
- file that defines one line of the {@link android.widget.ListView}. For example, you can define
- the main layout file <code>res/layout/contacts_list_view.xml</code> that contains the
- following XML:
+ file that defines one line of the {@link android.widget.ListView}. For example, you could create
+ the main layout file <code>res/layout/contacts_list_view.xml</code> with
+ the following XML:
</p>
<pre>
<?xml version="1.0" encoding="utf-8"?>
@@ -250,7 +250,8 @@
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
// Inflate the fragment layout
- return inflater.inflate(R.layout.contacts_list_layout, container, false);
+ return inflater.inflate(R.layout.contact_list_fragment,
+ container, false);
}
</pre>
<h3 id="DefineAdapter">Set up the CursorAdapter for the ListView</h3>
@@ -268,7 +269,8 @@
super.onActivityCreated(savedInstanceState);
...
// Gets the ListView from the View list of the parent activity
- mContactsList = (ListView) getActivity().findViewById(R.layout.contact_list_view);
+ mContactsList =
+ (ListView) getActivity().findViewById(R.layout.contact_list_view);
// Gets a CursorAdapter
mCursorAdapter = new SimpleCursorAdapter(
getActivity(),
diff --git a/docs/html/training/training_toc.cs b/docs/html/training/training_toc.cs
index 0616b62..c5dc3c5 100644
--- a/docs/html/training/training_toc.cs
+++ b/docs/html/training/training_toc.cs
@@ -609,6 +609,35 @@
</li>
</ul>
</li>
+ <li class="nav-section">
+ <div class="nav-section-header">
+ <a href="<?cs var:toroot ?>training/volley/index.html"
+ description="How to perform fast, scalable UI operations over the network using Volley"
+ >Transmitting Network Data Using Volley</a>
+ </div>
+ <ul>
+ <li>
+ <a href="<?cs var:toroot ?>training/volley/simple.html">
+ Sending a Simple Request
+ </a>
+ </li>
+ <li>
+ <a href="<?cs var:toroot ?>training/volley/requestqueue.html">
+ Setting Up a RequestQueue
+ </a>
+ </li>
+ <li>
+ <a href="<?cs var:toroot ?>training/volley/request.html">
+ Making a Standard Request
+ </a>
+ </li>
+ <li>
+ <a href="<?cs var:toroot ?>training/volley/request-custom.html">
+ Implementing a Custom Request
+ </a>
+ </li>
+ </ul>
+ </li>
</ul>
</li>
diff --git a/docs/html/training/tv/index.jd b/docs/html/training/tv/index.jd
deleted file mode 100644
index 54f7016..0000000
--- a/docs/html/training/tv/index.jd
+++ /dev/null
@@ -1,59 +0,0 @@
-page.title=Designing for TV
-page.tags="input","screens"
-
-trainingnavtop=true
-startpage=true
-
-@jd:body
-
-<div id="tb-wrapper">
-<div id="tb">
-
-<!-- Required platform, tools, add-ons, devices, knowledge, etc. -->
-<h2>Dependencies and prerequisites</h2>
-<ul>
- <li>Android 2.0 (API Level 5) or higher</li>
-</ul>
-
-</div>
-</div>
-
-<a class="notice-developers-video wide" href="http://www.youtube.com/watch?v=zsRnRLh-O34">
-<div>
- <h3>Video</h3>
- <p>DevBytes: Design for Large Displays - Part 1</p>
-</div>
-</a>
-
-<p>
- Smart TVs powered by Android bring your favorite Android apps to the best screen in your house.
- Thousands of apps in the Google Play Store are already optimized for TVs. This class shows how
- you can optimize your Android app for TVs, including how to build a layout that
- works great when the user is ten feet away and navigating with a remote control.
-</p>
-
-<h2>Lessons</h2>
-
-<dl>
- <dt><b><a href="optimizing-layouts-tv.html">Optimizing Layouts for TV</a></b></dt>
- <dd>Shows you how to optimize app layouts for TV screens, which have some unique characteristics such as:
- <ul>
- <li>permanent "landscape" mode</li>
- <li>high-resolution displays</li>
- <li>"10 foot UI" environment.</li>
- </ul>
- </dd>
-
- <dt><b><a href="optimizing-navigation-tv.html">Optimizing Navigation for TV</a></b></dt>
- <dd>Shows you how to design navigation for TVs, including:
- <ul>
- <li>handling D-pad navigation</li>
- <li>providing navigational feedback</li>
- <li>providing easily-accessible controls on the screen.</li>
- </ul>
- </dd>
-
- <dt><b><a href="unsupported-features-tv.html">Handling features not supported on TV</a></b></dt>
- <dd>Lists the hardware features that are usually not available on TVs. This lesson also shows you how to
- provide alternatives for missing features or check for missing features and disable code at run time.</dd>
-</dl>
diff --git a/docs/html/training/tv/optimizing-layouts-tv.jd b/docs/html/training/tv/optimizing-layouts-tv.jd
deleted file mode 100644
index a6db052..0000000
--- a/docs/html/training/tv/optimizing-layouts-tv.jd
+++ /dev/null
@@ -1,246 +0,0 @@
-page.title=Optimizing Layouts for TV
-parent.title=Designing for TV
-parent.link=index.html
-
-trainingnavtop=true
-next.title=Optimizing Navigation for TV
-next.link=optimizing-navigation-tv.html
-
-@jd:body
-
-<div id="tb-wrapper">
-<div id="tb">
-
-<h2>This lesson teaches you to</h2>
-<ol>
- <li><a href="#DesignLandscapeLayouts">Design Landscape Layouts</a></li>
- <li><a href="#MakeTextControlsEasyToSee">Make Text and Controls Easy to See</a></li>
- <li><a href="#DesignForLargeScreens">Design for High-Density Large Screens</a></li>
- <li><a href="#HandleLargeBitmaps">Design to Handle Large Bitmaps</a></li>
-</ol>
-
-<h2>You should also read</h2>
-<ul>
- <li><a href="{@docRoot}guide/practices/screens_support.html">Supporting Multiple Screens</a></li>
-</ul>
-
-</div>
-</div>
-
-<p>
-When your application is running on a television set, you should assume that the user is sitting about
-ten feet away from the screen. This user environment is referred to as the
-<a href="http://en.wikipedia.org/wiki/10-foot_user_interface">10-foot UI</a>. To provide your
-users with a usable and enjoyable experience, you should style and lay out your UI accordingly..
-</p>
-<p>
-This lesson shows you how to optimize layouts for TV by:
-</p>
-<ul>
- <li>Providing appropriate layout resources for landscape mode.</li>
- <li>Ensuring that text and controls are large enough to be visible from a distance.</li>
- <li>Providing high resolution bitmaps and icons for HD TV screens.</li>
-</ul>
-
-<h2 id="DesignLandscapeLayouts">Design Landscape Layouts</h2>
-
-<p>
-TV screens are always in landscape orientation. Follow these tips to build landscape layouts optimized for TV screens:
-</p>
-<ul>
- <li>Put on-screen navigational controls on the left or right side of the screen and save the
- vertical space for content.</li>
- <li>Create UIs that are divided into sections, by using <a href="{@docRoot}guide/components/fragments.html">Fragments</a>
- and use view groups like {@link android.widget.GridView} instead
- of {@link android.widget.ListView} to make better use of the
- horizontal screen space.</li>
- <li>Use view groups such as {@link android.widget.RelativeLayout}
- or {@link android.widget.LinearLayout} to arrange views.
- This allows the Android system to adjust the position of the views to the size, alignment,
- aspect ratio, and pixel density of the TV screen.</li>
- <li>Add sufficient margins between layout controls to avoid a cluttered UI.</li>
-</ul>
-
-<p>
-For example, the following layout is optimized for TV:
-</p>
-
-<img src="{@docRoot}images/training/panoramio-grid.png" />
-
-<p>
-In this layout, the controls are on the lefthand side. The UI is displayed within a
-{@link android.widget.GridView}, which is well-suited to landscape orientation.
-In this layout both GridView and Fragment have the width and height set
-dynamically, so they can adjust to the screen resolution. Controls are added to the left side Fragment programatically at runtime.
-The layout file for this UI is {@code res/layout-land-large/photogrid_tv.xml}.
-(This layout file is placed in {@code layout-land-large} because TVs have large screens with landscape orientation. For details refer to
-<a href="{@docRoot}guide/practices/screens_support.html">Supporting Multiple Screens</a>.)</p>
-
-res/layout-land-large/photogrid_tv.xml
-<pre>
-<RelativeLayout
- android:layout_width="fill_parent"
- android:layout_height="fill_parent" >
-
- <fragment
- android:id="@+id/leftsidecontrols"
- android:layout_width="0dip"
- android:layout_marginLeft="5dip"
- android:layout_height="match_parent" />
-
- <GridView
- android:id="@+id/gridview"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content" />
-
-</RelativeLayout>
-</pre>
-
-<p>
-To set up action bar items on the left side of the screen, you can also include the <a
-href="http://code.google.com/p/googletv-android-samples/source/browse/#git%2FLeftNavBarLibrary">
-Left navigation bar library</a> in your application to set up action items on the left side
-of the screen, instead of creating a custom Fragment to add controls:
-</p>
-
-<pre>
-LeftNavBar bar = (LeftNavBarService.instance()).getLeftNavBar(this);
-</pre>
-
-<p>
-When you have an activity in which the content scrolls vertically, always use a left navigation bar;
-otherwise, your users have to scroll to the top of the content to switch between the content view and
-the ActionBar. Look at the
-<a href="http://code.google.com/p/googletv-android-samples/source/browse/#git%2FLeftNavBarDemo">
-Left navigation bar sample app</a> to see how to simple it is to include the left navigation bar in your app.
-</p>
-
-<h2 id="MakeTextControlsEasyToSee">Make Text and Controls Easy to See</h2>
-<p>
-The text and controls in a TV application's UI should be easily visible and navigable from a distance.
-Follow these tips to make them easier to see from a distance :
-</p>
-
-<ul>
- <li>Break text into small chunks that users can quickly scan.</li>
- <li>Use light text on a dark background. This style is easier to read on a TV.</li>
- <li>Avoid lightweight fonts or fonts that have both very narrow and very broad strokes. Use simple sans-serif
- fonts and use anti-aliasing to increase readability.</li>
- <li>Use Android's standard font sizes:
- <pre>
- <TextView
- android:id="@+id/atext"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:gravity="center_vertical"
- android:singleLine="true"
- android:textAppearance="?android:attr/textAppearanceMedium"/>
- </pre></li>
- <li>Ensure that all your view widgets are large enough to be clearly visible to someone sitting 10 feet away
- from the screen (this distance is greater for very large screens). The best way to do this is to use
- layout-relative sizing rather than absolute sizing, and density-independent pixel units instead of absolute
- pixel units. For example, to set the width of a widget, use wrap_content instead of a pixel measurement,
- and to set the margin for a widget, use dip instead of px values.
- </li>
-</ul>
-<p>
-
-</p>
-
-<h2 id="DesignForLargeScreens">Design for High-Density Large Screens</h2>
-
-<p>
-The common HDTV display resolutions are 720p, 1080i, and 1080p. Design your UI for 1080p, and then
-allow the Android system to downscale your UI to 720p if necessary. In general, downscaling (removing pixels)
-does not degrade the UI (Notice that the converse is not true; you should avoid upscaling because it degrades
-UI quality).
-</p>
-
-<p>
-To get the best scaling results for images, provide them as <a href="{@docRoot}tools/help/draw9patch.html">
-9-patch image</a> elements if possible.
-If you provide low quality or small images in your layouts, they will appear pixelated, fuzzy, or grainy. This
-is not a good experience for the user. Instead, use high-quality images.
-</p>
-
-<p>
-For more information on optimizing apps for large screens see <a href="{@docRoot}training/multiscreen/index.html">
-Designing for multiple screens</a>.
-</p>
-
-<h2 id="HandleLargeBitmaps">Design to Handle Large Bitmaps</h2>
-
-<p>
-The Android system has a limited amount of memory, so downloading and storing high-resolution images can often
-cause out-of-memory errors in your app. To avoid this, follow these tips:
-</p>
-
-<ul>
- <li>Load images only when they're displayed on the screen. For example, when displaying multiple images in
- a {@link android.widget.GridView} or
- {@link android.widget.Gallery}, only load an image when
- {@link android.widget.Adapter#getView(int, View, ViewGroup) getView()}
- is called on the View's {@link android.widget.Adapter}.
- </li>
- <li>Call {@link android.graphics.Bitmap#recycle()} on
- {@link android.graphics.Bitmap} views that are no longer needed.
- </li>
- <li>Use {@link java.lang.ref.WeakReference} for storing references
- to {@link android.graphics.Bitmap} objects in an in-memory
- {@link java.util.Collection}.</li>
- <li>If you fetch images from the network, use {@link android.os.AsyncTask}
- to fetch them and store them on the SD card for faster access.
- Never do network transactions on the application's UI thread.
- </li>
- <li>Scale down really large images to a more appropriate size as you download them; otherwise, downloading the image
- itself may cause an "Out of Memory" exception. Here is sample code that scales down images while downloading:
-
- <pre>
- // Get the source image's dimensions
- BitmapFactory.Options options = new BitmapFactory.Options();
- // This does not download the actual image, just downloads headers.
- options.inJustDecodeBounds = true;
- BitmapFactory.decodeFile(IMAGE_FILE_URL, options);
- // The actual width of the image.
- int srcWidth = options.outWidth;
- // The actual height of the image.
- int srcHeight = options.outHeight;
-
- // Only scale if the source is bigger than the width of the destination view.
- if(desiredWidth > srcWidth)
- desiredWidth = srcWidth;
-
- // Calculate the correct inSampleSize/scale value. This helps reduce memory use. It should be a power of 2.
- int inSampleSize = 1;
- while(srcWidth / 2 > desiredWidth){
- srcWidth /= 2;
- srcHeight /= 2;
- inSampleSize *= 2;
- }
-
- float desiredScale = (float) desiredWidth / srcWidth;
-
- // Decode with inSampleSize
- options.inJustDecodeBounds = false;
- options.inDither = false;
- options.inSampleSize = inSampleSize;
- options.inScaled = false;
- // Ensures the image stays as a 32-bit ARGB_8888 image.
- // This preserves image quality.
- options.inPreferredConfig = Bitmap.Config.ARGB_8888;
-
- Bitmap sampledSrcBitmap = BitmapFactory.decodeFile(IMAGE_FILE_URL, options);
-
- // Resize
- Matrix matrix = new Matrix();
- matrix.postScale(desiredScale, desiredScale);
- Bitmap scaledBitmap = Bitmap.createBitmap(sampledSrcBitmap, 0, 0,
- sampledSrcBitmap.getWidth(), sampledSrcBitmap.getHeight(), matrix, true);
- sampledSrcBitmap = null;
-
- // Save
- FileOutputStream out = new FileOutputStream(LOCAL_PATH_TO_STORE_IMAGE);
- scaledBitmap.compress(Bitmap.CompressFormat.JPEG, 100, out);
- scaledBitmap = null;
- </pre>
- </li> </ul>
\ No newline at end of file
diff --git a/docs/html/training/tv/optimizing-navigation-tv.jd b/docs/html/training/tv/optimizing-navigation-tv.jd
deleted file mode 100644
index bb78258..0000000
--- a/docs/html/training/tv/optimizing-navigation-tv.jd
+++ /dev/null
@@ -1,206 +0,0 @@
-page.title=Optimizing Navigation for TV
-parent.title=Designing for TV
-parent.link=index.html
-
-trainingnavtop=true
-previous.title=Optimizing Layouts for TV
-previous.link=optimizing-layouts-tv.html
-next.title=Handling Features Not Supported on TV
-next.link=unsupported-features-tv.html
-
-@jd:body
-
-<div id="tb-wrapper">
-<div id="tb">
-
-<h2>This lesson teaches you to</h2>
-<ol>
- <li><a href="#HandleDpadNavigation">Handle D-pad Navigation</a></li>
- <li><a href="#HandleFocusSelection">Provide Clear Visual Indication for Focus and Selection</a></li>
- <li><a href="#DesignForEasyNavigation">Design for Easy Navigation</a></li>
-</ol>
-
-<h2>You should also read</h2>
-<ul>
- <li><a href="{@docRoot}training/design-navigation/index.html">Designing Effective Navigation</a></li>
-</ul>
-
-</div>
-</div>
-
-<p>
-An important aspect of the user experience when operating a TV is the direct human interface: a remote control.
-As you optimize your Android application for TVs, you should pay special attention to how the user actually navigates
-around your application when using a remote control instead of a touchscreen.
-</p>
-<p>
-This lesson shows you how to optimize navigation for TV by:
-</p>
-
-<ul>
- <li>Ensuring all layout controls are D-pad navigable.</li>
- <li>Providing highly obvious feedback for UI navigation.</li>
- <li>Placing layout controls for easy access.</li>
-</ul>
-
-<h2 id="HandleDpadNavigation">Handle D-pad Navigation</h2>
-
-<p>
-On a TV, users navigate with controls on a TV remote, using either a D-pad or arrow keys.
-This limits movement to up, down, left, and right.
-To build a great TV-optimized app, you must provide a navigation scheme in which the user can
-quickly learn how to navigate your app using the remote.
-</p>
-
-<p>
-When you design navigation for D-pad, follow these guidelines:
-</p>
-
-<ul>
- <li>Ensure that the D-pad can navigate to all the visible controls on the screen.</li>
- <li>For scrolling lists with focus, D-pad up/down keys scroll the list and Enter key selects an item in the list. Ensure that users can
- select an element in the list and that the list still scrolls when an element is selected.</li>
- <li>Ensure that movement between controls is straightforward and predictable.</li>
-</ul>
-
-<p>
-Android usually handles navigation order between layout elements automatically, so you don't need to do anything extra. If the screen layout
-makes navigation difficult, or if you want users to move through the layout in a specific way, you can set up explicit navigation for your
-controls.
-For example, for an {@code android.widget.EditText}, to define the next control to receive focus, use:
-<pre>
-<EditText android:id="@+id/LastNameField" android:nextFocusDown="@+id/FirstNameField"\>
-</pre>
-The following table lists all of the available navigation attributes:
-</p>
-
-<table>
-<tr>
-<th>Attribute</th>
-<th>Function</th>
-</tr>
-<tr>
-<td>{@link android.R.attr#nextFocusDown}</td>
-<td>Defines the next view to receive focus when the user navigates down.</td>
-</tr>
-<tr>
-<td>{@link android.R.attr#nextFocusLeft}</td>
-<td>Defines the next view to receive focus when the user navigates left.</td>
-</tr>
-<tr>
-<td>{@link android.R.attr#nextFocusRight}</td>
-<td>Defines the next view to receive focus when the user navigates right.</td>
-</tr>
-<tr>
-<td>{@link android.R.attr#nextFocusUp}</td>
-<td>Defines the next view to receive focus when the user navigates up.</td>
-</tr>
-</table>
-
-<p>
-To use one of these explicit navigation attributes, set the value to the ID (android:id value) of another widget in the layout. You should set
-up the navigation order as a loop, so that the last control directs focus back to the first one.
-</p>
-
-<p>
-Note: You should only use these attributes to modify the navigation order if the default order that the system applies does not work well.
-</p>
-
-<h2 id="HandleFocusSelection">Provide Clear Visual Indication for Focus and Selection</h2>
-
-<p>
-Use appropriate color highlights for all navigable and selectable elements in the UI. This makes it easy for users to know whether the control
-is currently focused or selected when they navigate with a D-pad. Also, use uniform highlight scheme across your application.
-</p>
-
-<p>
-Android provides <a href="{@docRoot}guide/topics/resources/drawable-resource.html#StateList">Drawable State List Resources</a> to implement highlights
-for selected and focused controls. For example:
-</p>
-
-res/drawable/button.xml:
-<pre>
-<?xml version="1.0" encoding="utf-8"?>
-<selector xmlns:android="http://schemas.android.com/apk/res/android">
- <item android:state_pressed="true"
- android:drawable="@drawable/button_pressed" /> <!-- pressed -->
- <item android:state_focused="true"
- android:drawable="@drawable/button_focused" /> <!-- focused -->
- <item android:state_hovered="true"
- android:drawable="@drawable/button_focused" /> <!-- hovered -->
- <item android:drawable="@drawable/button_normal" /> <!-- default -->
-</selector>
-</pre>
-
-<p>
-This layout XML applies the above state list drawable to a {@link android.widget.Button}:
-</p>
-<pre>
-<Button
- android:layout_height="wrap_content"
- android:layout_width="wrap_content"
- android:background="@drawable/button" />
-</pre>
-
-<p>
-Provide sufficient padding within the focusable and selectable controls so that the highlights around them are clearly visible.
-</p>
-
-<h2 id="DesignForEasyNavigation">Design for Easy Navigation</h2>
-
-<p>
-Users should be able to navigate to any UI control with a couple of D-pad clicks. Navigation should be easy and intuitive to
-understand. For any non-intuitive actions, provide users with written help, using a dialog triggered by a help button or action bar icon.
-</p>
-
-<p>
-Predict the next screen that the user will want to navigate to and provide one click navigation to it. If the current screen UI is very sparse,
-consider making it a multi pane screen. Use fragments for making multi-pane screens. For example, consider the multi-pane UI below with continent names
-on the left and list of cool places in each continent on the right.
-</p>
-
-<img src="{@docRoot}images/training/cool-places.png" alt="" />
-
-<p>
-The above UI consists of three Fragments - <code>left_side_action_controls</code>, <code>continents</code> and
-<code>places</code> - as shown in its layout
-xml file below. Such multi-pane UIs make D-pad navigation easier and make good use of the horizontal screen space for
-TVs.
-</p>
-res/layout/cool_places.xml
-<pre>
-<LinearLayout
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:orientation="horizontal"
- >
- <fragment
- android:id="@+id/left_side_action_controls"
- android:layout_width="0px"
- android:layout_height="match_parent"
- android:layout_marginLeft="10dip"
- android:layout_weight="0.2"/>
- <fragment
- android:id="@+id/continents"
- android:layout_width="0px"
- android:layout_height="match_parent"
- android:layout_marginLeft="10dip"
- android:layout_weight="0.2"/>
-
- <fragment
- android:id="@+id/places"
- android:layout_width="0px"
- android:layout_height="match_parent"
- android:layout_marginLeft="10dip"
- android:layout_weight="0.6"/>
-
-</LinearLayout>
-</pre>
-
-<p>
-Also, notice in the UI layout above action controls are on the left hand side of a vertically scrolling list to make
-them easily accessible using D-pad.
-In general, for layouts with horizontally scrolling components, place action controls on left or right hand side and
-vice versa for vertically scrolling components.
-</p>
-
diff --git a/docs/html/training/tv/unsupported-features-tv.jd b/docs/html/training/tv/unsupported-features-tv.jd
deleted file mode 100644
index a9f090b..0000000
--- a/docs/html/training/tv/unsupported-features-tv.jd
+++ /dev/null
@@ -1,157 +0,0 @@
-page.title=Handling Features Not Supported on TV
-parent.title=Designing for TV
-parent.link=index.html
-
-trainingnavtop=true
-previous.title=Optimizing Navigation for TV
-previous.link=optimizing-navigation-tv.html
-
-@jd:body
-
-<div id="tb-wrapper">
-<div id="tb">
-
-<h2>This lesson teaches you to</h2>
-<ol>
- <li><a href="#WorkaroundUnsupportedFeatures">Work Around Features Not Supported on TV</a></li>
- <li><a href="#CheckAvailableFeatures">Check for Available Features at Runtime</a></li>
-</ol>
-
-</div>
-</div>
-
-<p>
-TVs are much different from other Android-powered devices:
-</p>
-<ul>
- <li>They're not mobile.</li>
- <li>Out of habit, people use them for watching media with little or no interaction.</li>
- <li>People interact with them from a distance.</li>
-</ul>
-
-<p>
-Because TVs have a different purpose from other devices, they usually don't have hardware features
-that other Android-powered devices often have. For this reason, the Android system does not
-support the following features for a TV device:
-<table>
-<tr>
-<th>Hardware</th>
-<th>Android feature descriptor</th>
-</tr>
-<tr>
-<td>Camera</td>
-<td>android.hardware.camera</td>
-</tr>
-<tr>
-<td>GPS</td>
-<td>android.hardware.location.gps</td>
-</tr>
-<tr>
-<td>Microphone</td>
-<td>android.hardware.microphone</td>
-</tr>
-<tr>
-<td>Near Field Communications (NFC)</td>
-<td>android.hardware.nfc</td>
-</tr>
-<tr>
-<td>Telephony</td>
-<td>android.hardware.telephony</td>
-</tr>
-<tr>
-<td>Touchscreen</td>
-<td>android.hardware.touchscreen</td>
-</tr>
-</table>
-</p>
-
-<p>
-This lesson shows you how to work around features that are not available on TV by:
-<ul>
- <li>Providing work arounds for some non-supported features.</li>
- <li>Checking for available features at runtime and conditionally activating/deactivating certain code
- paths based on availability of those features.</li>
-</ul>
-</p>
-
-
-<h2 id="WorkaroundUnsupportedFeatures">Work Around Features Not Supported on TV</h2>
-
-<p>
-Android doesn't support touchscreen interaction for TV devices, most TVs don't have touch screens,
-and interacting with a TV using a touchscreen is not consistent with the 10 foot environment. For
-these reasons, users interact with Android-powered TVs using a remote. In consideration of this,
-ensure that every control in your app can be accessed with the D-pad. Refer back to the previous two lessons
-<a href="{@docRoot}training/tv/optimizing-layouts-tv.html">Optimizing Layouts for TV</a> and
-<a href="{@docRoot}training/tv/optimizing-navigation-tv.html">Optimize Navigation for TV</a> for
-more details
-on this topic. The Android system assumes that a device has a touchscreen, so if you want your application
-to run on a TV, you must <strong>explicitly</strong> disable the touchscreen requirement in your manifest file:
-<pre>
-<uses-feature android:name="android.hardware.touchscreen" android:required="false"/>
-</pre>
-</p>
-
-<p>
-Although a TV doesn't have a camera, you can still provide a photography-related application on a TV.
-For example, if you have an app that takes, views and edits photos, you can disable its picture-taking
-functionality for TVs and still allow users to view and even edit photos. The next section talks about how to
-deactivate or activate specific functions in the application based on runtime device type detection.
-</p>
-
-<p>
-Because TVs are stationary, indoor devices, they don't have built-in GPS. If your application uses location
-information, allow users to search for a location or use a "static" location provider to get
-a location from the zip code configured during the TV setup.
-<pre>
-LocationManager locationManager = (LocationManager) this.getSystemService(Context.LOCATION_SERVICE);
-Location location = locationManager.getLastKnownLocation("static");
-Geocoder geocoder = new Geocoder(this);
-Address address = null;
-
-try {
- address = geocoder.getFromLocation(location.getLatitude(), location.getLongitude(), 1).get(0);
- Log.d("Zip code", address.getPostalCode());
-
-} catch (IOException e) {
- Log.e(TAG, "Geocoder error", e);
-}
-</pre>
-</p>
-
-<p>
-TVs usually don't support microphones, but if you have an application that uses voice control,
-you can create a mobile device app that takes voice input and then acts as a remote control for a TV.
-</p>
-
-<h2 id="CheckAvailableFeatures">Check for Available Features at Runtime</h2>
-
-<p>
-To check if a feature is available at runtime, call
-{@link android.content.pm.PackageManager#hasSystemFeature(String)}.
- This method takes a single argument : a string corresponding to the
-feature you want to check. For example, to check for touchscreen, use
-{@link android.content.pm.PackageManager#hasSystemFeature(String)} with the argument
-{@link android.content.pm.PackageManager#FEATURE_TOUCHSCREEN}.
-</p>
-
-<p>
-The following code snippet demonstrates how to detect device type at runtime based on supported features:
-
-<pre>
-// Check if android.hardware.telephony feature is available.
-if (getPackageManager().hasSystemFeature("android.hardware.telephony")) {
- Log.d("Mobile Test", "Running on phone");
-// Check if android.hardware.touchscreen feature is available.
-} else if (getPackageManager().hasSystemFeature("android.hardware.touchscreen")) {
- Log.d("Tablet Test", "Running on devices that don't support telphony but have a touchscreen.");
-} else {
- Log.d("TV Test", "Running on a TV!");
-}
-</pre>
-</p>
-
-<p>
-This is just one example of using runtime checks to deactivate app functionality that depends on features
-that aren't available on TVs.
-</p>
\ No newline at end of file
diff --git a/docs/html/training/volley/index.jd b/docs/html/training/volley/index.jd
new file mode 100644
index 0000000..ba5b09f
--- /dev/null
+++ b/docs/html/training/volley/index.jd
@@ -0,0 +1,133 @@
+page.title=Transmitting Network Data Using Volley
+page.tags=""
+
+trainingnavtop=true
+startpage=true
+
+
+@jd:body
+
+
+
+<div id="tb-wrapper">
+<div id="tb">
+
+
+<!-- Required platform, tools, add-ons, devices, knowledge, etc. -->
+<h2>Dependencies and prerequisites</h2>
+
+<ul>
+ <li>Android 1.6 (API Level 4) or higher</li>
+</ul>
+
+<h2>You should also see</h2>
+<ul>
+ <li>For a production quality app that uses Volley, see the 2013 Google I/O
+ <a href="https://github.com/google/iosched">schedule app</a>. In particular, see:
+ <ul>
+ <li><a
+ href="https://github.com/google/iosched/blob/master/android/src/main/java/com/google/android/apps/iosched/util/ImageLoader.java">
+ ImageLoader</a></li>
+ <li><a
+ href="https://github.com/google/iosched/blob/master/android/src/main/java/com/google/android/apps/iosched/util/BitmapCache.java">
+ BitmapCache</a></li>
+ </ul>
+ </li>
+</ul>
+
+</div>
+</div>
+
+<a class="notice-developers-video wide" href="https://developers.google.com/events/io/sessions/325304728">
+<div>
+ <h3>Video</h3>
+ <p>Volley: Easy, Fast Networking for Android</p>
+</div>
+</a>
+
+
+<p>Volley is an HTTP library that makes networking for Android apps easier and most importantly,
+faster. Volley is available through the open
+<a href="https://android.googlesource.com/platform/frameworks/volley">AOSP</a> repository.</p>
+
+<p>Volley offers the following benefits:</p>
+
+<ul>
+
+<li>Automatic scheduling of network requests.</li>
+<li>Multiple concurrent network connections.</li>
+<li>Transparent disk and memory response caching with standard HTTP
+<a href=http://en.wikipedia.org/wiki/Cache_coherence">cache coherence</a>.</li>
+<li>Support for request prioritization.</li>
+<li>Cancellation request API. You can cancel a single request, or you can set blocks or
+scopes of requests to cancel.</li>
+<li>Ease of customization, for example, for retry and backoff.</li>
+<li>Strong ordering that makes it easy to correctly populate your UI with data fetched
+asynchronously from the network.</li>
+<li>Debugging and tracing tools.</li>
+
+</ul>
+
+<p>Volley excels at RPC-type operations used to populate a UI, such as fetching a page of
+search results as structured data. It integrates easily with any protocol and comes out of
+the box with support for raw strings, images, and JSON. By providing built-in support for
+the features you need, Volley frees you from writing boilerplate code and allows you to
+concentrate on the logic that is specific to your app.</p>
+<p>Volley is not suitable for large download or streaming operations, since Volley holds
+all responses in memory during parsing. For large download operations, consider using an
+alternative like {@link android.app.DownloadManager}.</p>
+
+<p>The core Volley library is developed in the open
+<a href="https://android.googlesource.com/platform/frameworks/volley">AOSP</a>
+repository at {@code frameworks/volley} and contains the main request dispatch pipeline
+as well as a set of commonly applicable utilities, available in the Volley "toolbox." The
+easiest way to add Volley to your project is to clone the Volley repository and set it as
+a library project:</p>
+
+<ol>
+<li>Git clone the repository by typing the following at the command line:
+
+<pre>
+git clone https://android.googlesource.com/platform/frameworks/volley
+</pre>
+</li>
+
+<li>Import the downloaded source into your app project as an Android library project
+(as described in <a href="{@docRoot}tools/projects/projects-eclipse.html">
+Managing Projects from Eclipse with ADT</a>, if you're using Eclipse) or make a
+<a href="{@docRoot}guide/faq/commontasks.html#addexternallibrary"><code>.jar</code> file</a>.</li>
+</ol>
+
+<h2>Lessons</h2>
+
+<dl>
+ <dt>
+ <strong><a href="simple.html">Sending a Simple Request</a></strong>
+ </dt>
+ <dd>
+ Learn how to send a simple request using the default behaviors of Volley, and how
+ to cancel a request.
+
+ </dd>
+ <dt>
+ <strong><a href="requestqueue.html">Setting Up a RequestQueue</a></strong>
+ </dt>
+ <dd>
+ Learn how to set up a {@code RequestQueue}, and how to implement a singleton
+ pattern to create a {@code RequestQueue} that lasts the lifetime of your app.
+ </dd>
+ <dt>
+ <strong><a href="request.html">Making a Standard Request</a></strong>
+ </dt>
+ <dd>
+ Learn how to send a request using one of Volley's out-of-the-box request types
+ (raw strings, images, and JSON).
+ </dd>
+ <dt>
+ <strong><a href="request-custom.html">Implementing a Custom Request</a></strong>
+ </dt>
+ <dd>
+ Learn how to implement a custom request.
+ </dd>
+
+</dl>
diff --git a/docs/html/training/volley/request-custom.jd b/docs/html/training/volley/request-custom.jd
new file mode 100644
index 0000000..7b669b9
--- /dev/null
+++ b/docs/html/training/volley/request-custom.jd
@@ -0,0 +1,163 @@
+page.title=Implementing a Custom Request
+
+trainingnavtop=true
+
+@jd:body
+
+<div id="tb-wrapper">
+<div id="tb">
+
+<!-- table of contents -->
+<h2>This lesson teaches you to</h2>
+<ol>
+ <li><a href="#custom-request">Write a Custom Request</a></li>
+</ol>
+
+</div>
+</div>
+
+<a class="notice-developers-video wide" href="https://developers.google.com/events/io/sessions/325304728">
+<div>
+ <h3>Video</h3>
+ <p>Volley: Easy, Fast Networking for Android</p>
+</div>
+</a>
+
+<p>This lesson describes how to implement your own custom request types, for types that
+don't have out-of-the-box Volley support.</p>
+
+<h2 id="custom-request">Write a Custom Request</h2>
+
+Most requests have ready-to-use implementations in the toolbox; if your response is a string,
+image, or JSON, you probably won't need to implement a custom {@code Request}.</p>
+
+<p>For cases where you do need to implement a custom request, this is all you need
+to do:</p>
+
+<ul>
+
+<li>Extend the {@code Request<T>} class, where
+{@code <T>} represents the type of parsed response
+the request expects. So if your parsed response is a string, for example,
+create your custom request by extending {@code Request<String>}. See the Volley
+toolbox classes {@code StringRequest} and {@code ImageRequest} for examples of
+extending {@code Request<T>}.</li>
+
+<li>Implement the abstract methods {@code parseNetworkResponse()}
+and {@code deliverResponse()}, described in more detail below.</li>
+
+</ul>
+
+<h3>parseNetworkResponse</h3>
+
+<p>A {@code Response} encapsulates a parsed response for delivery, for a given type
+(such as string, image, or JSON). Here is a sample implementation of
+{@code parseNetworkResponse()}:</p>
+
+<pre>
+@Override
+protected Response<T> parseNetworkResponse(
+ NetworkResponse response) {
+ try {
+ String json = new String(response.data,
+ HttpHeaderParser.parseCharset(response.headers));
+ return Response.success(gson.fromJson(json, clazz),
+ HttpHeaderParser.parseCacheHeaders(response));
+ }
+ // handle errors
+...
+}
+</pre>
+
+<p>Note the following:</p>
+
+<ul>
+<li>{@code parseNetworkResponse()} takes as its parameter a {@code NetworkResponse}, which
+contains the response payload as a byte[], HTTP status code, and response headers.</li>
+<li>Your implementation must return a {@code Response<T>}, which contains your typed
+response object and cache metadata or an error, such as in the case of a parse failure.</li>
+</ul>
+
+<p>If your protocol has non-standard cache semantics, you can build a {@code Cache.Entry}
+yourself, but most requests are fine with something like this:
+</p>
+<pre>return Response.success(myDecodedObject,
+ HttpHeaderParser.parseCacheHeaders(response));</pre>
+<p>
+Volley calls {@code parseNetworkResponse()} from a worker thread. This ensures that
+expensive parsing operations, such as decoding a JPEG into a Bitmap, don't block the UI
+thread.</p>
+
+<h3>deliverResponse</h3>
+
+<p>Volley calls you back on the main thread with the object you returned in
+{@code parseNetworkResponse()}. Most requests invoke a callback interface here,
+for example:
+</p>
+
+<pre>
+protected void deliverResponse(T response) {
+ listener.onResponse(response);
+</pre>
+
+<h3>Example: GsonRequest</h3>
+
+<p><a href="http://code.google.com/p/google-gson/">Gson</a> is a library for converting
+Java objects to and from JSON using reflection. You can define Java objects that have the
+same names as their corresponding JSON keys, pass Gson the class object, and Gson will fill
+in the fields for you. Here's a complete implementation of a Volley request that uses
+Gson for parsing:</p>
+
+<pre>
+public class GsonRequest<T> extends Request<T> {
+ private final Gson gson = new Gson();
+ private final Class<T> clazz;
+ private final Map<String, String> headers;
+ private final Listener<T> listener;
+
+ /**
+ * Make a GET request and return a parsed object from JSON.
+ *
+ * @param url URL of the request to make
+ * @param clazz Relevant class object, for Gson's reflection
+ * @param headers Map of request headers
+ */
+ public GsonRequest(String url, Class<T> clazz, Map<String, String> headers,
+ Listener<T> listener, ErrorListener errorListener) {
+ super(Method.GET, url, errorListener);
+ this.clazz = clazz;
+ this.headers = headers;
+ this.listener = listener;
+ }
+
+ @Override
+ public Map<String, String> getHeaders() throws AuthFailureError {
+ return headers != null ? headers : super.getHeaders();
+ }
+
+ @Override
+ protected void deliverResponse(T response) {
+ listener.onResponse(response);
+ }
+
+ @Override
+ protected Response<T> parseNetworkResponse(NetworkResponse response) {
+ try {
+ String json = new String(
+ response.data,
+ HttpHeaderParser.parseCharset(response.headers));
+ return Response.success(
+ gson.fromJson(json, clazz),
+ HttpHeaderParser.parseCacheHeaders(response));
+ } catch (UnsupportedEncodingException e) {
+ return Response.error(new ParseError(e));
+ } catch (JsonSyntaxException e) {
+ return Response.error(new ParseError(e));
+ }
+ }
+}
+</pre>
+
+<p>Volley provides ready-to-use {@code JsonArrayRequest} and {@code JsonArrayObject} classes
+if you prefer to take that approach. See <a href="request.html">
+Using Standard Request Types</a> for more information.</p>
diff --git a/docs/html/training/volley/request.jd b/docs/html/training/volley/request.jd
new file mode 100644
index 0000000..d8ccab2
--- /dev/null
+++ b/docs/html/training/volley/request.jd
@@ -0,0 +1,281 @@
+page.title=Making a Standard Request
+
+trainingnavtop=true
+
+@jd:body
+
+<div id="tb-wrapper">
+<div id="tb">
+
+<!-- table of contents -->
+<h2>This lesson teaches you to</h2>
+<ol>
+ <li><a href="#request-image">Request an Image</a></li>
+ <li><a href="#request-json">Request JSON</a></li>
+</ol>
+
+</div>
+</div>
+
+<a class="notice-developers-video wide" href="https://developers.google.com/events/io/sessions/325304728">
+<div>
+ <h3>Video</h3>
+ <p>Volley: Easy, Fast Networking for Android</p>
+</div>
+</a>
+
+<p>
+This lesson describes how to use the common request types that Volley supports:</p>
+
+<ul>
+ <li>{@code StringRequest}. Specify a URL and receive a raw string in response. See
+ <a href="requestqueue.html">Setting Up a Request Queue</a> for an example.</li>
+ <li>{@code ImageRequest}. Specify a URL and receive an image in response.</li>
+ <li>{@code JsonObjectRequest} and {@code JsonArrayRequest} (both subclasses of
+ {@code JsonRequest}). Specify a URL and get a JSON object or array (respectively) in
+ response.</li>
+</ul>
+
+<p>If your expected response is one of these types, you probably won't have to implement a
+custom request. This lesson describes how to use these standard request types. For
+information on how to implement your own custom request, see <a href="requests-custom.html">
+Implementing a Custom Request</a>.</p>
+
+
+<h2 id="request-image">Request an Image</h2>
+
+<p>Volley offers the following classes for requesting images. These classes layer on top
+of each other to offer different levels of support for processing images:</p>
+
+<ul>
+ <li>{@code ImageRequest}—a canned request for getting an image at a given URL and
+ calling back with a decoded bitmap. It also provides convenience features like specifying
+ a size to resize to. Its main benefit is that Volley's thread scheduling ensures that
+ expensive image operations (decoding, resizing) automatically happen on a worker thread.</li>
+
+ <li>{@code ImageLoader}—a helper class that handles loading and caching images from
+ remote URLs. {@code ImageLoader} is a an orchestrator for large numbers of {@code ImageRequest}s,
+ for example when putting multiple thumbnails in a {@link android.widget.ListView}.
+ {@code ImageLoader} provides an in-memory cache to sit in front of the normal Volley
+ cache, which is important to prevent flickering. This makes it possible to achieve a
+ cache hit without blocking or deferring off the main thread, which is impossible when
+ using disk I/O. {@code ImageLoader} also does response coalescing, without which almost
+ every response handler would set a bitmap on a view and cause a layout pass per image.
+ Coalescing makes it possible to deliver multiple responses simultaneously, which improves
+ performance.</li>
+ <li>{@code NetworkImageView}—builds on {@code ImageLoader} and effectively replaces
+ {@link android.widget.ImageView} for situations where your image is being fetched over
+ the network via URL. {@code NetworkImageView} also manages canceling pending requests if
+ the view is detached from the hierarchy.</li>
+</ul>
+
+<h3>Use ImageRequest</h3>
+
+<p>Here is an example of using {@code ImageRequest}. It retrieves the image specified by
+the URL and displays it in the app. Note that this snippet interacts with the
+{@code RequestQueue} through a singleton class (see <a href="{@docRoot}
+training/volley/requestqueue.html#singleton">Setting Up a RequestQueue</a> for more discussion of
+this topic):</p>
+
+<pre>
+ImageView mImageView;
+String url = "http://i.imgur.com/7spzG.png";
+mImageView = (ImageView) findViewById(R.id.myImage);
+...
+
+// Retrieves an image specified by the URL, displays it in the UI.
+ImageRequest request = new ImageRequest(url,
+ new Response.Listener<Bitmap>() {
+ @Override
+ public void onResponse(Bitmap bitmap) {
+ mImageView.setImageBitmap(bitmap);
+ }
+ }, 0, 0, null,
+ new Response.ErrorListener() {
+ public void onErrorResponse(VolleyError error) {
+ mImageView.setImageResource(R.drawable.image_load_error);
+ }
+ });
+// Access the RequestQueue through your singleton class.
+MySingleton.getInstance(this).addToRequestQueue(request);</pre>
+
+
+<h3>Use ImageLoader and NetworkImageView</h3>
+
+<p>You can use {@code ImageLoader} and {@code NetworkImageView} in concert to efficiently
+manage the display of multiple images, such as in a {@link android.widget.ListView}. In your
+layout XML file, you use {@code NetworkImageView} in much the same way you would use
+{@link android.widget.ImageView}, for example:</p>
+
+<pre><com.android.volley.toolbox.NetworkImageView
+ android:id="@+id/networkImageView"
+ android:layout_width="150dp"
+ android:layout_height="170dp"
+ android:layout_centerHorizontal="true" /></pre>
+
+<p>You can use {@code ImageLoader} by itself to display an image, for example:</p>
+
+<pre>
+ImageLoader mImageLoader;
+ImageView mImageView;
+// The URL for the image that is being loaded.
+private static final String IMAGE_URL =
+ "http://developer.android.com/images/training/system-ui.png";
+...
+mImageView = (ImageView) findViewById(R.id.regularImageView);
+
+// Get the ImageLoader through your singleton class.
+mImageLoader = MySingleton.getInstance(this).getImageLoader();
+mImageLoader.get(IMAGE_URL, ImageLoader.getImageListener(mImageView,
+ R.drawable.def_image, R.drawable.err_image));
+</pre>
+
+<p>However, {@code NetworkImageView} can do this for you if all you're doing is populating
+an {@link android.widget.ImageView}. For example:</p>
+
+<pre>
+ImageLoader mImageLoader;
+NetworkImageView mNetworkImageView;
+private static final String IMAGE_URL =
+ "http://developer.android.com/images/training/system-ui.png";
+...
+
+// Get the NetworkImageView that will display the image.
+mNetworkImageView = (NetworkImageView) findViewById(R.id.networkImageView);
+
+// Get the ImageLoader through your singleton class.
+mImageLoader = MySingleton.getInstance(this).getImageLoader();
+
+// Set the URL of the image that should be loaded into this view, and
+// specify the ImageLoader that will be used to make the request.
+mNetworkImageView.setImageUrl(IMAGE_URL, mImageLoader);
+</pre>
+
+<p>The above snippets access the {@code RequestQueue} and the {@code ImageLoader}
+through a singleton class, as described in <a href="{@docRoot}training/volley/requestqueue.html#singleton">
+Setting Up a RequestQueue</a>. This approach ensures that your app creates single instances of
+these classes that last the lifetime of your app. The reason that this is important for
+{@code ImageLoader} (the helper class that handles loading and caching images) is that
+the main function of the in-memory cache is to allow for flickerless rotation. Using a
+singleton pattern allows the bitmap cache to outlive the activity. If instead you create the
+{@code ImageLoader} in an activity, the {@code ImageLoader} would be recreated along with
+the activity every time the user rotates the device. This would cause flickering.</p>
+
+<h4 id="lru-cache">Example LRU cache</h4>
+
+<p>The Volley toolbox provides a standard cache implementation via the
+{@code DiskBasedCache} class. This class caches files directly onto the hard disk in the
+specified directory. But to use {@code ImageLoader}, you should provide a custom
+in-memory LRU bitmap cache that implements the {@code ImageLoader.ImageCache} interface.
+You may want to set up your cache as a singleton; for more discussion of this topic, see
+<a href="{@docRoot}training/volley/requestqueue.html#singleton">
+Setting Up a RequestQueue</a>.</p>
+
+<p>Here is a sample implementation for an in-memory {@code LruBitmapCache} class.
+It extends the {@link android.support.v4.util.LruCache} class and implements the
+{@code ImageLoader.ImageCache} interface:</p>
+
+<pre>
+import android.graphics.Bitmap;
+import android.support.v4.util.LruCache;
+import android.util.DisplayMetrics;
+import com.android.volley.toolbox.ImageLoader.ImageCache;
+
+public class LruBitmapCache extends LruCache<String, Bitmap>
+ implements ImageCache {
+
+ public LruBitmapCache(int maxSize) {
+ super(maxSize);
+ }
+
+ public LruBitmapCache(Context ctx) {
+ this(getCacheSize(ctx));
+ }
+
+ @Override
+ protected int sizeOf(String key, Bitmap value) {
+ return value.getRowBytes() * value.getHeight();
+ }
+
+ @Override
+ public Bitmap getBitmap(String url) {
+ return get(url);
+ }
+
+ @Override
+ public void putBitmap(String url, Bitmap bitmap) {
+ put(url, bitmap);
+ }
+
+ // Returns a cache size equal to approximately three screens worth of images.
+ public static int getCacheSize(Context ctx) {
+ final DisplayMetrics displayMetrics = ctx.getResources().
+ getDisplayMetrics();
+ final int screenWidth = displayMetrics.widthPixels;
+ final int screenHeight = displayMetrics.heightPixels;
+ // 4 bytes per pixel
+ final int screenBytes = screenWidth * screenHeight * 4;
+
+ return screenBytes * 3;
+ }
+}
+</pre>
+
+<p>Here is an example of how to instantiate an {@code ImageLoader} to use this
+cache:</p>
+
+<pre>
+RequestQueue mRequestQueue; // assume this exists.
+ImageLoader mImageLoader = new ImageLoader(mRequestQueue, new LruBitmapCache(
+ LruBitmapCache.getCacheSize()));
+</pre>
+
+
+<h2 id="request-json">Request JSON</h2>
+
+<p>Volley provides the following classes for JSON requests:</p>
+
+<ul>
+ <li>{@code JsonArrayRequest}—A request for retrieving a
+ {@link org.json.JSONArray}
+ response body at a given URL.</li>
+ <li>{@code JsonObjectRequest}—A request for retrieving a
+ {@link org.json.JSONObject}
+ response body at a given URL, allowing for an optional
+ {@link org.json.JSONObject}
+ to be passed in as part of the request body.</li>
+</ul>
+
+<p>Both classes are based on the common base class {@code JsonRequest}. You use them
+following the same basic pattern you use for other types of requests. For example, this
+snippet fetches a JSON feed and displays it as text in the UI:</p>
+
+<pre>
+TextView mTxtDisplay;
+ImageView mImageView;
+mTxtDisplay = (TextView) findViewById(R.id.txtDisplay);
+String url = "http://my-json-feed";
+
+JsonObjectRequest jsObjRequest = new JsonObjectRequest
+ (Request.Method.GET, url, null, new Response.Listener<JSONObject>() {
+
+ @Override
+ public void onResponse(JSONObject response) {
+ mTxtDisplay.setText("Response: " + response.toString());
+ }
+}, new Response.ErrorListener() {
+
+ @Override
+ public void onErrorResponse(VolleyError error) {
+ // TODO Auto-generated method stub
+
+ }
+});
+
+// Access the RequestQueue through your singleton class.
+MySingleton.getInstance(this).addToRequestQueue(jsObjRequest);
+</pre>
+
+For an example of implementing a custom JSON request based on
+<a href="http://code.google.com/p/google-gson/">Gson</a>, see the next lesson,
+<a href="request-custom.html">Implementing a Custom Request</a>.
diff --git a/docs/html/training/volley/requestqueue.jd b/docs/html/training/volley/requestqueue.jd
new file mode 100644
index 0000000..6858d91
--- /dev/null
+++ b/docs/html/training/volley/requestqueue.jd
@@ -0,0 +1,204 @@
+page.title=Setting Up a RequestQueue
+
+trainingnavtop=true
+
+@jd:body
+
+<div id="tb-wrapper">
+<div id="tb">
+
+<!-- table of contents -->
+<h2>This lesson teaches you to</h2>
+<ol>
+ <li><a href="#network">Set Up a Network and Cache</a></li>
+ <li><a href="#singleton">Use a Singleton Pattern</a></li>
+</ol>
+
+</div>
+</div>
+
+<a class="notice-developers-video wide" href="https://developers.google.com/events/io/sessions/325304728">
+<div>
+ <h3>Video</h3>
+ <p>Volley: Easy, Fast Networking for Android</p>
+</div>
+</a>
+
+
+<p>The previous lesson showed you how to use the convenience method
+<code>Volley.newRequestQueue</code> to set up a {@code RequestQueue}, taking advantage of
+Volley's default behaviors. This lesson walks you through the explicit steps of creating a
+{@code RequestQueue}, to allow you to supply your own custom behavior.</p>
+
+<p>This lesson also describes the recommended practice of creating a {@code RequestQueue}
+as a singleton, which makes the {@code RequestQueue} last the lifetime of your app.</p>
+
+<h2 id="network">Set Up a Network and Cache</h2>
+
+<p>A {@code RequestQueue} needs two things to do its job: a network to perform transport
+of the requests, and a cache to handle caching. There are standard implementations of these
+available in the Volley toolbox: {@code DiskBasedCache} provides a one-file-per-response
+cache with an in-memory index, and {@code BasicNetwork} provides a network transport based
+on your choice of {@link android.net.http.AndroidHttpClient} or {@link java.net.HttpURLConnection}.</p>
+
+<p>{@code BasicNetwork} is Volley's default network implementation. A {@code BasicNetwork}
+must be initialized with the HTTP client your app is using to connect to the network.
+Typically this is {@link android.net.http.AndroidHttpClient} or
+{@link java.net.HttpURLConnection}:</p>
+<ul>
+<li>Use {@link android.net.http.AndroidHttpClient} for apps targeting Android API levels
+lower than API Level 9 (Gingerbread). Prior to Gingerbread, {@link java.net.HttpURLConnection}
+was unreliable. For more discussion of this topic, see
+<a href="http://android-developers.blogspot.com/2011/09/androids-http-clients.html">
+Android's HTTP Clients</a>. </li>
+
+<li>Use {@link java.net.HttpURLConnection} for apps targeting Android API Level 9
+(Gingerbread) and higher.</li>
+</ul>
+<p>To create an app that runs on all versions of Android, you can check the version of
+Android the device is running and choose the appropriate HTTP client, for example:</p>
+
+<pre>
+HttpStack stack;
+...
+// If the device is running a version >= Gingerbread...
+if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.GINGERBREAD) {
+ // ...use HttpURLConnection for stack.
+} else {
+ // ...use AndroidHttpClient for stack.
+}
+Network network = new BasicNetwork(stack);
+</pre>
+
+<p>This snippet shows you the steps involved in setting up a
+{@code RequestQueue}:</p>
+
+<pre>
+RequestQueue mRequestQueue;
+
+// Instantiate the cache
+Cache cache = new DiskBasedCache(getCacheDir(), 1024 * 1024); // 1MB cap
+
+// Set up the network to use HttpURLConnection as the HTTP client.
+Network network = new BasicNetwork(new HurlStack());
+
+// Instantiate the RequestQueue with the cache and network.
+mRequestQueue = new RequestQueue(cache, network);
+
+// Start the queue
+mRequestQueue.start();
+
+String url ="http://www.myurl.com";
+
+// Formulate the request and handle the response.
+StringRequest stringRequest = new StringRequest(Request.Method.GET, url,
+ new Response.Listener<String>() {
+ @Override
+ public void onResponse(String response) {
+ // Do something with the response
+ }
+},
+ new Response.ErrorListener() {
+ @Override
+ public void onErrorResponse(VolleyError error) {
+ // Handle error
+ }
+});
+
+// Add the request to the RequestQueue.
+mRequestQueue.add(stringRequest);
+...
+</pre>
+
+<p>If you just need to make a one-time request and don't want to leave the thread pool
+around, you can create the {@code RequestQueue} wherever you need it and call {@code stop()} on the
+{@code RequestQueue} once your response or error has come back, using the
+{@code Volley.newRequestQueue()} method described in <a href="simple.html">Sending a Simple
+Request</a>. But the more common use case is to create the {@code RequestQueue} as a
+singleton to keep it running for the lifetime of your app, as described in the next section.</p>
+
+
+<h2 id="singleton">Use a Singleton Pattern</h2>
+
+<p>If your application makes constant use of the network, it's probably most efficient to
+set up a single instance of {@code RequestQueue} that will last the lifetime of your app.
+You can achieve this in various ways. The recommended approach is to implement a singleton
+class that encapsulates {@code RequestQueue} and other Volley
+functionality. Another approach is to subclass {@link android.app.Application} and set up the
+{@code RequestQueue} in {@link android.app.Application#onCreate Application.onCreate()}.
+But this approach is <a href="{@docRoot}reference/android/app/Application.html">
+discouraged</a>; a static singleton can provide the same functionality in a more modular
+way. </p>
+
+<p>A key concept is that the {@code RequestQueue} must be instantiated with the
+{@link android.app.Application} context, not an {@link android.app.Activity} context. This
+ensures that the {@code RequestQueue} will last for the lifetime of your app, instead of
+being recreated every time the activity is recreated (for example, when the user
+rotates the device).
+
+<p>Here is an example of a singleton class that provides {@code RequestQueue} and
+{@code ImageLoader} functionality:</p>
+
+<pre>private static MySingleton mInstance;
+ private RequestQueue mRequestQueue;
+ private ImageLoader mImageLoader;
+ private static Context mCtx;
+
+ private MySingleton(Context context) {
+ mCtx = context;
+ mRequestQueue = getRequestQueue();
+
+ mImageLoader = new ImageLoader(mRequestQueue,
+ new ImageLoader.ImageCache() {
+ private final LruCache<String, Bitmap>
+ cache = new LruCache<String, Bitmap>(20);
+
+ @Override
+ public Bitmap getBitmap(String url) {
+ return cache.get(url);
+ }
+
+ @Override
+ public void putBitmap(String url, Bitmap bitmap) {
+ cache.put(url, bitmap);
+ }
+ });
+ }
+
+ public static synchronized MySingleton getInstance(Context context) {
+ if (mInstance == null) {
+ mInstance = new MySingleton(context);
+ }
+ return mInstance;
+ }
+
+ public RequestQueue getRequestQueue() {
+ if (mRequestQueue == null) {
+ // getApplicationContext() is key, it keeps you from leaking the
+ // Activity or BroadcastReceiver if someone passes one in.
+ mRequestQueue = Volley.newRequestQueue(mCtx.getApplicationContext());
+ }
+ return mRequestQueue;
+ }
+
+ public <T> void addToRequestQueue(Request<T> req) {
+ getRequestQueue().add(req);
+ }
+
+ public ImageLoader getImageLoader() {
+ return mImageLoader;
+ }
+}</pre>
+
+<p>Here are some examples of performing {@code RequestQueue} operations using the singleton
+class:</p>
+
+<pre>
+// Get a RequestQueue
+RequestQueue queue = MySingleton.getInstance(this.getApplicationContext()).
+ getRequestQueue();
+...
+
+// Add a request (in this example, called stringRequest) to your RequestQueue.
+MySingleton.getInstance(this).addToRequestQueue(stringRequest);
+</pre>
diff --git a/docs/html/training/volley/simple.jd b/docs/html/training/volley/simple.jd
new file mode 100644
index 0000000..942c57f
--- /dev/null
+++ b/docs/html/training/volley/simple.jd
@@ -0,0 +1,169 @@
+page.title=Sending a Simple Request
+
+trainingnavtop=true
+
+@jd:body
+
+<div id="tb-wrapper">
+<div id="tb">
+
+<!-- table of contents -->
+<h2>This lesson teaches you to</h2>
+<ol>
+ <li><a href="#manifest">Add the INTERNET Permission</a></li>
+ <li><a href="#simple">Use newRequestQueue</a></li>
+ <li><a href="#send">Send a Request</a></li>
+ <li><a href="#cancel">Cancel a Request</a></li>
+</ol>
+
+</div>
+</div>
+
+<a class="notice-developers-video wide" href="https://developers.google.com/events/io/sessions/325304728">
+<div>
+ <h3>Video</h3>
+ <p>Volley: Easy, Fast Networking for Android</p>
+</div>
+</a>
+
+<p>At a high level, you use Volley by creating a {@code RequestQueue} and passing it
+{@code Request} objects. The {@code RequestQueue} manages worker threads for running the
+network operations, reading from and writing to the cache, and parsing responses. Requests
+do the parsing of raw responses and Volley takes care of dispatching the parsed response
+back to the main thread for delivery.</p>
+
+<p> This lesson describes how to send a request using the <code>Volley.newRequestQueue</code>
+convenience method, which sets up a {@code RequestQueue} for you.
+See the next lesson,
+<a href="requestqueue.html">Setting Up a RequestQueue</a>, for information on how to set
+up a {@code RequestQueue} yourself.</p>
+
+<p>This lesson also describes how to add a request to a {@code RequestQueue} and cancel a
+request.</p>
+
+<h2 id="manifest">Add the INTERNET Permission</h2>
+
+<p>To use Volley, you must add the
+{@link android.Manifest.permission#INTERNET android.permission.INTERNET} permission
+to your app's manifest. Without this, your app won't be able to connect to the network.</p>
+
+
+<h2 id="simple">Use newRequestQueue</h2>
+
+<p>Volley provides a convenience method <code>Volley.newRequestQueue</code> that sets up a
+{@code RequestQueue} for you, using default values, and starts the queue. For example:</p>
+
+<pre>
+final TextView mTextView = (TextView) findViewById(R.id.text);
+...
+
+// Instantiate the RequestQueue.
+RequestQueue queue = Volley.newRequestQueue(this);
+String url ="http://www.google.com";
+
+// Request a string response from the provided URL.
+StringRequest stringRequest = new StringRequest(Request.Method.GET, url,
+ new Response.Listener<String>() {
+ @Override
+ public void onResponse(String response) {
+ // Display the first 500 characters of the response string.
+ mTextView.setText("Response is: "+ response.substring(0,500));
+ }
+}, new Response.ErrorListener() {
+ @Override
+ public void onErrorResponse(VolleyError error) {
+ mTextView.setText("That didn't work!");
+ }
+});
+// Add the request to the RequestQueue.
+queue.add(stringRequest);
+</pre>
+
+<p>Volley always delivers parsed responses on the main thread. Running on the main thread
+is convenient for populating UI controls with received data, as you can freely modify UI
+controls directly from your response handler, but it's especially critical to many of the
+important semantics provided by the library, particularly related to canceling requests.
+</p>
+
+<p>See <a href="requestqueue.html">Setting Up a RequestQueue</a> for a
+description of how to set up a {@code RequestQueue} yourself, instead of using the
+<code>Volley.newRequestQueue</code> convenience method.</p>
+
+<h2 id="send">Send a Request</h2>
+
+<p>To send a request, you simply construct one and add it to the {@code RequestQueue} with
+{@code add()}, as shown above. Once you add the request it moves through the pipeline,
+gets serviced, and has its raw response parsed and delivered.</p>
+
+<p>When you call {@code add()}, Volley runs one cache processing thread and a pool of
+network dispatch threads. When you add a request to the queue, it is picked up by the cache
+thread and triaged: if the request can be serviced from cache, the cached response is
+parsed on the cache thread and the parsed response is delivered on the main thread. If the
+request cannot be serviced from cache, it is placed on the network queue. The first
+available network thread takes the request from the queue, performs the HTTP transaction,
+parsse the response on the worker thread, writes the response to cache, and posts the parsed
+response back to the main thread for delivery.</p>
+
+<p>Note that expensive operations like blocking I/O and parsing/decoding are done on worker
+threads. You can add a request from any thread, but responses are always delivered on the
+main thread.</p>
+
+<p>Figure 1 illustrates the life of a request:</p>
+
+ <img src="{@docRoot}images/training/volley-request.png"
+ alt="system bars">
+<p class="img-caption"><strong>Figure 1.</strong> Life of a request.</p>
+
+
+<h2 id="cancel">Cancel a Request</h2>
+
+<p>To cancel a request, call {@code cancel()} on your {@code Request} object. Once cancelled,
+Volley guarantees that your response handler will never be called. What this means in
+practice is that you can cancel all of your pending requests in your activity's
+{@link android.app.Activity#onStop onStop()} method and you don't have to litter your
+response handlers with checks for {@code getActivity() == null},
+whether {@code onSaveInstanceState()} has been called already, or other defensive
+boilerplate.</p>
+
+<p>To take advantage of this behavior, you would typically have to
+track all in-flight requests in order to be able to cancel them at the
+appropriate time. There is an easier way: you can associate a tag object with each
+request. You can then use this tag to provide a scope of requests to cancel. For
+example, you can tag all of your requests with the {@link android.app.Activity} they
+are being made on behalf of, and call {@code requestQueue.cancelAll(this)} from
+{@link android.app.Activity#onStop onStop()}.
+Similarly, you could tag all thumbnail image requests in a
+{@link android.support.v4.view.ViewPager} tab with their respective tabs and cancel on swipe
+to make sure that the new tab isn't being held up by requests from another one.</p>
+
+<p>Here is an example that uses a string value for the tag:</p>
+
+<ol>
+<li>Define your tag and add it to your requests.
+<pre>
+public static final String TAG = "MyTag";
+StringRequest stringRequest; // Assume this exists.
+RequestQueue mRequestQueue; // Assume this exists.
+
+// Set the tag on the request.
+stringRequest.setTag(TAG);
+
+// Add the request to the RequestQueue.
+mRequestQueue.add(stringRequest);</pre>
+</li>
+
+<li>In your activity's {@link android.app.Activity#onStop onStop()} method, cancel all requests that have this tag.
+<pre>
+@Override
+protected void onStop () {
+ super.onStop();
+ if (mRequestQueue != null) {
+ mRequestQueue.cancelAll(TAG);
+ }
+}
+</pre></li></ol>
+
+<p>Take care when canceling requests. If you are depending on your response handler to
+advance a state or kick off another process, you need to account for this. Again, the
+response handler will not be called.
+</p>
diff --git a/docs/html/tv/images/hero.jpg b/docs/html/tv/images/hero.jpg
new file mode 100644
index 0000000..c42a436
--- /dev/null
+++ b/docs/html/tv/images/hero.jpg
Binary files differ
diff --git a/docs/html/tv/index.jd b/docs/html/tv/index.jd
new file mode 100644
index 0000000..e1cae8c
--- /dev/null
+++ b/docs/html/tv/index.jd
@@ -0,0 +1,262 @@
+page.title=Android TV
+page.viewport_width=970
+fullpage=true
+no_footer_links=true
+page.type=about
+
+
+@jd:body
+
+<style>
+.fullpage>#footer,
+#jd-content>.content-footer.wrap {
+ display:none;
+}
+</style>
+
+<style>
+#footer {
+ display: none;
+}
+.content-footer {
+ display: none;
+}
+</style>
+
+
+<div class="landing-body-content">
+ <div class="landing-hero-container">
+
+ <div class="landing-section tv-hero">
+ <div class="landing-hero-scrim"></div>
+ <div class="landing-hero-wrap">
+ <div class="vertical-center-outer">
+ <div class="vertical-center-inner">
+
+ <div class="col-10">
+ <div class="landing-section-header">
+ <div class="landing-h1 hero">Android TV</div>
+ <div class="landing-subhead hero">Your apps on the big screen</div>
+ <div class="landing-hero-description">
+ <p>Engage users from the comfort of their couches.
+ Put your app on TV and bring everyone into
+ the action.</p>
+ </div>
+
+ <div class="landing-body">
+ <a href="{@docRoot}preview/tv/index.html" class="landing-button landing-primary" style="margin-top: 40px;">
+ Get Started
+ </a>
+ </div>
+ </div>
+ </div>
+ </div>
+ </div> <!-- end .wrap -->
+ <div class="landing-scroll-down-affordance">
+ <a class="landing-down-arrow" href="#reimagine-your-app">
+ <img src="{@docRoot}wear/images/carrot.png" alt="Scroll down to read more">
+ </a>
+ </div>
+ </div> <!-- end .landing-section .landing-hero -->
+ </div> <!-- end .landing-hero-container -->
+
+ <div class="landing-rest-of-page">
+
+ <div class="landing-section landing-gray-background" id="reimagine-your-app">
+ <div class="wrap">
+ <div class="landing-section-header">
+ <div class="landing-h1">Reimagine Your App</div>
+ <div class="landing-subhead">
+ Design your app to shine on the biggest screen in the house.
+ </div>
+ </div>
+
+
+ <div class="landing-body">
+ <div class="landing-breakout cols">
+
+ <div class="col-3-wide">
+ <img src="{@docRoot}tv/images/placeholder-square.png" alt="">
+
+ <p>Simple</p>
+ <p class="landing-small">
+ Smooth, fast interactions are key to a successful TV app. Keep navigation simple
+ and light. Bring your content forward to let users enjoy it with a minimum of
+ fuss.
+ </p>
+ <p class="landing-small">
+ <a href="{@docRoot}design/tv/index.html">Learn about TV design</a>
+ </p>
+ </div>
+
+ <div class="col-3-wide">
+ <img src="{@docRoot}tv/images/placeholder-square.png" alt="">
+
+ <p>Cinematic</p>
+ <p class="landing-small">
+ What would your app look like if it were a film? Use movement, animation and sound to make your app into an experience.
+ </p>
+ <p class="landing-small">
+ <a href="{@docRoot}design/tv/index.html">Learn about TV design</a>
+ </p>
+ </div>
+
+ <div class="col-3-wide">
+ <img src="{@docRoot}tv/images/placeholder-square.png" alt="">
+
+ <p>Beautiful</p>
+ <p class="landing-small">
+ Apps on TV should be a pleasure to look at, as well as enjoyable to use. Use
+ made-for-TV styles to make your app familiar and fun.
+ </p>
+ <p class="landing-small">
+ <a href="{@docRoot}design/tv/index.html">Learn about design for TV</a>
+ </p>
+ </div>
+ </div>
+
+ </div>
+ </div> <!-- end .wrap -->
+ </div> <!-- end .landing-section -->
+
+ <div class="landing-section" style="background-color:#f5f5f5">
+ <div class="wrap">
+ <div class="landing-section-header">
+ <div class="landing-h1">Build to Entertain</div>
+ <div class="landing-subhead">
+ Android TV let's you engage your users in a new, shared environment.<br>
+ Find out how to get your app ready for it's big screen debut.
+ </div>
+ </div>
+
+
+ <div class="landing-body">
+ <div class="landing-breakout cols">
+
+ <div class="col-3-wide">
+ <img src="{@docRoot}tv/images/placeholder-square.png" alt="">
+
+ <p>Made for TV</p>
+ <p class="landing-small">
+ Take advantage of pre-built fragments for browsing and interacting with media
+ catalogs.
+ </p>
+ <p class="landing-small">
+ <a href="{@docRoot}design/tv/index.html">Learn pre-built fragments</a>
+ </p>
+ </div>
+
+ <div class="col-3-wide">
+ <img src="{@docRoot}tv/images/placeholder-square.png" alt="">
+
+ <p>Get Found</p>
+ <p class="landing-small">
+ Give your content the attention it deserves by including it in Android TV's global
+ search results.
+ </p>
+ <p class="landing-small">
+ <a href="{@docRoot}design/tv/index.html">Learn about TV design</a>
+ </p>
+ </div>
+
+ <div class="col-3-wide">
+ <img src="{@docRoot}tv/images/placeholder-square.png" alt="">
+
+ <p>Recommend</p>
+ <p class="landing-small">
+ Suggest content from your app to keep your users coming back.
+ </p>
+ <p class="landing-small">
+ <a href="{@docRoot}design/tv/index.html">Learn about design for TV</a>
+ </p>
+ </div>
+
+ </div>
+
+ </div>
+ </div> <!-- end .wrap -->
+ </div> <!-- end .landing-section -->
+
+ <div class="landing-section landing-red-background">
+ <div class="wrap">
+ <div class="landing-section-header">
+ <div class="landing-h1 landing-align-left">Get Started with Android TV</div>
+ <div class="landing-body">
+ <p>You can begin building apps right away using these developer resources.</p>
+ </div>
+ </div>
+
+ <div class="landing-body">
+ <div class="landing-breakout cols">
+ <div class="col-8">
+ <p>Preview SDK</p>
+ <p>
+ Get started building for Android TV using the Android L-preview SDK. The preview
+ SDK includes the Android TV emulator so you can start building your TV app right
+ away.
+ </p>
+
+ </div>
+
+ <div class="col-8">
+ <p>ADT-1 Developer Kit</p>
+ <p>
+ While supplies last, developers can request an ADT-1 Developer Kit, a compact and
+ powerful streaming media player and gamepad, ideal for developing apps for Android
+ TV.
+ </p>
+
+ </div>
+
+ </div>
+ </div>
+
+ <div class="landing-body">
+ <div class="landing-breakout cols">
+
+ <div class="col-8">
+ <a href="{@docRoot}preview/download.html" class="landing-button landing-secondary">
+ Download the Preview SDK
+ </a>
+ </div>
+
+ <div class="col-8">
+ <a href="{@docRoot}tv/adt-1/request.html" class="landing-button landing-secondary">
+ Request ADT-1 Developer Kit
+ </a>
+ </div>
+ </div>
+
+ </div> <!-- end .wrap -->
+ </div> <!-- end .landing-section -->
+
+ </div> <!-- end .landing-rest-of-page -->
+
+
+ <div class="content-footer wrap" itemscope="" itemtype="http://schema.org/SiteNavigationElement">
+ <div class="layout-content-col col-16" style="padding-top:4px">
+ <style>#___plusone_0 {float:right !important;}</style>
+ <div class="g-plusone" data-size="medium"></div>
+ </div>
+ </div>
+ <div id="footer" class="wrap" style="width:940px;position:relative;top:-35px;z-index:-1">
+ <div 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>. For details and
+ restrictions, see the <a href="/license.html">Content
+ License</a>.
+ </div>
+ </div>
+
+
+ </div> <!-- end landing-body-content -->
+
+ <script>
+ $("a.landing-down-arrow").on("click", function(e) {
+ $("body").animate({
+ scrollTop: $(".wear-hero").height() + 76
+ }, 1000, "easeOutQuint");
+ e.preventDefault();
+ });
+ </script>
diff --git a/docs/html/wear/css/wear.css b/docs/html/wear/css/wear.css
deleted file mode 100644
index fe9eef2..0000000
--- a/docs/html/wear/css/wear.css
+++ /dev/null
@@ -1,447 +0,0 @@
-/**
- * UTILITIES
- */
-
-
-.border-box {
- box-sizing: border-box;
-}
-
-.vertical-center-outer {
- display: table;
- height: 100%;
- width: 100%;
-}
-
-.vertical-center-inner {
- display: table-cell;
- vertical-align: middle;
-}
-
-/**
- * TYPE STYLES
- */
-
-.wear-h1 {
- font-weight: 300;
- font-size: 60px;
- line-height: 78px;
- text-align: center;
- letter-spacing: -1px;
-}
-
-.wear-pre-h1 {
- font-weight: 400;
- font-size: 28px;
- color: #93B73F;
- line-height: 36px;
- text-align: center;
- letter-spacing: -1px;
- text-transform: uppercase;
-
-}
-
-.wear-h1.hero {
- text-align: left;
-}
-
-.wear-h2 {
- font-weight: 300;
- font-size: 42px;
- line-height: 64px;
- text-align: center;
-}
-
-
-.wear-subhead {
- color: #999999;
- font-size: 20px;
- line-height: 28px;
- text-align: center;
-}
-.wear-subhead.hero {
- text-align: left;
- color: white;
-}
-
-.wear-hero-description {
- text-align: left;
- margin: 1em 0;
-}
-
-.wear-hero-description p {
- font-weight: 300;
- margin: 0;
- font-size: 18px;
- line-height: 24px;
-}
-
-.wear-body .wear-small {
- font-size: 14px;
- line-height: 19px;
-}
-
-.wear-body.wear-align-center {
- text-align: center;
-}
-
-.wear-align-left {
- text-align: left;
-}
-
-/**
- * LAYOUT
- */
-
-#body-content,
-.fullpage,
-#jd-content,
-.jd-descr,
-.wear-body-content {
- height: 100%;
-}
-
-.wear-section {
- padding: 80px 10px 80px;
- width: 100%;
- margin-left: -10px;
- text-rendering: optimizeLegibility;
-}
-
-#extending-android-to-wearables {
- padding-top: 30px;
-}
-
-.wear-short-section {
- padding: 40px 10px 28px;
-}
-
-.wear-gray-background {
- background-color: #e9e9e9;
-}
-
-.wear-white-background {
- background-color: white;
-}
-
-.wear-red-background {
- color: white;
- background-color: hsl(8, 70%, 54%);
-}
-
-.wear-subhead-red {
- color: hsl(8, 71%, 84%);
- text-align: left;
-}
-
-.wear-subhead-red p {
- margin-top: 20px;
-}
-
-.wear-hero-container {
- height: 100%;
-}
-
-.wear-hero {
- height: calc(100% - 70px);
- min-height: 504px;
- margin-top: 0;
- padding-top: 0;
- padding-bottom: 0;
- background-image: url(/wear/images/hero.jpg);
- background-size: cover;
- background-position: right center;
- color: white;
- position: relative;
- overflow: hidden;
-}
-
-.wear-hero-scrim {
- background: black;
- opacity: .2;
- position: absolute;
- width: 100%;
- height: 100%;
- margin-left: -10px;
-}
-
-.wear-hero-wrap {
- margin: 0 auto;
- width: 940px;
- clear: both;
- height: 100%;
- position: relative;
-}
-
-.wear-section-header {
- margin-bottom: 40px;
-}
-
-.wear-hero-wrap .wear-section-header {
- margin-bottom: 16px;
-}
-
-.wear-body {
- font-size: 18px;
- line-height: 24px;
-}
-
-.wear-button {
- white-space: nowrap;
- display: inline-block;
- padding: 16px 32px;
- font-size: 18px;
- font-weight: 500;
- line-height: 24px;
- cursor: pointer;
- color: white;
- -webkit-user-select: none;
- -moz-user-select: none;
- -o-user-select: none;
- user-select: none;
- -webkit-transition: .2s background-color ease-in-out;
- -moz-transition: .2s background-color ease-in-out;
- -o-transition: .2s background-color ease-in-out;
- transition: .2s background-color ease-in-out;
-}
-
-.wear-primary {
- background-color: hsl(8, 70%, 54%); /* #dc4b35 */
- color: #f8f8f8;
-}
-
-.wear-button.wear-primary:hover {
- background-color: hsl(8, 70%, 44%); /* #bf3722 */
-}
-
-.wear-button.wear-primary:active {
- background-color: hsl(8, 70%, 36%); /* # */
-}
-
-.wear-button.wear-secondary {
- background-color: hsl(8, 70%, 44%);
-}
-
-.wear-button.wear-secondary:hover {
- background-color: hsl(8, 70%, 36%);
-}
-
-.wear-button.wear-secondary:active {
- background-color: hsl(8, 70%, 30%);
-}
-
-a.wear-button,
-a.wear-button:hover,
-a.wear-button:visited {
- color: white !important;
-}
-
-.wear-video-link {
- white-space: nowrap;
- display: inline-block;
- padding: 16px 32px 16px 82px;
- font-size: 18px;
- font-weight: 400;
- line-height: 24px;
- cursor: pointer;
- color: hsla(0, 0%, 100%, .8);
- -webkit-user-select: none;
- -moz-user-select: none;
- -o-user-select: none;
- user-select: none;
- -webkit-transition: .2s color ease-in-out;
- -moz-transition: .2s color ease-in-out;
- -o-transition: .2s color ease-in-out;
- transition: .2s color ease-in-out;
-}
-
-.wear-video-link:before {
- height: 64px;
- width: 64px;
- display: inline-block;
- background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGAAAABgCAYAAADimHc4AAAFuklEQVR42u2dXWgcVRSAV9LWtBBTTZVWUhNqEQtq1QeroDRKFRFsROqTYPuo+JCiIoJKFC0USqlUfCiowRcfrBgVUUElefAPkW5T8aeaGn9aRbFsjP0x2cx8PuRMvFxmdjeb2Z17Z8+B85DsZPbO+eaec3/OPSkABdXsVI2gABSAqgJQAKoKQAGoKgAFoKoAFICqAlAAqgpAAai6DqDRAiwDeoFtwB7gPaAInABKwKToCWAMeB/YDdwJrAWWNLh9+QMAXABsBQ4A3wFTwAxQBmaBAAhjNJDPy3L938BXwAvArUCHAkh+kCXAVcA+YBw4bRg7MngtkgTlDPA98CywHmhTAP8/xCbgVeAvMZZpwDQllN7xB/AysKGlAQAXAvuBkzW85UVgCBgENlfQQbmuWAXELPAnsAvoaikAQBtwh/j3coLhS2LIfqCzzu/plL8fkvvFgZiR4L2lHrfkHQBgpQTFUwmGnwC212v0KjC2y/3jQPwDPA+05xYAcBHwubx1YZzhC02QBBBRbxgBzssdAOBy4JgRZE0ZTPuNr7FHDCbEhqNAd24AAN0yUbID7QSwsZChABut3hANXY8Bq70HIMb/Ocb4w81+66v0hmGrN0QQ1ngLQJYRvpWHMWWo4KDIaMnuCcVKgdlZAGL8t2J8vpPGrwChDLyWBMFlAA8D0z4ZvwKEs8D93gCQEc9Jy/jFgkdizaRDGUSs8wXAu1bQLQE9ngHosWbPAXDQeQAypT9rBd3+gociyxi2K9riLABZUj5iuZ6RgsciM2OzFxw2A7JrAO6VwGtKTwpG+Anoy9AVmb3gDHCPcwCAFcChRox6jPu9CazMeFQUAKNRL3AJwE2yopjq228BQPZ/d2bcCyaBTa4BeNGa8Q6naIA4GQWubiKEYWvBbp8zAGQt5VfL/fQ3GEAkTzXDLVkjokA2k5a7AuA2GaLNj/tTfvhq0pQgbcwLQtlQusYVALtlzSR191MjADNI9zbJDZWBR10BMGr5/4GMADQ0SAMDlht62xUAxy0AmzMEEMnhtIO0ZF2YAH5wITd0hQw/5wE04M1bjDyXZpC2hqMlYGnWAHqBf40APOEYgChI35VSWyasWfGqrAH0WVkOIw4CSC1IG2tDoSy7XJE1gPs8ArDoIG0BmJGk30wBDHgGYFFBOgbAtqwB7GxxAHerC8rOBU0Dt2gQzjYIb8gawDor+6HVhqFdrkzEwhabiAVOTMSkUb+06FLEUVfWgj5q0cW4g64AeNo66ZLlcnTDNmesBN4y8KArAG6QU42ttCEzBVzpCoAO4EfLDeV5SzIEvgHaXdqUP2BlQud1Ux55zj2uZUX02cPRnKalRLmu17qYmPWF5YbymJgVAh8Ay5wCII3ZEZOYm6fURGT2u9X43Mnk3CDHybmfmRVYXExPv9nKEcpLejqSC3SjdY2TBzTesHqB7wc0onTEV2KucxLApXKkJy9HlAI5anuJFwCkYQ/EuCJfD+mdBnYkXOssgHY53un7MdVZ4CVgqVcADAhjMafkfTioHc14P04yvvMApIEXy5F/+7S8y6UKolPyR4BVVf7Wi2IdawwIPhTrmAW+rmZ8bwBIQ7vloXwoVzNWS6UUrwAYy9YfOlqwKZDkgneA5Qu4l3cly84F9sqGhislywLmaozuYoGFXr0DII1ukxP1hxJ6QzR7HqLxRfumZaRzXZ3f4XXZyi7gCeB3kqsnzs+kSb9s5XHgMeD8RTxDLgq3rmeuYuFvNYCoR8wqujNi+L3UWBcu9wAMt3QZ8LiMlk5RuU50teq6kcEDgTolveIRYHUQBOek1O5cFu/ukLz7/ZJgNSm+OirebWpgaPS7slxfAr4EngGuX8jopqUBxGzyrAVuB54EXgc+lV4yLhO8cfn5E+ZqUD8kBu9sQvv0Hzj4rmoEBaAAVBWAAlBVAApAVQEoAFUFoABUFYACUFUACkC1CfofXVRJocowZVYAAAAASUVORK5CYII=);
- background-size: contain;
- position: absolute;
- content: "";
- opacity: .7;
- margin-top: -19px;
- margin-left: -64px;
- -webkit-transition: .2s opacity ease-in-out;
- -moz-transition: .2s opacity ease-in-out;
- -o-transition: .2s opacity ease-in-out;
- transition: .2s opacity ease-in-out;
-}
-
-.wear-video-link:hover {
- color: hsla(0, 0%, 100%, 1);
-}
-
-.wear-video-link:hover:before {
- opacity: 1;
-}
-
-.wear-social-image {
- float: left;
- margin-right: 14px;
- height: 64px;
- width: 64px;
-}
-
-.wear-social-copy {
- padding-left: 78px;
-}
-
-.wear-scroll-down-affordance {
- position: absolute;
- bottom: 0;
- width: 100%;
- text-align: center;
- z-index: 10;
-}
-
-.wear-down-arrow {
- padding: 24px;
- display: inline-block;
- opacity: .5;
- -webkit-transition: .2s opacity ease-in-out;
- -moz-transition: .2s opacity ease-in-out;
- -o-transition: .2s opacity ease-in-out;
- transition: .2s opacity ease-in-out;
-
- -webkit-animation-name: pulse-opacity;
- -webkit-animation-duration: 4s;
-}
-
-.wear-down-arrow:hover {
- opacity: 1;
-}
-
-.wear-down-arrow img {
- height: 28px;
- width: 28px;
- margin: 0 auto;
- display: block;
-}
-
-.wear-divider {
- display: inline-block;
- height: 2px;
- background-color: white;
- position: relative;
- margin: 10px 0;
-}
-
-/* 3 CLOLUMN LAYOUT */
-
-.wear-breakout {
- margin-top: 40px;
- margin-bottom: 40px;
-}
-
-.wear-breakout img {
- margin-bottom: 20px;
-}
-
-.wear-partners img {
- margin-bottom: 20px;
-}
-
-.wear-breakout p {
- padding: 0 23px;
-}
-
-.wear-inset-video-container {
- position: relative;
-}
-
-.wear-inset-video-container img.gif {
- max-width: 222px;
- position: absolute;
- top: 40px;
- left: 40px;
-}
-
-img.wear-bezel-only {
- height:302px;
- width:302px;
-}
-
-.wear-breakout.wear-partners img {
- margin-bottom: 20px;
-}
-
-.col-3-wide {
- display: inline;
- float: left;
- margin-left: 10px;
- margin-right: 10px;
-}
-
-.col-3-wide {
- width: 302px;
-}
-
-/**
- * ANIMATION
- */
-
-@-webkit-keyframes pulse-opacity {
- 0% {
- opacity: .5;
- }
- 20% {
- opacity: .5;
- }
- 40% {
- opacity: 1;
- }
- 60% {
- opacity: .5;
- }
- 80% {
- opacity: 1;
- }
- 100% {
- opacity: .5;
- }
-}
-
-
-
-/**
- * VIDEO
- */
-
-#video-container {
- display:none;
- position:fixed;
- top:0;
- left:-10px;
- width:102%;
- height:100%;
- background-color:rgba(0,0,0,0.7);
- z-index:99;
-}
-
-#video-frame {
- width:940px;
- height:526.4px;
- margin:80px auto 0;
- display:none;
-}
-
-.video-close {
-cursor: pointer;
-position: relative;
-left: 940px;
-top: 0;
-pointer-events: all;
-}
-
-#icon-video-close {
-background-image: url("../images/close.png");
-background-position: 0 0;
-height: 36px;
-width: 36px;
-display:block;
-}
diff --git a/docs/html/wear/images/hero.jpg b/docs/html/wear/images/hero.jpg
index 40cc03c..7850a81 100644
--- a/docs/html/wear/images/hero.jpg
+++ b/docs/html/wear/images/hero.jpg
Binary files differ
diff --git a/docs/html/wear/images/kitchen_still.jpg b/docs/html/wear/images/kitchen_still.jpg
deleted file mode 100644
index 4afe3593..0000000
--- a/docs/html/wear/images/kitchen_still.jpg
+++ /dev/null
Binary files differ
diff --git a/docs/html/wear/index.jd b/docs/html/wear/index.jd
index 659e9f2..59d5506 100644
--- a/docs/html/wear/index.jd
+++ b/docs/html/wear/index.jd
@@ -2,7 +2,7 @@
page.viewport_width=970
fullpage=true
no_footer_links=true
-page.customHeadTag=<link rel="stylesheet" type="text/css" href="/wear/css/wear.css">
+page.type=about
@jd:body
@@ -14,8 +14,6 @@
</style>
-
-
<div id="video-container">
<div id="video-frame">
<div class="video-close">
@@ -23,28 +21,28 @@
</div>
<script src="//ajax.googleapis.com/ajax/libs/swfobject/2.2/swfobject.js"></script>
<div id="ytapiplayer">
- <a href="http://www.youtube.com/watch?v=0xQ3y902DEQ"><img width=940
- src="https://i1.ytimg.com/vi/0xQ3y902DEQ/maxresdefault.jpg"></a><!--You need Flash player 8+ and JavaScript enabled to view this video. -->
+ <a href="http://www.youtube.com/watch?v=0xQ3y902DEQ"><img width="940" src="https://i1.ytimg.com/vi/0xQ3y902DEQ/maxresdefault.jpg"></a><!--You need Flash player 8+ and JavaScript enabled to view this video. -->
</div>
</div>
</div>
-<div class="wear-body-content">
- <div class="wear-hero-container">
- <div class="wear-section wear-hero">
- <div class="wear-hero-scrim"></div>
- <div class="wear-hero-wrap">
+<div class="landing-body-content">
+ <div class="landing-hero-container">
+ <div class="landing-section wear-hero">
+ <div class="landing-hero-scrim"></div>
+ <div class="landing-hero-wrap">
<div class="vertical-center-outer">
<div class="vertical-center-inner">
<div class="col-10">
- <div class="wear-section-header">
- <div class="wear-h1 hero">Android Wear</div>
- <div class="wear-subhead hero">Information that moves with you</div>
+ <div class="landing-section-header">
+ <div class="landing-h1 hero">Android Wear</div>
+ <div class="landing-subhead hero">Information that moves with you</div>
</div>
- <div class="wear-hero-description">
+ <div class="landing-hero-description">
+
<p>Small, powerful devices, worn on the body.
Useful information when you need it most.
Intelligent answers to spoken questions.
@@ -52,318 +50,208 @@
Your key to a multiscreen world.</p>
</div>
- <div class="wear-body">
- <a href="/wear/preview/start.html" class="wear-button wear-primary" style="margin-top: 40px;">
- Get the Developer Preview
+ <div class="landing-body">
+ <a href="{@docRoot}training/building-wearables.html" class="landing-button landing-primary" style="margin-top: 40px;">
+ Get Started
</a>
- <a id="watchVideo" href="https://youtube.googleapis.com/v/0xQ3y902DEQ">
- <div class="wear-video-link">Watch the video</div>
- </a>
-<script>
-$("#watchVideo").on("click", function(e) {
- $("#video-container").fadeIn(400, function(){$("#video-frame").show()});
-
- var params = { allowScriptAccess: "always"};
- var atts = { id: "ytapiplayer" };
- swfobject.embedSWF("//www.youtube.com/v/0xQ3y902DEQ?enablejsapi=1&playerapiid=ytplayer&version=3&HD=1;rel=0;showinfo=0;modestbranding;origin=developer.android.com;autohide=1;autoplay=1",
- "ytapiplayer", "940", "526.4", "8", null, null, params, atts);
-
- e.preventDefault();
-});
-$("#icon-video-close").on("click", function() {
- ytplayer = document.getElementById("ytapiplayer");
- try {
- ytplayer.stopVideo();
- $(ytplayer).hide();
- $("#video-container").fadeOut(400);
- } catch(e) {
- console.log('Video not available');
- $("#video-container").fadeOut(400);
- }
-});
-</script>
</div>
</div>
</div>
</div>
</div> <!-- end .wrap -->
- <div class="wear-scroll-down-affordance">
- <a class="wear-down-arrow" href="#extending-android-to-wearables">
- <img src="/wear/images/carrot.png" alt="Scroll down to read more">
+ <div class="landing-scroll-down-affordance">
+ <a class="landing-down-arrow" href="#extending-android-to-wearables">
+ <img src="{@docRoot}wear/images/carrot.png" alt="Scroll down to read more">
</a>
</div>
- </div> <!-- end .wear-section .wear-hero -->
- </div> <!-- end .wear-hero-container -->
+ </div> <!-- end .landing-section .landing-hero -->
+ </div> <!-- end .landing-hero-container -->
- <div class="wear-rest-of-page">
- <div class="wear-section" id="extending-android-to-wearables">
+ <div class="landing-rest-of-page">
+ <div class="landing-section" id="extending-android-to-wearables">
<div class="wrap">
- <div class="wear-section-header">
- <div class="wear-h1">Extending Android to Wearables</div>
- <div class="wear-subhead">
- Android Wear extends the Android platform to a new generation of wearable devices. <br>
- The user experience is designed specifically for wearables.
+ <div class="landing-section-header">
+ <div class="landing-h1">Extending Android to Wearables</div>
+ <div class="landing-subhead">
+ Android Wear extends the Android platform to a new generation of devices, <br>
+ with a user experience that's designed specifically for wearables.
+
</div>
</div>
- <div class="wear-body">
- <div class="wear-breakout cols">
+ <div class="landing-body">
+ <div class="landing-breakout cols">
<div class="col-3-wide">
- <div class="wear-inset-video-container">
- <img class="wear-bezel-only" src="/wear/images/screens/bezel.png" alt="">
- <img class="gif" src="/wear/images/screens/reservation_animated.gif">
+ <div class="landing-inset-video-container">
+ <img class="landing-bezel-only" src="{@docRoot}wear/images/screens/bezel.png" alt="">
+ <img class="gif" src="{@docRoot}wear/images/screens/reservation_animated.gif">
</div>
- <p class="wear-small">
+ <p class="landing-small">
Say “Ok Google” to ask questions and get stuff done.
</p>
</div>
<div class="col-3-wide">
- <img src="/wear/images/screens/circle_message2.png" itemprop="image" alt="" >
- <p class="wear-small">
- Get glanceable, actionable information at just the right time throughout the day.
+ <img src="{@docRoot}wear/images/screens/circle_message2.png" itemprop="image" alt="">
+ <p class="landing-small">
+ Get glanceable, actionable information at just the right time with notifications
+ that are synced from your handheld device.
+
</p>
</div>
<div class="col-3-wide">
- <img src="/wear/images/screens/fitness-24.png" alt="">
- <p class="wear-small">
- A wide range of sensors is available to your applications, from accelerometers to heart rate monitors.
+ <img src="{@docRoot}wear/images/screens/fitness-24.png" alt="">
+ <p class="landing-small">
+ Design apps that can access a wide range of sensors and other hardware
+ directly on the wearable.
+
</p>
</div>
</div>
<p>
- The Android Wear Developer Preview lets you create wearable experiences for your existing Android apps and see how they will appear on square and round Android wearables.
- </p>
-
- <p>
- Later this year, we’ll be launching the Android Wear SDK, enabling even more customized experiences.
- </p>
- </div>
- </div> <!-- end .wrap -->
- </div> <!-- end .wear-section -->
-
- <div class="wear-section wear-gray-background">
- <div class="wrap">
- <div class="wear-section-header">
- <div class="wear-h1">Developer Preview</div>
- <div class="wear-subhead">
- Your app’s notifications will already appear on Android wearables. <br>
- With the new Android Wear APIs you can customize and extend those notifications.
- </div>
- </div>
-
-
- <div class="wear-body">
- <div class="wear-breakout cols">
- <div class="col-3-wide">
- <img src="images/screens/14_circle_voicereply.png" alt="">
- <p>Receive Voice Replies</p>
- <p class="wear-small">
- Add actions to your notifications to allow users to reply by voice or touch. The system delivers the text to your app on the phone.
- </p>
- <p class="wear-small">
- <a href="/wear/notifications/remote-input.html">Learn about input actions</a>
- </p>
- </div>
- <div class="col-3-wide">
-
-
- <div class="wear-inset-video-container">
- <img class="wear-bezel-only" src="/wear/images/screens/bezel.png" alt="">
- <img class="gif" src="/wear/images/screens/pages_animated.gif">
- </div>
-
- <p>Add Notification Pages</p>
- <p class="wear-small">
- Add additional pages to your notification that are visible on the wearable device to provide detailed information on the wrist.
- </p>
- <p class="wear-small">
- <a href="/wear/notifications/pages.html">Learn about pages</a>
- </p>
- </div>
- <div class="col-3-wide">
- <img src="images/screens/11_stack_B.png" alt="">
- <p>Stack Multiple Notifications</p>
- <p class="wear-small">
- Your app should consolidate similar notifications. On a wearable, you can stack them together so the details for each are immediately available.
- </p>
- <p class="wear-small">
- <a href="/wear/notifications/stacks.html">Learn about stacks</a>
- </p>
- </div>
- </div>
-
- <p>
- You can also trigger your notifications contextually using existing Android APIs. For example, use <a href="{@docRoot}training/location/geofencing.html">geofences</a> to provide glanceable information to your users when they are at home, or use the <a href="{@docRoot}training/location/activity-recognition.html">activity detection APIs</a> to send messages to your users’ wrists while they are bicycling.
- </p>
-
- <p>See the <a href="{@docRoot}wear/design/index.html">Android Wear Developer Preview Design Principles</a> for more suggestions on creating great wearable experiences.</p>
+ Before you start building, check out the
+ <a href="{@docRoot}design/wear/index.html">Android Wear Design Principles</a>
+ to understand how to create great experiences for this exciting, new form factor.</p>
</div>
</div> <!-- end .wrap -->
- </div> <!-- end .wear-section -->
+ </div> <!-- end .landing-section -->
- <div class="wear-section" style="background-color:#f5f5f5">
+ <div class="landing-section landing-gray-background">
<div class="wrap">
- <div class="wear-section-header">
- <div class="wear-pre-h1">Coming soon</div>
- <div class="wear-h1">The Android Wear SDK</div>
- <div class="wear-subhead">
- The Developer Preview is just the beginning for Android Wear.
+ <div class="landing-section-header">
+ <div class="landing-h1">Developing for Android Wear</div>
+ <div class="landing-subhead">
+ The Android Wear APIs are delivered in the Android v4 support library and Google Play services.
+ This lets Android handhelds, old and new, communicate with Android wearables.
</div>
</div>
- <div class="wear-body">
- <p>
- In the coming months we’ll be launching new APIs and features for Android wearables to create even more unique experiences for the wrist:
- </p>
-
- <div class="wear-breakout cols">
+ <div class="landing-body">
+ <div class="landing-breakout cols">
<div class="col-4">
- <img src="/wear/images/features/ts1.png" alt="">
- <p>Build Custom UI</p>
- <p class="wear-small">
- Create custom card layouts and run activities directly on wearables.
+ <img src="{@docRoot}wear/images/features/ts2.png" alt="">
+ <p>Synced Notifications</p>
+ <p class="landing-small">
+ Notifications on handhelds can automatically sync to wearables, so design them
+ with both devices in mind.
+ </p>
+ <p class="landing-small">
+ <a href="{@docRoot}training/wearables/notifications/index.html">Build notifications</a>
</p>
</div>
<div class="col-4">
- <img src="/wear/images/features/ts2.png" alt="">
+ <img src="{@docRoot}wear/images/features/ts1.png" alt="">
+ <p>Wearable Apps</p>
+ <p class="landing-small">
+ Create custom experiences with activities, services, sensors, and much
+ more with the Android SDK.
+ </p>
+ <p class="landing-small">
+ <a href="{@docRoot}training/wearables/apps/index.html">Create wearable apps</a>
+
+ </p>
+ </div>
+ <div class="col-4">
+ <img src="{@docRoot}wear/images/features/ts2.png" alt="">
<p>Send Data</p>
- <p class="wear-small">
- Send data and actions between a phone and a wearable with data replication APIs and RPCs.
+ <p class="landing-small">
+ Send data and actions between handhelds and wearables with
+ data replication APIs and RPCs.
+ </p>
+ <p class="landing-small">
+ <a href="{@docRoot}training/wearables/data-layer/index.html">Work with the Data Layer</a>
+
</p>
</div>
<div class="col-4">
- <img src="/wear/images/features/ts3.png" alt="">
- <p>Control Sensors</p>
- <p class="wear-small">
- Gather sensor data and display it in real-time on Android wearables.
- </p>
- </div>
- <div class="col-4">
- <img src="/wear/images/features/ts4.png" alt="">
+ <img src="{@docRoot}wear/images/features/ts4.png" alt="">
<p>Voice Actions</p>
- <p class="wear-small">
- Register your app to handle voice actions, like "Ok Google, take a note."
+ <p class="landing-small">
+ Register your app to handle voice actions, like "Ok Google, take a note,"
+ for a hands-free experience.
+ </p>
+ <p class="landing-small">
+ <a href="{@docRoot}training/wearables/apps/voice-actions.html">Integrate voice actions</a>
</p>
</div>
</div>
-
</div>
</div> <!-- end .wrap -->
- </div> <!-- end .wear-section -->
+ </div> <!-- end .landing-section -->
- <div class="wear-section wear-white-background">
+ <div class="landing-section landing-red-background">
<div class="wrap">
- <div class="wear-section-header">
- <div class="wear-h2">Building an Ecosystem</div>
- <div class="wear-body wear-align-center">
- <p class="wear-small">
- We’re working with several partners to bring you watches powered by Android Wear later this year!
- </p>
- </div>
- </div>
+ <div class="landing-section-header">
+ <div class="landing-h1 landing-align-left">Get Started with Android Wear</div>
- <div class="wear-partners cols">
- <div class="col-4">
- <img src="/wear/images/partners/asus.png" alt="Asus">
- </div>
- <div class="col-4">
- <img src="/wear/images/partners/broadcom.png" alt="Broadcom">
- </div>
- <div class="col-4">
- <img src="/wear/images/partners/fossil.png" alt="Fossil">
- </div>
- <div class="col-4">
- <img src="/wear/images/partners/htc.png" alt="HTC">
- </div>
- <div class="col-4">
- <img src="/wear/images/partners/intel.png" alt="Intel">
- </div>
- <div class="col-4">
- <img src="/wear/images/partners/lg.png" alt="LG">
- </div>
- <div class="col-4">
- <img src="/wear/images/partners/mediatek.png" alt="Mediatek">
- </div>
- <div class="col-4">
- <img src="/wear/images/partners/mips.png" alt="MIPS">
- </div>
- <div class="col-4">
- <img src="/wear/images/partners/motorola.png" alt="Motorola">
- </div>
- <div class="col-4">
- <img src="/wear/images/partners/qualcomm.png" alt="Qualcomm">
- </div>
- <div class="col-4">
- <img src="/wear/images/partners/samsung.png" alt="Samsung">
+ <div class="landing-subhead landing-subhead-red">
+ <p>
+ Set up your development environment and start working with the APIs.
+ We’re excited about the experiences you'll create and can't
+ wait to see what you do next.</p>
</div>
</div>
- </div> <!-- end .wrap -->
- </div> <!-- end .wear-section -->
-
- <div class="wear-section wear-red-background">
- <div class="wrap">
- <div class="wear-section-header">
- <div class="wear-h1 wear-align-left">Start working with Android Wear</div>
- <div class="wear-subhead wear-subhead-red">
- <p>
- Your app’s notifications will already appear on Android wearables. <br>
- With the new Android Wear APIs, you can customize and extend those notifications.
- </p>
- <p>
- We’re excited about wearables and the experiences developers can create with them. <br>
- We can’t wait to see what you do next.</p>
- </div>
- </div>
- <div class="wear-body">
- <a href="/wear/preview/start.html" class="wear-button wear-secondary" style="margin-top: 20px;">
- Get the Developer Preview
+ <div class="landing-body">
+ <a href="{@docRoot}training/building-wearables.html" class="landing-button landing-secondary" style="margin-top: 20px;">
+ Get Started
</a>
</div>
</div>
</div>
- <div class="wear-section">
+ <div class="landing-section">
<div class="wrap">
<div class="cols">
- <div class="wear-body">
+ <div class="landing-body">
<div class="col-3-wide">
<a target="_blank" href="https://www.youtube.com/playlist?list=PLWz5rJ2EKKc-kIrPiq098QH9dOle-fLef">
- <img class="wear-social-image" src="//www.google.com/images/icons/product/youtube-128.png" alt="">
+ <img class="landing-social-image" src="//www.google.com/images/icons/product/youtube-128.png" alt="">
</a>
- <div class="wear-social-copy">
+ <div class="landing-social-copy">
<p>DevBytes</p>
- <p class="wear-small">
- Learn how to optimize your app notifications for wearable devices in this <a target="_blank" href="https://www.youtube.com/playlist?list=PLWz5rJ2EKKc-kIrPiq098QH9dOle-fLef">DevBytes video</a> using the Android Wear Developer Preview.
- </p>
+ <p class="landing-small">
+ Learn the basic concepts of Android Wear
+ development with videos from the product team.
+ </p>
+ <br>
+ <p class="landing-small">
+ <a target="_blank" href="https://www.youtube.com/playlist?list=PLWz5rJ2EKKc-kIrPiq098QH9dOle-fLef">DevBytes videos</a>
+ </p>
</div>
</div>
<div class="col-3-wide">
- <a target="_blank" href="http://android-developers.blogspot.com/2014/03/android-wear-developer-preview.html">
- <img class="wear-social-image" src="/wear/images/blogger.png" alt="">
+ <a target="_blank" href="http://android-developers.blogspot.com/2014/03/android-landing-developer-preview.html">
+ <img class="landing-social-image" src="{@docRoot}wear/images/blogger.png" alt="">
</a>
- <div class="wear-social-copy">
+ <div class="landing-social-copy">
<p>Blog Post</p>
- <p class="wear-small">
- Read more about the Android Wear Developer Preview announcement
- at the <a target="_blank" href="http://android-developers.blogspot.com/2014/03/android-wear-developer-preview.html">Android Developers Blog</a>.
+ <p class="landing-small">
+ Read more about Android Wear development
+ on our blog. Just search for "Android Wear".
+
</p>
+ <br>
+ <p class="landing-small">
+ <a target="_blank" href="http://android-developers.blogspot.com/2014/03/android-wear-developer-preview.html">Android Developers Blog</a>
+ </p>
+ <p></p>
</div>
</div>
<div class="col-3-wide">
<a target="_blank" href="http://g.co/androidweardev">
- <img class="wear-social-image" src="//www.google.com/images/icons/product/gplus-128.png" alt="+Android Wear Developers">
+ <img class="landing-social-image" src="//www.google.com/images/icons/product/gplus-128.png" alt="+Android Wear Developers">
</a>
- <div class="wear-social-copy">
+ <div class="landing-social-copy">
<p>G+ Community</p>
- <p class="wear-small">
- Follow us on Google+ to stay up-to-date on Android Wear development and join the discussion!
+ <p class="landing-small">
+ Follow us on Google+ to stay up-to-date with Android Wear development and to join the discussion!
+
</p>
- <p class="wear-small">
+ <p class="landing-small">
<a target="_blank" href="http://g.co/androidweardev">+Android Wear Developers</a>
</p>
</div>
@@ -371,14 +259,12 @@
</div>
</div>
</div> <!-- end .wrap -->
- </div> <!-- end .wear-section -->
- </div> <!-- end .wear-rest-of-page -->
-
-
+ </div> <!-- end .landing-section -->
+ </div> <!-- end .landing-rest-of-page -->
<div class="content-footer wrap" itemscope="" itemtype="http://schema.org/SiteNavigationElement">
<div class="layout-content-col col-16" style="padding-top:4px">
<style>#___plusone_0 {float:right !important;}</style>
- <div class="g-plusone" data-size="medium"></div>
+ <div id="___plusone_0" style="text-indent: 0px; margin: 0px; padding: 0px; border-style: none; float: none; line-height: normal; font-size: 1px; vertical-align: baseline; display: inline-block; width: 90px; height: 20px; background: transparent;"><iframe frameborder="0" hspace="0" marginheight="0" marginwidth="0" scrolling="no" style="position: static; top: 0px; width: 90px; margin: 0px; border-style: none; left: 0px; visibility: visible; height: 20px;" tabindex="0" vspace="0" width="100%" id="I0_1402525433965" name="I0_1402525433965" src="https://apis.google.com/u/0/_/+1/fastbutton?usegapi=1&size=medium&origin=http%3A%2F%2Frobertly.mtv%3A8080&url=http%3A%2F%2Frobertly.mtv%3A8080%2Fwear%2Findex.html&gsrc=3p&jsh=m%3B%2F_%2Fscs%2Fapps-static%2F_%2Fjs%2Fk%3Doz.gapi.en.QxHQHBkhz7M.O%2Fm%3D__features__%2Fam%3DUQ%2Frt%3Dj%2Fd%3D1%2Fz%3Dzcms%2Frs%3DAItRSTMLrMyRVKsu2FQoRingre3w1MT49A#_methods=onPlusOne%2C_ready%2C_close%2C_open%2C_resizeMe%2C_renderstart%2Concircled%2Cdrefresh%2Cerefresh%2Conload&id=I0_1402525433965&parent=http%3A%2F%2Frobertly.mtv%3A8080&pfname=&rpctoken=32453860" data-gapiattached="true" title="+1"></iframe></div>
</div>
</div>
<div id="footer" class="wrap" style="width:940px;position:relative;top:-35px;z-index:-1">
@@ -386,20 +272,9 @@
Except as noted, this content is
licensed under <a href="http://creativecommons.org/licenses/by/2.5/">
Creative Commons Attribution 2.5</a>. For details and
- restrictions, see the <a href="/license.html">Content
+ restrictions, see the <a href="{@docRoot}license.html">Content
License</a>.
</div>
</div>
-
-
- </div> <!-- end wear-body-content -->
-
- <script>
- $("a.wear-down-arrow").on("click", function(e) {
- $("body").animate({
- scrollTop: $(".wear-hero").height() + 76
- }, 1000, "easeOutQuint");
- e.preventDefault();
- });
- </script>
+ </div> <!-- end landing-body-content -->
diff --git a/docs/html/wear/license.jd b/docs/html/wear/license.jd
deleted file mode 100644
index b07dacf..0000000
--- a/docs/html/wear/license.jd
+++ /dev/null
@@ -1,142 +0,0 @@
-page.title=Developer Preview License Agreement
-
-@jd:body
-
-
-<div class="sdk-terms" style="height:auto;border:0;padding:0;width:700px">
-This is the Android Wear Developer Preview License Agreement.
-
-1. Introduction
-
-1.1 The Android Wear Developer Preview Kit (referred to in this License Agreement as the “Developer Preview” and specifically including the Android system files, packaged APIs, Developer Preview library files, and the Developer Preview companion app, if and when they are made available) is licensed to you subject to the terms of this License Agreement. This License Agreement forms a legally binding contract between you and Google in relation to your use of the Developer Preview.
-
-1.2 "Android Wear" means the Android Wear devices and the Android Wear software stack for use on Android Wear devices.
-
-1.3 "Android" means the Android software stack for devices, as made available under the Android Open Source Project, which is located at the following URL: http://source.android.com/, as updated from time to time.
-
-1.4 "Google" means Google Inc., a Delaware corporation with principal place of business at 1600 Amphitheatre Parkway, Mountain View, CA 94043, United States.
-
-2. Accepting this License Agreement
-
-2.1 In order to use the Developer Preview, you must first agree to this License Agreement. You may not use the Developer Preview if you do not accept this License Agreement.
-
-2.2 By clicking to accept, you hereby agree to the terms of this License Agreement.
-
-2.3 You may not use the Developer Preview and may not accept the License Agreement if you are a person barred from receiving the Developer Preview under the laws of the United States or other countries including the country in which you are resident or from which you use the Developer Preview.
-
-2.4 If you are agreeing to be bound by this License Agreement on behalf of your employer or other entity, you represent and warrant that you have full legal authority to bind your employer or such entity to this License Agreement. If you do not have the requisite authority, you may not accept the License Agreement or use the Developer Preview on behalf of your employer or other entity.
-
-3. Developer Preview License from Google
-
-3.1 Subject to the terms of this License Agreement, Google grants you a limited, worldwide, royalty-free, internal-use, non-assignable and non-exclusive license to use the Developer Preview solely to develop applications to run on the Android Wear platform for Android Wear devices.
-
-3.2 You agree that Google or third parties own all legal right, title and interest in and to the Developer Preview, including any Intellectual Property Rights that subsist in the Developer Preview. "Intellectual Property Rights" means any and all rights under patent law, copyright law, trade secret law, trademark law, and any and all other proprietary rights. Google reserves all rights not expressly granted to you.
-
-3.3 You may not use the Developer Preview for any purpose not expressly permitted by this License Agreement. Except to the extent required by applicable third party licenses, you may not: (a) copy (except for backup purposes), modify, adapt, redistribute, decompile, reverse engineer, disassemble, or create derivative works of the Developer Preview or any part of the Developer Preview; or (b) load any part of the Developer Preview onto a mobile handset or wearable computing device or any other hardware device except an Android Wear device, combine any part of the Developer Preview with other software, or distribute any software or device incorporating a part of the Developer Preview.
-
-3.4 You agree that you will not take any actions that may cause or result in the fragmentation of Android Wear, including but not limited to distributing, participating in the creation of, or promoting in any way a software development kit derived from the Developer Preview.
-
-3.5 Use, reproduction and distribution of components of the Developer Preview licensed under an open source software license are governed solely by the terms of that open source software license and not this License Agreement.
-
-3.6 You agree that the form and nature of the Developer Preview that Google provides may change without prior notice to you and that future versions of the Developer Preview may be incompatible with applications developed on previous versions of the Developer Preview. You agree that Google may stop (permanently or temporarily) providing the Developer Preview (or any features within the Developer Preview) to you or to users generally at Google's sole discretion, without prior notice to you.
-
-3.7 Nothing in this License Agreement gives you a right to use any of Google's trade names, trademarks, service marks, logos, domain names, or other distinctive brand features.
-
-3.8 You agree that you will not remove, obscure, or alter any proprietary rights notices (including copyright and trademark notices) that may be affixed to or contained within the Developer Preview.
-
-3.9 Your use of any Android system files, packaged APIs, or other components of the Developer Preview which are part of the Android Software Development Kit is subject to the terms of the Android Software Development Kit License Agreement located at http://developer.android.com/sdk/terms.html. These terms are hereby incorporated by reference into this License Agreement.
-
-4. Use of the Developer Preview by You
-
-4.1 Google agrees that it obtains no right, title or interest from you (or your licensors) under this License Agreement in or to any software applications that you develop using the Developer Preview, including any intellectual property rights that subsist in those applications.
-
-4.2 You agree to use the Developer Preview and write applications only for purposes that are permitted by (a) this License Agreement, (b) the Google Play Developer Program Policies located at https://play.google.com/about/developer-content-policy.html, and hereby incorporated into this License Agreement by reference), and (c) any applicable law, regulation or generally accepted practices or guidelines in the relevant jurisdictions (including any laws regarding the export of data or software to and from the United States or other relevant countries). You agree to use reasonable efforts to comply with the Android Wear Platform Design Guide available on the Android Wear developer website
-
-4.3 You agree that if you use the Developer Preview to develop applications for general public users, you will protect the privacy and legal rights of those users. If the users provide you with user names, passwords, or other login information or personal information, you must make the users aware that the information will be available to your application, and you must provide legally adequate privacy notice and protection for those users. If your application stores personal or sensitive information provided by users, it must do so securely. If the user provides your application with Google Account information, your application may only use that information to access the user's Google Account when, and for the limited purposes for which, the user has given you permission to do so.
-
-4.4 You agree that you will not engage in any activity with the Developer Preview, including the development or distribution of an application, that interferes with, disrupts, damages, or accesses in an unauthorized manner the servers, networks, or other properties or services of any third party including, but not limited to, Google.
-
-4.5 You agree that you are solely responsible for (and that Google has no responsibility to you or to any third party for) any data, content, or resources that you create, transmit or display through Android Wear and/or applications for Android Wear, and for the consequences of your actions (including any loss or damage which Google may suffer) by doing so.
-
-4.6 You agree that you are solely responsible for (and that Google has no responsibility to you or to any third party for) any breach of your obligations under this License Agreement, any applicable third party contract or Terms of Service, or any applicable law or regulation, and for the consequences (including any loss or damage which Google or any third party may suffer) of any such breach.
-
-4.7 Unless otherwise specified in writing by Google, Google does not intend use of Android Wear to create obligations under the Health Insurance Portability and Accountability Act, as amended, (“HIPAA”), and makes no representations that Android Wear satisfies HIPAA requirements. If you are (or become) a Covered Entity or Business Associate under HIPAA, you agree not to use Android Wear for any purpose or in any manner involving Protected Health Information unless you have received prior written consent to such use from Google.
-
-4.8 The Developer Preview is in development, and your testing and feedback are an important part of the development process. By using the Developer Preview, you acknowledge that implementation of some features are still under development and that you should not rely on the Developer Preview, Android Wear devices, Android Wear system software, or Android Wear services having the full functionality of a stable release. You agree not to publicly distribute or ship any application using this Developer Preview as this Developer Preview will no longer be supported after the official SDK is released.
-
-5. Your Developer Credentials
-
-5.1 You agree that you are responsible for maintaining the confidentiality of any developer credentials that may be issued to you by Google or which you may choose yourself and that you will be solely responsible for all applications that are developed under your developer credentials.
-
-6. Privacy and Information
-
-6.1 In order to continually innovate and improve the Developer Preview, Google may collect certain usage statistics from the software including but not limited to a unique identifier, associated IP address, version number of the software, and information on which tools and/or services in the Developer Preview are being used and how they are being used. Before any of this information is collected, the Developer Preview will notify you and seek your consent. If you withhold consent, the information will not be collected.
-
-6.2 The data collected is examined in the aggregate to improve the Developer Preview and is maintained in accordance with Google's Privacy Policy lcoated at http://www.google.com/policies/privacy/.
-
-7. Third Party Applications
-
-7.1 If you use the Developer Preview to run applications developed by a third party or that access data, content or resources provided by a third party, you agree that Google is not responsible for those applications, data, content, or resources. You understand that all data, content or resources which you may access through such third party applications are the sole responsibility of the person from which they originated and that Google is not liable for any loss or damage that you may experience as a result of the use or access of any of those third party applications, data, content, or resources.
-
-7.2 You should be aware the data, content, and resources presented to you through such a third party application may be protected by intellectual property rights which are owned by the providers (or by other persons or companies on their behalf). You may not modify, rent, lease, loan, sell, distribute or create derivative works based on these data, content, or resources (either in whole or in part) unless you have been specifically given permission to do so by the relevant owners.
-
-7.3 You acknowledge that your use of such third party applications, data, content, or resources may be subject to separate terms between you and the relevant third party. In that case, this License Agreement does not affect your legal relationship with these third parties.
-
-8. Using Google APIs
-
-8.1 Google APIs
-
-8.1.1 If you use any API to retrieve data from Google, you acknowledge that the data may be protected by intellectual property rights which are owned by Google or those parties that provide the data (or by other persons or companies on their behalf). Your use of any such API may be subject to additional Terms of Service. You may not modify, rent, lease, loan, sell, distribute or create derivative works based on this data (either in whole or in part) unless allowed by the relevant Terms of Service.
-
-8.1.2 If you use any API to retrieve a user's data from Google, you acknowledge and agree that you shall retrieve data only with the user's explicit consent and only when, and for the limited purposes for which, the user has given you permission to do so.
-
-9. Terminating this License Agreement
-
-9.1 This License Agreement will continue to apply until terminated by either you or Google as set out below.
-
-9.2 If you want to terminate this License Agreement, you may do so by ceasing your use of the Developer Preview and any relevant developer credentials.
-
-9.3 Google may at any time, terminate this License Agreement with you if:
-(A) you have breached any provision of this License Agreement; or
-(B) Google is required to do so by law; or
-(C) the partner with whom Google offered certain parts of Developer Preview (such as APIs) to you has terminated its relationship with Google or ceased to offer certain parts of the Developer Preview to you; or
-(D) Google decides to no longer provide the Developer Preview or certain parts of the Developer Preview to users in the country in which you are resident or from which you use the service, or the provision of the Developer Preview or certain Developer Preview services to you by Google is, in Google's sole discretion, no longer commercially viable.
-
-9.4 When this License Agreement comes to an end, all of the legal rights, obligations and liabilities that you and Google have benefited from, been subject to (or which have accrued over time whilst this License Agreement has been in force) or which are expressed to continue indefinitely, shall be unaffected by this cessation, and the provisions of paragraph 14.7 shall continue to apply to such rights, obligations and liabilities indefinitely.
-
-10. DISCLAIMER OF WARRANTIES
-
-10.1 YOU EXPRESSLY UNDERSTAND AND AGREE THAT YOUR USE OF THE DEVELOPER PREVIEW IS AT YOUR SOLE RISK AND THAT THE DEVELOPER PREVIEW IS PROVIDED "AS IS" AND "AS AVAILABLE" WITHOUT WARRANTY OF ANY KIND FROM GOOGLE.
-
-10.2 YOUR USE OF THE DEVELOPER PREVIEW AND ANY MATERIAL DOWNLOADED OR OTHERWISE OBTAINED THROUGH THE USE OF THE DEVELOPER PREVIEW IS AT YOUR OWN DISCRETION AND RISK AND YOU ARE SOLELY RESPONSIBLE FOR ANY DAMAGE TO YOUR COMPUTER SYSTEM OR OTHER DEVICE OR LOSS OF DATA THAT RESULTS FROM SUCH USE.
-
-10.3 GOOGLE FURTHER EXPRESSLY DISCLAIMS ALL WARRANTIES AND CONDITIONS OF ANY KIND, WHETHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO THE IMPLIED WARRANTIES AND CONDITIONS OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
-
-11. LIMITATION OF LIABILITY
-
-11.1 YOU EXPRESSLY UNDERSTAND AND AGREE THAT GOOGLE, ITS SUBSIDIARIES AND AFFILIATES, AND ITS LICENSORS SHALL NOT BE LIABLE TO YOU UNDER ANY THEORY OF LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, CONSEQUENTIAL OR EXEMPLARY DAMAGES THAT MAY BE INCURRED BY YOU, INCLUDING ANY LOSS OF DATA, WHETHER OR NOT GOOGLE OR ITS REPRESENTATIVES HAVE BEEN ADVISED OF OR SHOULD HAVE BEEN AWARE OF THE POSSIBILITY OF ANY SUCH LOSSES ARISING.
-
-12. Indemnification
-
-12.1 To the maximum extent permitted by law, you agree to defend, indemnify and hold harmless Google, its affiliates and their respective directors, officers, employees and agents from and against any and all claims, actions, suits or proceedings, as well as any and all losses, liabilities, damages, costs and expenses (including reasonable attorneys’ fees) arising out of or accruing from (a) your use of the Developer Preview, (b) any application you develop on the Developer Preview that infringes any copyright, trademark, trade secret, trade dress, patent or other intellectual property right of any person or defames any person or violates their rights of publicity or privacy, and (c) any non-compliance by you with this License Agreement.
-
-13. Changes to the License Agreement
-
-13.1 Google may make changes to the License Agreement as it distributes new versions of the Developer Preview. When these changes are made, Google will make a new version of the License Agreement available on the website where the Developer Preview is made available.
-
-14. General Legal Terms
-
-14.1 This License Agreement constitutes the whole legal agreement between you and Google and governs your use of the Developer Preview (excluding any services which Google may provide to you under a separate written agreement), and completely replaces any prior agreements between you and Google in relation to the Developer Preview.
-
-14.2 You agree that if Google does not exercise or enforce any legal right or remedy which is contained in this License Agreement (or which Google has the benefit of under any applicable law), this will not be taken to be a formal waiver of Google's rights and that those rights or remedies will still be available to Google.
-
-14.3 If any court of law, having the jurisdiction to decide on this matter, rules that any provision of this License Agreement is invalid, then that provision will be removed from this License Agreement without affecting the rest of this License Agreement. The remaining provisions of this License Agreement will continue to be valid and enforceable.
-
-14.4 You acknowledge and agree that each member of the group of companies of which Google is the parent shall be third party beneficiaries to this License Agreement and that such other companies shall be entitled to directly enforce, and rely upon, any provision of this License Agreement that confers a benefit on (or rights in favor of) them. Other than this, no other person or company shall be third party beneficiaries to this License Agreement.
-
-14.5 EXPORT RESTRICTIONS. THE DEVELOPER PREVIEW IS SUBJECT TO UNITED STATES EXPORT LAWS AND REGULATIONS. YOU MUST COMPLY WITH ALL DOMESTIC AND INTERNATIONAL EXPORT LAWS AND REGULATIONS THAT APPLY TO THE DEVELOPER PREVIEW. THESE LAWS INCLUDE RESTRICTIONS ON DESTINATIONS, END USERS AND END USE.
-
-14.6 The rights granted in this License Agreement may not be assigned or transferred by either you or Google without the prior written approval of the other party. Neither you nor Google shall be permitted to delegate their responsibilities or obligations under this License Agreement without the prior written approval of the other party.
-
-14.7 This License Agreement, and your relationship with Google under this License Agreement, shall be governed by the laws of the State of California without regard to its conflict of laws provisions. You and Google agree to submit to the exclusive jurisdiction of the courts located within the county of Santa Clara, California to resolve any legal matter arising from this License Agreement. Notwithstanding this, you agree that Google shall still be allowed to apply for injunctive remedies (or an equivalent type of urgent legal relief) in any jurisdiction.
-</div>
diff --git a/docs/html/wear/preview/signup.jd b/docs/html/wear/preview/signup.jd
deleted file mode 100644
index 8e8ec9a..0000000
--- a/docs/html/wear/preview/signup.jd
+++ /dev/null
@@ -1,169 +0,0 @@
-page.title=Sign Up for the Developer Preview
-
-@jd:body
-
-<p>To get started with the Android Wear Developer Preview, you must agree to the
- following terms and conditions and provide the email address for your Google account.
-After signing up, you’ll have access to:</p>
-<ul>
- <li>New APIs that allow you to build enhanced notifications for wearables.</li>
- <li>Sample code using the new APIs.</li>
- <li>The Android Wear Preview app that delivers your notifications to the Android Wear emulator.</li>
-</ul>
-
-<div class="sdk-terms" style="width:678px" onfocus="this.blur()"><div class="sdk-terms-padding">
-This is the Android Wear Developer Preview License Agreement.
-
-1. Introduction
-
-1.1 The Android Wear Developer Preview Kit (referred to in this License Agreement as the “Developer Preview” and specifically including the Android system files, packaged APIs, Developer Preview library files, and the Developer Preview companion app, if and when they are made available) is licensed to you subject to the terms of this License Agreement. This License Agreement forms a legally binding contract between you and Google in relation to your use of the Developer Preview.
-
-1.2 "Android Wear" means the Android Wear devices and the Android Wear software stack for use on Android Wear devices.
-
-1.3 "Android" means the Android software stack for devices, as made available under the Android Open Source Project, which is located at the following URL: http://source.android.com/, as updated from time to time.
-
-1.4 "Google" means Google Inc., a Delaware corporation with principal place of business at 1600 Amphitheatre Parkway, Mountain View, CA 94043, United States.
-
-2. Accepting this License Agreement
-
-2.1 In order to use the Developer Preview, you must first agree to this License Agreement. You may not use the Developer Preview if you do not accept this License Agreement.
-
-2.2 By clicking to accept, you hereby agree to the terms of this License Agreement.
-
-2.3 You may not use the Developer Preview and may not accept the License Agreement if you are a person barred from receiving the Developer Preview under the laws of the United States or other countries including the country in which you are resident or from which you use the Developer Preview.
-
-2.4 If you are agreeing to be bound by this License Agreement on behalf of your employer or other entity, you represent and warrant that you have full legal authority to bind your employer or such entity to this License Agreement. If you do not have the requisite authority, you may not accept the License Agreement or use the Developer Preview on behalf of your employer or other entity.
-
-3. Developer Preview License from Google
-
-3.1 Subject to the terms of this License Agreement, Google grants you a limited, worldwide, royalty-free, internal-use, non-assignable and non-exclusive license to use the Developer Preview solely to develop applications to run on the Android Wear platform for Android Wear devices.
-
-3.2 You agree that Google or third parties own all legal right, title and interest in and to the Developer Preview, including any Intellectual Property Rights that subsist in the Developer Preview. "Intellectual Property Rights" means any and all rights under patent law, copyright law, trade secret law, trademark law, and any and all other proprietary rights. Google reserves all rights not expressly granted to you.
-
-3.3 You may not use the Developer Preview for any purpose not expressly permitted by this License Agreement. Except to the extent required by applicable third party licenses, you may not: (a) copy (except for backup purposes), modify, adapt, redistribute, decompile, reverse engineer, disassemble, or create derivative works of the Developer Preview or any part of the Developer Preview; or (b) load any part of the Developer Preview onto a mobile handset or wearable computing device or any other hardware device except an Android Wear device, combine any part of the Developer Preview with other software, or distribute any software or device incorporating a part of the Developer Preview.
-
-3.4 You agree that you will not take any actions that may cause or result in the fragmentation of Android Wear, including but not limited to distributing, participating in the creation of, or promoting in any way a software development kit derived from the Developer Preview.
-
-3.5 Use, reproduction and distribution of components of the Developer Preview licensed under an open source software license are governed solely by the terms of that open source software license and not this License Agreement.
-
-3.6 You agree that the form and nature of the Developer Preview that Google provides may change without prior notice to you and that future versions of the Developer Preview may be incompatible with applications developed on previous versions of the Developer Preview. You agree that Google may stop (permanently or temporarily) providing the Developer Preview (or any features within the Developer Preview) to you or to users generally at Google's sole discretion, without prior notice to you.
-
-3.7 Nothing in this License Agreement gives you a right to use any of Google's trade names, trademarks, service marks, logos, domain names, or other distinctive brand features.
-
-3.8 You agree that you will not remove, obscure, or alter any proprietary rights notices (including copyright and trademark notices) that may be affixed to or contained within the Developer Preview.
-
-3.9 Your use of any Android system files, packaged APIs, or other components of the Developer Preview which are part of the Android Software Development Kit is subject to the terms of the Android Software Development Kit License Agreement located at http://developer.android.com/sdk/terms.html. These terms are hereby incorporated by reference into this License Agreement.
-
-4. Use of the Developer Preview by You
-
-4.1 Google agrees that it obtains no right, title or interest from you (or your licensors) under this License Agreement in or to any software applications that you develop using the Developer Preview, including any intellectual property rights that subsist in those applications.
-
-4.2 You agree to use the Developer Preview and write applications only for purposes that are permitted by (a) this License Agreement, (b) the Google Play Developer Program Policies located at https://play.google.com/about/developer-content-policy.html, and hereby incorporated into this License Agreement by reference), and (c) any applicable law, regulation or generally accepted practices or guidelines in the relevant jurisdictions (including any laws regarding the export of data or software to and from the United States or other relevant countries). You agree to use reasonable efforts to comply with the Android Wear Platform Design Guide available on the Android Wear developer website
-
-4.3 You agree that if you use the Developer Preview to develop applications for general public users, you will protect the privacy and legal rights of those users. If the users provide you with user names, passwords, or other login information or personal information, you must make the users aware that the information will be available to your application, and you must provide legally adequate privacy notice and protection for those users. If your application stores personal or sensitive information provided by users, it must do so securely. If the user provides your application with Google Account information, your application may only use that information to access the user's Google Account when, and for the limited purposes for which, the user has given you permission to do so.
-
-4.4 You agree that you will not engage in any activity with the Developer Preview, including the development or distribution of an application, that interferes with, disrupts, damages, or accesses in an unauthorized manner the servers, networks, or other properties or services of any third party including, but not limited to, Google.
-
-4.5 You agree that you are solely responsible for (and that Google has no responsibility to you or to any third party for) any data, content, or resources that you create, transmit or display through Android Wear and/or applications for Android Wear, and for the consequences of your actions (including any loss or damage which Google may suffer) by doing so.
-
-4.6 You agree that you are solely responsible for (and that Google has no responsibility to you or to any third party for) any breach of your obligations under this License Agreement, any applicable third party contract or Terms of Service, or any applicable law or regulation, and for the consequences (including any loss or damage which Google or any third party may suffer) of any such breach.
-
-4.7 Unless otherwise specified in writing by Google, Google does not intend use of Android Wear to create obligations under the Health Insurance Portability and Accountability Act, as amended, (“HIPAA”), and makes no representations that Android Wear satisfies HIPAA requirements. If you are (or become) a Covered Entity or Business Associate under HIPAA, you agree not to use Android Wear for any purpose or in any manner involving Protected Health Information unless you have received prior written consent to such use from Google.
-
-4.8 The Developer Preview is in development, and your testing and feedback are an important part of the development process. By using the Developer Preview, you acknowledge that implementation of some features are still under development and that you should not rely on the Developer Preview, Android Wear devices, Android Wear system software, or Android Wear services having the full functionality of a stable release. You agree not to publicly distribute or ship any application using this Developer Preview as this Developer Preview will no longer be supported after the official SDK is released.
-
-5. Your Developer Credentials
-
-5.1 You agree that you are responsible for maintaining the confidentiality of any developer credentials that may be issued to you by Google or which you may choose yourself and that you will be solely responsible for all applications that are developed under your developer credentials.
-
-6. Privacy and Information
-
-6.1 In order to continually innovate and improve the Developer Preview, Google may collect certain usage statistics from the software including but not limited to a unique identifier, associated IP address, version number of the software, and information on which tools and/or services in the Developer Preview are being used and how they are being used. Before any of this information is collected, the Developer Preview will notify you and seek your consent. If you withhold consent, the information will not be collected.
-
-6.2 The data collected is examined in the aggregate to improve the Developer Preview and is maintained in accordance with Google's Privacy Policy lcoated at http://www.google.com/policies/privacy/.
-
-7. Third Party Applications
-
-7.1 If you use the Developer Preview to run applications developed by a third party or that access data, content or resources provided by a third party, you agree that Google is not responsible for those applications, data, content, or resources. You understand that all data, content or resources which you may access through such third party applications are the sole responsibility of the person from which they originated and that Google is not liable for any loss or damage that you may experience as a result of the use or access of any of those third party applications, data, content, or resources.
-
-7.2 You should be aware the data, content, and resources presented to you through such a third party application may be protected by intellectual property rights which are owned by the providers (or by other persons or companies on their behalf). You may not modify, rent, lease, loan, sell, distribute or create derivative works based on these data, content, or resources (either in whole or in part) unless you have been specifically given permission to do so by the relevant owners.
-
-7.3 You acknowledge that your use of such third party applications, data, content, or resources may be subject to separate terms between you and the relevant third party. In that case, this License Agreement does not affect your legal relationship with these third parties.
-
-8. Using Google APIs
-
-8.1 Google APIs
-
-8.1.1 If you use any API to retrieve data from Google, you acknowledge that the data may be protected by intellectual property rights which are owned by Google or those parties that provide the data (or by other persons or companies on their behalf). Your use of any such API may be subject to additional Terms of Service. You may not modify, rent, lease, loan, sell, distribute or create derivative works based on this data (either in whole or in part) unless allowed by the relevant Terms of Service.
-
-8.1.2 If you use any API to retrieve a user's data from Google, you acknowledge and agree that you shall retrieve data only with the user's explicit consent and only when, and for the limited purposes for which, the user has given you permission to do so.
-
-9. Terminating this License Agreement
-
-9.1 This License Agreement will continue to apply until terminated by either you or Google as set out below.
-
-9.2 If you want to terminate this License Agreement, you may do so by ceasing your use of the Developer Preview and any relevant developer credentials.
-
-9.3 Google may at any time, terminate this License Agreement with you if:
-(A) you have breached any provision of this License Agreement; or
-(B) Google is required to do so by law; or
-(C) the partner with whom Google offered certain parts of Developer Preview (such as APIs) to you has terminated its relationship with Google or ceased to offer certain parts of the Developer Preview to you; or
-(D) Google decides to no longer provide the Developer Preview or certain parts of the Developer Preview to users in the country in which you are resident or from which you use the service, or the provision of the Developer Preview or certain Developer Preview services to you by Google is, in Google's sole discretion, no longer commercially viable.
-
-9.4 When this License Agreement comes to an end, all of the legal rights, obligations and liabilities that you and Google have benefited from, been subject to (or which have accrued over time whilst this License Agreement has been in force) or which are expressed to continue indefinitely, shall be unaffected by this cessation, and the provisions of paragraph 14.7 shall continue to apply to such rights, obligations and liabilities indefinitely.
-
-10. DISCLAIMER OF WARRANTIES
-
-10.1 YOU EXPRESSLY UNDERSTAND AND AGREE THAT YOUR USE OF THE DEVELOPER PREVIEW IS AT YOUR SOLE RISK AND THAT THE DEVELOPER PREVIEW IS PROVIDED "AS IS" AND "AS AVAILABLE" WITHOUT WARRANTY OF ANY KIND FROM GOOGLE.
-
-10.2 YOUR USE OF THE DEVELOPER PREVIEW AND ANY MATERIAL DOWNLOADED OR OTHERWISE OBTAINED THROUGH THE USE OF THE DEVELOPER PREVIEW IS AT YOUR OWN DISCRETION AND RISK AND YOU ARE SOLELY RESPONSIBLE FOR ANY DAMAGE TO YOUR COMPUTER SYSTEM OR OTHER DEVICE OR LOSS OF DATA THAT RESULTS FROM SUCH USE.
-
-10.3 GOOGLE FURTHER EXPRESSLY DISCLAIMS ALL WARRANTIES AND CONDITIONS OF ANY KIND, WHETHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO THE IMPLIED WARRANTIES AND CONDITIONS OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
-
-11. LIMITATION OF LIABILITY
-
-11.1 YOU EXPRESSLY UNDERSTAND AND AGREE THAT GOOGLE, ITS SUBSIDIARIES AND AFFILIATES, AND ITS LICENSORS SHALL NOT BE LIABLE TO YOU UNDER ANY THEORY OF LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, CONSEQUENTIAL OR EXEMPLARY DAMAGES THAT MAY BE INCURRED BY YOU, INCLUDING ANY LOSS OF DATA, WHETHER OR NOT GOOGLE OR ITS REPRESENTATIVES HAVE BEEN ADVISED OF OR SHOULD HAVE BEEN AWARE OF THE POSSIBILITY OF ANY SUCH LOSSES ARISING.
-
-12. Indemnification
-
-12.1 To the maximum extent permitted by law, you agree to defend, indemnify and hold harmless Google, its affiliates and their respective directors, officers, employees and agents from and against any and all claims, actions, suits or proceedings, as well as any and all losses, liabilities, damages, costs and expenses (including reasonable attorneys’ fees) arising out of or accruing from (a) your use of the Developer Preview, (b) any application you develop on the Developer Preview that infringes any copyright, trademark, trade secret, trade dress, patent or other intellectual property right of any person or defames any person or violates their rights of publicity or privacy, and (c) any non-compliance by you with this License Agreement.
-
-13. Changes to the License Agreement
-
-13.1 Google may make changes to the License Agreement as it distributes new versions of the Developer Preview. When these changes are made, Google will make a new version of the License Agreement available on the website where the Developer Preview is made available.
-
-14. General Legal Terms
-
-14.1 This License Agreement constitutes the whole legal agreement between you and Google and governs your use of the Developer Preview (excluding any services which Google may provide to you under a separate written agreement), and completely replaces any prior agreements between you and Google in relation to the Developer Preview.
-
-14.2 You agree that if Google does not exercise or enforce any legal right or remedy which is contained in this License Agreement (or which Google has the benefit of under any applicable law), this will not be taken to be a formal waiver of Google's rights and that those rights or remedies will still be available to Google.
-
-14.3 If any court of law, having the jurisdiction to decide on this matter, rules that any provision of this License Agreement is invalid, then that provision will be removed from this License Agreement without affecting the rest of this License Agreement. The remaining provisions of this License Agreement will continue to be valid and enforceable.
-
-14.4 You acknowledge and agree that each member of the group of companies of which Google is the parent shall be third party beneficiaries to this License Agreement and that such other companies shall be entitled to directly enforce, and rely upon, any provision of this License Agreement that confers a benefit on (or rights in favor of) them. Other than this, no other person or company shall be third party beneficiaries to this License Agreement.
-
-14.5 EXPORT RESTRICTIONS. THE DEVELOPER PREVIEW IS SUBJECT TO UNITED STATES EXPORT LAWS AND REGULATIONS. YOU MUST COMPLY WITH ALL DOMESTIC AND INTERNATIONAL EXPORT LAWS AND REGULATIONS THAT APPLY TO THE DEVELOPER PREVIEW. THESE LAWS INCLUDE RESTRICTIONS ON DESTINATIONS, END USERS AND END USE.
-
-14.6 The rights granted in this License Agreement may not be assigned or transferred by either you or Google without the prior written approval of the other party. Neither you nor Google shall be permitted to delegate their responsibilities or obligations under this License Agreement without the prior written approval of the other party.
-
-14.7 This License Agreement, and your relationship with Google under this License Agreement, shall be governed by the laws of the State of California without regard to its conflict of laws provisions. You and Google agree to submit to the exclusive jurisdiction of the courts located within the county of Santa Clara, California to resolve any legal matter arising from this License Agreement. Notwithstanding this, you agree that Google shall still be allowed to apply for injunctive remedies (or an equivalent type of urgent legal relief) in any jurisdiction.
-
-
-</div></div>
-
-
-<p class="caution">
- <strong>Important:</strong> Your email address is used to provide your Google account
- access to the Android Wear Preview app Beta Preview on Google Play Store. As such, the
- email address you provide below must be for the account you use to download apps on Google Play Store.
- We may also use your email address to provide you with updates about the Android Wear
- platform release.
-</p>
-
-<iframe src="https://docs.google.com/forms/d/1iSJ084kEkV242cZisNMnj6G8qpi9r_zdEyfXA-hB1ao/viewform?embedded=true" width="100%" height="540" frameborder="0" marginheight="0" marginwidth="0" id="signupform">Loading...</iframe>
-
-
-
-
-</body>
-</html>
diff --git a/docs/html/wear/preview/start.jd b/docs/html/wear/preview/start.jd
deleted file mode 100644
index f8f0129..0000000
--- a/docs/html/wear/preview/start.jd
+++ /dev/null
@@ -1,254 +0,0 @@
-page.title=Get Started with the Developer Preview
-
-@jd:body
-
-
-<div class="cols">
-
- <div class="col-5">
-<p>The Android Wear Developer Preview includes tools and APIs that allow you to
-enhance your app notifications
-to provide an optimized user experience on Android wearables.</p>
-
-<p>With the Android Wear Developer Preview, you can:</p>
-
-<ul>
- <li>Run the Android Wear platform in the Android emulator.</li>
- <li>Connect your Android device to the emulator and view notifications from the
-device as cards on Android Wear.</li>
- <li>Try new APIs in the preview support library that enhance your app's notifications
-with features such as voice replies and notification pages.</li>
-</ul>
-
-<p>To get access to the Developer Preview tools,
-click the sign up button on the right, then follow the setup instructions below.</p>
- </div>
-
- <div class="col-7">
-<img src="/wear/images/laptop-bridge.png" width="400" height="222" alt="" />
-
-<a href="/wear/preview/signup.html" class="button" style="
- width: 370px;
- margin: 10px 0 20px;
- font-weight: bold;
- font-size: 16px;
-">Sign Up for the Developer Preview</a>
-
-<p>Signing up provides you access to:</p>
-<ul>
-<li>New notification APIs in the preview support library.</li>
-<li>Sample apps using the new notification APIs.</li>
-<li>The <em>Android Wear Preview</em> app for your mobile device, which connects
-your device to the Android Wear emulator.</li>
-</ul>
-
- </div>
-</div>
-
-
-<p class="caution"><strong>Caution:</strong>
-The current Android Wear Developer Preview is intended for <b>development and testing purposes only</b>, not for production apps. Google may change this Developer Preview significantly prior to the official release of the Android Wear SDK. You may not publicly distribute or ship any application using this Developer Preview, as this Developer Preview will no longer be supported after the official SDK is released (which will cause applications based only on the Developer Preview to break).</p>
-
-
-
-
-<h2 id="Prereq">Prerequisites</h2>
-
-<p>Before you begin the setup, you must:</p>
-
-<ol>
- <li><a href="{@docRoot}sdk/index.html"><b>Install the Android SDK</b></a>.
- <p>The Android SDK includes all the developer tools required to build
-apps for Android (optional IDEs are also available for download).</p></li>
- <li><a href="{@docRoot}wear/preview/signup.html"><b>Sign up for the Android Wear Developer Preview</b></a>.
- <p>You must sign up with a Gmail or other Google account in order to download the
-preview support library and receive access to the
-<em>Android Wear Preview</em> beta app on Google Play Store.</p></li>
-</ol>
-
-<p class="note"><strong>Note:</strong>
-If you're using the ADT plugin for Eclipse, you must update to version 22.6.1 or higher.
-If you're using Android Studio, you must update to version 0.5.1 or higher</p>
-
-
-
-<h2 id="Install">1. Install the Android Wear System Image</h2>
-
-
-<ol>
- <li>Launch <a href="{@docRoot}tools/help/sdk-manager.html"
- >Android SDK Manager</a>.
- <ul>
- <li>From Eclipse, select <b>Window > Android SDK Manager</b>.</li>
- <li>From Android Studio, select <b>Tools > Android > SDK Manager</b>.</li>
- </ul>
- </li>
- <li>Below Tools, verify that you have Android SDK Tools revision 22.6 or higher.
- <p>If your version of Android SDK Tools is lower than 22.6, you must update:</p>
- <ol>
- <li>Select <strong>Android SDK Tools</strong>.</li>
- <li>Click <strong>Install package</strong>.</li>
- <li>Accept the license and click <strong>Install</strong>.</li>
- <li>When the installation completes, restart Android SDK Manager.</li>
- </ol>
- </li>
-
- <li>Below Android 4.4.2, select <strong>Android Wear ARM EABI v7a System Image</strong>.
-<p class="note"><strong>Note:</strong> Android Wear is designed to support multiple processor architectures.
-</p></li>
- <li>Below Extras, ensure that you have the latest version of the
-<a href="{@docRoot}tools/support-library/index.html">Android Support Library</a>.
- If an update is available, select <strong>Android Support Library</strong>. If you're using Android Studio, also select <strong>Android Support Repository</strong>.</li>
- <li>Click <strong>Install packages</strong>.</li>
- <li>Accept the license and click <strong>Install</strong>.</li>
-</ol>
-
-
-
-<h2 id="SetupEmulator">2. Set Up the Android Wear Emulator</h2>
-
-<ol>
-<li>Launch the <a href="{@docRoot}tools/help/avd-manager.html"
- >Android Virtual Device Manager</a>.
-<ul>
-<li>From Eclipse, select <b>Window > Android Virtual Device Manager</b>.</li>
-<li>From Android Studio, select <b>Tools > Android > AVD Manager</b>.</li>
-</ul>
-</li>
-<li>Click <strong>New</strong>.</li>
-<li>For the AVD Name, enter "AndroidWearSquare" or "AndroidWearRound", depending on whether
-you want to create an emulator with a square or round display.</li>
-<li>For the Device, select <strong>Android Wear Square</strong> or
- <strong>Android Wear Round</strong>.</li>
-<li>For the Target, select <strong>Android 4.4.2 - API Level 19</strong> (or higher).</li>
-<li>For the CPU/ABI, select <strong>Android Wear ARM (armeabi-v7a)</strong>.
-<p class="note"><strong>Note:</strong> Android Wear is designed to support multiple processor architectures.
-</p></li>
-<li>For the Skin, select <strong>AndroidWearSquare</strong> or
-<strong>AndroidWearRound</strong>.</li>
-<li>Leave all other options set to their defaults and click <strong>OK</strong>.
- <p>Although real Android wearables do not provide a keyboard as an input method,
- you should keep <strong>Hardware keyboard present</strong> selected so you can
- provide text input on screens where users will instead provide voice input.</p>
-</li>
-<!--
-<li>Click <strong>Device Definitions</strong>.</li>
-<li>Select <strong>Android WearSquare</strong> then click <strong>Create AVD</strong>.</li>
-<li>Click <strong>OK</strong>.</li>
--->
-<li>In the list of AVDs, select the one you just created and click
- <strong>Start</strong>. In the following window, click <strong>Launch</strong>.</li>
-</ol>
-
-<p>The Android Wear emulator now starts. To begin testing your app's notifications,
-you must now pair the emulator to your development device
-that has the <em>Android Wear Preview</em> app installed.</p>
-
-<p class="note"><strong>Tip:</strong> To improve the emulator startup time, edit your AVD
-and enable <strong>Snapshot</strong> under Emulator Options. When you start the emulator,
-select <strong>Save to snapshot</strong> then click <strong>Launch</strong>. Once the emulator
-is running, close it to save a snapshot of the system.
-Start the AVD again, but select <strong>Launch from snapshot</strong> and
-deselect <strong>Save to snapshot</strong>.</p>
-
-<p class="caution"><strong>Caution:</strong> Do not install apps on the Android Wear emulator.
-The system does not support traditional Android apps and the result of running such apps is
-unpredictable.</p>
-
-
-
-<h2 id="SetupApp">3. Set Up the Android Wear Preview App</h2>
-
-<p>To view your app's notifications on the Android Wear emulator, you must have the
-<em>Android Wear Preview</em> app installed on your Android device (a phone or tablet).</p>
-
-<p>To receive the Android Wear Preview app, you must <a
-href="{@docRoot}wear/preview/signup.html">sign up for the Developer Preview</a> using the same
-Gmail or Google account you use with Google Play Store.</p>
-</p>
-
-<p class="note"><strong>Note:</strong> The <em>Android Wear Preview</em> app is compatible with
- Android 4.3 and higher and is not available for the Android emulator.</p>
-
-<p>After you've signed up for the Developer Preview,
- you'll receive a confirmation email that includes a link to opt-in to the
- <em>Android Wear Preview</em> app beta program. Once you opt-in, it may take up to 24 hours for the
- app to become available in Google Play Store.</p>
-
-<p>After you install the <em>Android Wear Preview</em> app, you can set up
- your device to communicate with the Android Wear emulator:</p>
-
-<ol>
-<li>Open the <em>Android Wear Preview</em> app. You should see a notice that the app is currently
- not enabled as a notification listener. Tap the message to open the system settings,
- then select Android Wear Preview to grant it notification access.</li>
-<li>Connect your device to your development machine over USB. Be sure that no other
- Android devices are connected to the machine.</li>
-<li>Ensure that the Android Wear emulator (created in the previous section) is running.
-The emulator should show the time and an icon that indicates no device is connected.</li>
-<li>Open a command line terminal, navigate to your Android SDK's <code>platform-tools/</code>
-directory, then execute:
-<pre style="margin-top:.5em">adb -d forward tcp:5601 tcp:5601</pre>
-<p class="note"><strong>Note:</strong> You must execute this command each time you connect your
-device over USB.</p>
-</li>
-<li>Return to the Android Wear Preview app. It should now indicate that it is connected to
- the emulator. The Android Wear emulator should now show the 'g' orb icon, indicating
- that is is connected to your device.
-</ol>
-
-<p>Now, notifications from your device also appear in the Android Wear emulator.</p>
-
-
-
-
-<h2 id="AddLibrary">4. Add the Support Library to Your Project</h2>
-
-<p>The Android Wear preview support library includes several APIs that allow you to
-optimize your app's notifications for the Android Wear user experience.</p>
-
-<p>To receive the preview support library, you must <a
-href="{@docRoot}wear/preview/signup.html">sign up for the Developer Preview</a>. The
-confirmation email you receive after you sign up includes a link to download a ZIP file,
-which contains the preview support library and some sample apps.</p>
-
-<p>After you download and unzip the package, add the preview support library
-sto your Android project:</p>
-
-<p><b>If you're using Eclipse:</b></p>
- <ol>
- <li>In your Android app project, create a <code>libs/</code> directory in your project root
- (the same location as the <code>AndroidManifest.xml</code> file).</li>
- <li>Copy the v4 support library JAR file from your Android SDK directory (e.g.,
- <code><sdk>/extras/android/support/v4/android-support-v4.jar</code>) into your
- project <code>libs/</code> directory.
- <li>Also save the <code>wearable-preview-support.jar</code> file in the <code>libs/</code> directory.
- <li>Right click each JAR file and select <strong>Build Path > Add to Build Path</strong>.</li>
- </ol>
-
- <p><b>If you're using Android Studio:</b></p>
- <ol>
- <li>In your Android app project, create a <code>libs/</code> directory in your project root
- (the same location as the <code>AndroidManifest.xml</code> file).</li>
- <li>Save the <code>wearable-preview-support.jar</code> file in the <code>libs/</code> directory.
- <li>Open the <code>build.gradle</code> file in your app module.</li>
- <li>Add a dependency rule for both the v4 support library and the Android Wear
- preview support library:
-<pre>
-dependencies {
- compile "com.android.support:support-v4:18.0.+"
- compile files('../libs/wearable-preview-support.jar')
-}
-</pre>
- </li>
- <li>Click <strong>Sync Project with Gradle Files</strong> in the toolbar.</li>
- </ol>
-
-<p>To start optimizing your notifications for Android Wear,
- read <a href="{@docRoot}wear/notifications/creating.html"
- >Creating Notifications for Android Wear</a>.</p>
-
-
-
-</body>
-</html>
diff --git a/docs/image_sources/training/volley/volley-request.graffle b/docs/image_sources/training/volley/volley-request.graffle
new file mode 100644
index 0000000..1d79b3df
--- /dev/null
+++ b/docs/image_sources/training/volley/volley-request.graffle
@@ -0,0 +1,2259 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>ActiveLayerIndex</key>
+ <integer>0</integer>
+ <key>ApplicationVersion</key>
+ <array>
+ <string>com.omnigroup.OmniGrafflePro</string>
+ <string>139.18.0.187838</string>
+ </array>
+ <key>AutoAdjust</key>
+ <true/>
+ <key>BackgroundGraphic</key>
+ <dict>
+ <key>Bounds</key>
+ <string>{{0, 0}, {576, 733}}</string>
+ <key>Class</key>
+ <string>SolidGraphic</string>
+ <key>ID</key>
+ <integer>2</integer>
+ <key>Style</key>
+ <dict>
+ <key>shadow</key>
+ <dict>
+ <key>Draws</key>
+ <string>NO</string>
+ </dict>
+ <key>stroke</key>
+ <dict>
+ <key>Draws</key>
+ <string>NO</string>
+ </dict>
+ </dict>
+ </dict>
+ <key>BaseZoom</key>
+ <integer>0</integer>
+ <key>CanvasOrigin</key>
+ <string>{0, 0}</string>
+ <key>ColumnAlign</key>
+ <integer>1</integer>
+ <key>ColumnSpacing</key>
+ <real>36</real>
+ <key>CreationDate</key>
+ <string>2014-03-24 22:38:51 +0000</string>
+ <key>Creator</key>
+ <string>Katie McCormick</string>
+ <key>DisplayScale</key>
+ <string>1 0/72 in = 1 0/72 in</string>
+ <key>GraphDocumentVersion</key>
+ <integer>8</integer>
+ <key>GraphicsList</key>
+ <array>
+ <dict>
+ <key>Bounds</key>
+ <string>{{68.798424333456921, 309.90064645900816}, {70.999998092651367, 24}}</string>
+ <key>Class</key>
+ <string>ShapedGraphic</string>
+ <key>FitText</key>
+ <string>Vertical</string>
+ <key>Flow</key>
+ <string>Resize</string>
+ <key>FontInfo</key>
+ <dict>
+ <key>Color</key>
+ <dict>
+ <key>b</key>
+ <string>0</string>
+ <key>g</key>
+ <string>0</string>
+ <key>r</key>
+ <string>0</string>
+ </dict>
+ <key>Font</key>
+ <string>Helvetica</string>
+ <key>Size</key>
+ <real>12</real>
+ </dict>
+ <key>ID</key>
+ <integer>1990</integer>
+ <key>Rotation</key>
+ <real>88.863800048828125</real>
+ <key>Shape</key>
+ <string>Rectangle</string>
+ <key>Style</key>
+ <dict>
+ <key>fill</key>
+ <dict>
+ <key>Draws</key>
+ <string>NO</string>
+ </dict>
+ <key>shadow</key>
+ <dict>
+ <key>Draws</key>
+ <string>NO</string>
+ </dict>
+ <key>stroke</key>
+ <dict>
+ <key>Draws</key>
+ <string>NO</string>
+ </dict>
+ </dict>
+ <key>Text</key>
+ <dict>
+ <key>Align</key>
+ <integer>0</integer>
+ <key>Text</key>
+ <string>{\rtf1\ansi\ansicpg1252\cocoartf1265\cocoasubrtf190
+\cocoascreenfonts1{\fonttbl\f0\fswiss\fcharset0 Helvetica;}
+{\colortbl;\red255\green255\blue255;}
+\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720
+
+\f0\fs24 \cf0 cache miss}</string>
+ </dict>
+ </dict>
+ <dict>
+ <key>Bounds</key>
+ <string>{{164.31081962585449, 233}, {59, 24}}</string>
+ <key>Class</key>
+ <string>ShapedGraphic</string>
+ <key>FitText</key>
+ <string>YES</string>
+ <key>Flow</key>
+ <string>Resize</string>
+ <key>FontInfo</key>
+ <dict>
+ <key>Color</key>
+ <dict>
+ <key>b</key>
+ <string>0</string>
+ <key>g</key>
+ <string>0</string>
+ <key>r</key>
+ <string>0</string>
+ </dict>
+ <key>Font</key>
+ <string>Helvetica</string>
+ <key>Size</key>
+ <real>12</real>
+ </dict>
+ <key>ID</key>
+ <integer>1989</integer>
+ <key>Shape</key>
+ <string>Rectangle</string>
+ <key>Style</key>
+ <dict>
+ <key>fill</key>
+ <dict>
+ <key>Draws</key>
+ <string>NO</string>
+ </dict>
+ <key>shadow</key>
+ <dict>
+ <key>Draws</key>
+ <string>NO</string>
+ </dict>
+ <key>stroke</key>
+ <dict>
+ <key>Draws</key>
+ <string>NO</string>
+ </dict>
+ </dict>
+ <key>Text</key>
+ <dict>
+ <key>Align</key>
+ <integer>0</integer>
+ <key>Text</key>
+ <string>{\rtf1\ansi\ansicpg1252\cocoartf1265\cocoasubrtf190
+\cocoascreenfonts1{\fonttbl\f0\fswiss\fcharset0 Helvetica;}
+{\colortbl;\red255\green255\blue255;}
+\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720
+
+\f0\fs24 \cf0 cache hit}</string>
+ </dict>
+ <key>Wrap</key>
+ <string>NO</string>
+ </dict>
+ <dict>
+ <key>Bounds</key>
+ <string>{{109, 567.5}, {72, 24}}</string>
+ <key>Class</key>
+ <string>ShapedGraphic</string>
+ <key>FitText</key>
+ <string>YES</string>
+ <key>Flow</key>
+ <string>Resize</string>
+ <key>FontInfo</key>
+ <dict>
+ <key>Color</key>
+ <dict>
+ <key>b</key>
+ <string>0</string>
+ <key>g</key>
+ <string>0</string>
+ <key>r</key>
+ <string>0</string>
+ </dict>
+ <key>Font</key>
+ <string>Helvetica</string>
+ <key>Size</key>
+ <real>12</real>
+ </dict>
+ <key>ID</key>
+ <integer>1987</integer>
+ <key>Shape</key>
+ <string>Rectangle</string>
+ <key>Style</key>
+ <dict>
+ <key>fill</key>
+ <dict>
+ <key>Draws</key>
+ <string>NO</string>
+ </dict>
+ <key>shadow</key>
+ <dict>
+ <key>Draws</key>
+ <string>NO</string>
+ </dict>
+ <key>stroke</key>
+ <dict>
+ <key>Draws</key>
+ <string>NO</string>
+ </dict>
+ </dict>
+ <key>Text</key>
+ <dict>
+ <key>Align</key>
+ <integer>0</integer>
+ <key>Text</key>
+ <string>{\rtf1\ansi\ansicpg1252\cocoartf1265\cocoasubrtf190
+\cocoascreenfonts1{\fonttbl\f0\fswiss\fcharset0 Helvetica;}
+{\colortbl;\red255\green255\blue255;}
+\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720
+
+\f0\fs24 \cf0 round-robin}</string>
+ </dict>
+ <key>Wrap</key>
+ <string>NO</string>
+ </dict>
+ <dict>
+ <key>Class</key>
+ <string>LineGraphic</string>
+ <key>Head</key>
+ <dict>
+ <key>ID</key>
+ <integer>209</integer>
+ </dict>
+ <key>ID</key>
+ <integer>1986</integer>
+ <key>Points</key>
+ <array>
+ <string>{362.483096786499, 520.41741752624512}</string>
+ <string>{439.59458923339844, 165.16970062255859}</string>
+ </array>
+ <key>Style</key>
+ <dict>
+ <key>stroke</key>
+ <dict>
+ <key>HeadArrow</key>
+ <string>FilledArrow</string>
+ <key>Legacy</key>
+ <true/>
+ <key>TailArrow</key>
+ <string>0</string>
+ </dict>
+ </dict>
+ <key>Tail</key>
+ <dict>
+ <key>ID</key>
+ <integer>213</integer>
+ <key>Info</key>
+ <integer>7</integer>
+ </dict>
+ </dict>
+ <dict>
+ <key>Class</key>
+ <string>LineGraphic</string>
+ <key>Head</key>
+ <dict>
+ <key>ID</key>
+ <integer>209</integer>
+ </dict>
+ <key>ID</key>
+ <integer>1985</integer>
+ <key>Points</key>
+ <array>
+ <string>{362.483096786499, 461.33483529090881}</string>
+ <string>{439.59458923339844, 165.16970062255859}</string>
+ </array>
+ <key>Style</key>
+ <dict>
+ <key>stroke</key>
+ <dict>
+ <key>HeadArrow</key>
+ <string>FilledArrow</string>
+ <key>Legacy</key>
+ <true/>
+ <key>TailArrow</key>
+ <string>0</string>
+ </dict>
+ </dict>
+ <key>Tail</key>
+ <dict>
+ <key>ID</key>
+ <integer>204</integer>
+ <key>Info</key>
+ <integer>7</integer>
+ </dict>
+ </dict>
+ <dict>
+ <key>Class</key>
+ <string>LineGraphic</string>
+ <key>Head</key>
+ <dict>
+ <key>ID</key>
+ <integer>209</integer>
+ </dict>
+ <key>ID</key>
+ <integer>1984</integer>
+ <key>Points</key>
+ <array>
+ <string>{362.48308152770994, 402.2522608306885}</string>
+ <string>{439.59458923339844, 165.16970062255859}</string>
+ </array>
+ <key>Style</key>
+ <dict>
+ <key>stroke</key>
+ <dict>
+ <key>HeadArrow</key>
+ <string>FilledArrow</string>
+ <key>Legacy</key>
+ <true/>
+ <key>TailArrow</key>
+ <string>0</string>
+ </dict>
+ </dict>
+ <key>Tail</key>
+ <dict>
+ <key>ID</key>
+ <integer>203</integer>
+ <key>Info</key>
+ <integer>7</integer>
+ </dict>
+ </dict>
+ <dict>
+ <key>Class</key>
+ <string>LineGraphic</string>
+ <key>Head</key>
+ <dict>
+ <key>ID</key>
+ <integer>209</integer>
+ </dict>
+ <key>ID</key>
+ <integer>1983</integer>
+ <key>Points</key>
+ <array>
+ <string>{294.65540856933592, 227.99996948242188}</string>
+ <string>{381.3049268594778, 164.77353614247437}</string>
+ </array>
+ <key>Style</key>
+ <dict>
+ <key>stroke</key>
+ <dict>
+ <key>HeadArrow</key>
+ <string>FilledArrow</string>
+ <key>Legacy</key>
+ <true/>
+ <key>TailArrow</key>
+ <string>0</string>
+ </dict>
+ </dict>
+ <key>Tail</key>
+ <dict>
+ <key>ID</key>
+ <integer>210</integer>
+ <key>Info</key>
+ <integer>6</integer>
+ </dict>
+ </dict>
+ <dict>
+ <key>Class</key>
+ <string>LineGraphic</string>
+ <key>Head</key>
+ <dict>
+ <key>ID</key>
+ <integer>4</integer>
+ <key>Info</key>
+ <integer>6</integer>
+ </dict>
+ <key>ID</key>
+ <integer>1982</integer>
+ <key>Points</key>
+ <array>
+ <string>{94.216227905273399, 165.16970062255859}</string>
+ <string>{92.966230102539043, 227.99999237060547}</string>
+ </array>
+ <key>Style</key>
+ <dict>
+ <key>stroke</key>
+ <dict>
+ <key>HeadArrow</key>
+ <string>FilledArrow</string>
+ <key>Legacy</key>
+ <true/>
+ <key>TailArrow</key>
+ <string>0</string>
+ </dict>
+ </dict>
+ <key>Tail</key>
+ <dict>
+ <key>ID</key>
+ <integer>157</integer>
+ <key>Info</key>
+ <integer>5</integer>
+ </dict>
+ </dict>
+ <dict>
+ <key>Class</key>
+ <string>LineGraphic</string>
+ <key>Head</key>
+ <dict>
+ <key>ID</key>
+ <integer>213</integer>
+ <key>Info</key>
+ <integer>9</integer>
+ </dict>
+ <key>ID</key>
+ <integer>1980</integer>
+ <key>Points</key>
+ <array>
+ <string>{179.26087951660151, 462.43391850741568}</string>
+ <string>{224.48312730407713, 514.92974541704564}</string>
+ </array>
+ <key>Style</key>
+ <dict>
+ <key>stroke</key>
+ <dict>
+ <key>HeadArrow</key>
+ <string>FilledArrow</string>
+ <key>Legacy</key>
+ <true/>
+ <key>TailArrow</key>
+ <string>0</string>
+ </dict>
+ </dict>
+ <key>Tail</key>
+ <dict>
+ <key>ID</key>
+ <integer>1973</integer>
+ <key>Info</key>
+ <integer>3</integer>
+ </dict>
+ </dict>
+ <dict>
+ <key>Class</key>
+ <string>LineGraphic</string>
+ <key>Head</key>
+ <dict>
+ <key>ID</key>
+ <integer>204</integer>
+ <key>Info</key>
+ <integer>8</integer>
+ </dict>
+ <key>ID</key>
+ <integer>1979</integer>
+ <key>Points</key>
+ <array>
+ <string>{179.76073189455099, 462.42177007636207}</string>
+ <string>{224.48312730407716, 461.33483529090881}</string>
+ </array>
+ <key>Style</key>
+ <dict>
+ <key>stroke</key>
+ <dict>
+ <key>HeadArrow</key>
+ <string>FilledArrow</string>
+ <key>Legacy</key>
+ <true/>
+ <key>TailArrow</key>
+ <string>0</string>
+ </dict>
+ </dict>
+ <key>Tail</key>
+ <dict>
+ <key>ID</key>
+ <integer>1973</integer>
+ </dict>
+ </dict>
+ <dict>
+ <key>Class</key>
+ <string>LineGraphic</string>
+ <key>Head</key>
+ <dict>
+ <key>ID</key>
+ <integer>203</integer>
+ <key>Info</key>
+ <integer>8</integer>
+ </dict>
+ <key>ID</key>
+ <integer>1978</integer>
+ <key>Points</key>
+ <array>
+ <string>{179.26087951660151, 462.43391850741568}</string>
+ <string>{224.48311204528804, 402.2522608306885}</string>
+ </array>
+ <key>Style</key>
+ <dict>
+ <key>stroke</key>
+ <dict>
+ <key>HeadArrow</key>
+ <string>FilledArrow</string>
+ <key>Legacy</key>
+ <true/>
+ <key>TailArrow</key>
+ <string>0</string>
+ </dict>
+ </dict>
+ <key>Tail</key>
+ <dict>
+ <key>ID</key>
+ <integer>1973</integer>
+ <key>Info</key>
+ <integer>3</integer>
+ </dict>
+ </dict>
+ <dict>
+ <key>Class</key>
+ <string>LineGraphic</string>
+ <key>Head</key>
+ <dict>
+ <key>ID</key>
+ <integer>1973</integer>
+ </dict>
+ <key>ID</key>
+ <integer>1975</integer>
+ <key>Points</key>
+ <array>
+ <string>{92.966230102539043, 286.16969299316406}</string>
+ <string>{92.966239929199205, 356.41910654608148}</string>
+ </array>
+ <key>Style</key>
+ <dict>
+ <key>stroke</key>
+ <dict>
+ <key>HeadArrow</key>
+ <string>FilledArrow</string>
+ <key>Legacy</key>
+ <true/>
+ <key>TailArrow</key>
+ <string>0</string>
+ </dict>
+ </dict>
+ <key>Tail</key>
+ <dict>
+ <key>ID</key>
+ <integer>4</integer>
+ <key>Info</key>
+ <integer>5</integer>
+ </dict>
+ </dict>
+ <dict>
+ <key>Class</key>
+ <string>LineGraphic</string>
+ <key>Head</key>
+ <dict>
+ <key>ID</key>
+ <integer>210</integer>
+ <key>Info</key>
+ <integer>8</integer>
+ </dict>
+ <key>ID</key>
+ <integer>1974</integer>
+ <key>Points</key>
+ <array>
+ <string>{150.81081933593748, 257.08484268188477}</string>
+ <string>{236.81081933593748, 257.08481979370117}</string>
+ </array>
+ <key>Style</key>
+ <dict>
+ <key>stroke</key>
+ <dict>
+ <key>HeadArrow</key>
+ <string>FilledArrow</string>
+ <key>Legacy</key>
+ <true/>
+ <key>TailArrow</key>
+ <string>0</string>
+ </dict>
+ </dict>
+ <key>Tail</key>
+ <dict>
+ <key>ID</key>
+ <integer>4</integer>
+ <key>Info</key>
+ <integer>7</integer>
+ </dict>
+ </dict>
+ <dict>
+ <key>Bounds</key>
+ <string>{{391, 540.66744232177734}, {137.99996948242188, 23.499996185302734}}</string>
+ <key>Class</key>
+ <string>ShapedGraphic</string>
+ <key>FontInfo</key>
+ <dict>
+ <key>Color</key>
+ <dict>
+ <key>b</key>
+ <string>0</string>
+ <key>g</key>
+ <string>0</string>
+ <key>r</key>
+ <string>0</string>
+ </dict>
+ <key>Font</key>
+ <string>Roboto-BoldCondensed</string>
+ <key>Size</key>
+ <real>12</real>
+ </dict>
+ <key>ID</key>
+ <integer>214</integer>
+ <key>Magnets</key>
+ <array>
+ <string>{1, 1}</string>
+ <string>{1, -1}</string>
+ <string>{-1, -1}</string>
+ <string>{-1, 1}</string>
+ <string>{0, 1}</string>
+ <string>{0, -1}</string>
+ <string>{1, 0}</string>
+ <string>{-1, 0}</string>
+ <string>{-0.5, -0.233518}</string>
+ <string>{-0.49144199999999999, 0.26006299999999999}</string>
+ <string>{0.50711799999999996, -0.22408600000000001}</string>
+ <string>{0.50711799999999996, 0.267179}</string>
+ <string>{-0.27431, -0.474028}</string>
+ <string>{0.27977999999999997, -0.47847800000000001}</string>
+ <string>{0.29393799999999998, 0.54304399999999997}</string>
+ <string>{-0.28623199999999999, 0.55380399999999996}</string>
+ </array>
+ <key>Shape</key>
+ <string>Rectangle</string>
+ <key>Style</key>
+ <dict>
+ <key>fill</key>
+ <dict>
+ <key>Color</key>
+ <dict>
+ <key>b</key>
+ <string>0.2</string>
+ <key>g</key>
+ <string>0.733333</string>
+ <key>r</key>
+ <string>1</string>
+ </dict>
+ </dict>
+ <key>shadow</key>
+ <dict>
+ <key>Color</key>
+ <dict>
+ <key>a</key>
+ <string>0.35</string>
+ <key>b</key>
+ <string>0.328823</string>
+ <key>g</key>
+ <string>0.328823</string>
+ <key>r</key>
+ <string>0.328823</string>
+ </dict>
+ <key>Fuzziness</key>
+ <real>1.5349206924438477</real>
+ <key>ShadowVector</key>
+ <string>{0, 1}</string>
+ </dict>
+ <key>stroke</key>
+ <dict>
+ <key>Color</key>
+ <dict>
+ <key>b</key>
+ <string>0.131021</string>
+ <key>g</key>
+ <string>0.363196</string>
+ <key>r</key>
+ <string>0.725948</string>
+ </dict>
+ <key>CornerRadius</key>
+ <real>2</real>
+ <key>Draws</key>
+ <string>NO</string>
+ </dict>
+ </dict>
+ <key>Text</key>
+ <dict>
+ <key>Text</key>
+ <string>{\rtf1\ansi\ansicpg1252\cocoartf1265\cocoasubrtf190
+\cocoascreenfonts1{\fonttbl\f0\fswiss\fcharset0 Helvetica;}
+{\colortbl;\red255\green255\blue255;}
+\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\qc
+
+\f0\b\fs24 \cf0 network threads}</string>
+ <key>VerticalPad</key>
+ <integer>0</integer>
+ </dict>
+ </dict>
+ <dict>
+ <key>Bounds</key>
+ <string>{{224.48312730407713, 508.66741943359375}, {137.99996948242188, 23.499996185302734}}</string>
+ <key>Class</key>
+ <string>ShapedGraphic</string>
+ <key>FontInfo</key>
+ <dict>
+ <key>Color</key>
+ <dict>
+ <key>b</key>
+ <string>0</string>
+ <key>g</key>
+ <string>0</string>
+ <key>r</key>
+ <string>0</string>
+ </dict>
+ <key>Font</key>
+ <string>Roboto-BoldCondensed</string>
+ <key>Size</key>
+ <real>12</real>
+ </dict>
+ <key>ID</key>
+ <integer>213</integer>
+ <key>Magnets</key>
+ <array>
+ <string>{1, 1}</string>
+ <string>{1, -1}</string>
+ <string>{-1, -1}</string>
+ <string>{-1, 1}</string>
+ <string>{0, 1}</string>
+ <string>{0, -1}</string>
+ <string>{1, 0}</string>
+ <string>{-1, 0}</string>
+ <string>{-0.5, -0.233518}</string>
+ <string>{-0.49144199999999999, 0.26006299999999999}</string>
+ <string>{0.50711799999999996, -0.22408600000000001}</string>
+ <string>{0.50711799999999996, 0.267179}</string>
+ <string>{-0.27431, -0.474028}</string>
+ <string>{0.27977999999999997, -0.47847800000000001}</string>
+ <string>{0.29393799999999998, 0.54304399999999997}</string>
+ <string>{-0.28623199999999999, 0.55380399999999996}</string>
+ </array>
+ <key>Shape</key>
+ <string>Rectangle</string>
+ <key>Style</key>
+ <dict>
+ <key>fill</key>
+ <dict>
+ <key>Color</key>
+ <dict>
+ <key>b</key>
+ <string>0.2</string>
+ <key>g</key>
+ <string>0.733333</string>
+ <key>r</key>
+ <string>1</string>
+ </dict>
+ </dict>
+ <key>shadow</key>
+ <dict>
+ <key>Color</key>
+ <dict>
+ <key>a</key>
+ <string>0.35</string>
+ <key>b</key>
+ <string>0.328823</string>
+ <key>g</key>
+ <string>0.328823</string>
+ <key>r</key>
+ <string>0.328823</string>
+ </dict>
+ <key>Fuzziness</key>
+ <real>1.5349206924438477</real>
+ <key>ShadowVector</key>
+ <string>{0, 1}</string>
+ </dict>
+ <key>stroke</key>
+ <dict>
+ <key>Color</key>
+ <dict>
+ <key>b</key>
+ <string>0.131021</string>
+ <key>g</key>
+ <string>0.363196</string>
+ <key>r</key>
+ <string>0.725948</string>
+ </dict>
+ <key>CornerRadius</key>
+ <real>2</real>
+ <key>Draws</key>
+ <string>NO</string>
+ </dict>
+ </dict>
+ <key>Text</key>
+ <dict>
+ <key>Text</key>
+ <string>{\rtf1\ansi\ansicpg1252\cocoartf1265\cocoasubrtf190
+\cocoascreenfonts1{\fonttbl\f0\fswiss\fcharset0 Helvetica;}
+{\colortbl;\red255\green255\blue255;}
+\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\qc
+
+\f0\b\fs24 \cf0 HTTP...}</string>
+ <key>VerticalPad</key>
+ <integer>0</integer>
+ </dict>
+ </dict>
+ <dict>
+ <key>Bounds</key>
+ <string>{{23.966230102539043, 498}, {137.99998474121094, 58.169700622558594}}</string>
+ <key>Class</key>
+ <string>ShapedGraphic</string>
+ <key>FontInfo</key>
+ <dict>
+ <key>Color</key>
+ <dict>
+ <key>b</key>
+ <string>0</string>
+ <key>g</key>
+ <string>0</string>
+ <key>r</key>
+ <string>0</string>
+ </dict>
+ <key>Font</key>
+ <string>Roboto-BoldCondensed</string>
+ <key>Size</key>
+ <real>12</real>
+ </dict>
+ <key>ID</key>
+ <integer>212</integer>
+ <key>Magnets</key>
+ <array>
+ <string>{1, 1}</string>
+ <string>{1, -1}</string>
+ <string>{-1, -1}</string>
+ <string>{-1, 1}</string>
+ <string>{0, 1}</string>
+ <string>{0, -1}</string>
+ <string>{1, 0}</string>
+ <string>{-1, 0}</string>
+ <string>{-0.5, -0.233518}</string>
+ <string>{-0.49144199999999999, 0.26006299999999999}</string>
+ <string>{0.50711799999999996, -0.22408600000000001}</string>
+ <string>{0.50711799999999996, 0.267179}</string>
+ <string>{-0.27431, -0.474028}</string>
+ <string>{0.27977999999999997, -0.47847800000000001}</string>
+ <string>{0.29393799999999998, 0.54304399999999997}</string>
+ <string>{-0.28623199999999999, 0.55380399999999996}</string>
+ </array>
+ <key>Shape</key>
+ <string>Rectangle</string>
+ <key>Style</key>
+ <dict>
+ <key>fill</key>
+ <dict>
+ <key>Color</key>
+ <dict>
+ <key>b</key>
+ <string>0.2</string>
+ <key>g</key>
+ <string>0.733333</string>
+ <key>r</key>
+ <string>1</string>
+ </dict>
+ </dict>
+ <key>shadow</key>
+ <dict>
+ <key>Color</key>
+ <dict>
+ <key>a</key>
+ <string>0.35</string>
+ <key>b</key>
+ <string>0.328823</string>
+ <key>g</key>
+ <string>0.328823</string>
+ <key>r</key>
+ <string>0.328823</string>
+ </dict>
+ <key>Fuzziness</key>
+ <real>1.5349206924438477</real>
+ <key>ShadowVector</key>
+ <string>{0, 1}</string>
+ </dict>
+ <key>stroke</key>
+ <dict>
+ <key>Color</key>
+ <dict>
+ <key>b</key>
+ <string>0.131021</string>
+ <key>g</key>
+ <string>0.363196</string>
+ <key>r</key>
+ <string>0.725948</string>
+ </dict>
+ <key>CornerRadius</key>
+ <real>2</real>
+ <key>Draws</key>
+ <string>NO</string>
+ </dict>
+ </dict>
+ <key>Text</key>
+ <dict>
+ <key>Text</key>
+ <string>{\rtf1\ansi\ansicpg1252\cocoartf1265\cocoasubrtf190
+\cocoascreenfonts1{\fonttbl\f0\fswiss\fcharset0 Helvetica;}
+{\colortbl;\red255\green255\blue255;}
+\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\qc
+
+\f0\b\fs24 \cf0 Request dequeued by NetworkDispatcher}</string>
+ <key>VerticalPad</key>
+ <integer>0</integer>
+ </dict>
+ </dict>
+ <dict>
+ <key>Bounds</key>
+ <string>{{23.966245361328106, 432.24999237060547}, {137.99998474121094, 58.169700622558594}}</string>
+ <key>Class</key>
+ <string>ShapedGraphic</string>
+ <key>FontInfo</key>
+ <dict>
+ <key>Color</key>
+ <dict>
+ <key>b</key>
+ <string>0</string>
+ <key>g</key>
+ <string>0</string>
+ <key>r</key>
+ <string>0</string>
+ </dict>
+ <key>Font</key>
+ <string>Roboto-BoldCondensed</string>
+ <key>Size</key>
+ <real>12</real>
+ </dict>
+ <key>ID</key>
+ <integer>211</integer>
+ <key>Magnets</key>
+ <array>
+ <string>{1, 1}</string>
+ <string>{1, -1}</string>
+ <string>{-1, -1}</string>
+ <string>{-1, 1}</string>
+ <string>{0, 1}</string>
+ <string>{0, -1}</string>
+ <string>{1, 0}</string>
+ <string>{-1, 0}</string>
+ <string>{-0.5, -0.233518}</string>
+ <string>{-0.49144199999999999, 0.26006299999999999}</string>
+ <string>{0.50711799999999996, -0.22408600000000001}</string>
+ <string>{0.50711799999999996, 0.267179}</string>
+ <string>{-0.27431, -0.474028}</string>
+ <string>{0.27977999999999997, -0.47847800000000001}</string>
+ <string>{0.29393799999999998, 0.54304399999999997}</string>
+ <string>{-0.28623199999999999, 0.55380399999999996}</string>
+ </array>
+ <key>Shape</key>
+ <string>Rectangle</string>
+ <key>Style</key>
+ <dict>
+ <key>fill</key>
+ <dict>
+ <key>Color</key>
+ <dict>
+ <key>b</key>
+ <string>0.2</string>
+ <key>g</key>
+ <string>0.733333</string>
+ <key>r</key>
+ <string>1</string>
+ </dict>
+ </dict>
+ <key>shadow</key>
+ <dict>
+ <key>Color</key>
+ <dict>
+ <key>a</key>
+ <string>0.35</string>
+ <key>b</key>
+ <string>0.328823</string>
+ <key>g</key>
+ <string>0.328823</string>
+ <key>r</key>
+ <string>0.328823</string>
+ </dict>
+ <key>Fuzziness</key>
+ <real>1.5349206924438477</real>
+ <key>ShadowVector</key>
+ <string>{0, 1}</string>
+ </dict>
+ <key>stroke</key>
+ <dict>
+ <key>Color</key>
+ <dict>
+ <key>b</key>
+ <string>0.131021</string>
+ <key>g</key>
+ <string>0.363196</string>
+ <key>r</key>
+ <string>0.725948</string>
+ </dict>
+ <key>CornerRadius</key>
+ <real>2</real>
+ <key>Draws</key>
+ <string>NO</string>
+ </dict>
+ </dict>
+ <key>Text</key>
+ <dict>
+ <key>Text</key>
+ <string>{\rtf1\ansi\ansicpg1252\cocoartf1265\cocoasubrtf190
+\cocoascreenfonts1{\fonttbl\f0\fswiss\fcharset0 Helvetica;}
+{\colortbl;\red255\green255\blue255;}
+\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\qc
+
+\f0\b\fs24 \cf0 Request dequeued by NetworkDispatcher}</string>
+ <key>VerticalPad</key>
+ <integer>0</integer>
+ </dict>
+ </dict>
+ <dict>
+ <key>Bounds</key>
+ <string>{{236.81081933593748, 227.99996948242188}, {115.68917846679688, 58.169700622558594}}</string>
+ <key>Class</key>
+ <string>ShapedGraphic</string>
+ <key>FontInfo</key>
+ <dict>
+ <key>Color</key>
+ <dict>
+ <key>b</key>
+ <string>0</string>
+ <key>g</key>
+ <string>0</string>
+ <key>r</key>
+ <string>0</string>
+ </dict>
+ <key>Font</key>
+ <string>Roboto-BoldCondensed</string>
+ <key>Size</key>
+ <real>10</real>
+ </dict>
+ <key>ID</key>
+ <integer>210</integer>
+ <key>Magnets</key>
+ <array>
+ <string>{1, 1}</string>
+ <string>{1, -1}</string>
+ <string>{-1, -1}</string>
+ <string>{-1, 1}</string>
+ <string>{0, 1}</string>
+ <string>{0, -1}</string>
+ <string>{1, 0}</string>
+ <string>{-1, 0}</string>
+ <string>{-0.5, -0.233518}</string>
+ <string>{-0.49144199999999999, 0.26006299999999999}</string>
+ <string>{0.50711799999999996, -0.22408600000000001}</string>
+ <string>{0.50711799999999996, 0.267179}</string>
+ <string>{-0.27431, -0.474028}</string>
+ <string>{0.27977999999999997, -0.47847800000000001}</string>
+ <string>{0.29393799999999998, 0.54304399999999997}</string>
+ <string>{-0.28623199999999999, 0.55380399999999996}</string>
+ </array>
+ <key>Shape</key>
+ <string>Rectangle</string>
+ <key>Style</key>
+ <dict>
+ <key>fill</key>
+ <dict>
+ <key>Color</key>
+ <dict>
+ <key>b</key>
+ <string>0</string>
+ <key>g</key>
+ <string>0.8</string>
+ <key>r</key>
+ <string>0.6</string>
+ </dict>
+ </dict>
+ <key>shadow</key>
+ <dict>
+ <key>Color</key>
+ <dict>
+ <key>a</key>
+ <string>0.35</string>
+ <key>b</key>
+ <string>0.328823</string>
+ <key>g</key>
+ <string>0.328823</string>
+ <key>r</key>
+ <string>0.328823</string>
+ </dict>
+ <key>Fuzziness</key>
+ <real>1.5349206924438477</real>
+ <key>ShadowVector</key>
+ <string>{0, 1}</string>
+ </dict>
+ <key>stroke</key>
+ <dict>
+ <key>Color</key>
+ <dict>
+ <key>b</key>
+ <string>0</string>
+ <key>g</key>
+ <string>0.6</string>
+ <key>r</key>
+ <string>0.4</string>
+ </dict>
+ <key>CornerRadius</key>
+ <real>2</real>
+ <key>Draws</key>
+ <string>NO</string>
+ </dict>
+ </dict>
+ <key>Text</key>
+ <dict>
+ <key>Text</key>
+ <string>{\rtf1\ansi\ansicpg1252\cocoartf1265\cocoasubrtf190
+\cocoascreenfonts1{\fonttbl\f0\fswiss\fcharset0 Helvetica;}
+{\colortbl;\red255\green255\blue255;}
+\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\qc
+
+\f0\b\fs24 \cf0 Request read from cache and parsed}</string>
+ <key>VerticalPad</key>
+ <integer>0</integer>
+ </dict>
+ </dict>
+ <dict>
+ <key>Bounds</key>
+ <string>{{380.5, 107}, {118.18917846679688, 58.169700622558594}}</string>
+ <key>Class</key>
+ <string>ShapedGraphic</string>
+ <key>FontInfo</key>
+ <dict>
+ <key>Color</key>
+ <dict>
+ <key>b</key>
+ <string>0</string>
+ <key>g</key>
+ <string>0</string>
+ <key>r</key>
+ <string>0</string>
+ </dict>
+ <key>Font</key>
+ <string>Roboto-BoldCondensed</string>
+ <key>Size</key>
+ <real>12</real>
+ </dict>
+ <key>ID</key>
+ <integer>209</integer>
+ <key>Magnets</key>
+ <array>
+ <string>{1, 1}</string>
+ <string>{1, -1}</string>
+ <string>{-1, -1}</string>
+ <string>{-1, 1}</string>
+ <string>{0, 1}</string>
+ <string>{0, -1}</string>
+ <string>{1, 0}</string>
+ <string>{-1, 0}</string>
+ <string>{-0.5, -0.233518}</string>
+ <string>{-0.49144199999999999, 0.26006299999999999}</string>
+ <string>{0.50711799999999996, -0.22408600000000001}</string>
+ <string>{0.50711799999999996, 0.267179}</string>
+ <string>{-0.27431, -0.474028}</string>
+ <string>{0.27977999999999997, -0.47847800000000001}</string>
+ <string>{0.29393799999999998, 0.54304399999999997}</string>
+ <string>{-0.28623199999999999, 0.55380399999999996}</string>
+ </array>
+ <key>Shape</key>
+ <string>Rectangle</string>
+ <key>Style</key>
+ <dict>
+ <key>fill</key>
+ <dict>
+ <key>Color</key>
+ <dict>
+ <key>b</key>
+ <string>0.898039</string>
+ <key>g</key>
+ <string>0.709804</string>
+ <key>r</key>
+ <string>0.2</string>
+ </dict>
+ </dict>
+ <key>shadow</key>
+ <dict>
+ <key>Color</key>
+ <dict>
+ <key>a</key>
+ <string>0.35</string>
+ <key>b</key>
+ <string>0.328823</string>
+ <key>g</key>
+ <string>0.328823</string>
+ <key>r</key>
+ <string>0.328823</string>
+ </dict>
+ <key>Fuzziness</key>
+ <real>1.5349206924438477</real>
+ <key>ShadowVector</key>
+ <string>{0, 1}</string>
+ </dict>
+ <key>stroke</key>
+ <dict>
+ <key>Color</key>
+ <dict>
+ <key>b</key>
+ <string>0.93512</string>
+ <key>g</key>
+ <string>0.472602</string>
+ <key>r</key>
+ <string>0.333854</string>
+ </dict>
+ <key>CornerRadius</key>
+ <real>2</real>
+ <key>Draws</key>
+ <string>NO</string>
+ </dict>
+ </dict>
+ <key>Text</key>
+ <dict>
+ <key>Text</key>
+ <string>{\rtf1\ansi\ansicpg1252\cocoartf1265\cocoasubrtf190
+\cocoascreenfonts1{\fonttbl\f0\fswiss\fcharset0 Helvetica;}
+{\colortbl;\red255\green255\blue255;}
+\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\qc
+
+\f0\b\fs24 \cf0 Parsed response delivered on main thread}</string>
+ <key>VerticalPad</key>
+ <integer>0</integer>
+ </dict>
+ </dict>
+ <dict>
+ <key>Bounds</key>
+ <string>{{391, 508.66740417480469}, {137.99996948242188, 23.499996185302734}}</string>
+ <key>Class</key>
+ <string>ShapedGraphic</string>
+ <key>FontInfo</key>
+ <dict>
+ <key>Color</key>
+ <dict>
+ <key>b</key>
+ <string>0</string>
+ <key>g</key>
+ <string>0</string>
+ <key>r</key>
+ <string>0</string>
+ </dict>
+ <key>Font</key>
+ <string>Roboto-BoldCondensed</string>
+ <key>Size</key>
+ <real>10</real>
+ </dict>
+ <key>ID</key>
+ <integer>207</integer>
+ <key>Magnets</key>
+ <array>
+ <string>{1, 1}</string>
+ <string>{1, -1}</string>
+ <string>{-1, -1}</string>
+ <string>{-1, 1}</string>
+ <string>{0, 1}</string>
+ <string>{0, -1}</string>
+ <string>{1, 0}</string>
+ <string>{-1, 0}</string>
+ <string>{-0.5, -0.233518}</string>
+ <string>{-0.49144199999999999, 0.26006299999999999}</string>
+ <string>{0.50711799999999996, -0.22408600000000001}</string>
+ <string>{0.50711799999999996, 0.267179}</string>
+ <string>{-0.27431, -0.474028}</string>
+ <string>{0.27977999999999997, -0.47847800000000001}</string>
+ <string>{0.29393799999999998, 0.54304399999999997}</string>
+ <string>{-0.28623199999999999, 0.55380399999999996}</string>
+ </array>
+ <key>Shape</key>
+ <string>Rectangle</string>
+ <key>Style</key>
+ <dict>
+ <key>fill</key>
+ <dict>
+ <key>Color</key>
+ <dict>
+ <key>b</key>
+ <string>0</string>
+ <key>g</key>
+ <string>0.8</string>
+ <key>r</key>
+ <string>0.6</string>
+ </dict>
+ </dict>
+ <key>shadow</key>
+ <dict>
+ <key>Color</key>
+ <dict>
+ <key>a</key>
+ <string>0.35</string>
+ <key>b</key>
+ <string>0.328823</string>
+ <key>g</key>
+ <string>0.328823</string>
+ <key>r</key>
+ <string>0.328823</string>
+ </dict>
+ <key>Fuzziness</key>
+ <real>1.5349206924438477</real>
+ <key>ShadowVector</key>
+ <string>{0, 1}</string>
+ </dict>
+ <key>stroke</key>
+ <dict>
+ <key>Color</key>
+ <dict>
+ <key>b</key>
+ <string>0</string>
+ <key>g</key>
+ <string>0.6</string>
+ <key>r</key>
+ <string>0.4</string>
+ </dict>
+ <key>CornerRadius</key>
+ <real>2</real>
+ <key>Draws</key>
+ <string>NO</string>
+ </dict>
+ </dict>
+ <key>Text</key>
+ <dict>
+ <key>Text</key>
+ <string>{\rtf1\ansi\ansicpg1252\cocoartf1265\cocoasubrtf190
+\cocoascreenfonts1{\fonttbl\f0\fswiss\fcharset0 Helvetica;}
+{\colortbl;\red255\green255\blue255;}
+\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\qc
+
+\f0\b\fs24 \cf0 cache thread}</string>
+ <key>VerticalPad</key>
+ <integer>0</integer>
+ </dict>
+ </dict>
+ <dict>
+ <key>Bounds</key>
+ <string>{{391, 476.6673583984375}, {137.99996948242188, 23.499980926513672}}</string>
+ <key>Class</key>
+ <string>ShapedGraphic</string>
+ <key>FontInfo</key>
+ <dict>
+ <key>Color</key>
+ <dict>
+ <key>b</key>
+ <string>0</string>
+ <key>g</key>
+ <string>0</string>
+ <key>r</key>
+ <string>0</string>
+ </dict>
+ <key>Font</key>
+ <string>Roboto-BoldCondensed</string>
+ <key>Size</key>
+ <real>12</real>
+ </dict>
+ <key>ID</key>
+ <integer>206</integer>
+ <key>Magnets</key>
+ <array>
+ <string>{1, 1}</string>
+ <string>{1, -1}</string>
+ <string>{-1, -1}</string>
+ <string>{-1, 1}</string>
+ <string>{0, 1}</string>
+ <string>{0, -1}</string>
+ <string>{1, 0}</string>
+ <string>{-1, 0}</string>
+ <string>{-0.5, -0.233518}</string>
+ <string>{-0.49144199999999999, 0.26006299999999999}</string>
+ <string>{0.50711799999999996, -0.22408600000000001}</string>
+ <string>{0.50711799999999996, 0.267179}</string>
+ <string>{-0.27431, -0.474028}</string>
+ <string>{0.27977999999999997, -0.47847800000000001}</string>
+ <string>{0.29393799999999998, 0.54304399999999997}</string>
+ <string>{-0.28623199999999999, 0.55380399999999996}</string>
+ </array>
+ <key>Shape</key>
+ <string>Rectangle</string>
+ <key>Style</key>
+ <dict>
+ <key>fill</key>
+ <dict>
+ <key>Color</key>
+ <dict>
+ <key>b</key>
+ <string>0.898039</string>
+ <key>g</key>
+ <string>0.709804</string>
+ <key>r</key>
+ <string>0.2</string>
+ </dict>
+ </dict>
+ <key>shadow</key>
+ <dict>
+ <key>Color</key>
+ <dict>
+ <key>a</key>
+ <string>0.35</string>
+ <key>b</key>
+ <string>0.328823</string>
+ <key>g</key>
+ <string>0.328823</string>
+ <key>r</key>
+ <string>0.328823</string>
+ </dict>
+ <key>Fuzziness</key>
+ <real>1.5349206924438477</real>
+ <key>ShadowVector</key>
+ <string>{0, 1}</string>
+ </dict>
+ <key>stroke</key>
+ <dict>
+ <key>Color</key>
+ <dict>
+ <key>b</key>
+ <string>0.93512</string>
+ <key>g</key>
+ <string>0.472602</string>
+ <key>r</key>
+ <string>0.333854</string>
+ </dict>
+ <key>CornerRadius</key>
+ <real>2</real>
+ <key>Draws</key>
+ <string>NO</string>
+ </dict>
+ </dict>
+ <key>Text</key>
+ <dict>
+ <key>Text</key>
+ <string>{\rtf1\ansi\ansicpg1252\cocoartf1265\cocoasubrtf190
+\cocoascreenfonts1{\fonttbl\f0\fswiss\fcharset0 Helvetica;}
+{\colortbl;\red255\green255\blue255;}
+\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\qc
+
+\f0\b\fs24 \cf0 main thread}</string>
+ <key>VerticalPad</key>
+ <integer>0</integer>
+ </dict>
+ </dict>
+ <dict>
+ <key>Bounds</key>
+ <string>{{224.48312730407713, 421.74998497962952}, {137.99996948242188, 79.169700622558594}}</string>
+ <key>Class</key>
+ <string>ShapedGraphic</string>
+ <key>FontInfo</key>
+ <dict>
+ <key>Color</key>
+ <dict>
+ <key>b</key>
+ <string>0</string>
+ <key>g</key>
+ <string>0</string>
+ <key>r</key>
+ <string>0</string>
+ </dict>
+ <key>Font</key>
+ <string>Roboto-BoldCondensed</string>
+ <key>Size</key>
+ <real>12</real>
+ </dict>
+ <key>ID</key>
+ <integer>204</integer>
+ <key>Magnets</key>
+ <array>
+ <string>{1, 1}</string>
+ <string>{1, -1}</string>
+ <string>{-1, -1}</string>
+ <string>{-1, 1}</string>
+ <string>{0, 1}</string>
+ <string>{0, -1}</string>
+ <string>{1, 0}</string>
+ <string>{-1, 0}</string>
+ <string>{-0.5, -0.233518}</string>
+ <string>{-0.49144199999999999, 0.26006299999999999}</string>
+ <string>{0.50711799999999996, -0.22408600000000001}</string>
+ <string>{0.50711799999999996, 0.267179}</string>
+ <string>{-0.27431, -0.474028}</string>
+ <string>{0.27977999999999997, -0.47847800000000001}</string>
+ <string>{0.29393799999999998, 0.54304399999999997}</string>
+ <string>{-0.28623199999999999, 0.55380399999999996}</string>
+ </array>
+ <key>Shape</key>
+ <string>Rectangle</string>
+ <key>Style</key>
+ <dict>
+ <key>fill</key>
+ <dict>
+ <key>Color</key>
+ <dict>
+ <key>b</key>
+ <string>0.2</string>
+ <key>g</key>
+ <string>0.733333</string>
+ <key>r</key>
+ <string>1</string>
+ </dict>
+ </dict>
+ <key>shadow</key>
+ <dict>
+ <key>Color</key>
+ <dict>
+ <key>a</key>
+ <string>0.35</string>
+ <key>b</key>
+ <string>0.328823</string>
+ <key>g</key>
+ <string>0.328823</string>
+ <key>r</key>
+ <string>0.328823</string>
+ </dict>
+ <key>Fuzziness</key>
+ <real>1.5349206924438477</real>
+ <key>ShadowVector</key>
+ <string>{0, 1}</string>
+ </dict>
+ <key>stroke</key>
+ <dict>
+ <key>Color</key>
+ <dict>
+ <key>b</key>
+ <string>0.131021</string>
+ <key>g</key>
+ <string>0.363196</string>
+ <key>r</key>
+ <string>0.725948</string>
+ </dict>
+ <key>CornerRadius</key>
+ <real>2</real>
+ <key>Draws</key>
+ <string>NO</string>
+ </dict>
+ </dict>
+ <key>Text</key>
+ <dict>
+ <key>Text</key>
+ <string>{\rtf1\ansi\ansicpg1252\cocoartf1265\cocoasubrtf190
+\cocoascreenfonts1{\fonttbl\f0\fswiss\fcharset0 Helvetica;}
+{\colortbl;\red255\green255\blue255;}
+\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\qc
+
+\f0\b\fs24 \cf0 HTTP transaction, response parse, cache write (if applicable)}</string>
+ <key>VerticalPad</key>
+ <integer>0</integer>
+ </dict>
+ </dict>
+ <dict>
+ <key>Bounds</key>
+ <string>{{224.48311204528807, 390.50226273803713}, {137.99996948242188, 23.499996185302734}}</string>
+ <key>Class</key>
+ <string>ShapedGraphic</string>
+ <key>FontInfo</key>
+ <dict>
+ <key>Color</key>
+ <dict>
+ <key>b</key>
+ <string>0</string>
+ <key>g</key>
+ <string>0</string>
+ <key>r</key>
+ <string>0</string>
+ </dict>
+ <key>Font</key>
+ <string>Roboto-BoldCondensed</string>
+ <key>Size</key>
+ <real>12</real>
+ </dict>
+ <key>ID</key>
+ <integer>203</integer>
+ <key>Magnets</key>
+ <array>
+ <string>{1, 1}</string>
+ <string>{1, -1}</string>
+ <string>{-1, -1}</string>
+ <string>{-1, 1}</string>
+ <string>{0, 1}</string>
+ <string>{0, -1}</string>
+ <string>{1, 0}</string>
+ <string>{-1, 0}</string>
+ <string>{-0.5, -0.233518}</string>
+ <string>{-0.49144199999999999, 0.26006299999999999}</string>
+ <string>{0.50711799999999996, -0.22408600000000001}</string>
+ <string>{0.50711799999999996, 0.267179}</string>
+ <string>{-0.27431, -0.474028}</string>
+ <string>{0.27977999999999997, -0.47847800000000001}</string>
+ <string>{0.29393799999999998, 0.54304399999999997}</string>
+ <string>{-0.28623199999999999, 0.55380399999999996}</string>
+ </array>
+ <key>Shape</key>
+ <string>Rectangle</string>
+ <key>Style</key>
+ <dict>
+ <key>fill</key>
+ <dict>
+ <key>Color</key>
+ <dict>
+ <key>b</key>
+ <string>0.2</string>
+ <key>g</key>
+ <string>0.733333</string>
+ <key>r</key>
+ <string>1</string>
+ </dict>
+ </dict>
+ <key>shadow</key>
+ <dict>
+ <key>Color</key>
+ <dict>
+ <key>a</key>
+ <string>0.35</string>
+ <key>b</key>
+ <string>0.328823</string>
+ <key>g</key>
+ <string>0.328823</string>
+ <key>r</key>
+ <string>0.328823</string>
+ </dict>
+ <key>Fuzziness</key>
+ <real>1.5349206924438477</real>
+ <key>ShadowVector</key>
+ <string>{0, 1}</string>
+ </dict>
+ <key>stroke</key>
+ <dict>
+ <key>Color</key>
+ <dict>
+ <key>b</key>
+ <string>0.131021</string>
+ <key>g</key>
+ <string>0.363196</string>
+ <key>r</key>
+ <string>0.725948</string>
+ </dict>
+ <key>CornerRadius</key>
+ <real>2</real>
+ <key>Draws</key>
+ <string>NO</string>
+ </dict>
+ </dict>
+ <key>Text</key>
+ <dict>
+ <key>Text</key>
+ <string>{\rtf1\ansi\ansicpg1252\cocoartf1265\cocoasubrtf190
+\cocoascreenfonts1{\fonttbl\f0\fswiss\fcharset0 Helvetica;}
+{\colortbl;\red255\green255\blue255;}
+\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\qc
+
+\f0\b\fs24 \cf0 HTTP...}</string>
+ <key>VerticalPad</key>
+ <integer>0</integer>
+ </dict>
+ </dict>
+ <dict>
+ <key>Bounds</key>
+ <string>{{23.966245361328106, 366.5}, {137.99998474121094, 58.169700622558594}}</string>
+ <key>Class</key>
+ <string>ShapedGraphic</string>
+ <key>FontInfo</key>
+ <dict>
+ <key>Color</key>
+ <dict>
+ <key>b</key>
+ <string>0</string>
+ <key>g</key>
+ <string>0</string>
+ <key>r</key>
+ <string>0</string>
+ </dict>
+ <key>Font</key>
+ <string>Roboto-BoldCondensed</string>
+ <key>Size</key>
+ <real>12</real>
+ </dict>
+ <key>ID</key>
+ <integer>200</integer>
+ <key>Magnets</key>
+ <array>
+ <string>{1, 1}</string>
+ <string>{1, -1}</string>
+ <string>{-1, -1}</string>
+ <string>{-1, 1}</string>
+ <string>{0, 1}</string>
+ <string>{0, -1}</string>
+ <string>{1, 0}</string>
+ <string>{-1, 0}</string>
+ <string>{-0.5, -0.233518}</string>
+ <string>{-0.49144199999999999, 0.26006299999999999}</string>
+ <string>{0.50711799999999996, -0.22408600000000001}</string>
+ <string>{0.50711799999999996, 0.267179}</string>
+ <string>{-0.27431, -0.474028}</string>
+ <string>{0.27977999999999997, -0.47847800000000001}</string>
+ <string>{0.29393799999999998, 0.54304399999999997}</string>
+ <string>{-0.28623199999999999, 0.55380399999999996}</string>
+ </array>
+ <key>Shape</key>
+ <string>Rectangle</string>
+ <key>Style</key>
+ <dict>
+ <key>fill</key>
+ <dict>
+ <key>Color</key>
+ <dict>
+ <key>b</key>
+ <string>0.2</string>
+ <key>g</key>
+ <string>0.733333</string>
+ <key>r</key>
+ <string>1</string>
+ </dict>
+ </dict>
+ <key>shadow</key>
+ <dict>
+ <key>Color</key>
+ <dict>
+ <key>a</key>
+ <string>0.35</string>
+ <key>b</key>
+ <string>0.328823</string>
+ <key>g</key>
+ <string>0.328823</string>
+ <key>r</key>
+ <string>0.328823</string>
+ </dict>
+ <key>Fuzziness</key>
+ <real>1.5349206924438477</real>
+ <key>ShadowVector</key>
+ <string>{0, 1}</string>
+ </dict>
+ <key>stroke</key>
+ <dict>
+ <key>Color</key>
+ <dict>
+ <key>b</key>
+ <string>0.131021</string>
+ <key>g</key>
+ <string>0.363196</string>
+ <key>r</key>
+ <string>0.725948</string>
+ </dict>
+ <key>CornerRadius</key>
+ <real>2</real>
+ <key>Draws</key>
+ <string>NO</string>
+ </dict>
+ </dict>
+ <key>Text</key>
+ <dict>
+ <key>Text</key>
+ <string>{\rtf1\ansi\ansicpg1252\cocoartf1265\cocoasubrtf190
+\cocoascreenfonts1{\fonttbl\f0\fswiss\fcharset0 Helvetica;}
+{\colortbl;\red255\green255\blue255;}
+\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\qc
+
+\f0\b\fs24 \cf0 Request dequeued by NetworkDispatcher}</string>
+ <key>VerticalPad</key>
+ <integer>0</integer>
+ </dict>
+ </dict>
+ <dict>
+ <key>Bounds</key>
+ <string>{{35.121640869140606, 227.99999237060547}, {115.68917846679688, 58.169700622558594}}</string>
+ <key>Class</key>
+ <string>ShapedGraphic</string>
+ <key>FontInfo</key>
+ <dict>
+ <key>Color</key>
+ <dict>
+ <key>b</key>
+ <string>0</string>
+ <key>g</key>
+ <string>0</string>
+ <key>r</key>
+ <string>0</string>
+ </dict>
+ <key>Font</key>
+ <string>Roboto-BoldCondensed</string>
+ <key>Size</key>
+ <real>10</real>
+ </dict>
+ <key>ID</key>
+ <integer>4</integer>
+ <key>Magnets</key>
+ <array>
+ <string>{1, 1}</string>
+ <string>{1, -1}</string>
+ <string>{-1, -1}</string>
+ <string>{-1, 1}</string>
+ <string>{0, 1}</string>
+ <string>{0, -1}</string>
+ <string>{1, 0}</string>
+ <string>{-1, 0}</string>
+ <string>{-0.5, -0.233518}</string>
+ <string>{-0.49144199999999999, 0.26006299999999999}</string>
+ <string>{0.50711799999999996, -0.22408600000000001}</string>
+ <string>{0.50711799999999996, 0.267179}</string>
+ <string>{-0.27431, -0.474028}</string>
+ <string>{0.27977999999999997, -0.47847800000000001}</string>
+ <string>{0.29393799999999998, 0.54304399999999997}</string>
+ <string>{-0.28623199999999999, 0.55380399999999996}</string>
+ </array>
+ <key>Shape</key>
+ <string>Rectangle</string>
+ <key>Style</key>
+ <dict>
+ <key>fill</key>
+ <dict>
+ <key>Color</key>
+ <dict>
+ <key>b</key>
+ <string>0</string>
+ <key>g</key>
+ <string>0.8</string>
+ <key>r</key>
+ <string>0.6</string>
+ </dict>
+ </dict>
+ <key>shadow</key>
+ <dict>
+ <key>Color</key>
+ <dict>
+ <key>a</key>
+ <string>0.35</string>
+ <key>b</key>
+ <string>0.328823</string>
+ <key>g</key>
+ <string>0.328823</string>
+ <key>r</key>
+ <string>0.328823</string>
+ </dict>
+ <key>Fuzziness</key>
+ <real>1.5349206924438477</real>
+ <key>ShadowVector</key>
+ <string>{0, 1}</string>
+ </dict>
+ <key>stroke</key>
+ <dict>
+ <key>Color</key>
+ <dict>
+ <key>b</key>
+ <string>0</string>
+ <key>g</key>
+ <string>0.6</string>
+ <key>r</key>
+ <string>0.4</string>
+ </dict>
+ <key>CornerRadius</key>
+ <real>2</real>
+ <key>Draws</key>
+ <string>NO</string>
+ </dict>
+ </dict>
+ <key>Text</key>
+ <dict>
+ <key>Text</key>
+ <string>{\rtf1\ansi\ansicpg1252\cocoartf1265\cocoasubrtf190
+\cocoascreenfonts1{\fonttbl\f0\fswiss\fcharset0 Helvetica;}
+{\colortbl;\red255\green255\blue255;}
+\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\qc
+
+\f0\b\fs24 \cf0 Request dequeued by CacheDispatcher}</string>
+ <key>VerticalPad</key>
+ <integer>0</integer>
+ </dict>
+ </dict>
+ <dict>
+ <key>Bounds</key>
+ <string>{{35.121638671874962, 107}, {118.18917846679688, 58.169700622558594}}</string>
+ <key>Class</key>
+ <string>ShapedGraphic</string>
+ <key>FontInfo</key>
+ <dict>
+ <key>Color</key>
+ <dict>
+ <key>b</key>
+ <string>0</string>
+ <key>g</key>
+ <string>0</string>
+ <key>r</key>
+ <string>0</string>
+ </dict>
+ <key>Font</key>
+ <string>Roboto-BoldCondensed</string>
+ <key>Size</key>
+ <real>12</real>
+ </dict>
+ <key>ID</key>
+ <integer>157</integer>
+ <key>Magnets</key>
+ <array>
+ <string>{1, 1}</string>
+ <string>{1, -1}</string>
+ <string>{-1, -1}</string>
+ <string>{-1, 1}</string>
+ <string>{0, 1}</string>
+ <string>{0, -1}</string>
+ <string>{1, 0}</string>
+ <string>{-1, 0}</string>
+ <string>{-0.5, -0.233518}</string>
+ <string>{-0.49144199999999999, 0.26006299999999999}</string>
+ <string>{0.50711799999999996, -0.22408600000000001}</string>
+ <string>{0.50711799999999996, 0.267179}</string>
+ <string>{-0.27431, -0.474028}</string>
+ <string>{0.27977999999999997, -0.47847800000000001}</string>
+ <string>{0.29393799999999998, 0.54304399999999997}</string>
+ <string>{-0.28623199999999999, 0.55380399999999996}</string>
+ </array>
+ <key>Shape</key>
+ <string>Rectangle</string>
+ <key>Style</key>
+ <dict>
+ <key>fill</key>
+ <dict>
+ <key>Color</key>
+ <dict>
+ <key>b</key>
+ <string>0.898039</string>
+ <key>g</key>
+ <string>0.709804</string>
+ <key>r</key>
+ <string>0.2</string>
+ </dict>
+ </dict>
+ <key>shadow</key>
+ <dict>
+ <key>Color</key>
+ <dict>
+ <key>a</key>
+ <string>0.35</string>
+ <key>b</key>
+ <string>0.328823</string>
+ <key>g</key>
+ <string>0.328823</string>
+ <key>r</key>
+ <string>0.328823</string>
+ </dict>
+ <key>Fuzziness</key>
+ <real>1.5349206924438477</real>
+ <key>ShadowVector</key>
+ <string>{0, 1}</string>
+ </dict>
+ <key>stroke</key>
+ <dict>
+ <key>Color</key>
+ <dict>
+ <key>b</key>
+ <string>0.93512</string>
+ <key>g</key>
+ <string>0.472602</string>
+ <key>r</key>
+ <string>0.333854</string>
+ </dict>
+ <key>CornerRadius</key>
+ <real>2</real>
+ <key>Draws</key>
+ <string>NO</string>
+ </dict>
+ </dict>
+ <key>Text</key>
+ <dict>
+ <key>Text</key>
+ <string>{\rtf1\ansi\ansicpg1252\cocoartf1265\cocoasubrtf190
+\cocoascreenfonts1{\fonttbl\f0\fswiss\fcharset0 Helvetica;}
+{\colortbl;\red255\green255\blue255;}
+\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\qc
+
+\f0\b\fs24 \cf0 Request added to queue in priority order}</string>
+ <key>VerticalPad</key>
+ <integer>0</integer>
+ </dict>
+ </dict>
+ <dict>
+ <key>Class</key>
+ <string>Group</string>
+ <key>Graphics</key>
+ <array>
+ <dict>
+ <key>Bounds</key>
+ <string>{{20.00199264625337, 331.00000000000006}, {145.92853034472586, 25.419100784950434}}</string>
+ <key>Class</key>
+ <string>ShapedGraphic</string>
+ <key>FontInfo</key>
+ <dict>
+ <key>Color</key>
+ <dict>
+ <key>a</key>
+ <string>0.65</string>
+ <key>b</key>
+ <string>0</string>
+ <key>g</key>
+ <string>0</string>
+ <key>r</key>
+ <string>0</string>
+ </dict>
+ <key>Font</key>
+ <string>Roboto-Condensed</string>
+ <key>Size</key>
+ <real>12</real>
+ </dict>
+ <key>ID</key>
+ <integer>1972</integer>
+ <key>Shape</key>
+ <string>Rectangle</string>
+ <key>Style</key>
+ <dict>
+ <key>fill</key>
+ <dict>
+ <key>Draws</key>
+ <string>NO</string>
+ </dict>
+ <key>shadow</key>
+ <dict>
+ <key>Draws</key>
+ <string>NO</string>
+ </dict>
+ <key>stroke</key>
+ <dict>
+ <key>Draws</key>
+ <string>NO</string>
+ </dict>
+ </dict>
+ <key>Text</key>
+ <dict>
+ <key>Pad</key>
+ <integer>2</integer>
+ </dict>
+ </dict>
+ <dict>
+ <key>Bounds</key>
+ <string>{{6.671600341796875, 356.41910654608148}, {172.58927917480466, 212.02962392266838}}</string>
+ <key>Class</key>
+ <string>ShapedGraphic</string>
+ <key>FontInfo</key>
+ <dict>
+ <key>Color</key>
+ <dict>
+ <key>a</key>
+ <string>0.65</string>
+ <key>w</key>
+ <string>0</string>
+ </dict>
+ <key>Font</key>
+ <string>Roboto-BoldCondensed</string>
+ <key>Size</key>
+ <real>12</real>
+ </dict>
+ <key>ID</key>
+ <integer>1973</integer>
+ <key>Magnets</key>
+ <array>
+ <string>{0, 1}</string>
+ <string>{0, -1}</string>
+ <string>{1, 0}</string>
+ <string>{-1, 0}</string>
+ </array>
+ <key>Shape</key>
+ <string>Rectangle</string>
+ <key>Style</key>
+ <dict>
+ <key>fill</key>
+ <dict>
+ <key>Draws</key>
+ <string>NO</string>
+ </dict>
+ <key>shadow</key>
+ <dict>
+ <key>Draws</key>
+ <string>NO</string>
+ </dict>
+ <key>stroke</key>
+ <dict>
+ <key>Color</key>
+ <dict>
+ <key>b</key>
+ <string>0.578326</string>
+ <key>g</key>
+ <string>0.578615</string>
+ <key>r</key>
+ <string>0.578453</string>
+ </dict>
+ <key>CornerRadius</key>
+ <real>5</real>
+ <key>Pattern</key>
+ <integer>1</integer>
+ </dict>
+ </dict>
+ <key>Text</key>
+ <dict>
+ <key>VerticalPad</key>
+ <integer>10</integer>
+ </dict>
+ <key>TextPlacement</key>
+ <integer>0</integer>
+ </dict>
+ </array>
+ <key>ID</key>
+ <integer>1971</integer>
+ </dict>
+ </array>
+ <key>GridInfo</key>
+ <dict/>
+ <key>GuidesLocked</key>
+ <string>NO</string>
+ <key>GuidesVisible</key>
+ <string>YES</string>
+ <key>HPages</key>
+ <integer>1</integer>
+ <key>ImageCounter</key>
+ <integer>1</integer>
+ <key>KeepToScale</key>
+ <false/>
+ <key>Layers</key>
+ <array>
+ <dict>
+ <key>Lock</key>
+ <string>NO</string>
+ <key>Name</key>
+ <string>Layer 1</string>
+ <key>Print</key>
+ <string>YES</string>
+ <key>View</key>
+ <string>YES</string>
+ </dict>
+ </array>
+ <key>LayoutInfo</key>
+ <dict>
+ <key>Animate</key>
+ <string>NO</string>
+ <key>circoMinDist</key>
+ <real>18</real>
+ <key>circoSeparation</key>
+ <real>0.0</real>
+ <key>layoutEngine</key>
+ <string>dot</string>
+ <key>neatoSeparation</key>
+ <real>0.0</real>
+ <key>twopiSeparation</key>
+ <real>0.0</real>
+ </dict>
+ <key>LinksVisible</key>
+ <string>NO</string>
+ <key>MagnetsVisible</key>
+ <string>NO</string>
+ <key>MasterSheets</key>
+ <array/>
+ <key>ModificationDate</key>
+ <string>2014-03-24 23:38:43 +0000</string>
+ <key>Modifier</key>
+ <string>Katie McCormick</string>
+ <key>NotesVisible</key>
+ <string>NO</string>
+ <key>Orientation</key>
+ <integer>2</integer>
+ <key>OriginVisible</key>
+ <string>NO</string>
+ <key>PageBreaks</key>
+ <string>YES</string>
+ <key>PrintInfo</key>
+ <dict>
+ <key>NSBottomMargin</key>
+ <array>
+ <string>float</string>
+ <string>41</string>
+ </array>
+ <key>NSHorizonalPagination</key>
+ <array>
+ <string>coded</string>
+ <string>BAtzdHJlYW10eXBlZIHoA4QBQISEhAhOU051bWJlcgCEhAdOU1ZhbHVlAISECE5TT2JqZWN0AIWEASqEhAFxlwCG</string>
+ </array>
+ <key>NSLeftMargin</key>
+ <array>
+ <string>float</string>
+ <string>18</string>
+ </array>
+ <key>NSPaperSize</key>
+ <array>
+ <string>size</string>
+ <string>{612, 792}</string>
+ </array>
+ <key>NSPrintReverseOrientation</key>
+ <array>
+ <string>int</string>
+ <string>0</string>
+ </array>
+ <key>NSRightMargin</key>
+ <array>
+ <string>float</string>
+ <string>18</string>
+ </array>
+ <key>NSTopMargin</key>
+ <array>
+ <string>float</string>
+ <string>18</string>
+ </array>
+ </dict>
+ <key>PrintOnePage</key>
+ <false/>
+ <key>ReadOnly</key>
+ <string>NO</string>
+ <key>RowAlign</key>
+ <integer>1</integer>
+ <key>RowSpacing</key>
+ <real>36</real>
+ <key>SheetTitle</key>
+ <string>Canvas 1</string>
+ <key>SmartAlignmentGuidesActive</key>
+ <string>YES</string>
+ <key>SmartDistanceGuidesActive</key>
+ <string>YES</string>
+ <key>UniqueID</key>
+ <integer>1</integer>
+ <key>UseEntirePage</key>
+ <false/>
+ <key>VPages</key>
+ <integer>1</integer>
+ <key>WindowInfo</key>
+ <dict>
+ <key>CurrentSheet</key>
+ <integer>0</integer>
+ <key>ExpandedCanvases</key>
+ <array>
+ <dict>
+ <key>name</key>
+ <string>Canvas 1</string>
+ </dict>
+ </array>
+ <key>Frame</key>
+ <string>{{159, 135}, {899, 874}}</string>
+ <key>ListView</key>
+ <true/>
+ <key>OutlineWidth</key>
+ <integer>142</integer>
+ <key>RightSidebar</key>
+ <false/>
+ <key>ShowRuler</key>
+ <true/>
+ <key>Sidebar</key>
+ <true/>
+ <key>SidebarWidth</key>
+ <integer>120</integer>
+ <key>VisibleRegion</key>
+ <string>{{-94, -1}, {764, 735}}</string>
+ <key>Zoom</key>
+ <real>1</real>
+ <key>ZoomValues</key>
+ <array>
+ <array>
+ <string>Canvas 1</string>
+ <real>1</real>
+ <real>1</real>
+ </array>
+ </array>
+ </dict>
+</dict>
+</plist>
diff --git a/drm/jni/android_drm_DrmManagerClient.cpp b/drm/jni/android_drm_DrmManagerClient.cpp
index de8531b..d321baf 100644
--- a/drm/jni/android_drm_DrmManagerClient.cpp
+++ b/drm/jni/android_drm_DrmManagerClient.cpp
@@ -233,7 +233,7 @@
static void android_drm_DrmManagerClient_release(
JNIEnv* env, jobject thiz, jint uniqueId) {
ALOGV("release - Enter");
- DrmManagerClientImpl::remove(uniqueId);
+ getDrmManagerClientImpl(env, thiz)->remove(uniqueId);
getDrmManagerClientImpl(env, thiz)->setOnInfoListener(uniqueId, NULL);
sp<DrmManagerClientImpl> oldClient = setDrmManagerClientImpl(env, thiz, NULL);
diff --git a/keystore/java/android/security/KeyPairGeneratorSpec.java b/keystore/java/android/security/KeyPairGeneratorSpec.java
index 21d6caa..4a823cc 100644
--- a/keystore/java/android/security/KeyPairGeneratorSpec.java
+++ b/keystore/java/android/security/KeyPairGeneratorSpec.java
@@ -35,7 +35,7 @@
/**
* This provides the required parameters needed for initializing the
* {@code KeyPairGenerator} that works with
- * <a href="{@docRoot}guide/topics/security/keystore.html">Android KeyStore
+ * <a href="{@docRoot}training/articles/keystore.html">Android KeyStore
* facility</a>. The Android KeyStore facility is accessed through a
* {@link java.security.KeyPairGenerator} API using the {@code AndroidKeyStore}
* provider. The {@code context} passed in may be used to pop up some UI to ask
@@ -306,7 +306,7 @@
* Builder class for {@link KeyPairGeneratorSpec} objects.
* <p>
* This will build a parameter spec for use with the <a href="{@docRoot}
- * guide/topics/security/keystore.html">Android KeyStore facility</a>.
+ * training/articles/keystore.html">Android KeyStore facility</a>.
* <p>
* The required fields must be filled in with the builder.
* <p>
diff --git a/keystore/java/android/security/KeyStoreParameter.java b/keystore/java/android/security/KeyStoreParameter.java
index 621a605..fb5c859 100644
--- a/keystore/java/android/security/KeyStoreParameter.java
+++ b/keystore/java/android/security/KeyStoreParameter.java
@@ -27,7 +27,7 @@
/**
* This provides the optional parameters that can be specified for
* {@code KeyStore} entries that work with
- * <a href="{@docRoot}guide/topics/security/keystore.html">Android KeyStore
+ * <a href="{@docRoot}training/articles/keystore.html">Android KeyStore
* facility</a>. The Android KeyStore facility is accessed through a
* {@link java.security.KeyStore} API using the {@code AndroidKeyStore}
* provider. The {@code context} passed in may be used to pop up some UI to ask
@@ -70,7 +70,7 @@
* Builder class for {@link KeyStoreParameter} objects.
* <p>
* This will build protection parameters for use with the
- * <a href="{@docRoot}guide/topics/security/keystore.html">Android KeyStore
+ * <a href="{@docRoot}training/articles/keystore.html">Android KeyStore
* facility</a>.
* <p>
* This can be used to require that KeyStore entries be stored encrypted.
diff --git a/policy/src/com/android/internal/policy/impl/PhoneWindow.java b/policy/src/com/android/internal/policy/impl/PhoneWindow.java
index c670b5c..610f6cf 100644
--- a/policy/src/com/android/internal/policy/impl/PhoneWindow.java
+++ b/policy/src/com/android/internal/policy/impl/PhoneWindow.java
@@ -2259,7 +2259,6 @@
protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
final DisplayMetrics metrics = getContext().getResources().getDisplayMetrics();
final boolean isPortrait = metrics.widthPixels < metrics.heightPixels;
-
final int widthMode = getMode(widthMeasureSpec);
final int heightMode = getMode(heightMeasureSpec);
@@ -2306,11 +2305,17 @@
if (mOutsetBottom != null) {
int mode = MeasureSpec.getMode(heightMeasureSpec);
- if (mode != MeasureSpec.UNSPECIFIED) {
+ if (mode != MeasureSpec.UNSPECIFIED && !isPortrait) {
int outset = (int) mOutsetBottom.getDimension(metrics);
int height = MeasureSpec.getSize(heightMeasureSpec);
heightMeasureSpec = MeasureSpec.makeMeasureSpec(height + outset, mode);
}
+ mode = MeasureSpec.getMode(widthMeasureSpec);
+ if (mode != MeasureSpec.UNSPECIFIED && isPortrait) {
+ int outset = (int) mOutsetBottom.getDimension(metrics);
+ int width = MeasureSpec.getSize(widthMeasureSpec);
+ widthMeasureSpec = MeasureSpec.makeMeasureSpec(width + outset, mode);
+ }
}
super.onMeasure(widthMeasureSpec, heightMeasureSpec);
diff --git a/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java b/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java
index 38845b5..c096bb7 100644
--- a/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java
+++ b/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java
@@ -297,6 +297,7 @@
boolean mSystemReady;
boolean mSystemBooted;
boolean mHdmiPlugged;
+ IUiModeManager mUiModeManager;
int mUiMode;
int mDockMode = Intent.EXTRA_DOCK_STATE_UNDOCKED;
int mLidOpenRotation;
@@ -3920,11 +3921,6 @@
+ " policyFlags=" + Integer.toHexString(policyFlags));
}
- if (down && (policyFlags & WindowManagerPolicy.FLAG_VIRTUAL) != 0
- && event.getRepeatCount() == 0) {
- performHapticFeedbackLw(null, HapticFeedbackConstants.VIRTUAL_KEY, false);
- }
-
// Basic policy based on interactive state.
int result;
boolean isWakeKey = (policyFlags & (WindowManagerPolicy.FLAG_WAKE
@@ -3947,6 +3943,10 @@
return result;
}
+ boolean useHapticFeedback = down
+ && (policyFlags & WindowManagerPolicy.FLAG_VIRTUAL) != 0
+ && event.getRepeatCount() == 0;
+
// Handle special keys.
switch (keyCode) {
case KeyEvent.KEYCODE_VOLUME_DOWN:
@@ -4102,6 +4102,9 @@
case KeyEvent.KEYCODE_SLEEP: {
result &= ~ACTION_PASS_TO_USER;
+ if (!mPowerManager.isInteractive()) {
+ useHapticFeedback = false; // suppress feedback if already non-interactive
+ }
mPowerManager.goToSleep(event.getEventTime());
isWakeKey = false;
break;
@@ -4176,6 +4179,10 @@
}
}
+ if (useHapticFeedback) {
+ performHapticFeedbackLw(null, HapticFeedbackConstants.VIRTUAL_KEY, false);
+ }
+
if (isWakeKey) {
mPowerManager.wakeUp(event.getEventTime());
}
@@ -4756,6 +4763,7 @@
mKeyguardDelegate = new KeyguardServiceDelegate(mContext, null);
mKeyguardDelegate.onSystemReady();
+ updateUiMode();
synchronized (mLock) {
updateOrientationListenerLp();
mSystemReady = true;
@@ -4932,6 +4940,17 @@
}
}
+ void updateUiMode() {
+ if (mUiModeManager == null) {
+ mUiModeManager = IUiModeManager.Stub.asInterface(
+ ServiceManager.getService(Context.UI_MODE_SERVICE));
+ }
+ try {
+ mUiMode = mUiModeManager.getCurrentModeType();
+ } catch (RemoteException e) {
+ }
+ }
+
void updateRotation(boolean alwaysSendConfiguration) {
try {
//set orientation on WindowManager
@@ -4977,6 +4996,12 @@
if (ENABLE_DESK_DOCK_HOME_CAPTURE) {
intent = mDeskDockIntent;
}
+ } else if (mUiMode == Configuration.UI_MODE_TYPE_WATCH
+ && (mDockMode == Intent.EXTRA_DOCK_STATE_DESK
+ || mDockMode == Intent.EXTRA_DOCK_STATE_HE_DESK
+ || mDockMode == Intent.EXTRA_DOCK_STATE_LE_DESK)) {
+ // Always launch dock home from home when watch is docked, if it exists.
+ intent = mDeskDockIntent;
}
if (intent == null) {
diff --git a/services/core/java/com/android/server/ConnectivityService.java b/services/core/java/com/android/server/ConnectivityService.java
index 57ee031..8e08583 100644
--- a/services/core/java/com/android/server/ConnectivityService.java
+++ b/services/core/java/com/android/server/ConnectivityService.java
@@ -4152,7 +4152,9 @@
mIsProvisioningNetwork.set(true);
MobileDataStateTracker mdst = (MobileDataStateTracker)
mNetTrackers[ConnectivityManager.TYPE_MOBILE];
- mdst.setInternalDataEnable(false);
+
+ // Disable radio until user starts provisioning
+ mdst.setRadio(false);
} else {
if (DBG) log("CheckMp.onComplete: warm (no dns/tcp), no url");
}
@@ -4658,17 +4660,24 @@
// Mark notification as not visible
setProvNotificationVisible(false, ConnectivityManager.TYPE_MOBILE_HIPRI, null, null);
- // If provisioning network handle as a special case,
+ // Check airplane mode
+ boolean isAirplaneModeOn = Settings.System.getInt(mContext.getContentResolver(),
+ Settings.Global.AIRPLANE_MODE_ON, 0) == 1;
+ // If provisioning network and not in airplane mode handle as a special case,
// otherwise launch browser with the intent directly.
- if (mIsProvisioningNetwork.get()) {
+ if (mIsProvisioningNetwork.get() && !isAirplaneModeOn) {
if (DBG) log("handleMobileProvisioningAction: on prov network enable then launch");
+ mIsProvisioningNetwork.set(false);
mIsStartingProvisioning.set(true);
MobileDataStateTracker mdst = (MobileDataStateTracker)
mNetTrackers[ConnectivityManager.TYPE_MOBILE];
+ // Radio was disabled on CMP_RESULT_CODE_PROVISIONING_NETWORK, enable it here
+ mdst.setRadio(true);
mdst.setEnableFailFastMobileData(DctConstants.ENABLED);
mdst.enableMobileProvisioning(url);
} else {
if (DBG) log("handleMobileProvisioningAction: not prov network, launch browser directly");
+ mIsProvisioningNetwork.set(false);
Intent newIntent = Intent.makeMainSelectorActivity(Intent.ACTION_MAIN,
Intent.CATEGORY_APP_BROWSER);
newIntent.setData(Uri.parse(url));
diff --git a/services/core/java/com/android/server/am/ActivityStack.java b/services/core/java/com/android/server/am/ActivityStack.java
index e4b196e..d894e4e 100755
--- a/services/core/java/com/android/server/am/ActivityStack.java
+++ b/services/core/java/com/android/server/am/ActivityStack.java
@@ -32,12 +32,11 @@
import static com.android.server.am.ActivityStackSupervisor.DEBUG_ADD_REMOVE;
import static com.android.server.am.ActivityStackSupervisor.DEBUG_APP;
+import static com.android.server.am.ActivityStackSupervisor.DEBUG_CONTAINERS;
import static com.android.server.am.ActivityStackSupervisor.DEBUG_SAVED_STATE;
import static com.android.server.am.ActivityStackSupervisor.DEBUG_STATES;
import static com.android.server.am.ActivityStackSupervisor.HOME_STACK_ID;
-import static com.android.server.am.ActivityStackSupervisor.ActivityContainer.CONTAINER_STATE_HAS_SURFACE;
-
import com.android.internal.os.BatteryStatsImpl;
import com.android.server.Watchdog;
import com.android.server.am.ActivityManagerService.ItemMatcher;
@@ -1275,7 +1274,7 @@
ActivityRecord parent = mActivityContainer.mParentActivity;
if ((parent != null && parent.state != ActivityState.RESUMED) ||
- !mActivityContainer.isAttached()) {
+ !mActivityContainer.isAttachedLocked()) {
// Do not resume this stack if its parent is not resumed.
// TODO: If in a loop, make sure that parent stack resumeTopActivity is called 1st.
return false;
@@ -2539,11 +2538,14 @@
|| prevState == ActivityState.INITIALIZING) {
// If this activity is already stopped, we can just finish
// it right now.
- boolean activityRemoved = destroyActivityLocked(r, true,
- oomAdj, "finish-imm");
+ r.makeFinishing();
+ boolean activityRemoved = destroyActivityLocked(r, true, oomAdj, "finish-imm");
if (activityRemoved) {
mStackSupervisor.resumeTopActivitiesLocked();
}
+ if (DEBUG_CONTAINERS) Slog.d(TAG,
+ "destroyActivityLocked: finishCurrentActivityLocked r=" + r +
+ " destroy returned removed=" + activityRemoved);
return activityRemoved ? null : r;
}
@@ -2912,6 +2914,7 @@
if (r != null) {
mHandler.removeMessages(DESTROY_TIMEOUT_MSG, r);
}
+ if (DEBUG_CONTAINERS) Slog.d(TAG, "activityDestroyedLocked: r=" + r);
if (isInStackLocked(token) != null) {
if (r.state == ActivityState.DESTROYING) {
@@ -3669,6 +3672,7 @@
mStacks.remove(this);
mStacks.add(0, this);
}
+ mActivityContainer.onTaskListEmptyLocked();
}
}
diff --git a/services/core/java/com/android/server/am/ActivityStackSupervisor.java b/services/core/java/com/android/server/am/ActivityStackSupervisor.java
index be37ee2..bca215dd 100644
--- a/services/core/java/com/android/server/am/ActivityStackSupervisor.java
+++ b/services/core/java/com/android/server/am/ActivityStackSupervisor.java
@@ -105,6 +105,7 @@
static final boolean DEBUG_SAVED_STATE = DEBUG || false;
static final boolean DEBUG_STATES = DEBUG || false;
static final boolean DEBUG_IDLE = DEBUG || false;
+ static final boolean DEBUG_CONTAINERS = DEBUG || false;
public static final int HOME_STACK_ID = 0;
@@ -126,6 +127,8 @@
static final int HANDLE_DISPLAY_CHANGED = FIRST_SUPERVISOR_STACK_MSG + 6;
static final int HANDLE_DISPLAY_REMOVED = FIRST_SUPERVISOR_STACK_MSG + 7;
static final int CONTAINER_CALLBACK_VISIBILITY = FIRST_SUPERVISOR_STACK_MSG + 8;
+ static final int CONTAINER_CALLBACK_TASK_LIST_EMPTY = FIRST_SUPERVISOR_STACK_MSG + 9;
+ static final int CONTAINER_TASK_LIST_EMPTY_TIMEOUT = FIRST_SUPERVISOR_STACK_MSG + 10;
private final static String VIRTUAL_DISPLAY_BASE_NAME = "ActivityViewVirtualDisplay";
@@ -223,7 +226,7 @@
// TODO: Add listener for removal of references.
/** Mapping from (ActivityStack/TaskStack).mStackId to their current state */
- SparseArray<ActivityContainer> mActivityContainers = new SparseArray<ActivityContainer>();
+ private SparseArray<ActivityContainer> mActivityContainers = new SparseArray<ActivityContainer>();
/** Mapping from displayId to display current state */
private final SparseArray<ActivityDisplay> mActivityDisplays =
@@ -523,7 +526,7 @@
}
void pauseChildStacks(ActivityRecord parent, boolean userLeaving, boolean uiSleeping) {
- // TODO: Put all stacks in supervisor and iterate through them instead.
+ // TODO: Put all stacks in supervisor and iterate through them instead.
for (int displayNdx = mActivityDisplays.size() - 1; displayNdx >= 0; --displayNdx) {
ArrayList<ActivityStack> stacks = mActivityDisplays.valueAt(displayNdx).mStacks;
for (int stackNdx = stacks.size() - 1; stackNdx >= 0; --stackNdx) {
@@ -2160,8 +2163,10 @@
ActivityContainer createActivityContainer(ActivityRecord parentActivity,
IActivityContainerCallback callback) {
- ActivityContainer activityContainer = new VirtualActivityContainer(parentActivity, callback);
+ ActivityContainer activityContainer =
+ new VirtualActivityContainer(parentActivity, callback);
mActivityContainers.put(activityContainer.mStackId, activityContainer);
+ if (DEBUG_CONTAINERS) Slog.d(TAG, "createActivityContainer: " + activityContainer);
parentActivity.mChildContainers.add(activityContainer);
return activityContainer;
}
@@ -2170,6 +2175,8 @@
final ArrayList<ActivityContainer> childStacks = parentActivity.mChildContainers;
for (int containerNdx = childStacks.size() - 1; containerNdx >= 0; --containerNdx) {
ActivityContainer container = childStacks.remove(containerNdx);
+ if (DEBUG_CONTAINERS) Slog.d(TAG, "removeChildActivityContainers: removing " +
+ container);
container.release();
}
}
@@ -2177,11 +2184,8 @@
void deleteActivityContainer(IActivityContainer container) {
ActivityContainer activityContainer = (ActivityContainer)container;
if (activityContainer != null) {
- activityContainer.mStack.finishAllActivitiesLocked();
- final ActivityRecord parent = activityContainer.mParentActivity;
- if (parent != null) {
- parent.mChildContainers.remove(activityContainer);
- }
+ if (DEBUG_CONTAINERS) Slog.d(TAG, "deleteActivityContainer: ",
+ new RuntimeException("here").fillInStackTrace());
final int stackId = activityContainer.mStackId;
mActivityContainers.remove(stackId);
mWindowManager.removeStack(stackId);
@@ -2764,16 +2768,19 @@
@Override
public void onDisplayAdded(int displayId) {
+ Slog.v(TAG, "Display added displayId=" + displayId);
mHandler.sendMessage(mHandler.obtainMessage(HANDLE_DISPLAY_ADDED, displayId, 0));
}
@Override
public void onDisplayRemoved(int displayId) {
+ Slog.v(TAG, "Display removed displayId=" + displayId);
mHandler.sendMessage(mHandler.obtainMessage(HANDLE_DISPLAY_REMOVED, displayId, 0));
}
@Override
public void onDisplayChanged(int displayId) {
+ Slog.v(TAG, "Display changed displayId=" + displayId);
mHandler.sendMessage(mHandler.obtainMessage(HANDLE_DISPLAY_CHANGED, displayId, 0));
}
@@ -2931,19 +2938,38 @@
} break;
case CONTAINER_CALLBACK_VISIBILITY: {
final ActivityContainer container = (ActivityContainer) msg.obj;
- try {
- // We only send this message if mCallback is non-null.
- container.mCallback.setVisible(container.asBinder(), msg.arg1 == 1);
- } catch (RemoteException e) {
+ final IActivityContainerCallback callback = container.mCallback;
+ if (callback != null) {
+ try {
+ callback.setVisible(container.asBinder(), msg.arg1 == 1);
+ } catch (RemoteException e) {
+ }
}
- }
+ } break;
+ case CONTAINER_CALLBACK_TASK_LIST_EMPTY: {
+ final ActivityContainer container = (ActivityContainer) msg.obj;
+ final IActivityContainerCallback callback = container.mCallback;
+ if (callback != null) {
+ try {
+ callback.onAllActivitiesComplete(container.asBinder());
+ } catch (RemoteException e) {
+ }
+ }
+ } break;
+ case CONTAINER_TASK_LIST_EMPTY_TIMEOUT: {
+ synchronized (mService) {
+ Slog.w(TAG, "Timeout waiting for all activities in task to finish. " +
+ msg.obj);
+ ((ActivityContainer) msg.obj).onTaskListEmptyLocked();
+ }
+ } break;
}
}
}
class ActivityContainer extends android.app.IActivityContainer.Stub {
final static int FORCE_NEW_TASK_FLAGS = Intent.FLAG_ACTIVITY_NEW_TASK |
- Intent.FLAG_ACTIVITY_MULTIPLE_TASK;
+ Intent.FLAG_ACTIVITY_MULTIPLE_TASK | Intent.FLAG_ACTIVITY_NO_ANIMATION;
final int mStackId;
IActivityContainerCallback mCallback = null;
final ActivityStack mStack;
@@ -2993,8 +3019,10 @@
@Override
public int getDisplayId() {
- if (mActivityDisplay != null) {
- return mActivityDisplay.mDisplayId;
+ synchronized (mService) {
+ if (mActivityDisplay != null) {
+ return mActivityDisplay.mDisplayId;
+ }
}
return -1;
}
@@ -3003,10 +3031,12 @@
public boolean injectEvent(InputEvent event) {
final long origId = Binder.clearCallingIdentity();
try {
- if (mActivityDisplay != null) {
- return mInputManagerInternal.injectInputEvent(event,
- mActivityDisplay.mDisplayId,
- InputManager.INJECT_INPUT_EVENT_MODE_ASYNC);
+ synchronized (mService) {
+ if (mActivityDisplay != null) {
+ return mInputManagerInternal.injectInputEvent(event,
+ mActivityDisplay.mDisplayId,
+ InputManager.INJECT_INPUT_EVENT_MODE_ASYNC);
+ }
}
return false;
} finally {
@@ -3016,10 +3046,23 @@
@Override
public void release() {
- mContainerState = CONTAINER_STATE_FINISHING;
- mStack.finishAllActivitiesLocked();
- detachLocked();
- mWindowManager.removeStack(mStackId);
+ synchronized (mService) {
+ if (mContainerState == CONTAINER_STATE_FINISHING) {
+ return;
+ }
+ mContainerState = CONTAINER_STATE_FINISHING;
+
+ final Message msg =
+ mHandler.obtainMessage(CONTAINER_TASK_LIST_EMPTY_TIMEOUT, this);
+ mHandler.sendMessageDelayed(msg, 1000);
+
+ long origId = Binder.clearCallingIdentity();
+ try {
+ mStack.finishAllActivitiesLocked();
+ } finally {
+ Binder.restoreCallingIdentity(origId);
+ }
+ }
}
private void detachLocked() {
@@ -3110,15 +3153,17 @@
return ActivityStackSupervisor.this;
}
- boolean isAttached() {
+ boolean isAttachedLocked() {
return mActivityDisplay != null;
}
void getBounds(Point outBounds) {
- if (mActivityDisplay != null) {
- mActivityDisplay.getBounds(outBounds);
- } else {
- outBounds.set(0, 0);
+ synchronized (mService) {
+ if (mActivityDisplay != null) {
+ mActivityDisplay.getBounds(outBounds);
+ } else {
+ outBounds.set(0, 0);
+ }
}
}
@@ -3141,6 +3186,15 @@
return true;
}
+ void onTaskListEmptyLocked() {
+ mHandler.removeMessages(CONTAINER_TASK_LIST_EMPTY_TIMEOUT, this);
+ if (!mStack.isHomeStack()) {
+ detachLocked();
+ deleteActivityContainer(this);
+ }
+ mHandler.obtainMessage(CONTAINER_CALLBACK_TASK_LIST_EMPTY, this).sendToTarget();
+ }
+
@Override
public String toString() {
return mIdString + (mActivityDisplay == null ? "N" : "A");
@@ -3156,7 +3210,7 @@
mParentActivity = parent;
mCallback = callback;
mContainerState = CONTAINER_STATE_NO_SURFACE;
- mIdString = "VirtualActivtyContainer{" + mStackId + ", parent=" + mParentActivity + "}";
+ mIdString = "VirtualActivityContainer{" + mStackId + ", parent=" + mParentActivity + "}";
}
@Override
@@ -3202,22 +3256,22 @@
}
}
- setSurfaceIfReady();
+ setSurfaceIfReadyLocked();
if (DEBUG_STACK) Slog.d(TAG, "setSurface: " + this + " to display="
+ virtualActivityDisplay);
}
@Override
- boolean isAttached() {
- return mSurface != null && super.isAttached();
+ boolean isAttachedLocked() {
+ return mSurface != null && super.isAttachedLocked();
}
@Override
void setDrawn() {
synchronized (mService) {
mDrawn = true;
- setSurfaceIfReady();
+ setSurfaceIfReadyLocked();
}
}
@@ -3227,8 +3281,8 @@
return false;
}
- private void setSurfaceIfReady() {
- if (DEBUG_STACK) Slog.v(TAG, "setSurfaceIfReady: mDrawn=" + mDrawn +
+ private void setSurfaceIfReadyLocked() {
+ if (DEBUG_STACK) Slog.v(TAG, "setSurfaceIfReadyLocked: mDrawn=" + mDrawn +
" mContainerState=" + mContainerState + " mSurface=" + mSurface);
if (mDrawn && mSurface != null && mContainerState == CONTAINER_STATE_NO_SURFACE) {
((VirtualActivityDisplay) mActivityDisplay).setSurface(mSurface);
diff --git a/services/core/java/com/android/server/display/DisplayPowerController.java b/services/core/java/com/android/server/display/DisplayPowerController.java
index 47406a1..1a36cbf 100644
--- a/services/core/java/com/android/server/display/DisplayPowerController.java
+++ b/services/core/java/com/android/server/display/DisplayPowerController.java
@@ -706,8 +706,14 @@
// Turn the screen on. The contents of the screen may not yet
// be visible if the electron beam has not been dismissed because
// its last frame of animation is solid black.
- setScreenState(mPowerRequest.screenState == DisplayPowerRequest.SCREEN_STATE_DOZE
- ? Display.STATE_DOZING : Display.STATE_ON);
+
+ if (mPowerRequest.screenState == DisplayPowerRequest.SCREEN_STATE_DOZE) {
+ if (!mScreenBrightnessRampAnimator.isAnimating()) {
+ setScreenState(Display.STATE_DOZING);
+ }
+ } else {
+ setScreenState(Display.STATE_ON);
+ }
if (mPowerRequest.blockScreenOn
&& mPowerState.getElectronBeamLevel() == 0.0f) {
diff --git a/services/core/java/com/android/server/notification/NotificationManagerService.java b/services/core/java/com/android/server/notification/NotificationManagerService.java
index b708c16..f8ff038 100644
--- a/services/core/java/com/android/server/notification/NotificationManagerService.java
+++ b/services/core/java/com/android/server/notification/NotificationManagerService.java
@@ -177,6 +177,8 @@
private AppOpsManager mAppOps;
+ private Archive mArchive;
+
// contains connections to all connected listeners, including app services
// and system listeners
private ArrayList<NotificationListenerInfo> mListeners
@@ -277,10 +279,12 @@
}
private static class Archive {
- static final int BUFFER_SIZE = 250;
- ArrayDeque<StatusBarNotification> mBuffer = new ArrayDeque<StatusBarNotification>(BUFFER_SIZE);
+ final int mBufferSize;
+ final ArrayDeque<StatusBarNotification> mBuffer;
- public Archive() {
+ public Archive(int size) {
+ mBufferSize = size;
+ mBuffer = new ArrayDeque<StatusBarNotification>(mBufferSize);
}
public String toString() {
@@ -294,7 +298,7 @@
}
public void record(StatusBarNotification nr) {
- if (mBuffer.size() == BUFFER_SIZE) {
+ if (mBuffer.size() == mBufferSize) {
mBuffer.removeFirst();
}
@@ -304,7 +308,6 @@
mBuffer.addLast(nr.cloneLight());
}
-
public void clear() {
mBuffer.clear();
}
@@ -354,7 +357,7 @@
}
public StatusBarNotification[] getArray(int count) {
- if (count == 0) count = Archive.BUFFER_SIZE;
+ if (count == 0) count = mBufferSize;
final StatusBarNotification[] a
= new StatusBarNotification[Math.min(count, mBuffer.size())];
Iterator<StatusBarNotification> iter = descendingIterator();
@@ -366,7 +369,7 @@
}
public StatusBarNotification[] getArray(int count, String pkg, int userId) {
- if (count == 0) count = Archive.BUFFER_SIZE;
+ if (count == 0) count = mBufferSize;
final StatusBarNotification[] a
= new StatusBarNotification[Math.min(count, mBuffer.size())];
Iterator<StatusBarNotification> iter = filter(descendingIterator(), pkg, userId);
@@ -379,8 +382,6 @@
}
- Archive mArchive = new Archive();
-
private void loadBlockDb() {
synchronized(mBlockedPackages) {
if (mPolicyFile == null) {
@@ -1231,6 +1232,9 @@
}
}
+ mArchive = new Archive(resources.getInteger(
+ R.integer.config_notificationServiceArchiveSize));
+
publishBinderService(Context.NOTIFICATION_SERVICE, mService);
publishLocalService(NotificationManagerInternal.class, mInternalService);
}
@@ -1729,14 +1733,15 @@
}
checkCallerIsSystemOrSameApp(pkg);
final boolean isSystemNotification = isUidSystem(callingUid) || ("android".equals(pkg));
+ final boolean isNotificationFromListener = mEnabledListenerPackageNames.contains(pkg);
final int userId = ActivityManager.handleIncomingUser(callingPid,
callingUid, incomingUserId, true, false, "enqueueNotification", pkg);
final UserHandle user = new UserHandle(userId);
// Limit the number of notifications that any given package except the android
- // package can enqueue. Prevents DOS attacks and deals with leaks.
- if (!isSystemNotification) {
+ // package or a registered listener can enqueue. Prevents DOS attacks and deals with leaks.
+ if (!isSystemNotification && !isNotificationFromListener) {
synchronized (mNotificationList) {
int count = 0;
final int N = mNotificationList.size();
diff --git a/services/core/java/com/android/server/wm/CircularDisplayMask.java b/services/core/java/com/android/server/wm/CircularDisplayMask.java
deleted file mode 100644
index 29bab22..0000000
--- a/services/core/java/com/android/server/wm/CircularDisplayMask.java
+++ /dev/null
@@ -1,133 +0,0 @@
-/*
- * Copyright (C) 2014 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.android.server.wm;
-
-
-import android.graphics.Canvas;
-import android.graphics.Color;
-import android.graphics.Paint;
-import android.graphics.PixelFormat;
-import android.graphics.PorterDuff;
-import android.graphics.Rect;
-import android.view.Display;
-import android.view.Surface;
-import android.view.Surface.OutOfResourcesException;
-import android.view.SurfaceControl;
-import android.view.SurfaceSession;
-
-class CircularDisplayMask {
- private static final String TAG = "CircularDisplayMask";
-
- private static final int STROKE_WIDTH = 2;
- // half the screen size
- private static final int CIRCLE_RADIUS = 160;
- // size of the chin
- private static final int SCREEN_OFFSET = 30;
-
- private final SurfaceControl mSurfaceControl;
- private final Surface mSurface = new Surface();
- private int mLastDW;
- private int mLastDH;
- private boolean mDrawNeeded;
- private Paint mPaint;
- private int mRotation;
- private boolean mVisible;
-
- public CircularDisplayMask(Display display, SurfaceSession session, int zOrder) {
- SurfaceControl ctrl = null;
- try {
- ctrl = new SurfaceControl(session, "CircularDisplayMask",
- 320, 320, PixelFormat.TRANSLUCENT, SurfaceControl.HIDDEN);
- ctrl.setLayerStack(display.getLayerStack());
- ctrl.setLayer(zOrder);
- ctrl.setPosition(0, 0);
- ctrl.show();
- mSurface.copyFrom(ctrl);
- } catch (OutOfResourcesException e) {
- }
- mSurfaceControl = ctrl;
- mDrawNeeded = true;
- mPaint = new Paint();
- mPaint.setAntiAlias(true);
- mPaint.setStyle(Paint.Style.STROKE);
- mPaint.setColor(Color.BLACK);
- mPaint.setStrokeWidth(STROKE_WIDTH);
- }
-
- private void drawIfNeeded() {
- if (!mDrawNeeded || !mVisible) {
- return;
- }
- mDrawNeeded = false;
-
- Rect dirty = new Rect(0, 0, 320, 320);
- Canvas c = null;
- try {
- c = mSurface.lockCanvas(dirty);
- } catch (IllegalArgumentException e) {
- } catch (Surface.OutOfResourcesException e) {
- }
- if (c == null) {
- return;
- }
- c.drawColor(Color.TRANSPARENT, PorterDuff.Mode.SRC);
- switch (mRotation) {
- case Surface.ROTATION_0:
- case Surface.ROTATION_90:
- // chin bottom or right
- mSurfaceControl.setPosition(0, 0);
- break;
- case Surface.ROTATION_180:
- // chin top
- mSurfaceControl.setPosition(0, -SCREEN_OFFSET);
- break;
- case Surface.ROTATION_270:
- // chin left
- mSurfaceControl.setPosition(-SCREEN_OFFSET, 0);
- break;
- }
- c.drawCircle(CIRCLE_RADIUS, CIRCLE_RADIUS, CIRCLE_RADIUS, mPaint);
- mSurface.unlockCanvasAndPost(c);
- }
-
- // Note: caller responsible for being inside
- // Surface.openTransaction() / closeTransaction()
- public void setVisibility(boolean on) {
- if (mSurfaceControl == null) {
- return;
- }
- mVisible = on;
- drawIfNeeded();
- if (on) {
- mSurfaceControl.show();
- } else {
- mSurfaceControl.hide();
- }
- }
-
- void positionSurface(int dw, int dh, int rotation) {
- if (mLastDW == dw && mLastDH == dh && mRotation == rotation) {
- return;
- }
- mLastDW = dw;
- mLastDH = dh;
- mDrawNeeded = true;
- mRotation = rotation;
- drawIfNeeded();
- }
-
-}
diff --git a/services/core/java/com/android/server/wm/TaskStack.java b/services/core/java/com/android/server/wm/TaskStack.java
index 81db8b3..72b4034 100644
--- a/services/core/java/com/android/server/wm/TaskStack.java
+++ b/services/core/java/com/android/server/wm/TaskStack.java
@@ -154,7 +154,8 @@
for (int activityNdx = activities.size() - 1; activityNdx >= 0; --activityNdx) {
final ArrayList<WindowState> windows = activities.get(activityNdx).allAppWindows;
for (int winNdx = windows.size() - 1; winNdx >= 0; --winNdx) {
- if (windows.get(winNdx).mWinAnimator.isAnimating()) {
+ final WindowStateAnimator winAnimator = windows.get(winNdx).mWinAnimator;
+ if (winAnimator.isAnimating() && !winAnimator.isDummyAnimation()) {
return true;
}
}
@@ -236,9 +237,22 @@
void detachDisplay() {
EventLog.writeEvent(EventLogTags.WM_STACK_REMOVED, mStackId);
+
+ boolean doAnotherLayoutPass = false;
for (int taskNdx = mTasks.size() - 1; taskNdx >= 0; --taskNdx) {
- mService.tmpRemoveTaskWindowsLocked(mTasks.get(taskNdx));
+ final AppTokenList appWindowTokens = mTasks.get(taskNdx).mAppTokens;
+ for (int appNdx = appWindowTokens.size() - 1; appNdx >= 0; --appNdx) {
+ final WindowList appWindows = appWindowTokens.get(appNdx).allAppWindows;
+ for (int winNdx = appWindows.size() - 1; winNdx >= 0; --winNdx) {
+ mService.removeWindowInnerLocked(null, appWindows.get(winNdx));
+ doAnotherLayoutPass = true;
+ }
+ }
}
+ if (doAnotherLayoutPass) {
+ mService.requestTraversalLocked();
+ }
+
mAnimationBackgroundSurface.destroySurface();
mAnimationBackgroundSurface = null;
mDimLayer.destroySurface();
diff --git a/services/core/java/com/android/server/wm/WindowManagerService.java b/services/core/java/com/android/server/wm/WindowManagerService.java
index 56d6974..5626c7a 100644
--- a/services/core/java/com/android/server/wm/WindowManagerService.java
+++ b/services/core/java/com/android/server/wm/WindowManagerService.java
@@ -422,7 +422,6 @@
final SurfaceSession mFxSession;
Watermark mWatermark;
StrictModeFlash mStrictModeFlash;
- CircularDisplayMask mCircularDisplayMask;
FocusedStackFrame mFocusedStackFrame;
int mFocusedStackLayer;
@@ -819,8 +818,6 @@
} finally {
SurfaceControl.closeTransaction();
}
-
- showCircularDisplayMaskIfNeeded();
}
public InputMonitor getInputMonitor() {
@@ -2491,7 +2488,7 @@
Binder.restoreCallingIdentity(origId);
}
- private void removeWindowInnerLocked(Session session, WindowState win) {
+ void removeWindowInnerLocked(Session session, WindowState win) {
if (win.mRemoved) {
// Nothing to do.
return;
@@ -5552,39 +5549,6 @@
}
}
- public void showCircularDisplayMaskIfNeeded() {
- // we're fullscreen and not hosted in an ActivityView
- if (mContext.getResources().getBoolean(
- com.android.internal.R.bool.config_windowIsRound)) {
- mH.sendMessage(mH.obtainMessage(H.SHOW_DISPLAY_MASK));
- }
- }
-
- public void showCircularMask() {
- synchronized(mWindowMap) {
-
- if (SHOW_LIGHT_TRANSACTIONS) Slog.i(TAG,
- ">>> OPEN TRANSACTION showDisplayMask");
- SurfaceControl.openTransaction();
- try {
- // TODO(multi-display): support multiple displays
- if (mCircularDisplayMask == null) {
- mCircularDisplayMask = new CircularDisplayMask(
- getDefaultDisplayContentLocked().getDisplay(),
- mFxSession,
- mPolicy.windowTypeToLayerLw(
- WindowManager.LayoutParams.TYPE_POINTER)
- * TYPE_LAYER_MULTIPLIER + 10);
- }
- mCircularDisplayMask.setVisibility(true);
- } finally {
- SurfaceControl.closeTransaction();
- if (SHOW_LIGHT_TRANSACTIONS) Slog.i(TAG,
- "<<< CLOSE TRANSACTION showDisplayMask");
- }
- }
- }
-
// TODO: more accounting of which pid(s) turned it on, keep count,
// only allow disables from pids which have count on, etc.
@Override
@@ -7200,8 +7164,7 @@
public static final int REMOVE_STARTING_TIMEOUT = 33;
- public static final int SHOW_DISPLAY_MASK = 34;
- public static final int ALL_WINDOWS_DRAWN = 35;
+ public static final int ALL_WINDOWS_DRAWN = 34;
@Override
public void handleMessage(Message msg) {
@@ -7605,11 +7568,6 @@
break;
}
- case SHOW_DISPLAY_MASK: {
- showCircularMask();
- break;
- }
-
case DO_ANIMATION_CALLBACK: {
try {
((IRemoteCallback)msg.obj).sendResult(null);
@@ -9094,9 +9052,6 @@
if (mStrictModeFlash != null) {
mStrictModeFlash.positionSurface(defaultDw, defaultDh);
}
- if (mCircularDisplayMask != null) {
- mCircularDisplayMask.positionSurface(defaultDw, defaultDh, mRotation);
- }
boolean focusDisplayed = false;
diff --git a/services/core/java/com/android/server/wm/WindowState.java b/services/core/java/com/android/server/wm/WindowState.java
index 9f3415e..0b11a1b 100644
--- a/services/core/java/com/android/server/wm/WindowState.java
+++ b/services/core/java/com/android/server/wm/WindowState.java
@@ -715,7 +715,11 @@
}
public DisplayContent getDisplayContent() {
- return mAppToken == null ? mDisplayContent : getStack().getDisplayContent();
+ if (mAppToken == null) {
+ return mDisplayContent;
+ }
+ final TaskStack stack = getStack();
+ return stack == null ? mDisplayContent : stack.getDisplayContent();
}
public int getDisplayId() {
diff --git a/tools/layoutlib/bridge/src/android/graphics/BitmapFactory_Delegate.java b/tools/layoutlib/bridge/src/android/graphics/BitmapFactory_Delegate.java
index d85c3d1..06673c1 100644
--- a/tools/layoutlib/bridge/src/android/graphics/BitmapFactory_Delegate.java
+++ b/tools/layoutlib/bridge/src/android/graphics/BitmapFactory_Delegate.java
@@ -102,7 +102,7 @@
}
@LayoutlibDelegate
- /*package*/ static Bitmap nativeDecodeAsset(int asset, Rect padding, Options opts) {
+ /*package*/ static Bitmap nativeDecodeAsset(long asset, Rect padding, Options opts) {
opts.inBitmap = null;
return null;
}
diff --git a/tools/layoutlib/bridge/src/android/graphics/Canvas_Delegate.java b/tools/layoutlib/bridge/src/android/graphics/Canvas_Delegate.java
index 9d21866..44a8e49 100644
--- a/tools/layoutlib/bridge/src/android/graphics/Canvas_Delegate.java
+++ b/tools/layoutlib/bridge/src/android/graphics/Canvas_Delegate.java
@@ -344,7 +344,7 @@
}
@LayoutlibDelegate
- /*package*/ static long native_saveLayer(long nativeCanvas, RectF bounds,
+ /*package*/ static int native_saveLayer(long nativeCanvas, RectF bounds,
long paint, int layerFlags) {
// get the delegate from the native int.
Canvas_Delegate canvasDelegate = sManager.getDelegate(nativeCanvas);
@@ -361,7 +361,7 @@
}
@LayoutlibDelegate
- /*package*/ static long native_saveLayer(long nativeCanvas, float l,
+ /*package*/ static int native_saveLayer(long nativeCanvas, float l,
float t, float r, float b,
long paint, int layerFlags) {
// get the delegate from the native int.
@@ -380,7 +380,7 @@
}
@LayoutlibDelegate
- /*package*/ static long native_saveLayerAlpha(long nativeCanvas,
+ /*package*/ static int native_saveLayerAlpha(long nativeCanvas,
RectF bounds, int alpha,
int layerFlags) {
// get the delegate from the native int.
@@ -393,7 +393,7 @@
}
@LayoutlibDelegate
- /*package*/ static long native_saveLayerAlpha(long nativeCanvas, float l,
+ /*package*/ static int native_saveLayerAlpha(long nativeCanvas, float l,
float t, float r, float b,
int alpha, int layerFlags) {
// get the delegate from the native int.
@@ -786,7 +786,7 @@
}
@LayoutlibDelegate
- /*package*/ static void native_drawPath(long nativeCanvas, int path, long paint) {
+ /*package*/ static void native_drawPath(long nativeCanvas, long path, long paint) {
final Path_Delegate pathDelegate = Path_Delegate.getDelegate(path);
if (pathDelegate == null) {
return;
diff --git a/tools/layoutlib/bridge/src/android/graphics/LightingColorFilter_Delegate.java b/tools/layoutlib/bridge/src/android/graphics/LightingColorFilter_Delegate.java
index defaac3..d7cf922 100644
--- a/tools/layoutlib/bridge/src/android/graphics/LightingColorFilter_Delegate.java
+++ b/tools/layoutlib/bridge/src/android/graphics/LightingColorFilter_Delegate.java
@@ -61,7 +61,7 @@
}
@LayoutlibDelegate
- /*package*/ static int nCreateLightingFilter(long nativeFilter, int mul, int add) {
+ /*package*/ static long nCreateLightingFilter(long nativeFilter, int mul, int add) {
// pass
return 0;
}
diff --git a/tools/layoutlib/bridge/src/android/graphics/Matrix_Delegate.java b/tools/layoutlib/bridge/src/android/graphics/Matrix_Delegate.java
index 1d66586..ebfe9bc 100644
--- a/tools/layoutlib/bridge/src/android/graphics/Matrix_Delegate.java
+++ b/tools/layoutlib/bridge/src/android/graphics/Matrix_Delegate.java
@@ -654,7 +654,7 @@
}
@LayoutlibDelegate
- /*package*/ static boolean native_invert(long native_object, int inverse) {
+ /*package*/ static boolean native_invert(long native_object, long inverse) {
Matrix_Delegate d = sManager.getDelegate(native_object);
if (d == null) {
return false;
diff --git a/tools/layoutlib/bridge/src/android/graphics/Paint_Delegate.java b/tools/layoutlib/bridge/src/android/graphics/Paint_Delegate.java
index 7007b71..de2e592 100644
--- a/tools/layoutlib/bridge/src/android/graphics/Paint_Delegate.java
+++ b/tools/layoutlib/bridge/src/android/graphics/Paint_Delegate.java
@@ -688,7 +688,7 @@
}
@LayoutlibDelegate
- /*package*/ static long native_getStyle(long native_object) {
+ /*package*/ static int native_getStyle(long native_object) {
// get the delegate from the native int.
Paint_Delegate delegate = sManager.getDelegate(native_object);
if (delegate == null) {
@@ -710,7 +710,7 @@
}
@LayoutlibDelegate
- /*package*/ static long native_getStrokeCap(long native_object) {
+ /*package*/ static int native_getStrokeCap(long native_object) {
// get the delegate from the native int.
Paint_Delegate delegate = sManager.getDelegate(native_object);
if (delegate == null) {
@@ -732,7 +732,7 @@
}
@LayoutlibDelegate
- /*package*/ static long native_getStrokeJoin(long native_object) {
+ /*package*/ static int native_getStrokeJoin(long native_object) {
// get the delegate from the native int.
Paint_Delegate delegate = sManager.getDelegate(native_object);
if (delegate == null) {
@@ -889,7 +889,7 @@
}
@LayoutlibDelegate
- /*package*/ static long native_getTextAlign(long native_object) {
+ /*package*/ static int native_getTextAlign(long native_object) {
// get the delegate from the native int.
Paint_Delegate delegate = sManager.getDelegate(native_object);
if (delegate == null) {
@@ -922,7 +922,7 @@
}
@LayoutlibDelegate
- /*package*/ static long native_getTextWidths(long native_object, char[] text, int index,
+ /*package*/ static int native_getTextWidths(long native_object, char[] text, int index,
int count, int bidiFlags, float[] widths) {
// get the delegate from the native int.
Paint_Delegate delegate = sManager.getDelegate(native_object);
@@ -964,14 +964,14 @@
}
@LayoutlibDelegate
- /*package*/ static long native_getTextWidths(long native_object, String text, int start,
+ /*package*/ static int native_getTextWidths(long native_object, String text, int start,
int end, int bidiFlags, float[] widths) {
return native_getTextWidths(native_object, text.toCharArray(), start, end - start,
bidiFlags, widths);
}
@LayoutlibDelegate
- /* package */static long native_getTextGlyphs(long native_object, String text, int start,
+ /* package */static int native_getTextGlyphs(long native_object, String text, int start,
int end, int contextStart, int contextEnd, int flags, char[] glyphs) {
// FIXME
return 0;
@@ -1012,7 +1012,7 @@
}
@LayoutlibDelegate
- /*package*/ static long native_getTextRunCursor(Paint thisPaint, long native_object, char[] text,
+ /*package*/ static int native_getTextRunCursor(Paint thisPaint, long native_object, char[] text,
int contextStart, int contextLength, int flags, int offset, int cursorOpt) {
// FIXME
Bridge.getLog().fidelityWarning(LayoutLog.TAG_UNSUPPORTED,
@@ -1021,7 +1021,7 @@
}
@LayoutlibDelegate
- /*package*/ static long native_getTextRunCursor(Paint thisPaint, long native_object, String text,
+ /*package*/ static int native_getTextRunCursor(Paint thisPaint, long native_object, String text,
int contextStart, int contextEnd, int flags, int offset, int cursorOpt) {
// FIXME
Bridge.getLog().fidelityWarning(LayoutLog.TAG_UNSUPPORTED,
diff --git a/tools/layoutlib/bridge/src/android/graphics/Path_Delegate.java b/tools/layoutlib/bridge/src/android/graphics/Path_Delegate.java
index 4e9c129..b42966b 100644
--- a/tools/layoutlib/bridge/src/android/graphics/Path_Delegate.java
+++ b/tools/layoutlib/bridge/src/android/graphics/Path_Delegate.java
@@ -142,7 +142,7 @@
}
@LayoutlibDelegate
- /*package*/ static long native_getFillType(long nPath) {
+ /*package*/ static int native_getFillType(long nPath) {
Path_Delegate pathDelegate = sManager.getDelegate(nPath);
if (pathDelegate == null) {
return 0;
@@ -401,17 +401,17 @@
}
@LayoutlibDelegate
- /*package*/ static void native_addPath(long nPath, int src, float dx, float dy) {
+ /*package*/ static void native_addPath(long nPath, long src, float dx, float dy) {
addPath(nPath, src, AffineTransform.getTranslateInstance(dx, dy));
}
@LayoutlibDelegate
- /*package*/ static void native_addPath(long nPath, int src) {
+ /*package*/ static void native_addPath(long nPath, long src) {
addPath(nPath, src, null /*transform*/);
}
@LayoutlibDelegate
- /*package*/ static void native_addPath(long nPath, int src, long matrix) {
+ /*package*/ static void native_addPath(long nPath, long src, long matrix) {
Matrix_Delegate matrixDelegate = Matrix_Delegate.getDelegate(matrix);
if (matrixDelegate == null) {
return;
@@ -474,7 +474,7 @@
}
@LayoutlibDelegate
- /*package*/ static boolean native_op(long nPath1, long nPath2, int op, int result) {
+ /*package*/ static boolean native_op(long nPath1, long nPath2, int op, long result) {
Bridge.getLog().error(LayoutLog.TAG_UNSUPPORTED, "Path.op() not supported", null);
return false;
}
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 f674da0..fde4e1a 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
@@ -58,6 +58,7 @@
import android.database.sqlite.SQLiteDatabase.CursorFactory;
import android.graphics.Bitmap;
import android.graphics.drawable.Drawable;
+import android.hardware.display.DisplayManager;
import android.net.Uri;
import android.os.Bundle;
import android.os.Handler;
@@ -101,6 +102,7 @@
private final ApplicationInfo mApplicationInfo;
private final IProjectCallback mProjectCallback;
private final WindowManager mWindowManager;
+ private final DisplayManager mDisplayManager;
private Resources.Theme mTheme;
@@ -149,6 +151,7 @@
}
mWindowManager = new WindowManagerImpl(mMetrics);
+ mDisplayManager = new DisplayManager(this);
}
/**
@@ -455,6 +458,10 @@
return new PowerManager(this, new BridgePowerManager(), new Handler());
}
+ if (DISPLAY_SERVICE.equals(service)) {
+ return mDisplayManager;
+ }
+
throw new UnsupportedOperationException("Unsupported Service: " + service);
}
diff --git a/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/bars/ActionBarLayout.java b/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/bars/ActionBarLayout.java
index 0e39a57..0d0c80f 100644
--- a/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/bars/ActionBarLayout.java
+++ b/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/bars/ActionBarLayout.java
@@ -23,11 +23,8 @@
import com.android.ide.common.rendering.api.RenderResources;
import com.android.ide.common.rendering.api.ResourceValue;
import com.android.ide.common.rendering.api.SessionParams;
-import com.android.ide.common.rendering.api.SystemViewCookie;
import com.android.internal.R;
import com.android.internal.app.ActionBarImpl;
-import com.android.internal.util.Predicate;
-import com.android.internal.view.menu.ActionMenuView;
import com.android.internal.view.menu.MenuBuilder;
import com.android.internal.view.menu.MenuBuilderAccessor;
import com.android.internal.view.menu.MenuItemImpl;
@@ -60,8 +57,6 @@
import java.util.ArrayList;
-import static com.android.ide.common.rendering.api.SystemViewCookie.ACTION_BAR_OVERFLOW;
-
/**
* A layout representing the action bar.
*/
@@ -175,29 +170,6 @@
mActionBarView.setSplitActionBar(mSplit);
inflateMenus();
-
- // Find if the Overflow Menu Button (the three dots) exists. If yes,
- // add the view cookie.
- Predicate<View> overflowMenuButtonTest = new Predicate<View>() {
- @Override
- public boolean apply(View view) {
- ViewGroup.LayoutParams lp = view.getLayoutParams();
- return lp instanceof ActionMenuView.LayoutParams &&
- ((ActionMenuView.LayoutParams) lp).isOverflowButton;
- }
- };
- View overflowMenu = null;
- if (mSplit) {
- if (splitView != null) {
- overflowMenu = splitView.findViewByPredicate(overflowMenuButtonTest);
- }
- }
- else {
- overflowMenu = mActionBarView.findViewByPredicate(overflowMenuButtonTest);
- }
- if (overflowMenu != null) {
- mBridgeContext.addViewKey(overflowMenu, new SystemViewCookie(ACTION_BAR_OVERFLOW));
- }
}
}
diff --git a/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/impl/RenderSessionImpl.java b/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/impl/RenderSessionImpl.java
index 4af73cf..bd42ca4 100644
--- a/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/impl/RenderSessionImpl.java
+++ b/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/impl/RenderSessionImpl.java
@@ -37,8 +37,10 @@
import com.android.ide.common.rendering.api.SessionParams;
import com.android.ide.common.rendering.api.SessionParams.RenderingMode;
import com.android.ide.common.rendering.api.ViewInfo;
+import com.android.ide.common.rendering.api.ViewType;
import com.android.internal.util.XmlUtils;
import com.android.internal.view.menu.ActionMenuItemView;
+import com.android.internal.view.menu.ActionMenuView;
import com.android.internal.view.menu.BridgeMenuItemImpl;
import com.android.internal.view.menu.IconMenuItemView;
import com.android.internal.view.menu.ListMenuItemView;
@@ -83,7 +85,9 @@
import android.view.ViewGroup;
import android.view.ViewGroup.LayoutParams;
import android.view.ViewGroup.MarginLayoutParams;
+import android.view.ViewParent;
import android.view.WindowManagerGlobal_Delegate;
+import android.view.ViewParent;
import android.widget.AbsListView;
import android.widget.AbsSpinner;
import android.widget.AdapterView;
@@ -1473,16 +1477,49 @@
ViewInfo result;
if (isContentFrame) {
+ // The view is part of the layout added by the user. Hence,
+ // the ViewCookie may be obtained only through the Context.
result = new ViewInfo(view.getClass().getName(),
- getViewKey(view),
+ getContext().getViewKey(view),
view.getLeft(), view.getTop() + offset, view.getRight(),
view.getBottom() + offset, view, view.getLayoutParams());
-
} else {
- result = new SystemViewInfo(view.getClass().getName(),
+ // We are part of the system decor.
+ SystemViewInfo r = new SystemViewInfo(view.getClass().getName(),
getViewKey(view),
view.getLeft(), view.getTop(), view.getRight(),
view.getBottom(), view, view.getLayoutParams());
+ result = r;
+ // We currently mark three kinds of views:
+ // 1. Menus in the Action Bar
+ // 2. Menus in the Overflow popup.
+ // 3. The overflow popup button.
+ if (view instanceof ListMenuItemView) {
+ // Mark 2.
+ // All menus in the popup are of type ListMenuItemView.
+ r.setViewType(ViewType.ACTION_BAR_OVERFLOW_MENU);
+ } else {
+ // Mark 3.
+ ViewGroup.LayoutParams lp = view.getLayoutParams();
+ if (lp instanceof ActionMenuView.LayoutParams &&
+ ((ActionMenuView.LayoutParams) lp).isOverflowButton) {
+ r.setViewType(ViewType.ACTION_BAR_OVERFLOW);
+ } else {
+ // Mark 1.
+ // A view is a menu in the Action Bar is it is not the overflow button and of
+ // its parent is of type ActionMenuView. We can also check if the view is
+ // instanceof ActionMenuItemView but that will fail for menus using
+ // actionProviderClass.
+ ViewParent parent = view.getParent();
+ while (parent != mViewRoot && parent instanceof ViewGroup) {
+ if (parent instanceof ActionMenuView) {
+ r.setViewType(ViewType.ACTION_BAR_MENU);
+ break;
+ }
+ parent = parent.getParent();
+ }
+ }
+ }
}
if (setExtendedInfo) {
@@ -1501,7 +1538,7 @@
return result;
}
- /**
+ /* (non-Javadoc)
* The cookie for menu items are stored in menu item and not in the map from View stored in
* BridgeContext.
*/
diff --git a/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/impl/SystemViewInfo.java b/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/impl/SystemViewInfo.java
index 5c267df..9fea167 100644
--- a/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/impl/SystemViewInfo.java
+++ b/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/impl/SystemViewInfo.java
@@ -17,9 +17,15 @@
package com.android.layoutlib.bridge.impl;
import com.android.ide.common.rendering.api.ViewInfo;
+import com.android.ide.common.rendering.api.ViewType;
+/**
+ * ViewInfo for views added by the platform.
+ */
public class SystemViewInfo extends ViewInfo {
+ private ViewType mViewType;
+
public SystemViewInfo(String name, Object cookie, int left, int top,
int right, int bottom) {
super(name, cookie, left, top, right, bottom);
@@ -32,7 +38,14 @@
}
@Override
- public boolean isSystemView() {
- return true;
+ public ViewType getViewType() {
+ if (mViewType != null) {
+ return mViewType;
+ }
+ return ViewType.SYSTEM_UNKNOWN;
+ }
+
+ public void setViewType(ViewType type) {
+ mViewType = type;
}
}
diff --git a/tools/layoutlib/bridge/src/libcore/icu/ICU_Delegate.java b/tools/layoutlib/bridge/src/libcore/icu/ICU_Delegate.java
index ad4103b..f54beed 100644
--- a/tools/layoutlib/bridge/src/libcore/icu/ICU_Delegate.java
+++ b/tools/layoutlib/bridge/src/libcore/icu/ICU_Delegate.java
@@ -137,6 +137,11 @@
}
@LayoutlibDelegate
+ /*package*/ static String getDisplayScriptNative(String variantCode, String locale) {
+ return "";
+ }
+
+ @LayoutlibDelegate
/*package*/ static String getISO3CountryNative(String locale) {
return "";
}
@@ -167,6 +172,16 @@
}
@LayoutlibDelegate
+ /*package*/ static String localeForLanguageTag(String languageTag, boolean strict) {
+ return "";
+ }
+
+ @LayoutlibDelegate
+ /*package*/ static String languageTagForLocale(String locale) {
+ return "";
+ }
+
+ @LayoutlibDelegate
/*package*/ static boolean initLocaleDataNative(String locale, LocaleData result) {
// Used by Calendar.