Merge "Removed hack for fingerprint HAL."
diff --git a/Android.mk b/Android.mk
index 8f7779e..936b41a 100644
--- a/Android.mk
+++ b/Android.mk
@@ -152,6 +152,7 @@
core/java/android/hardware/hdmi/IHdmiControlService.aidl \
core/java/android/hardware/hdmi/IHdmiDeviceEventListener.aidl \
core/java/android/hardware/hdmi/IHdmiHotplugEventListener.aidl \
+ core/java/android/hardware/hdmi/IHdmiSystemAudioModeChangeListener.aidl \
core/java/android/hardware/input/IInputManager.aidl \
core/java/android/hardware/input/IInputDevicesChangedListener.aidl \
core/java/android/hardware/location/IFusedLocationHardware.aidl \
diff --git a/CleanSpec.mk b/CleanSpec.mk
index 1968a78..b6a47f2 100644
--- a/CleanSpec.mk
+++ b/CleanSpec.mk
@@ -202,6 +202,7 @@
$(call add-clean-step, rm -rf $(OUT_DIR)/target/common/obj/JAVA_LIBRARIES/framework_intermediates/classes/android/app/maintenance)
$(call add-clean-step, rm -rf $(OUT_DIR)/target/common/obj/JAVA_LIBRARIES/android_stubs_current_intermediates/classes/android/app/maintenance)
$(call add-clean-step, rm -rf $(OUT_DIR)/target/common/obj/JAVA_LIBRARIES/android_stubs_current_intermediates/src/android/app/maintenance)
+$(call add-clean-step, rm -rf $(OUT_DIR)/target/common/obj/JAVA_LIBRARIES/services_intermediates)
# ******************************************************************
# NEWER CLEAN STEPS MUST BE AT THE END OF THE LIST ABOVE THIS BANNER
diff --git a/api/current.txt b/api/current.txt
index f788098..6a8b2be 100644
--- a/api/current.txt
+++ b/api/current.txt
@@ -510,7 +510,7 @@
field public static final int excludeClass = 16843844; // 0x1010444
field public static final int excludeFromRecents = 16842775; // 0x1010017
field public static final int excludeId = 16843843; // 0x1010443
- field public static final int excludeViewName = 16843856; // 0x1010450
+ field public static final int excludeName = 16843856; // 0x1010450
field public static final int exitFadeDuration = 16843533; // 0x101030d
field public static final int expandableListPreferredChildIndicatorLeft = 16842834; // 0x1010052
field public static final int expandableListPreferredChildIndicatorRight = 16842835; // 0x1010053
@@ -1154,9 +1154,9 @@
field public static final int targetClass = 16842799; // 0x101002f
field public static final int targetDescriptions = 16843680; // 0x10103a0
field public static final int targetId = 16843740; // 0x10103dc
+ field public static final int targetName = 16843855; // 0x101044f
field public static final int targetPackage = 16842785; // 0x1010021
field public static final int targetSdkVersion = 16843376; // 0x1010270
- field public static final int targetViewName = 16843855; // 0x101044f
field public static final int taskAffinity = 16842770; // 0x1010012
field public static final int taskCloseEnterAnimation = 16842942; // 0x10100be
field public static final int taskCloseExitAnimation = 16842943; // 0x10100bf
@@ -1239,6 +1239,8 @@
field public static final int thumbTintMode = 16843892; // 0x1010474
field public static final int thumbnail = 16843429; // 0x10102a5
field public static final int tileMode = 16843265; // 0x1010201
+ field public static final int tileModeX = 16843897; // 0x1010479
+ field public static final int tileModeY = 16843898; // 0x101047a
field public static final int timeZone = 16843724; // 0x10103cc
field public static final int tint = 16843041; // 0x1010121
field public static final int tintMode = 16843797; // 0x1010415
@@ -1266,6 +1268,7 @@
field public static final int transformPivotY = 16843553; // 0x1010321
field public static final int transition = 16843743; // 0x10103df
field public static final int transitionGroup = 16843803; // 0x101041b
+ field public static final int transitionName = 16843802; // 0x101041a
field public static final int transitionOrdering = 16843744; // 0x10103e0
field public static final int translateX = 16843868; // 0x101045c
field public static final int translateY = 16843869; // 0x101045d
@@ -1300,7 +1303,6 @@
field public static final int verticalGap = 16843328; // 0x1010240
field public static final int verticalScrollbarPosition = 16843572; // 0x1010334
field public static final int verticalSpacing = 16843029; // 0x1010115
- field public static final int viewName = 16843802; // 0x101041a
field public static final int viewportHeight = 16843805; // 0x101041d
field public static final int viewportWidth = 16843804; // 0x101041c
field public static final int visibility = 16842972; // 0x10100dc
@@ -11253,6 +11255,17 @@
method public void addTransition(int, int, android.graphics.drawable.AnimationDrawable, boolean);
}
+ public class AnimatedVectorDrawable extends android.graphics.drawable.Drawable implements android.graphics.drawable.Animatable {
+ ctor public AnimatedVectorDrawable();
+ method public void draw(android.graphics.Canvas);
+ method public int getOpacity();
+ method public boolean isRunning();
+ method public void setAlpha(int);
+ method public void setColorFilter(android.graphics.ColorFilter);
+ method public void start();
+ method public void stop();
+ }
+
public class AnimationDrawable extends android.graphics.drawable.DrawableContainer implements android.graphics.drawable.Animatable java.lang.Runnable {
ctor public AnimationDrawable();
method public void addFrame(android.graphics.drawable.Drawable, int);
@@ -11652,8 +11665,6 @@
method public int getOpacity();
method public void setAlpha(int);
method public void setColorFilter(android.graphics.ColorFilter);
- method public void setPadding(android.graphics.Rect);
- method public void setPadding(int, int, int, int);
}
}
@@ -30535,8 +30546,8 @@
method public android.transition.TransitionPropagation getPropagation();
method public long getStartDelay();
method public java.util.List<java.lang.Integer> getTargetIds();
+ method public java.util.List<java.lang.String> getTargetNames();
method public java.util.List<java.lang.Class> getTargetTypes();
- method public java.util.List<java.lang.String> getTargetViewNames();
method public java.util.List<android.view.View> getTargets();
method public java.lang.String[] getTransitionProperties();
method public android.transition.TransitionValues getTransitionValues(android.view.View, boolean);
@@ -30554,7 +30565,7 @@
field public static final int MATCH_ID = 3; // 0x3
field public static final int MATCH_INSTANCE = 1; // 0x1
field public static final int MATCH_ITEM_ID = 4; // 0x4
- field public static final int MATCH_VIEW_NAME = 2; // 0x2
+ field public static final int MATCH_NAME = 2; // 0x2
}
public static abstract class Transition.EpicenterCallback {
@@ -32745,13 +32756,13 @@
method protected int getTopPaddingOffset();
method public android.view.TouchDelegate getTouchDelegate();
method public java.util.ArrayList<android.view.View> getTouchables();
+ method public java.lang.String getTransitionName();
method public float getTranslationX();
method public float getTranslationY();
method public float getTranslationZ();
method public int getVerticalFadingEdgeLength();
method public int getVerticalScrollbarPosition();
method public int getVerticalScrollbarWidth();
- method public java.lang.String getViewName();
method public android.view.ViewTreeObserver getViewTreeObserver();
method public int getVisibility();
method public final int getWidth();
@@ -33008,13 +33019,13 @@
method public void setTextDirection(int);
method public final void setTop(int);
method public void setTouchDelegate(android.view.TouchDelegate);
+ method public final void setTransitionName(java.lang.String);
method public void setTranslationX(float);
method public void setTranslationY(float);
method public void setTranslationZ(float);
method public void setVerticalFadingEdgeEnabled(boolean);
method public void setVerticalScrollBarEnabled(boolean);
method public void setVerticalScrollbarPosition(int);
- method public final void setViewName(java.lang.String);
method public void setVisibility(int);
method public void setWillNotCacheDrawing(boolean);
method public void setWillNotDraw(boolean);
@@ -35283,6 +35294,7 @@
method public abstract long getResources();
method public abstract void grant(long);
field public static final long RESOURCE_AUDIO_CAPTURE = 4L; // 0x4L
+ field public static final long RESOURCE_PROTECTED_MEDIA_ID = 8L; // 0x8L
field public static final long RESOURCE_VIDEO_CAPTURE = 2L; // 0x2L
}
@@ -48278,6 +48290,35 @@
method public V replace(K, V);
}
+ public class ConcurrentLinkedDeque extends java.util.AbstractCollection implements java.util.Deque java.io.Serializable {
+ ctor public ConcurrentLinkedDeque();
+ ctor public ConcurrentLinkedDeque(java.util.Collection<? extends E>);
+ method public void addFirst(E);
+ method public void addLast(E);
+ method public java.util.Iterator<E> descendingIterator();
+ method public E element();
+ method public E getFirst();
+ method public E getLast();
+ method public java.util.Iterator<E> iterator();
+ method public boolean offer(E);
+ method public boolean offerFirst(E);
+ method public boolean offerLast(E);
+ method public E peek();
+ method public E peekFirst();
+ method public E peekLast();
+ method public E poll();
+ method public E pollFirst();
+ method public E pollLast();
+ method public E pop();
+ method public void push(E);
+ method public E remove();
+ method public E removeFirst();
+ method public boolean removeFirstOccurrence(java.lang.Object);
+ method public E removeLast();
+ method public boolean removeLastOccurrence(java.lang.Object);
+ method public int size();
+ }
+
public class ConcurrentLinkedQueue extends java.util.AbstractQueue implements java.util.Queue java.io.Serializable {
ctor public ConcurrentLinkedQueue();
ctor public ConcurrentLinkedQueue(java.util.Collection<? extends E>);
@@ -48518,6 +48559,94 @@
method public static java.util.concurrent.ScheduledExecutorService unconfigurableScheduledExecutorService(java.util.concurrent.ScheduledExecutorService);
}
+ public class ForkJoinPool extends java.util.concurrent.AbstractExecutorService {
+ ctor public ForkJoinPool();
+ ctor public ForkJoinPool(int);
+ ctor public ForkJoinPool(int, java.util.concurrent.ForkJoinPool.ForkJoinWorkerThreadFactory, java.lang.Thread.UncaughtExceptionHandler, boolean);
+ method public boolean awaitQuiescence(long, java.util.concurrent.TimeUnit);
+ method public boolean awaitTermination(long, java.util.concurrent.TimeUnit) throws java.lang.InterruptedException;
+ method protected int drainTasksTo(java.util.Collection<? super java.util.concurrent.ForkJoinTask<?>>);
+ method public void execute(java.util.concurrent.ForkJoinTask<?>);
+ method public void execute(java.lang.Runnable);
+ method public int getActiveThreadCount();
+ method public boolean getAsyncMode();
+ method public java.util.concurrent.ForkJoinPool.ForkJoinWorkerThreadFactory getFactory();
+ method public int getParallelism();
+ method public int getPoolSize();
+ method public int getQueuedSubmissionCount();
+ method public long getQueuedTaskCount();
+ method public int getRunningThreadCount();
+ method public long getStealCount();
+ method public java.lang.Thread.UncaughtExceptionHandler getUncaughtExceptionHandler();
+ method public boolean hasQueuedSubmissions();
+ method public T invoke(java.util.concurrent.ForkJoinTask<T>);
+ method public boolean isQuiescent();
+ method public boolean isShutdown();
+ method public boolean isTerminated();
+ method public boolean isTerminating();
+ method public static void managedBlock(java.util.concurrent.ForkJoinPool.ManagedBlocker) throws java.lang.InterruptedException;
+ method protected java.util.concurrent.ForkJoinTask<?> pollSubmission();
+ method public void shutdown();
+ method public java.util.List<java.lang.Runnable> shutdownNow();
+ method public java.util.concurrent.ForkJoinTask<T> submit(java.util.concurrent.ForkJoinTask<T>);
+ field public static final java.util.concurrent.ForkJoinPool.ForkJoinWorkerThreadFactory defaultForkJoinWorkerThreadFactory;
+ }
+
+ public static abstract interface ForkJoinPool.ForkJoinWorkerThreadFactory {
+ method public abstract java.util.concurrent.ForkJoinWorkerThread newThread(java.util.concurrent.ForkJoinPool);
+ }
+
+ public static abstract interface ForkJoinPool.ManagedBlocker {
+ method public abstract boolean block() throws java.lang.InterruptedException;
+ method public abstract boolean isReleasable();
+ }
+
+ public abstract class ForkJoinTask implements java.util.concurrent.Future java.io.Serializable {
+ ctor public ForkJoinTask();
+ method public static java.util.concurrent.ForkJoinTask<?> adapt(java.lang.Runnable);
+ method public static java.util.concurrent.ForkJoinTask<T> adapt(java.lang.Runnable, T);
+ method public static java.util.concurrent.ForkJoinTask<T> adapt(java.util.concurrent.Callable<? extends T>);
+ method public boolean cancel(boolean);
+ method public void complete(V);
+ method public void completeExceptionally(java.lang.Throwable);
+ method protected abstract boolean exec();
+ method public final java.util.concurrent.ForkJoinTask<V> fork();
+ method public final V get() throws java.util.concurrent.ExecutionException, java.lang.InterruptedException;
+ method public final V get(long, java.util.concurrent.TimeUnit) throws java.util.concurrent.ExecutionException, java.lang.InterruptedException, java.util.concurrent.TimeoutException;
+ method public final java.lang.Throwable getException();
+ method public static java.util.concurrent.ForkJoinPool getPool();
+ method public static int getQueuedTaskCount();
+ method public abstract V getRawResult();
+ method public static int getSurplusQueuedTaskCount();
+ method public static void helpQuiesce();
+ method public static boolean inForkJoinPool();
+ method public final V invoke();
+ method public static void invokeAll(java.util.concurrent.ForkJoinTask<?>, java.util.concurrent.ForkJoinTask<?>);
+ method public static void invokeAll(java.util.concurrent.ForkJoinTask<?>...);
+ method public static java.util.Collection<T> invokeAll(java.util.Collection<T>);
+ method public final boolean isCancelled();
+ method public final boolean isCompletedAbnormally();
+ method public final boolean isCompletedNormally();
+ method public final boolean isDone();
+ method public final V join();
+ method protected static java.util.concurrent.ForkJoinTask<?> peekNextLocalTask();
+ method protected static java.util.concurrent.ForkJoinTask<?> pollNextLocalTask();
+ method protected static java.util.concurrent.ForkJoinTask<?> pollTask();
+ method public final void quietlyInvoke();
+ method public final void quietlyJoin();
+ method public void reinitialize();
+ method protected abstract void setRawResult(V);
+ method public boolean tryUnfork();
+ }
+
+ public class ForkJoinWorkerThread extends java.lang.Thread {
+ ctor protected ForkJoinWorkerThread(java.util.concurrent.ForkJoinPool);
+ method public java.util.concurrent.ForkJoinPool getPool();
+ method public int getPoolIndex();
+ method protected void onStart();
+ method protected void onTermination(java.lang.Throwable);
+ }
+
public abstract interface Future {
method public abstract boolean cancel(boolean);
method public abstract V get() throws java.util.concurrent.ExecutionException, java.lang.InterruptedException;
@@ -48602,6 +48731,52 @@
method public E take() throws java.lang.InterruptedException;
}
+ public class LinkedTransferQueue extends java.util.AbstractQueue implements java.io.Serializable java.util.concurrent.TransferQueue {
+ ctor public LinkedTransferQueue();
+ ctor public LinkedTransferQueue(java.util.Collection<? extends E>);
+ method public int drainTo(java.util.Collection<? super E>);
+ method public int drainTo(java.util.Collection<? super E>, int);
+ method public int getWaitingConsumerCount();
+ method public boolean hasWaitingConsumer();
+ method public java.util.Iterator<E> iterator();
+ method public boolean offer(E, long, java.util.concurrent.TimeUnit);
+ method public boolean offer(E);
+ method public E peek();
+ method public E poll(long, java.util.concurrent.TimeUnit) throws java.lang.InterruptedException;
+ method public E poll();
+ method public void put(E);
+ method public int remainingCapacity();
+ method public int size();
+ method public E take() throws java.lang.InterruptedException;
+ method public void transfer(E) throws java.lang.InterruptedException;
+ method public boolean tryTransfer(E);
+ method public boolean tryTransfer(E, long, java.util.concurrent.TimeUnit) throws java.lang.InterruptedException;
+ }
+
+ public class Phaser {
+ ctor public Phaser();
+ ctor public Phaser(int);
+ ctor public Phaser(java.util.concurrent.Phaser);
+ ctor public Phaser(java.util.concurrent.Phaser, int);
+ method public int arrive();
+ method public int arriveAndAwaitAdvance();
+ method public int arriveAndDeregister();
+ method public int awaitAdvance(int);
+ method public int awaitAdvanceInterruptibly(int) throws java.lang.InterruptedException;
+ method public int awaitAdvanceInterruptibly(int, long, java.util.concurrent.TimeUnit) throws java.lang.InterruptedException, java.util.concurrent.TimeoutException;
+ method public int bulkRegister(int);
+ method public void forceTermination();
+ method public int getArrivedParties();
+ method public java.util.concurrent.Phaser getParent();
+ method public final int getPhase();
+ method public int getRegisteredParties();
+ method public java.util.concurrent.Phaser getRoot();
+ method public int getUnarrivedParties();
+ method public boolean isTerminated();
+ method protected boolean onAdvance(int, int);
+ method public int register();
+ }
+
public class PriorityBlockingQueue extends java.util.AbstractQueue implements java.util.concurrent.BlockingQueue java.io.Serializable {
ctor public PriorityBlockingQueue();
ctor public PriorityBlockingQueue(int);
@@ -48622,6 +48797,22 @@
method public E take() throws java.lang.InterruptedException;
}
+ public abstract class RecursiveAction extends java.util.concurrent.ForkJoinTask {
+ ctor public RecursiveAction();
+ method protected abstract void compute();
+ method protected final boolean exec();
+ method public final java.lang.Void getRawResult();
+ method protected final void setRawResult(java.lang.Void);
+ }
+
+ public abstract class RecursiveTask extends java.util.concurrent.ForkJoinTask {
+ ctor public RecursiveTask();
+ method protected abstract V compute();
+ method protected final boolean exec();
+ method public final V getRawResult();
+ method protected final void setRawResult(V);
+ }
+
public class RejectedExecutionException extends java.lang.RuntimeException {
ctor public RejectedExecutionException();
ctor public RejectedExecutionException(java.lang.String);
@@ -48660,12 +48851,14 @@
method protected java.util.concurrent.RunnableScheduledFuture<V> decorateTask(java.util.concurrent.Callable<V>, java.util.concurrent.RunnableScheduledFuture<V>);
method public boolean getContinueExistingPeriodicTasksAfterShutdownPolicy();
method public boolean getExecuteExistingDelayedTasksAfterShutdownPolicy();
+ method public boolean getRemoveOnCancelPolicy();
method public java.util.concurrent.ScheduledFuture<?> schedule(java.lang.Runnable, long, java.util.concurrent.TimeUnit);
method public java.util.concurrent.ScheduledFuture<V> schedule(java.util.concurrent.Callable<V>, long, java.util.concurrent.TimeUnit);
method public java.util.concurrent.ScheduledFuture<?> scheduleAtFixedRate(java.lang.Runnable, long, long, java.util.concurrent.TimeUnit);
method public java.util.concurrent.ScheduledFuture<?> scheduleWithFixedDelay(java.lang.Runnable, long, long, java.util.concurrent.TimeUnit);
method public void setContinueExistingPeriodicTasksAfterShutdownPolicy(boolean);
method public void setExecuteExistingDelayedTasksAfterShutdownPolicy(boolean);
+ method public void setRemoveOnCancelPolicy(boolean);
}
public class Semaphore implements java.io.Serializable {
@@ -48711,6 +48904,15 @@
method public abstract java.lang.Thread newThread(java.lang.Runnable);
}
+ public class ThreadLocalRandom extends java.util.Random {
+ method public static java.util.concurrent.ThreadLocalRandom current();
+ method public double nextDouble(double);
+ method public double nextDouble(double, double);
+ method public int nextInt(int, int);
+ method public long nextLong(long);
+ method public long nextLong(long, long);
+ }
+
public class ThreadPoolExecutor extends java.util.concurrent.AbstractExecutorService {
ctor public ThreadPoolExecutor(int, int, long, java.util.concurrent.TimeUnit, java.util.concurrent.BlockingQueue<java.lang.Runnable>);
ctor public ThreadPoolExecutor(int, int, long, java.util.concurrent.TimeUnit, java.util.concurrent.BlockingQueue<java.lang.Runnable>, java.util.concurrent.ThreadFactory);
@@ -48798,6 +49000,14 @@
ctor public TimeoutException(java.lang.String);
}
+ public abstract interface TransferQueue implements java.util.concurrent.BlockingQueue {
+ method public abstract int getWaitingConsumerCount();
+ method public abstract boolean hasWaitingConsumer();
+ method public abstract void transfer(E) throws java.lang.InterruptedException;
+ method public abstract boolean tryTransfer(E);
+ method public abstract boolean tryTransfer(E, long, java.util.concurrent.TimeUnit) throws java.lang.InterruptedException;
+ }
+
}
package java.util.concurrent.atomic {
@@ -49007,6 +49217,7 @@
method public final int getWaitQueueLength(java.util.concurrent.locks.AbstractQueuedLongSynchronizer.ConditionObject);
method public final java.util.Collection<java.lang.Thread> getWaitingThreads(java.util.concurrent.locks.AbstractQueuedLongSynchronizer.ConditionObject);
method public final boolean hasContended();
+ method public final boolean hasQueuedPredecessors();
method public final boolean hasQueuedThreads();
method public final boolean hasWaiters(java.util.concurrent.locks.AbstractQueuedLongSynchronizer.ConditionObject);
method protected boolean isHeldExclusively();
@@ -49053,6 +49264,7 @@
method public final int getWaitQueueLength(java.util.concurrent.locks.AbstractQueuedSynchronizer.ConditionObject);
method public final java.util.Collection<java.lang.Thread> getWaitingThreads(java.util.concurrent.locks.AbstractQueuedSynchronizer.ConditionObject);
method public final boolean hasContended();
+ method public final boolean hasQueuedPredecessors();
method public final boolean hasQueuedThreads();
method public final boolean hasWaiters(java.util.concurrent.locks.AbstractQueuedSynchronizer.ConditionObject);
method protected boolean isHeldExclusively();
diff --git a/core/java/android/app/ActivityOptions.java b/core/java/android/app/ActivityOptions.java
index 9160452..0ecead9 100644
--- a/core/java/android/app/ActivityOptions.java
+++ b/core/java/android/app/ActivityOptions.java
@@ -29,8 +29,6 @@
import android.view.Window;
import java.util.ArrayList;
-import java.util.List;
-import java.util.Map;
/**
* Helper class for building an options Bundle that can be used with
@@ -398,14 +396,14 @@
if (sharedElementName == null) {
throw new IllegalArgumentException("Shared element name must not be null");
}
- String viewName = sharedElement.first.getViewName();
- if (viewName == null) {
+ String name = sharedElement.first.getTransitionName();
+ if (name == null) {
throw new IllegalArgumentException("Shared elements must have non-null " +
- "viewNames");
+ "transitionNames");
}
names.add(sharedElementName);
- mappedNames.add(viewName);
+ mappedNames.add(name);
}
}
diff --git a/core/java/android/app/ActivityTransitionCoordinator.java b/core/java/android/app/ActivityTransitionCoordinator.java
index fa9b1e3..c351cd5 100644
--- a/core/java/android/app/ActivityTransitionCoordinator.java
+++ b/core/java/android/app/ActivityTransitionCoordinator.java
@@ -281,7 +281,7 @@
public ArrayList<String> getMappedNames() {
ArrayList<String> names = new ArrayList<String>(mSharedElements.size());
for (int i = 0; i < mSharedElements.size(); i++) {
- names.add(mSharedElements.get(i).getViewName());
+ names.add(mSharedElements.get(i).getTransitionName());
}
return names;
}
@@ -358,9 +358,9 @@
String name = mAllSharedElementNames.get(i);
View sharedElement = sharedElements.get(name);
if (sharedElement != null) {
- if (sharedElement.getViewName() == null) {
+ if (sharedElement.getTransitionName() == null) {
throw new IllegalArgumentException("Shared elements must have " +
- "non-null viewNames");
+ "non-null transitionNames");
}
mSharedElementNames.add(name);
mSharedElements.add(sharedElement);
@@ -494,7 +494,7 @@
if (bitmap != null) {
snapshot.setBackground(new BitmapDrawable(resources, bitmap));
}
- snapshot.setViewName(name);
+ snapshot.setTransitionName(name);
setSharedElementState(snapshot, name, state, parentLoc);
snapshots.add(snapshot);
}
diff --git a/core/java/android/app/ApplicationPackageManager.java b/core/java/android/app/ApplicationPackageManager.java
index 5e17e1a..13b922c 100644
--- a/core/java/android/app/ApplicationPackageManager.java
+++ b/core/java/android/app/ApplicationPackageManager.java
@@ -48,11 +48,13 @@
import android.content.pm.VerifierDeviceIdentity;
import android.content.res.Resources;
import android.content.res.XmlResourceParser;
+import android.graphics.Bitmap;
import android.graphics.drawable.Drawable;
import android.net.Uri;
import android.os.Process;
import android.os.RemoteException;
import android.os.UserHandle;
+import android.os.UserManager;
import android.util.ArrayMap;
import android.util.Log;
import android.view.Display;
@@ -1469,6 +1471,18 @@
/**
* @hide
*/
+ public void addCrossProfileIntentsForPackage(String packageName,
+ int sourceUserId, int targetUserId) {
+ try {
+ mPM.addCrossProfileIntentsForPackage(packageName, sourceUserId, targetUserId);
+ } catch (RemoteException e) {
+ // Should never happen!
+ }
+ }
+
+ /**
+ * @hide
+ */
@Override
public void clearCrossProfileIntentFilters(int sourceUserId) {
try {
@@ -1478,6 +1492,15 @@
}
}
+ /**
+ * @hide
+ */
+ @Override
+ public Bitmap getUserIcon(int userId) {
+ UserManager um = UserManager.get(mContext);
+ return um.getUserIcon(userId);
+ }
+
private final ContextImpl mContext;
private final IPackageManager mPM;
diff --git a/core/java/android/app/BackStackRecord.java b/core/java/android/app/BackStackRecord.java
index 01a388f..4433a3a 100644
--- a/core/java/android/app/BackStackRecord.java
+++ b/core/java/android/app/BackStackRecord.java
@@ -581,13 +581,13 @@
@Override
public FragmentTransaction setSharedElement(View sharedElement, String name) {
- String viewName = sharedElement.getViewName();
- if (viewName == null) {
- throw new IllegalArgumentException("Unique viewNames are required for all" +
+ String transitionName = sharedElement.getTransitionName();
+ if (transitionName == null) {
+ throw new IllegalArgumentException("Unique transitionNames are required for all" +
" sharedElements");
}
mSharedElementSourceNames = new ArrayList<String>(1);
- mSharedElementSourceNames.add(viewName);
+ mSharedElementSourceNames.add(transitionName);
mSharedElementTargetNames = new ArrayList<String>(1);
mSharedElementTargetNames.add(name);
@@ -603,12 +603,12 @@
ArrayList<String> sourceNames = new ArrayList<String>(sharedElements.length);
ArrayList<String> targetNames = new ArrayList<String>(sharedElements.length);
for (int i = 0; i < sharedElements.length; i++) {
- String viewName = sharedElements[i].first.getViewName();
- if (viewName == null) {
- throw new IllegalArgumentException("Unique viewNames are required for all" +
- " sharedElements");
+ String transitionName = sharedElements[i].first.getTransitionName();
+ if (transitionName == null) {
+ throw new IllegalArgumentException("Unique transitionNames are required for all"
+ + " sharedElements");
}
- sourceNames.add(viewName);
+ sourceNames.add(transitionName);
targetNames.add(sharedElements[i].second);
}
mSharedElementSourceNames = sourceNames;
diff --git a/core/java/android/app/FragmentTransaction.java b/core/java/android/app/FragmentTransaction.java
index 7479ecd..b6ea3c3 100644
--- a/core/java/android/app/FragmentTransaction.java
+++ b/core/java/android/app/FragmentTransaction.java
@@ -184,10 +184,10 @@
/**
* Used with {@link #setCustomTransition(int, int)} to map a View from a removed or hidden
* Fragment to a View from a shown or added Fragment.
- * <var>sharedElement</var> must have a unique viewName in the View hierarchy.
+ * <var>sharedElement</var> must have a unique transitionName in the View hierarchy.
* @param sharedElement A View in a disappearing Fragment to match with a View in an
* appearing Fragment.
- * @param name The viewName for a View in an appearing Fragment to match to the shared
+ * @param name The transitionName for a View in an appearing Fragment to match to the shared
* element.
*/
public abstract FragmentTransaction setSharedElement(View sharedElement, String name);
@@ -195,8 +195,8 @@
/**
* Used with {@link #setCustomTransition(int, int)} to map multiple Views from removed or hidden
* Fragments to a Views from a shown or added Fragments. Views in
- * <var>sharedElements</var> must have unique viewNames in the View hierarchy.
- * @param sharedElements Pairs of Views in disappearing Fragments to viewNames in
+ * <var>sharedElements</var> must have unique transitionNames in the View hierarchy.
+ * @param sharedElements Pairs of Views in disappearing Fragments to transitionNames in
* appearing Fragments.
*/
public abstract FragmentTransaction setSharedElements(Pair<View, String>... sharedElements);
diff --git a/core/java/android/app/SharedElementListener.java b/core/java/android/app/SharedElementListener.java
index e03e42e..14fbfab 100644
--- a/core/java/android/app/SharedElementListener.java
+++ b/core/java/android/app/SharedElementListener.java
@@ -108,7 +108,7 @@
* @param names The names of all shared elements transferred from the calling Activity
* to the started Activity.
* @param sharedElements The mapping of shared element names to Views. The best guess
- * will be filled into sharedElements based on the View names.
+ * will be filled into sharedElements based on the transitionNames.
*/
public void remapSharedElements(List<String> names, Map<String, View> sharedElements) {}
}
diff --git a/core/java/android/content/pm/IPackageManager.aidl b/core/java/android/content/pm/IPackageManager.aidl
index 00e7918..6111b01 100644
--- a/core/java/android/content/pm/IPackageManager.aidl
+++ b/core/java/android/content/pm/IPackageManager.aidl
@@ -251,6 +251,9 @@
void addCrossProfileIntentFilter(in IntentFilter intentFilter, int sourceUserId, int targetUserId,
int flags);
+ void addCrossProfileIntentsForPackage(in String packageName, int sourceUserId,
+ int targetUserId);
+
void clearCrossProfileIntentFilters(int sourceUserId);
/**
@@ -438,7 +441,7 @@
int flags, in String installerPackageName,
in VerificationParams verificationParams,
in ContainerEncryptionParams encryptionParams,
- in String packageAbiOverride);
+ in String packageAbiOverride);
int installExistingPackageAsUser(String packageName, int userId);
diff --git a/core/java/android/content/pm/PackageManager.java b/core/java/android/content/pm/PackageManager.java
index 9d871c5..d11698c 100644
--- a/core/java/android/content/pm/PackageManager.java
+++ b/core/java/android/content/pm/PackageManager.java
@@ -29,6 +29,7 @@
import android.content.pm.PackageParser.PackageParserException;
import android.content.res.Resources;
import android.content.res.XmlResourceParser;
+import android.graphics.Bitmap;
import android.graphics.drawable.Drawable;
import android.net.Uri;
import android.os.Environment;
@@ -3610,4 +3611,16 @@
* @hide
*/
public abstract void clearCrossProfileIntentFilters(int sourceUserId);
+
+ /**
+ * Forwards all intents for {@link packageName} for user {@link sourceUserId} to user
+ * {@link targetUserId}.
+ * @hide
+ */
+ public abstract void addCrossProfileIntentsForPackage(String packageName,
+ int sourceUserId, int targetUserId);
+ /**
+ * @hide
+ */
+ public abstract Bitmap getUserIcon(int userId);
}
diff --git a/core/java/android/content/pm/ResolveInfo.java b/core/java/android/content/pm/ResolveInfo.java
index 1ff41c0..1f9d60c 100644
--- a/core/java/android/content/pm/ResolveInfo.java
+++ b/core/java/android/content/pm/ResolveInfo.java
@@ -19,8 +19,11 @@
import android.content.ComponentName;
import android.content.IntentFilter;
import android.graphics.drawable.Drawable;
+import android.graphics.Bitmap;
+import android.graphics.drawable.BitmapDrawable;
import android.os.Parcel;
import android.os.Parcelable;
+import android.os.UserHandle;
import android.text.TextUtils;
import android.util.Printer;
import android.util.Slog;
@@ -127,6 +130,18 @@
public String resolvePackageName;
/**
+ * If not equal to UserHandle.USER_CURRENT, then the intent will be forwarded to this user.
+ * @hide
+ */
+ public int targetUserId;
+
+ /**
+ * If true, then loadIcon will return the icon of the target user.
+ * @hide
+ */
+ public boolean showTargetUserIcon;
+
+ /**
* @hide Target comes from system process?
*/
public boolean system;
@@ -202,6 +217,10 @@
return dr;
}
}
+ if (showTargetUserIcon) {
+ Bitmap bm = pm.getUserIcon(targetUserId);
+ return new BitmapDrawable(bm);
+ }
return ci.loadIcon(pm);
}
@@ -215,7 +234,9 @@
public final int getIconResource() {
if (icon != 0) return icon;
final ComponentInfo ci = getComponentInfo();
- if (ci != null) return ci.getIconResource();
+ if (ci != null && !showTargetUserIcon) {
+ return ci.getIconResource();
+ }
return 0;
}
@@ -250,6 +271,7 @@
}
public ResolveInfo() {
+ targetUserId = UserHandle.USER_CURRENT;
}
public ResolveInfo(ResolveInfo orig) {
@@ -266,6 +288,7 @@
icon = orig.icon;
resolvePackageName = orig.resolvePackageName;
system = orig.system;
+ targetUserId = orig.targetUserId;
}
public String toString() {
@@ -285,6 +308,13 @@
}
sb.append(" m=0x");
sb.append(Integer.toHexString(match));
+ if (targetUserId != UserHandle.USER_CURRENT) {
+ sb.append(" targetUserId=");
+ sb.append(targetUserId);
+ }
+ if (showTargetUserIcon) {
+ sb.append(" [showTargetUserIcon]");
+ }
sb.append('}');
return sb.toString();
}
@@ -320,6 +350,8 @@
TextUtils.writeToParcel(nonLocalizedLabel, dest, parcelableFlags);
dest.writeInt(icon);
dest.writeString(resolvePackageName);
+ dest.writeInt(targetUserId);
+ dest.writeInt(showTargetUserIcon ? 1 : 0);
dest.writeInt(system ? 1 : 0);
}
@@ -363,6 +395,8 @@
= TextUtils.CHAR_SEQUENCE_CREATOR.createFromParcel(source);
icon = source.readInt();
resolvePackageName = source.readString();
+ targetUserId = source.readInt();
+ showTargetUserIcon = source.readInt() != 0;
system = source.readInt() != 0;
}
@@ -374,6 +408,13 @@
}
public final int compare(ResolveInfo a, ResolveInfo b) {
+ // We want to put the one targeted to another user at the end of the dialog.
+ if (a.targetUserId != UserHandle.USER_CURRENT) {
+ return 1;
+ }
+ if (b.targetUserId != UserHandle.USER_CURRENT) {
+ return -1;
+ }
CharSequence sa = a.loadLabel(mPM);
if (sa == null) sa = a.activityInfo.name;
CharSequence sb = b.loadLabel(mPM);
diff --git a/core/java/android/hardware/hdmi/IHdmiControlService.aidl b/core/java/android/hardware/hdmi/IHdmiControlService.aidl
index 559a469..73726fa 100644
--- a/core/java/android/hardware/hdmi/IHdmiControlService.aidl
+++ b/core/java/android/hardware/hdmi/IHdmiControlService.aidl
@@ -21,6 +21,7 @@
import android.hardware.hdmi.IHdmiControlCallback;
import android.hardware.hdmi.IHdmiDeviceEventListener;
import android.hardware.hdmi.IHdmiHotplugEventListener;
+import android.hardware.hdmi.IHdmiSystemAudioModeChangeListener;
import java.util.List;
@@ -42,4 +43,9 @@
void portSelect(int portId, IHdmiControlCallback callback);
void sendKeyEvent(int keyCode, boolean isPressed);
List<HdmiPortInfo> getPortInfo();
+ boolean canChangeSystemAudioMode();
+ boolean getSystemAudioMode();
+ void setSystemAudioMode(boolean enabled, IHdmiControlCallback callback);
+ void addSystemAudioModeChangeListener(IHdmiSystemAudioModeChangeListener listener);
+ void removeSystemAudioModeChangeListener(IHdmiSystemAudioModeChangeListener listener);
}
diff --git a/core/java/android/hardware/hdmi/IHdmiSystemAudioModeChangeListener.aidl b/core/java/android/hardware/hdmi/IHdmiSystemAudioModeChangeListener.aidl
new file mode 100644
index 0000000..714bbe7
--- /dev/null
+++ b/core/java/android/hardware/hdmi/IHdmiSystemAudioModeChangeListener.aidl
@@ -0,0 +1,31 @@
+/*
+ * 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 android.hardware.hdmi;
+
+/**
+ * Callback interface definition for HDMI client to get informed of
+ * "System Audio" mode change.
+ *
+ * @hide
+ */
+oneway interface IHdmiSystemAudioModeChangeListener {
+
+ /**
+ * @param enabled true if the device gets activated
+ */
+ void onStatusChanged(in boolean enabled);
+}
diff --git a/core/java/android/transition/Transition.java b/core/java/android/transition/Transition.java
index e936232..0017eb1 100644
--- a/core/java/android/transition/Transition.java
+++ b/core/java/android/transition/Transition.java
@@ -89,8 +89,8 @@
* out-in behavior. Finally, note the use of the <code>targets</code> sub-tag, which
* takes a set of {@link android.R.styleable#TransitionTarget target} tags, each
* of which lists a specific <code>targetId</code>, <code>targetClass</code>,
- * <code>targetViewName</code>, <code>excludeId</code>, <code>excludeClass</code>, or
- * <code>excludeViewName</code>, which this transition acts upon.
+ * <code>targetName</code>, <code>excludeId</code>, <code>excludeClass</code>, or
+ * <code>excludeName</code>, which this transition acts upon.
* Use of targets is optional, but can be used to either limit the time spent checking
* attributes on unchanging views, or limiting the types of animations run on specific views.
* In this case, we know that only the <code>grayscaleContainer</code> will be
@@ -115,9 +115,9 @@
/**
* With {@link #setMatchOrder(int...)}, chooses to match by
- * {@link android.view.View#getViewName()}. Null names will not be matched.
+ * {@link android.view.View#getTransitionName()}. Null names will not be matched.
*/
- public static final int MATCH_VIEW_NAME = 0x2;
+ public static final int MATCH_NAME = 0x2;
/**
* With {@link #setMatchOrder(int...)}, chooses to match by
@@ -135,7 +135,7 @@
private static final int MATCH_LAST = MATCH_ITEM_ID;
private static final int[] DEFAULT_MATCH_ORDER = {
- MATCH_VIEW_NAME,
+ MATCH_NAME,
MATCH_INSTANCE,
MATCH_ID,
MATCH_ITEM_ID,
@@ -207,7 +207,7 @@
EpicenterCallback mEpicenterCallback;
// For Fragment shared element transitions, linking views explicitly by mismatching
- // viewNames.
+ // transitionNames.
ArrayMap<String, String> mNameOverrides;
/**
@@ -378,17 +378,17 @@
/**
* Sets the order in which Transition matches View start and end values.
* <p>
- * The default behavior is to match first by {@link android.view.View#getViewName()},
+ * The default behavior is to match first by {@link android.view.View#getTransitionName()},
* then by View instance, then by {@link android.view.View#getId()} and finally
* by its item ID if it is in a direct child of ListView. The caller can
* choose to have only some or all of the values of {@link #MATCH_INSTANCE},
- * {@link #MATCH_VIEW_NAME}, {@link #MATCH_ITEM_ID}, and {@link #MATCH_ID}. Only
+ * {@link #MATCH_NAME}, {@link #MATCH_ITEM_ID}, and {@link #MATCH_ID}. Only
* the match algorithms supplied will be used to determine whether Views are the
* the same in both the start and end Scene. Views that do not match will be considered
* as entering or leaving the Scene.
* </p>
* @param matches A list of zero or more of {@link #MATCH_INSTANCE},
- * {@link #MATCH_VIEW_NAME}, {@link #MATCH_ITEM_ID}, and {@link #MATCH_ID}.
+ * {@link #MATCH_NAME}, {@link #MATCH_ITEM_ID}, and {@link #MATCH_ID}.
* If none are provided, then the default match order will be set.
*/
public void setMatchOrder(int... matches) {
@@ -500,9 +500,9 @@
}
/**
- * Match start/end values by Adapter viewName. Adds matched values to startValuesList
+ * Match start/end values by Adapter transitionName. Adds matched values to startValuesList
* and endValuesList and removes them from unmatchedStart and unmatchedEnd, using
- * startNames and endNames as a guide for which Views have unique viewNames.
+ * startNames and endNames as a guide for which Views have unique transitionNames.
*/
private void matchNames(ArrayList<TransitionValues> startValuesList,
ArrayList<TransitionValues> endValuesList,
@@ -563,7 +563,7 @@
case MATCH_INSTANCE:
matchInstances(startValuesList, endValuesList, unmatchedStart, unmatchedEnd);
break;
- case MATCH_VIEW_NAME:
+ case MATCH_NAME:
matchNames(startValuesList, endValuesList, unmatchedStart, unmatchedEnd,
startValues.nameValues, endValues.nameValues);
break;
@@ -718,8 +718,8 @@
}
}
}
- if (mTargetNameExcludes != null && target != null && target.getViewName() != null) {
- if (mTargetNameExcludes.contains(target.getViewName())) {
+ if (mTargetNameExcludes != null && target != null && target.getTransitionName() != null) {
+ if (mTargetNameExcludes.contains(target.getTransitionName())) {
return false;
}
}
@@ -731,7 +731,7 @@
if (mTargetIds.contains(targetId) || mTargets.contains(target)) {
return true;
}
- if (mTargetNames != null && mTargetNames.contains(target.getViewName())) {
+ if (mTargetNames != null && mTargetNames.contains(target.getTransitionName())) {
return true;
}
if (mTargetTypes != null) {
@@ -882,18 +882,18 @@
}
/**
- * Adds the viewName of a target view that this Transition is interested in
+ * Adds the transitionName of a target view that this Transition is interested in
* animating. By default, there are no targetNames, and a Transition will
* listen for changes on every view in the hierarchy below the sceneRoot
* of the Scene being transitioned into. Setting targetNames constrains
- * the Transition to only listen for, and act on, views with these viewNames.
- * Views with different viewNames, or no viewName whatsoever, will be ignored.
+ * the Transition to only listen for, and act on, views with these transitionNames.
+ * Views with different transitionNames, or no transitionName whatsoever, will be ignored.
*
- * <p>Note that viewNames should be unique within the view hierarchy.</p>
+ * <p>Note that transitionNames should be unique within the view hierarchy.</p>
*
- * @see android.view.View#getViewName()
- * @param targetName The viewName of a target view, must be non-null.
- * @return The Transition to which the target viewName is added.
+ * @see android.view.View#getTransitionName()
+ * @param targetName The transitionName of a target view, must be non-null.
+ * @return The Transition to which the target transitionName is added.
* Returning the same object makes it easier to chain calls during
* construction, such as
* <code>transitionSet.addTransitions(new Fade()).addTarget(someName);</code>
@@ -958,10 +958,10 @@
}
/**
- * Removes the given targetName from the list of viewNames that this Transition
+ * Removes the given targetName from the list of transitionNames that this Transition
* is interested in animating.
*
- * @param targetName The viewName of a target view, must not be null.
+ * @param targetName The transitionName of a target view, must not be null.
* @return The Transition from which the targetName is removed.
* Returning the same object makes it easier to chain calls during
* construction, such as
@@ -1003,28 +1003,28 @@
}
/**
- * Whether to add the given viewName to the list of target viewNames to exclude from this
- * transition. The <code>exclude</code> parameter specifies whether the target
+ * Whether to add the given transitionName to the list of target transitionNames to exclude
+ * from this transition. The <code>exclude</code> parameter specifies whether the target
* should be added to or removed from the excluded list.
*
* <p>Excluding targets is a general mechanism for allowing transitions to run on
* a view hierarchy while skipping target views that should not be part of
* the transition. For example, you may want to avoid animating children
* of a specific ListView or Spinner. Views can be excluded by their
- * id, their instance reference, their viewName, or by the Class of that view
+ * id, their instance reference, their transitionName, or by the Class of that view
* (eg, {@link Spinner}).</p>
*
* @see #excludeTarget(View, boolean)
* @see #excludeTarget(int, boolean)
* @see #excludeTarget(Class, boolean)
*
- * @param targetViewName The name of a target to ignore when running this transition.
+ * @param targetName The name of a target to ignore when running this transition.
* @param exclude Whether to add the target to or remove the target from the
* current list of excluded targets.
* @return This transition object.
*/
- public Transition excludeTarget(String targetViewName, boolean exclude) {
- mTargetNameExcludes = excludeObject(mTargetNameExcludes, targetViewName, exclude);
+ public Transition excludeTarget(String targetName, boolean exclude) {
+ mTargetNameExcludes = excludeObject(mTargetNameExcludes, targetName, exclude);
return this;
}
@@ -1248,7 +1248,7 @@
/**
* Returns the list of target IDs that this transition limits itself to
* tracking and animating. If the list is null or empty for
- * {@link #getTargetIds()}, {@link #getTargets()}, {@link #getTargetViewNames()}, and
+ * {@link #getTargetIds()}, {@link #getTargets()}, {@link #getTargetNames()}, and
* {@link #getTargetTypes()} then this transition is
* not limited to specific views, and will handle changes to any views
* in the hierarchy of a scene change.
@@ -1262,7 +1262,7 @@
/**
* Returns the list of target views that this transition limits itself to
* tracking and animating. If the list is null or empty for
- * {@link #getTargetIds()}, {@link #getTargets()}, {@link #getTargetViewNames()}, and
+ * {@link #getTargetIds()}, {@link #getTargets()}, {@link #getTargetNames()}, and
* {@link #getTargetTypes()} then this transition is
* not limited to specific views, and will handle changes to any views
* in the hierarchy of a scene change.
@@ -1274,23 +1274,31 @@
}
/**
- * Returns the list of target viewNames that this transition limits itself to
+ * Returns the list of target transitionNames that this transition limits itself to
* tracking and animating. If the list is null or empty for
- * {@link #getTargetIds()}, {@link #getTargets()}, {@link #getTargetViewNames()}, and
+ * {@link #getTargetIds()}, {@link #getTargets()}, {@link #getTargetNames()}, and
* {@link #getTargetTypes()} then this transition is
* not limited to specific views, and will handle changes to any views
* in the hierarchy of a scene change.
*
- * @return the list of target viewNames
+ * @return the list of target transitionNames
+ */
+ public List<String> getTargetNames() {
+ return mTargetNames;
+ }
+
+ /**
+ * To be removed before L release.
+ * @hide
*/
public List<String> getTargetViewNames() {
return mTargetNames;
}
/**
- * Returns the list of target viewNames that this transition limits itself to
+ * Returns the list of target transitionNames that this transition limits itself to
* tracking and animating. If the list is null or empty for
- * {@link #getTargetIds()}, {@link #getTargets()}, {@link #getTargetViewNames()}, and
+ * {@link #getTargetIds()}, {@link #getTargets()}, {@link #getTargetNames()}, and
* {@link #getTargetTypes()} then this transition is
* not limited to specific views, and will handle changes to any views
* in the hierarchy of a scene change.
@@ -1380,10 +1388,10 @@
transitionValuesMaps.idValues.put(id, view);
}
}
- String name = view.getViewName();
+ String name = view.getTransitionName();
if (name != null) {
if (transitionValuesMaps.nameValues.containsKey(name)) {
- // Duplicate viewNames: cannot match by viewName.
+ // Duplicate transitionNames: cannot match by transitionName.
transitionValuesMaps.nameValues.put(name, null);
} else {
transitionValuesMaps.nameValues.put(name, view);
diff --git a/core/java/android/transition/TransitionInflater.java b/core/java/android/transition/TransitionInflater.java
index 5b7c737..551f78c 100644
--- a/core/java/android/transition/TransitionInflater.java
+++ b/core/java/android/transition/TransitionInflater.java
@@ -30,7 +30,6 @@
import org.xmlpull.v1.XmlPullParserException;
import java.io.IOException;
-import java.util.ArrayList;
import java.util.StringTokenizer;
/**
@@ -43,6 +42,8 @@
*/
public class TransitionInflater {
private static final String MATCH_INSTANCE = "instance";
+ private static final String MATCH_NAME = "name";
+ /** To be removed before L release */
private static final String MATCH_VIEW_NAME = "viewName";
private static final String MATCH_ID = "id";
private static final String MATCH_ITEM_ID = "itemId";
@@ -90,8 +91,6 @@
/**
* Loads a {@link TransitionManager} object from a resource
*
- *
- *
* @param resource The resource id of the transition manager to load
* @return The loaded TransitionManager object
* @throws android.content.res.Resources.NotFoundException when the
@@ -235,20 +234,20 @@
com.android.internal.R.styleable.TransitionTarget);
int id = a.getResourceId(
com.android.internal.R.styleable.TransitionTarget_targetId, -1);
- String viewName;
+ String transitionName;
if (id >= 0) {
transition.addTarget(id);
} else if ((id = a.getResourceId(
com.android.internal.R.styleable.TransitionTarget_excludeId, -1)) >= 0) {
transition.excludeTarget(id, true);
- } else if ((viewName = a.getString(
- com.android.internal.R.styleable.TransitionTarget_targetViewName))
+ } else if ((transitionName = a.getString(
+ com.android.internal.R.styleable.TransitionTarget_targetName))
!= null) {
- transition.addTarget(viewName);
- } else if ((viewName = a.getString(
- com.android.internal.R.styleable.TransitionTarget_excludeViewName))
+ transition.addTarget(transitionName);
+ } else if ((transitionName = a.getString(
+ com.android.internal.R.styleable.TransitionTarget_excludeName))
!= null) {
- transition.excludeTarget(viewName, true);
+ transition.excludeTarget(transitionName, true);
} else {
String className = a.getString(
com.android.internal.R.styleable.TransitionTarget_excludeClass);
@@ -282,8 +281,10 @@
matches[index] = Transition.MATCH_ID;
} else if (MATCH_INSTANCE.equalsIgnoreCase(token)) {
matches[index] = Transition.MATCH_INSTANCE;
+ } else if (MATCH_NAME.equalsIgnoreCase(token)) {
+ matches[index] = Transition.MATCH_NAME;
} else if (MATCH_VIEW_NAME.equalsIgnoreCase(token)) {
- matches[index] = Transition.MATCH_VIEW_NAME;
+ matches[index] = Transition.MATCH_NAME;
} else if (MATCH_ITEM_ID.equalsIgnoreCase(token)) {
matches[index] = Transition.MATCH_ITEM_ID;
} else if (token.isEmpty()) {
diff --git a/core/java/android/transition/TransitionSet.java b/core/java/android/transition/TransitionSet.java
index c04be4f..495814a 100644
--- a/core/java/android/transition/TransitionSet.java
+++ b/core/java/android/transition/TransitionSet.java
@@ -244,11 +244,11 @@
}
@Override
- public Transition excludeTarget(String targetViewName, boolean exclude) {
+ public Transition excludeTarget(String targetName, boolean exclude) {
for (int i = 0; i < mTransitions.size(); i++) {
- mTransitions.get(i).excludeTarget(targetViewName, exclude);
+ mTransitions.get(i).excludeTarget(targetName, exclude);
}
- return super.excludeTarget(targetViewName, exclude);
+ return super.excludeTarget(targetName, exclude);
}
@Override
diff --git a/core/java/android/view/GLES20Canvas.java b/core/java/android/view/GLES20Canvas.java
index 9fafc48..dcd9ba9 100644
--- a/core/java/android/view/GLES20Canvas.java
+++ b/core/java/android/view/GLES20Canvas.java
@@ -234,12 +234,11 @@
protected static native long nFinishRecording(long renderer);
@Override
- public int drawDisplayList(RenderNode displayList, Rect dirty, int flags) {
- return nDrawDisplayList(mRenderer, displayList.getNativeDisplayList(),
- dirty, flags);
+ public int drawRenderNode(RenderNode renderNode, Rect dirty, int flags) {
+ return nDrawRenderNode(mRenderer, renderNode.getNativeDisplayList(), dirty, flags);
}
- private static native int nDrawDisplayList(long renderer, long displayList,
+ private static native int nDrawRenderNode(long renderer, long renderNode,
Rect dirty, int flags);
///////////////////////////////////////////////////////////////////////////
diff --git a/core/java/android/view/HardwareCanvas.java b/core/java/android/view/HardwareCanvas.java
index b8e7d8c..263ebda 100644
--- a/core/java/android/view/HardwareCanvas.java
+++ b/core/java/android/view/HardwareCanvas.java
@@ -61,16 +61,16 @@
* Draws the specified display list onto this canvas. The display list can only
* be drawn if {@link android.view.RenderNode#isValid()} returns true.
*
- * @param displayList The display list to replay.
+ * @param renderNode The RenderNode to replay.
*/
- public void drawDisplayList(RenderNode displayList) {
- drawDisplayList(displayList, null, RenderNode.FLAG_CLIP_CHILDREN);
+ public void drawRenderNode(RenderNode renderNode) {
+ drawRenderNode(renderNode, null, RenderNode.FLAG_CLIP_CHILDREN);
}
/**
* Draws the specified display list onto this canvas.
*
- * @param displayList The display list to replay.
+ * @param renderNode The RenderNode to replay.
* @param dirty Ignored, can be null.
* @param flags Optional flags about drawing, see {@link RenderNode} for
* the possible flags.
@@ -80,7 +80,7 @@
*
* @hide
*/
- public abstract int drawDisplayList(RenderNode displayList, Rect dirty, int flags);
+ public abstract int drawRenderNode(RenderNode renderNode, Rect dirty, int flags);
/**
* Draws the specified layer onto this canvas.
diff --git a/core/java/android/view/ThreadedRenderer.java b/core/java/android/view/ThreadedRenderer.java
index 166edc2..a2ff0fb 100644
--- a/core/java/android/view/ThreadedRenderer.java
+++ b/core/java/android/view/ThreadedRenderer.java
@@ -222,7 +222,7 @@
try {
canvas.save();
callbacks.onHardwarePreDraw(canvas);
- canvas.drawDisplayList(view.getDisplayList());
+ canvas.drawRenderNode(view.getDisplayList());
callbacks.onHardwarePostDraw(canvas);
canvas.restore();
} finally {
diff --git a/core/java/android/view/View.java b/core/java/android/view/View.java
index d25ef16..517b671 100644
--- a/core/java/android/view/View.java
+++ b/core/java/android/view/View.java
@@ -672,7 +672,7 @@
* @attr ref android.R.styleable#View_scrollbarAlwaysDrawHorizontalTrack
* @attr ref android.R.styleable#View_scrollbarAlwaysDrawVerticalTrack
* @attr ref android.R.styleable#View_stateListAnimator
- * @attr ref android.R.styleable#View_viewName
+ * @attr ref android.R.styleable#View_transitionName
* @attr ref android.R.styleable#View_soundEffectsEnabled
* @attr ref android.R.styleable#View_tag
* @attr ref android.R.styleable#View_textAlignment
@@ -3193,18 +3193,18 @@
private boolean mHasBackgroundTint = false;
/**
- * Display list used for backgrounds.
+ * RenderNode used for backgrounds.
* <p>
* When non-null and valid, this is expected to contain an up-to-date copy
- * of the background drawable. It is cleared on temporary detach and reset
+ * of the background drawable. It is cleared on temporary detach, and reset
* on cleanup.
*/
- private RenderNode mBackgroundDisplayList;
+ private RenderNode mBackgroundRenderNode;
private int mBackgroundResource;
private boolean mBackgroundSizeChanged;
- private String mViewName;
+ private String mTransitionName;
static class ListenerInfo {
/**
@@ -4016,8 +4016,8 @@
case R.styleable.View_accessibilityLiveRegion:
setAccessibilityLiveRegion(a.getInt(attr, ACCESSIBILITY_LIVE_REGION_DEFAULT));
break;
- case R.styleable.View_viewName:
- setViewName(a.getString(attr));
+ case R.styleable.View_transitionName:
+ setTransitionName(a.getString(attr));
break;
case R.styleable.View_nestedScrollingEnabled:
setNestedScrollingEnabled(a.getBoolean(attr, false));
@@ -13755,8 +13755,8 @@
mRenderNode.destroyDisplayListData();
}
- if (mBackgroundDisplayList != null && mBackgroundDisplayList.isValid()) {
- mBackgroundDisplayList.destroyDisplayListData();
+ if (mBackgroundRenderNode != null && mBackgroundRenderNode.isValid()) {
+ mBackgroundRenderNode.destroyDisplayListData();
}
}
@@ -14471,7 +14471,7 @@
mPrivateFlags &= ~PFLAG_INVALIDATED;
}
- RenderNode displayList = null;
+ RenderNode renderNode = null;
Bitmap cache = null;
boolean hasDisplayList = false;
if (caching) {
@@ -14506,12 +14506,12 @@
}
useDisplayListProperties &= hasDisplayList;
if (useDisplayListProperties) {
- displayList = getDisplayList();
- if (!displayList.isValid()) {
+ renderNode = getDisplayList();
+ if (!renderNode.isValid()) {
// Uncommon, but possible. If a view is removed from the hierarchy during the call
// to getDisplayList(), the display list will be marked invalid and we should not
// try to use it again.
- displayList = null;
+ renderNode = null;
hasDisplayList = false;
useDisplayListProperties = false;
}
@@ -14565,7 +14565,7 @@
if (transformToApply != null) {
if (concatMatrix) {
if (useDisplayListProperties) {
- displayList.setAnimationMatrix(transformToApply.getMatrix());
+ renderNode.setAnimationMatrix(transformToApply.getMatrix());
} else {
// Undo the scroll translation, apply the transformation matrix,
// then redo the scroll translate to get the correct result.
@@ -14608,7 +14608,7 @@
layerFlags |= Canvas.CLIP_TO_LAYER_SAVE_FLAG;
}
if (useDisplayListProperties) {
- displayList.setAlpha(alpha * getAlpha() * getTransitionAlpha());
+ renderNode.setAlpha(alpha * getAlpha() * getTransitionAlpha());
} else if (layerType == LAYER_TYPE_NONE) {
final int scrollX = hasDisplayList ? 0 : sx;
final int scrollY = hasDisplayList ? 0 : sy;
@@ -14640,12 +14640,12 @@
}
if (!useDisplayListProperties && hasDisplayList) {
- displayList = getDisplayList();
- if (!displayList.isValid()) {
+ renderNode = getDisplayList();
+ if (!renderNode.isValid()) {
// Uncommon, but possible. If a view is removed from the hierarchy during the call
// to getDisplayList(), the display list will be marked invalid and we should not
// try to use it again.
- displayList = null;
+ renderNode = null;
hasDisplayList = false;
}
}
@@ -14678,7 +14678,7 @@
}
} else {
mPrivateFlags &= ~PFLAG_DIRTY_MASK;
- ((HardwareCanvas) canvas).drawDisplayList(displayList, null, flags);
+ ((HardwareCanvas) canvas).drawRenderNode(renderNode, null, flags);
}
}
} else if (cache != null) {
@@ -14949,12 +14949,12 @@
// Attempt to use a display list if requested.
if (canvas.isHardwareAccelerated() && mAttachInfo != null
&& mAttachInfo.mHardwareRenderer != null) {
- mBackgroundDisplayList = getDrawableDisplayList(background, mBackgroundDisplayList);
+ mBackgroundRenderNode = getDrawableRenderNode(background, mBackgroundRenderNode);
- final RenderNode displayList = mBackgroundDisplayList;
+ final RenderNode displayList = mBackgroundRenderNode;
if (displayList != null && displayList.isValid()) {
setBackgroundDisplayListProperties(displayList);
- ((HardwareCanvas) canvas).drawDisplayList(displayList);
+ ((HardwareCanvas) canvas).drawRenderNode(displayList);
return;
}
}
@@ -14985,30 +14985,30 @@
* specified Drawable.
*
* @param drawable Drawable for which to create a display list
- * @param displayList Existing display list, or {@code null}
+ * @param renderNode Existing RenderNode, or {@code null}
* @return A valid display list for the specified drawable
*/
- private RenderNode getDrawableDisplayList(Drawable drawable, RenderNode displayList) {
- if (displayList == null) {
- displayList = RenderNode.create(drawable.getClass().getName());
+ private RenderNode getDrawableRenderNode(Drawable drawable, RenderNode renderNode) {
+ if (renderNode == null) {
+ renderNode = RenderNode.create(drawable.getClass().getName());
}
final Rect bounds = drawable.getBounds();
final int width = bounds.width();
final int height = bounds.height();
- final HardwareCanvas canvas = displayList.start(width, height);
+ final HardwareCanvas canvas = renderNode.start(width, height);
try {
drawable.draw(canvas);
} finally {
- displayList.end(canvas);
+ renderNode.end(canvas);
}
// Set up drawable properties that are view-independent.
- displayList.setLeftTopRightBottom(bounds.left, bounds.top, bounds.right, bounds.bottom);
- displayList.setProjectBackwards(drawable.isProjected());
- displayList.setProjectionReceiver(true);
- displayList.setClipToBounds(false);
- return displayList;
+ renderNode.setLeftTopRightBottom(bounds.left, bounds.top, bounds.right, bounds.bottom);
+ renderNode.setProjectBackwards(drawable.isProjected());
+ renderNode.setProjectionReceiver(true);
+ renderNode.setClipToBounds(false);
+ return renderNode;
}
/**
@@ -18916,15 +18916,15 @@
}
/**
- * Adds all Views that have {@link #getViewName()} non-null to namedElements.
- * @param namedElements Will contain all Views in the hierarchy having a view name.
+ * Adds all Views that have {@link #getTransitionName()} non-null to namedElements.
+ * @param namedElements Will contain all Views in the hierarchy having a transitionName.
* @hide
*/
public void findNamedViews(Map<String, View> namedElements) {
if (getVisibility() == VISIBLE) {
- String viewName = getViewName();
- if (viewName != null) {
- namedElements.put(viewName, this);
+ String transitionName = getTransitionName();
+ if (transitionName != null) {
+ namedElements.put(transitionName, this);
}
}
}
@@ -19326,10 +19326,18 @@
* Sets the name of the View to be used to identify Views in Transitions.
* Names should be unique in the View hierarchy.
*
- * @param viewName The name of the View to uniquely identify it for Transitions.
+ * @param transitionName The name of the View to uniquely identify it for Transitions.
*/
- public final void setViewName(String viewName) {
- mViewName = viewName;
+ public final void setTransitionName(String transitionName) {
+ mTransitionName = transitionName;
+ }
+
+ /**
+ * To be removed before L release.
+ * @hide
+ */
+ public final void setViewName(String transitionName) {
+ setTransitionName(transitionName);
}
/**
@@ -19341,11 +19349,17 @@
* @return The name used of the View to be used to identify Views in Transitions or null
* if no name has been given.
*/
- public String getViewName() {
- return mViewName;
+ public String getTransitionName() {
+ return mTransitionName;
}
/**
+ * To be removed before L release.
+ * @hide
+ */
+ public String getViewName() { return getTransitionName(); }
+
+ /**
* Interface definition for a callback to be invoked when a hardware key event is
* dispatched to this view. The callback will be invoked before the key event is
* given to the view. This is only useful for hardware keyboards; a software input
diff --git a/core/java/android/view/ViewGroup.java b/core/java/android/view/ViewGroup.java
index 1e72625..45ac073 100644
--- a/core/java/android/view/ViewGroup.java
+++ b/core/java/android/view/ViewGroup.java
@@ -2326,13 +2326,13 @@
* individually during the transition.
* @return True if the ViewGroup should be acted on together during an Activity transition.
* The default value is false when the background is null and true when the background
- * is not null or if {@link #getViewName()} is not null.
+ * is not null or if {@link #getTransitionName()} is not null.
*/
public boolean isTransitionGroup() {
if ((mGroupFlags & FLAG_IS_TRANSITION_GROUP_SET) != 0) {
return ((mGroupFlags & FLAG_IS_TRANSITION_GROUP) != 0);
} else {
- return getBackground() != null || getViewName() != null;
+ return getBackground() != null || getTransitionName() != null;
}
}
diff --git a/core/java/android/view/ViewRootImpl.java b/core/java/android/view/ViewRootImpl.java
index 82e5ddd..f574042 100644
--- a/core/java/android/view/ViewRootImpl.java
+++ b/core/java/android/view/ViewRootImpl.java
@@ -41,6 +41,7 @@
import android.hardware.display.DisplayManager.DisplayListener;
import android.media.AudioManager;
import android.os.Binder;
+import android.os.Build;
import android.os.Bundle;
import android.os.Debug;
import android.os.Handler;
@@ -119,6 +120,9 @@
private static final String PROPERTY_PROFILE_RENDERING = "viewroot.profile_rendering";
private static final String PROPERTY_MEDIA_DISABLED = "config.disable_media";
+ // property used by emulator to determine display shape
+ private static final String PROPERTY_EMULATOR_CIRCULAR = "ro.emulator.circular";
+
/**
* Maximum time we allow the user to roll the trackball enough to generate
* a key event, before resetting the counters.
@@ -325,6 +329,8 @@
/** Set to true once doDie() has been called. */
private boolean mRemoved;
+ private boolean mIsEmulator;
+
/**
* Consistency verifier for debugging purposes.
*/
@@ -1170,8 +1176,9 @@
if ((mWindowAttributes.flags & WindowManager.LayoutParams.FLAG_LAYOUT_IN_OVERSCAN) != 0
&& mDisplay.getDisplayId() == 0) {
// we're fullscreen and not hosted in an ActivityView
- isRound = mContext.getResources().getBoolean(
- com.android.internal.R.bool.config_windowIsRound);
+ isRound = (mIsEmulator && SystemProperties.getBoolean(PROPERTY_EMULATOR_CIRCULAR, false))
+ || mContext.getResources().getBoolean(
+ com.android.internal.R.bool.config_windowIsRound);
}
host.dispatchApplyWindowInsets(new WindowInsets(
mFitSystemWindowsInsets, isRound));
@@ -5426,6 +5433,9 @@
mHandler.sendEmptyMessageDelayed(MSG_INVALIDATE_WORLD, 200);
}
}
+
+ // detect emulator
+ mIsEmulator = Build.HARDWARE.contains("goldfish");
}
});
}
diff --git a/core/java/android/webkit/PermissionRequest.java b/core/java/android/webkit/PermissionRequest.java
index fa760b7..231bf2d 100644
--- a/core/java/android/webkit/PermissionRequest.java
+++ b/core/java/android/webkit/PermissionRequest.java
@@ -39,6 +39,12 @@
* Resource belongs to audio capture device, like microphone.
*/
public final static long RESOURCE_AUDIO_CAPTURE = 1 << 2;
+ /**
+ * Resource belongs to protected media identifier.
+ * After the user grants this resource, the origin can use EME APIs to generate the license
+ * requests.
+ */
+ public final static long RESOURCE_PROTECTED_MEDIA_ID = 1 << 3;
/**
* @return the origin of web content which attempt to access the restricted
diff --git a/core/java/android/widget/Editor.java b/core/java/android/widget/Editor.java
index 4467128..13a0849 100644
--- a/core/java/android/widget/Editor.java
+++ b/core/java/android/widget/Editor.java
@@ -1420,7 +1420,7 @@
blockDisplayList.setLeftTopRightBottom(left, top, right, bottom);
}
- ((HardwareCanvas) canvas).drawDisplayList(blockDisplayList, null,
+ ((HardwareCanvas) canvas).drawRenderNode(blockDisplayList, null,
0 /* no child clipping, our TextView parent enforces it */);
endOfPreviousBlock = blockEndLine;
diff --git a/core/jni/AndroidRuntime.cpp b/core/jni/AndroidRuntime.cpp
index a7a1faad..598d6c1 100644
--- a/core/jni/AndroidRuntime.cpp
+++ b/core/jni/AndroidRuntime.cpp
@@ -491,8 +491,8 @@
char profile_duration[sizeof("-Xprofile-duration:") + PROPERTY_VALUE_MAX];
char profile_interval[sizeof("-Xprofile-interval:") + PROPERTY_VALUE_MAX];
char profile_backoff[sizeof("-Xprofile-backoff:") + PROPERTY_VALUE_MAX];
- char profile_top_k_threshold[sizeof("-Xprofile-top-k-threshold") + PROPERTY_VALUE_MAX];
- char profile_top_k_change_threshold[sizeof("-Xprofile-top-k-change-threshold") + PROPERTY_VALUE_MAX];
+ char profile_top_k_threshold[sizeof("-Xprofile-top-k-threshold:") + PROPERTY_VALUE_MAX];
+ char profile_top_k_change_threshold[sizeof("-Xprofile-top-k-change-threshold:") + PROPERTY_VALUE_MAX];
char langOption[sizeof("-Duser.language=") + 3];
char regionOption[sizeof("-Duser.region=") + 3];
char lockProfThresholdBuf[sizeof("-Xlockprofthreshold:") + sizeof(propBuf)];
diff --git a/core/jni/android_view_GLES20Canvas.cpp b/core/jni/android_view_GLES20Canvas.cpp
index 4362018..329e371 100644
--- a/core/jni/android_view_GLES20Canvas.cpp
+++ b/core/jni/android_view_GLES20Canvas.cpp
@@ -854,13 +854,13 @@
return reinterpret_cast<jlong>(new DisplayListRenderer);
}
-static jint android_view_GLES20Canvas_drawDisplayList(JNIEnv* env,
- jobject clazz, jlong rendererPtr, jlong displayListPtr,
+static jint android_view_GLES20Canvas_drawRenderNode(JNIEnv* env,
+ jobject clazz, jlong rendererPtr, jlong renderNodePtr,
jobject dirty, jint flags) {
OpenGLRenderer* renderer = reinterpret_cast<OpenGLRenderer*>(rendererPtr);
- RenderNode* displayList = reinterpret_cast<RenderNode*>(displayListPtr);
+ RenderNode* renderNode = reinterpret_cast<RenderNode*>(renderNodePtr);
android::uirenderer::Rect bounds;
- status_t status = renderer->drawDisplayList(displayList, bounds, flags);
+ status_t status = renderer->drawRenderNode(renderNode, bounds, flags);
if (status != DrawGlInfo::kStatusDone && dirty != NULL) {
env->CallVoidMethod(dirty, gRectClassInfo.set,
int(bounds.left), int(bounds.top), int(bounds.right), int(bounds.bottom));
@@ -996,12 +996,10 @@
{ "nDrawTextRun", "(JLjava/lang/String;IIIIFFZJJ)V",
(void*) android_view_GLES20Canvas_drawTextRun },
- { "nGetClipBounds", "(JLandroid/graphics/Rect;)Z",
- (void*) android_view_GLES20Canvas_getClipBounds },
+ { "nGetClipBounds", "(JLandroid/graphics/Rect;)Z", (void*) android_view_GLES20Canvas_getClipBounds },
- { "nFinishRecording", "(J)J", (void*) android_view_GLES20Canvas_finishRecording },
- { "nDrawDisplayList", "(JJLandroid/graphics/Rect;I)I",
- (void*) android_view_GLES20Canvas_drawDisplayList },
+ { "nFinishRecording", "(J)J", (void*) android_view_GLES20Canvas_finishRecording },
+ { "nDrawRenderNode", "(JJLandroid/graphics/Rect;I)I", (void*) android_view_GLES20Canvas_drawRenderNode },
{ "nCreateDisplayListRenderer", "()J", (void*) android_view_GLES20Canvas_createDisplayListRenderer },
diff --git a/core/res/res/layout/alert_dialog_leanback.xml b/core/res/res/layout/alert_dialog_leanback.xml
index 8655aea..848015c 100644
--- a/core/res/res/layout/alert_dialog_leanback.xml
+++ b/core/res/res/layout/alert_dialog_leanback.xml
@@ -1,20 +1,18 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
-/*
-** Copyright 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.
-*/
+ 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.
-->
<LinearLayout
@@ -22,11 +20,13 @@
android:id="@+id/parentPanel"
android:layout_width="match_parent"
android:layout_height="wrap_content"
+ android:orientation="vertical"
+ android:background="@drawable/dialog_background_material"
+ android:translationZ="@dimen/floating_window_z"
android:layout_marginLeft="@dimen/leanback_alert_dialog_horizontal_margin"
- android:layout_marginRight="@dimen/leanback_alert_dialog_horizontal_margin"
android:layout_marginTop="@dimen/leanback_alert_dialog_vertical_margin"
- android:layout_marginBottom="@dimen/leanback_alert_dialog_vertical_margin"
- android:orientation="vertical">
+ android:layout_marginRight="@dimen/leanback_alert_dialog_horizontal_margin"
+ android:layout_marginBottom="@dimen/leanback_alert_dialog_vertical_margin">
<LinearLayout android:id="@+id/topPanel"
android:layout_width="match_parent"
@@ -37,16 +37,17 @@
android:layout_height="wrap_content"
android:orientation="horizontal"
android:gravity="center_vertical|start"
- android:minHeight="@dimen/alert_dialog_title_height"
- android:layout_marginStart="16dip"
- android:layout_marginEnd="16dip">
+ android:paddingStart="16dip"
+ android:paddingEnd="16dip"
+ android:paddingTop="16dip">
<ImageView android:id="@+id/icon"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:paddingEnd="8dip"
+ android:layout_width="32dip"
+ android:layout_height="32dip"
+ android:layout_marginEnd="8dip"
+ android:scaleType="fitCenter"
android:src="@null" />
- <com.android.internal.widget.DialogTitle android:id="@+id/alertTitle"
- style="?android:attr/windowTitleStyle"
+ <TextView android:id="@+id/alertTitle"
+ style="?attr/windowTitleStyle"
android:singleLine="true"
android:ellipsize="end"
android:layout_width="match_parent"
@@ -67,13 +68,12 @@
android:layout_height="wrap_content"
android:clipToPadding="false">
<TextView android:id="@+id/message"
- style="?android:attr/textAppearanceMedium"
+ style="?attr/textAppearanceMedium"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingStart="16dip"
android:paddingEnd="16dip"
- android:paddingTop="8dip"
- android:paddingBottom="8dip"/>
+ android:paddingTop="16dip" />
</ScrollView>
</LinearLayout>
@@ -91,41 +91,32 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:minHeight="@dimen/alert_dialog_button_bar_height"
- android:orientation="vertical">
+ android:orientation="vertical"
+ android:gravity="end"
+ android:padding="16dip">
<LinearLayout
- style="?android:attr/buttonBarStyle"
- android:layout_width="match_parent"
+ style="?attr/buttonBarStyle"
+ android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:orientation="horizontal"
- android:layoutDirection="locale"
- android:measureWithLargestChild="true">
- <Button android:id="@+id/button2"
- android:layout_width="wrap_content"
- android:layout_gravity="start"
- android:layout_weight="1"
- android:maxLines="2"
- style="?android:attr/buttonBarButtonStyle"
- android:textSize="14sp"
- android:minHeight="@dimen/alert_dialog_button_bar_height"
- android:layout_height="wrap_content" />
+ android:layoutDirection="locale">
<Button android:id="@+id/button3"
+ style="?attr/buttonBarButtonStyle"
android:layout_width="wrap_content"
- android:layout_gravity="center_horizontal"
- android:layout_weight="1"
+ android:layout_height="wrap_content"
android:maxLines="2"
- style="?android:attr/buttonBarButtonStyle"
- android:textSize="14sp"
- android:minHeight="@dimen/alert_dialog_button_bar_height"
- android:layout_height="wrap_content" />
+ android:minHeight="@dimen/alert_dialog_button_bar_height" />
+ <Button android:id="@+id/button2"
+ style="?attr/buttonBarButtonStyle"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:maxLines="2"
+ android:minHeight="@dimen/alert_dialog_button_bar_height" />
<Button android:id="@+id/button1"
+ style="?attr/buttonBarButtonStyle"
android:layout_width="wrap_content"
- android:layout_gravity="end"
- android:layout_weight="1"
+ android:layout_height="wrap_content"
android:maxLines="2"
- android:minHeight="@dimen/alert_dialog_button_bar_height"
- style="?android:attr/buttonBarButtonStyle"
- android:textSize="14sp"
- android:layout_height="wrap_content" />
+ android:minHeight="@dimen/alert_dialog_button_bar_height" />
</LinearLayout>
</LinearLayout>
</LinearLayout>
diff --git a/core/res/res/layout/alert_dialog_leanback_button_panel_right.xml b/core/res/res/layout/alert_dialog_leanback_button_panel_right.xml
index 096b015..829d5aa 100644
--- a/core/res/res/layout/alert_dialog_leanback_button_panel_right.xml
+++ b/core/res/res/layout/alert_dialog_leanback_button_panel_right.xml
@@ -1,20 +1,18 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
-/*
-** Copyright 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.
-*/
+ 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.
-->
<LinearLayout
@@ -22,18 +20,20 @@
android:id="@+id/parentPanel"
android:layout_width="match_parent"
android:layout_height="wrap_content"
+ android:orientation="horizontal"
+ android:background="@drawable/dialog_background_material"
+ android:translationZ="@dimen/floating_window_z"
android:layout_marginLeft="@dimen/leanback_alert_dialog_horizontal_margin"
- android:layout_marginRight="@dimen/leanback_alert_dialog_horizontal_margin"
android:layout_marginTop="@dimen/leanback_alert_dialog_vertical_margin"
- android:layout_marginBottom="@dimen/leanback_alert_dialog_vertical_margin"
- android:orientation="horizontal">
+ android:layout_marginRight="@dimen/leanback_alert_dialog_horizontal_margin"
+ android:layout_marginBottom="@dimen/leanback_alert_dialog_vertical_margin">
- <LinearLayout
- android:id="@+id/leftPanel"
- android:layout_width="0dp"
- android:layout_weight="0.66"
- android:layout_height="wrap_content"
- android:orientation="vertical">
+ <LinearLayout
+ android:id="@+id/leftPanel"
+ android:layout_width="0dp"
+ android:layout_weight="1"
+ android:layout_height="wrap_content"
+ android:orientation="vertical">
<LinearLayout android:id="@+id/topPanel"
android:layout_width="match_parent"
@@ -44,16 +44,17 @@
android:layout_height="wrap_content"
android:orientation="horizontal"
android:gravity="center_vertical|start"
- android:minHeight="@dimen/alert_dialog_title_height"
- android:layout_marginStart="16dip"
- android:layout_marginEnd="16dip">
+ android:paddingStart="16dip"
+ android:paddingEnd="16dip"
+ android:paddingTop="16dip">
<ImageView android:id="@+id/icon"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:paddingEnd="8dip"
+ android:layout_width="32dip"
+ android:layout_height="32dip"
+ android:layout_marginEnd="8dip"
+ android:scaleType="fitCenter"
android:src="@null" />
- <com.android.internal.widget.DialogTitle android:id="@+id/alertTitle"
- style="?android:attr/windowTitleStyle"
+ <TextView android:id="@+id/alertTitle"
+ style="?attr/windowTitleStyle"
android:singleLine="true"
android:ellipsize="end"
android:layout_width="match_parent"
@@ -66,6 +67,7 @@
<LinearLayout android:id="@+id/contentPanel"
android:layout_width="match_parent"
android:layout_height="wrap_content"
+ android:layout_weight="1"
android:orientation="vertical"
android:minHeight="64dp">
<ScrollView android:id="@+id/scrollView"
@@ -73,13 +75,13 @@
android:layout_height="wrap_content"
android:clipToPadding="false">
<TextView android:id="@+id/message"
- style="?android:attr/textAppearanceMedium"
+ style="?attr/textAppearanceMedium"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingStart="16dip"
android:paddingEnd="16dip"
- android:paddingTop="8dip"
- android:paddingBottom="8dip"/>
+ android:paddingTop="16dip"
+ android:paddingBottom="16dip" />
</ScrollView>
</LinearLayout>
@@ -92,51 +94,41 @@
android:layout_width="match_parent"
android:layout_height="wrap_content" />
</FrameLayout>
- </LinearLayout>
+ </LinearLayout>
<LinearLayout android:id="@+id/buttonPanel"
- android:layout_width="0dp"
- android:layout_weight="0.33"
- android:layout_height="match_parent"
+ android:layout_width="wrap_content"
+android:background="#ffffff"
+ android:layout_height="wrap_content"
+ android:layout_gravity="center_vertical"
android:minHeight="@dimen/alert_dialog_button_bar_height"
- android:paddingLeft="32dp"
- android:paddingRight="32dp"
- android:orientation="horizontal">
+ android:orientation="vertical"
+ android:gravity="end"
+ android:padding="16dip">
<LinearLayout
- style="?android:attr/buttonBarStyle"
- android:layout_width="match_parent"
+ style="?attr/buttonBarStyle"
+ android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:layout_gravity="center_vertical"
- android:orientation="vertical"
android:layoutDirection="locale"
- android:measureWithLargestChild="true">
- <Button android:id="@+id/button1"
- android:layout_width="match_parent"
- android:gravity="center_vertical"
- android:layout_weight="1"
- android:maxLines="2"
- style="?android:attr/buttonBarButtonStyle"
- android:textSize="14sp"
- android:minHeight="@dimen/alert_dialog_button_bar_height"
- android:layout_height="wrap_content" />
+ android:orientation="vertical">
<Button android:id="@+id/button3"
+ style="?attr/buttonBarButtonStyle"
android:layout_width="match_parent"
- android:gravity="center_vertical"
- android:layout_weight="1"
+ android:layout_height="wrap_content"
android:maxLines="2"
- style="?android:attr/buttonBarButtonStyle"
- android:textSize="14sp"
- android:minHeight="@dimen/alert_dialog_button_bar_height"
- android:layout_height="wrap_content" />
+ android:minHeight="@dimen/alert_dialog_button_bar_height" />
<Button android:id="@+id/button2"
+ style="?attr/buttonBarButtonStyle"
android:layout_width="match_parent"
- android:gravity="center_vertical"
- android:layout_weight="1"
+ android:layout_height="wrap_content"
android:maxLines="2"
- android:minHeight="@dimen/alert_dialog_button_bar_height"
- style="?android:attr/buttonBarButtonStyle"
- android:textSize="14sp"
- android:layout_height="wrap_content" />
+ android:minHeight="@dimen/alert_dialog_button_bar_height" />
+ <Button android:id="@+id/button1"
+ style="?attr/buttonBarButtonStyle"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:maxLines="2"
+ android:minHeight="@dimen/alert_dialog_button_bar_height" />
</LinearLayout>
</LinearLayout>
</LinearLayout>
diff --git a/core/res/res/layout/progress_dialog_leanback.xml b/core/res/res/layout/progress_dialog_leanback.xml
deleted file mode 100644
index 6bcad7a..0000000
--- a/core/res/res/layout/progress_dialog_leanback.xml
+++ /dev/null
@@ -1,48 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-/*
-** Copyright 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.
-*/
--->
-
-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:orientation="vertical">
-
- <View
- android:layout_width="match_parent"
- android:layout_height="2dip"
- android:background="@android:color/leanback_dark_gray" />
- <LinearLayout android:id="@+id/body"
- android:orientation="horizontal"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:baselineAligned="false"
- android:padding="16dip">
-
- <ProgressBar android:id="@android:id/progress"
- style="?android:attr/progressBarStyle"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:max="10000"
- android:layout_marginEnd="16dip" />
-
- <TextView android:id="@+id/message"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:layout_gravity="center_vertical" />
- </LinearLayout>
-</LinearLayout>
diff --git a/core/res/res/layout/screen_action_bar.xml b/core/res/res/layout/screen_action_bar.xml
index 8bf8416..5acb588 100644
--- a/core/res/res/layout/screen_action_bar.xml
+++ b/core/res/res/layout/screen_action_bar.xml
@@ -34,7 +34,7 @@
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
style="?attr/actionBarStyle"
- android:viewName="android:action_bar"
+ android:transitionName="android:action_bar"
android:gravity="top">
<com.android.internal.widget.ActionBarView
android:id="@+id/action_bar"
diff --git a/core/res/res/layout/screen_custom_title.xml b/core/res/res/layout/screen_custom_title.xml
index c8952bf..b385bed 100644
--- a/core/res/res/layout/screen_custom_title.xml
+++ b/core/res/res/layout/screen_custom_title.xml
@@ -31,7 +31,7 @@
<FrameLayout android:id="@android:id/title_container"
android:layout_width="match_parent"
android:layout_height="?android:attr/windowTitleSize"
- android:viewName="android:title"
+ android:transitionName="android:title"
style="?android:attr/windowTitleBackgroundStyle">
</FrameLayout>
<FrameLayout android:id="@android:id/content"
diff --git a/core/res/res/layout/screen_toolbar.xml b/core/res/res/layout/screen_toolbar.xml
index 290c7da..56815f8 100644
--- a/core/res/res/layout/screen_toolbar.xml
+++ b/core/res/res/layout/screen_toolbar.xml
@@ -34,7 +34,7 @@
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
style="?attr/actionBarStyle"
- android:viewName="android:action_bar"
+ android:transitionName="android:action_bar"
android:gravity="top">
<Toolbar
android:id="@+id/action_bar"
diff --git a/core/res/res/values-television/themes.xml b/core/res/res/values-television/themes.xml
index f92ff40..3333f1b 100644
--- a/core/res/res/values-television/themes.xml
+++ b/core/res/res/values-television/themes.xml
@@ -16,8 +16,13 @@
<resources>
<style name="Theme.Dialog.Alert" parent="Theme.Leanback.Light.Dialog.Alert" />
<style name="Theme.Dialog.AppError" parent="Theme.Leanback.Dialog.AppError" />
+ <style name="Theme.Dialog.TimePicker" parent="Theme.Leanback.Dialog.TimePicker" />
<style name="Theme.Holo.Dialog.Alert" parent="Theme.Leanback.Dialog.Alert" />
+ <style name="Theme.Holo.Dialog.TimePicker" parent="Theme.Leanback.Dialog.TimePicker" />
<style name="Theme.Holo.Light.Dialog.Alert" parent="Theme.Leanback.Light.Dialog.Alert" />
+ <style name="Theme.Holo.Light.Dialog.TimePicker" parent="Theme.Leanback.Light.Dialog.TimePicker" />
<style name="Theme.Material.Dialog.Alert" parent="Theme.Leanback.Dialog.Alert" />
+ <style name="Theme.Material.Dialog.TimePicker" parent="Theme.Leanback.Dialog.TimePicker" />
<style name="Theme.Material.Light.Dialog.Alert" parent="Theme.Leanback.Light.Dialog.Alert" />
+ <style name="Theme.Material.Light.Dialog.TimePicker" parent="Theme.Leanback.Light.Dialog.TimePicker" />
</resources>
diff --git a/core/res/res/values-television/themes_device_defaults.xml b/core/res/res/values-television/themes_device_defaults.xml
index e01caa3..1938675 100644
--- a/core/res/res/values-television/themes_device_defaults.xml
+++ b/core/res/res/values-television/themes_device_defaults.xml
@@ -16,4 +16,6 @@
<resources>
<style name="Theme.DeviceDefault.Dialog.Alert" parent="Theme.Leanback.Dialog.Alert" />
<style name="Theme.DeviceDefault.Light.Dialog.Alert" parent="Theme.Leanback.Light.Dialog.Alert" />
+ <style name="Theme.DeviceDefault.Dialog.TimePicker" parent="Theme.Leanback.Dialog.TimePicker" />
+ <style name="Theme.DeviceDefault.Light.Dialog.TimePicker" parent="Theme.Leanback.Light.Dialog.TimePicker" />
</resources>
diff --git a/core/res/res/values/attrs.xml b/core/res/res/values/attrs.xml
index 4a6311a..a8a4d7a 100644
--- a/core/res/res/values/attrs.xml
+++ b/core/res/res/values/attrs.xml
@@ -2424,7 +2424,7 @@
<!-- Names a View such that it can be identified for Transitions. Names should be
unique in the View hierarchy. -->
- <attr name="viewName" format="string" />
+ <attr name="transitionName" format="string" />
<!-- Specifies that this view should permit nested scrolling within a compatible
ancestor view. -->
@@ -4813,6 +4813,32 @@
mirror images so that adjacent images always seam. -->
<enum name="mirror" value="2" />
</attr>
+ <!-- Defines the horizontal tile mode. When the tile mode is enabled, the bitmap is repeated.
+ Gravity is ignored when the tile mode is enabled. Default value is "disabled". -->
+ <attr name="tileModeX">
+ <!-- Do not tile the bitmap. This is the default value. -->
+ <enum name="disabled" value="-1" />
+ <!-- Replicates the edge color. -->
+ <enum name="clamp" value="0" />
+ <!-- Repeats the bitmap in both direction. -->
+ <enum name="repeat" value="1" />
+ <!-- Repeats the shader's image horizontally and vertically, alternating
+ mirror images so that adjacent images always seam. -->
+ <enum name="mirror" value="2" />
+ </attr>
+ <!-- Defines the vertical tile mode. When the tile mode is enabled, the bitmap is repeated.
+ Gravity is ignored when the tile mode is enabled. Default value is "disabled". -->
+ <attr name="tileModeY">
+ <!-- Do not tile the bitmap. This is the default value. -->
+ <enum name="disabled" value="-1" />
+ <!-- Replicates the edge color. -->
+ <enum name="clamp" value="0" />
+ <!-- Repeats the bitmap in both direction. -->
+ <enum name="repeat" value="1" />
+ <!-- Repeats the shader's image horizontally and vertically, alternating
+ mirror images so that adjacent images always seam. -->
+ <enum name="mirror" value="2" />
+ </attr>
<!-- Enables or disables the mipmap hint. See
{@link android.graphics.Bitmap#setHasMipMap(boolean)} for more information.
Default value is false. -->
@@ -4971,6 +4997,12 @@
<attr name="height" />
<!-- Enables or disables dithering. -->
<attr name="dither" />
+ <!-- If set, specifies the color to apply to the drawable as a tint. By default,
+ no tint is applied. May be a color state list. -->
+ <attr name="tint" />
+ <!-- When a tint color is set, specifies its Porter-Duff blending mode. The
+ default value is src_in, which treats the drawable as an alpha mask. -->
+ <attr name="tintMode" />
</declare-styleable>
<!-- ========================== -->
@@ -5291,10 +5323,10 @@
<attr name="interpolator" />
<!-- The match order to use for the transition. This is a comma-separated
list of values, containing one or more of the following:
- id, itemId, viewName, instance. These correspond to
+ id, itemId, name, instance. These correspond to
{@link android.transition.Transition#MATCH_ID},
{@link android.transition.Transition#MATCH_ITEM_ID},
- {@link android.transition.Transition#MATCH_VIEW_NAME}, and
+ {@link android.transition.Transition#MATCH_NAME}, and
{@link android.transition.Transition#MATCH_INSTANCE}, respectively.
This corresponds to {@link android.transition.Transition#setMatchOrder(int...)}. -->
<attr name="matchOrder" format="string" />
@@ -5349,10 +5381,10 @@
<attr name="targetClass" />
<!-- The fully-qualified name of the Class to exclude from this transition. -->
<attr name="excludeClass" format="string" />
- <!-- The viewName of the target on which this transition will animation changes. -->
- <attr name="targetViewName" format="string" />
- <!-- The viewName of the target to exclude from this transition. -->
- <attr name="excludeViewName" format="string" />
+ <!-- The transitionName of the target on which this transition will animation changes. -->
+ <attr name="targetName" format="string" />
+ <!-- The transitionName of the target to exclude from this transition. -->
+ <attr name="excludeName" format="string" />
</declare-styleable>
<!-- Use <code>set</code> as the root tag of the XML resource that
diff --git a/core/res/res/values/colors.xml b/core/res/res/values/colors.xml
index f304514..dd316ed 100644
--- a/core/res/res/values/colors.xml
+++ b/core/res/res/values/colors.xml
@@ -125,9 +125,6 @@
<color name="micro_text_light">#434343</color>
- <color name="leanback_dark_gray">#ff333333</color>
- <color name="leanback_light_gray">#ff888888</color>
-
<drawable name="notification_template_icon_bg">#3333B5E5</drawable>
<drawable name="notification_template_icon_low_bg">#0cffffff</drawable>
diff --git a/core/res/res/values/colors_leanback.xml b/core/res/res/values/colors_leanback.xml
new file mode 100644
index 0000000..dc0c673
--- /dev/null
+++ b/core/res/res/values/colors_leanback.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- 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.
+-->
+
+<!-- Colors specific to Leanback themes. -->
+<resources>
+ <color name="background_leanback_dark">#ff324248</color>
+ <color name="background_leanback_light">#ffeeeeee</color>
+
+ <color name="primary_text_leanback_dark">#cceeeeee</color>
+ <color name="secondary_text_leanback_dark">#99eeeeee</color>
+
+ <color name="primary_text_leanback_light">#cc222222</color>
+ <color name="secondary_text_leanback_light">#99222222</color>
+
+</resources>
diff --git a/core/res/res/values/public.xml b/core/res/res/values/public.xml
index c3e4d94..28e66d5 100644
--- a/core/res/res/values/public.xml
+++ b/core/res/res/values/public.xml
@@ -2115,7 +2115,7 @@
<public type="attr" name="controlY1" />
<public type="attr" name="controlX2" />
<public type="attr" name="controlY2" />
- <public type="attr" name="viewName" />
+ <public type="attr" name="transitionName" />
<public type="attr" name="transitionGroup" />
<public type="attr" name="viewportWidth" />
<public type="attr" name="viewportHeight" />
@@ -2168,8 +2168,8 @@
<public type="attr" name="fromId" />
<public type="attr" name="reversible" />
<public type="attr" name="splitTrack" />
- <public type="attr" name="targetViewName" />
- <public type="attr" name="excludeViewName" />
+ <public type="attr" name="targetName" />
+ <public type="attr" name="excludeName" />
<public type="attr" name="matchOrder" />
<public type="attr" name="windowDrawsSystemBarBackgrounds" />
<public type="attr" name="statusBarColor"/>
@@ -2210,6 +2210,8 @@
<public type="attr" name="propertyXName" />
<public type="attr" name="propertyYName" />
<public type="attr" name="relinquishTaskIdentity" />
+ <public type="attr" name="tileModeX" />
+ <public type="attr" name="tileModeY" />
<public-padding type="dimen" name="l_resource_pad" end="0x01050010" />
diff --git a/core/res/res/values/styles_leanback.xml b/core/res/res/values/styles_leanback.xml
index a37da4e..72d0379 100644
--- a/core/res/res/values/styles_leanback.xml
+++ b/core/res/res/values/styles_leanback.xml
@@ -14,46 +14,12 @@
limitations under the License.
-->
<resources>
- <style name="DialogWindowTitle.Leanback" parent="DialogWindowTitle.Holo">
- <item name="android:textAppearance">@style/TextAppearance.Leanback.DialogWindowTitle</item>
- </style>
-
- <style name="TextAppearance.Leanback.DialogWindowTitle" parent="TextAppearance.Holo.DialogWindowTitle">
- <item name="android:fontFamily">sans-serif-condensed</item>
- <item name="android:textColor">?attr/textColorPrimary</item>
- </style>
-
- <style name="Leanback.ButtonBar" parent="Holo.ButtonBar">
- <item name="showDividers">none</item>
- </style>
-
- <style name="AlertDialog.Leanback" parent="AlertDialog.Holo">
+ <style name="AlertDialog.Leanback" parent="AlertDialog.Material">
<item name="layout">@android:layout/alert_dialog_leanback</item>
<item name="buttonPanelSideLayout">@android:layout/alert_dialog_leanback_button_panel_right</item>
- <item name="progressLayout">@android:layout/progress_dialog_leanback</item>
- <item name="fullDark">@android:color/background_dark</item>
- <item name="topDark">@android:color/background_dark</item>
- <item name="centerDark">@android:color/background_dark</item>
- <item name="bottomDark">@android:color/background_dark</item>
- <item name="fullBright">@android:color/background_dark</item>
- <item name="topBright">@android:color/background_dark</item>
- <item name="centerBright">@android:color/background_dark</item>
- <item name="bottomBright">@android:color/background_dark</item>
- <item name="bottomMedium">@android:color/background_dark</item>
- <item name="centerMedium">@android:color/background_dark</item>
</style>
<style name="AlertDialog.Leanback.Light">
- <item name="fullDark">@android:color/leanback_light_gray</item>
- <item name="topDark">@android:color/leanback_light_gray</item>
- <item name="centerDark">@android:color/leanback_light_gray</item>
- <item name="bottomDark">@android:color/leanback_light_gray</item>
- <item name="fullBright">@android:color/leanback_light_gray</item>
- <item name="topBright">@android:color/leanback_light_gray</item>
- <item name="centerBright">@android:color/leanback_light_gray</item>
- <item name="bottomBright">@android:color/leanback_light_gray</item>
- <item name="bottomMedium">@android:color/leanback_light_gray</item>
- <item name="centerMedium">@android:color/leanback_light_gray</item>
</style>
</resources>
diff --git a/core/res/res/values/themes_leanback.xml b/core/res/res/values/themes_leanback.xml
index eba8dec..a571b98 100644
--- a/core/res/res/values/themes_leanback.xml
+++ b/core/res/res/values/themes_leanback.xml
@@ -14,26 +14,38 @@
limitations under the License.
-->
<resources>
- <style name="Theme.Leanback.Dialog.Alert" parent="Theme.Holo.Dialog.BaseAlert">
- <item name="windowTitleStyle">@style/DialogWindowTitle.Leanback</item>
+ <style name="Theme.Leanback.Dialog.Alert" parent="Theme.Material.Dialog.BaseAlert">
+ <item name="colorBackground">@color/background_leanback_dark</item>
+ <item name="textColorPrimary">@color/primary_text_leanback_dark</item>
+ <item name="textColorSecondary">@color/secondary_text_leanback_dark</item>
<item name="alertDialogStyle">@style/AlertDialog.Leanback</item>
- <item name="buttonBarStyle">@style/Leanback.ButtonBar</item>
- <item name="listDividerAlertDialog">@null</item>
</style>
- <style name="Theme.Leanback.Light.Dialog.Alert" parent="Theme.Holo.Light.Dialog.BaseAlert">
- <item name="windowTitleStyle">@style/DialogWindowTitle.Leanback</item>
+ <style name="Theme.Leanback.Light.Dialog.Alert" parent="Theme.Material.Light.Dialog.BaseAlert">
+ <item name="colorBackground">@color/background_leanback_light</item>
+ <item name="textColorPrimary">@color/primary_text_leanback_light</item>
+ <item name="textColorSecondary">@color/secondary_text_leanback_light</item>
<item name="alertDialogStyle">@style/AlertDialog.Leanback.Light</item>
- <item name="buttonBarStyle">@style/Leanback.ButtonBar</item>
- <item name="listDividerAlertDialog">@null</item>
</style>
- <style name="Theme.Leanback.Light.Dialog" parent="Theme.Holo.Light.Dialog">
- <item name="windowTitleStyle">@style/DialogWindowTitle.Leanback</item>
+ <style name="Theme.Leanback.Dialog.TimePicker" parent="Theme.Material.Dialog.BaseTimePicker">
+ <item name="colorBackground">@color/background_leanback_dark</item>
+ <item name="textColorPrimary">@color/primary_text_leanback_dark</item>
+ <item name="textColorSecondary">@color/secondary_text_leanback_dark</item>
+ <item name="alertDialogStyle">@style/AlertDialog.Leanback</item>
</style>
- <style name="Theme.Leanback.Dialog" parent="Theme.Holo.Dialog">
- <item name="windowTitleStyle">@style/DialogWindowTitle.Leanback</item>
+ <style name="Theme.Leanback.Light.Dialog.TimePicker" parent="Theme.Material.Light.Dialog.BaseTimePicker">
+ <item name="colorBackground">@color/background_leanback_light</item>
+ <item name="textColorPrimary">@color/primary_text_leanback_light</item>
+ <item name="textColorSecondary">@color/secondary_text_leanback_light</item>
+ <item name="alertDialogStyle">@style/AlertDialog.Leanback.Light</item>
+ </style>
+
+ <style name="Theme.Leanback.Light.Dialog" parent="Theme.Material.Light.Dialog">
+ </style>
+
+ <style name="Theme.Leanback.Dialog" parent="Theme.Material.Dialog">
</style>
<style name="Theme.Leanback.Dialog.AppError" parent="Theme.Leanback.Dialog">
diff --git a/core/res/res/values/themes_material.xml b/core/res/res/values/themes_material.xml
index 77e4307..b52b3a0 100644
--- a/core/res/res/values/themes_material.xml
+++ b/core/res/res/values/themes_material.xml
@@ -1092,26 +1092,30 @@
<item name="windowCloseOnTouchOutside">false</item>
</style>
- <!-- Material theme for alert dialog windows, which is used by the
- {@link android.app.AlertDialog} class. This is basically a dialog
- but sets the background to empty so it can do two-tone backgrounds.
- For applications targeting Honeycomb or newer, this is the default
- AlertDialog theme. -->
- <style name="Theme.Material.Dialog.Alert">
+ <style name="Theme.Material.Dialog.BaseAlert">
<item name="windowBackground">@color/transparent</item>
<item name="windowTitleStyle">@style/DialogWindowTitle.Material</item>
<item name="windowMinWidthMajor">@dimen/dialog_min_width_major</item>
<item name="windowMinWidthMinor">@dimen/dialog_min_width_minor</item>
</style>
- <!-- Material theme for the TimePicker dialog windows, which is used by the
- {@link android.app.TimePickerDialog} class. -->
- <style name="Theme.Material.Dialog.TimePicker">
+ <!-- Material theme for alert dialog windows, which is used by the
+ {@link android.app.AlertDialog} class. This is basically a dialog
+ but sets the background to empty so it can do two-tone backgrounds.
+ For applications targeting Honeycomb or newer, this is the default
+ AlertDialog theme. -->
+ <style name="Theme.Material.Dialog.Alert" parent="Theme.Material.Dialog.BaseAlert"/>
+
+ <style name="Theme.Material.Dialog.BaseTimePicker">
<item name="windowBackground">@color/transparent</item>
<item name="windowTitleStyle">@style/DialogWindowTitle.Material</item>
<item name="windowContentOverlay">@null</item>
</style>
+ <!-- Material theme for the TimePicker dialog windows, which is used by the
+ {@link android.app.TimePickerDialog} class. -->
+ <style name="Theme.Material.Dialog.TimePicker" parent="Theme.Material.Dialog.BaseTimePicker"/>
+
<!-- Theme for a window that will be displayed either full-screen on
smaller screens (small, normal) or as a dialog on larger screens
(large, xlarge). -->
@@ -1206,25 +1210,29 @@
(large, xlarge). -->
<style name="Theme.Material.Light.DialogWhenLarge.NoActionBar" parent="@style/Theme.Material.Light.NoActionBar" />
- <!-- Material light theme for alert dialog windows, which is used by the
- {@link android.app.AlertDialog} class. This is basically a dialog
- but sets the background to empty so it can do two-tone backgrounds.
- For applications targeting Honeycomb or newer, this is the default
- AlertDialog theme. -->
- <style name="Theme.Material.Light.Dialog.Alert">
+ <style name="Theme.Material.Light.Dialog.BaseAlert">
<item name="windowBackground">@color/transparent</item>
<item name="windowTitleStyle">@style/DialogWindowTitle.Material.Light</item>
<item name="windowMinWidthMajor">@dimen/dialog_min_width_major</item>
<item name="windowMinWidthMinor">@dimen/dialog_min_width_minor</item>
</style>
- <!-- Material Light theme for the TimePicker dialog windows, which is used by the
- {@link android.app.TimePickerDialog} class. -->
- <style name="Theme.Material.Light.Dialog.TimePicker">
+ <!-- Material light theme for alert dialog windows, which is used by the
+ {@link android.app.AlertDialog} class. This is basically a dialog
+ but sets the background to empty so it can do two-tone backgrounds.
+ For applications targeting Honeycomb or newer, this is the default
+ AlertDialog theme. -->
+ <style name="Theme.Material.Light.Dialog.Alert" parent="Theme.Material.Light.Dialog.BaseAlert"/>
+
+ <style name="Theme.Material.Light.Dialog.BaseTimePicker">
<item name="windowBackground">@color/transparent</item>
<item name="windowTitleStyle">@style/DialogWindowTitle.Material.Light</item>
</style>
+ <!-- Material Light theme for the TimePicker dialog windows, which is used by the
+ {@link android.app.TimePickerDialog} class. -->
+ <style name="Theme.Material.Light.Dialog.TimePicker" parent="Theme.Material.Light.Dialog.BaseTimePicker"/>
+
<!-- Theme for a presentation window on a secondary display. -->
<style name="Theme.Material.Light.Dialog.Presentation" parent="@style/Theme.Material.Light.NoActionBar.Fullscreen" />
diff --git a/docs/html/auto/images/assets/00_frame.png b/docs/html/auto/images/assets/00_frame.png
new file mode 100644
index 0000000..2a78380
--- /dev/null
+++ b/docs/html/auto/images/assets/00_frame.png
Binary files differ
diff --git a/docs/html/auto/images/assets/01_a_maps.png b/docs/html/auto/images/assets/01_a_maps.png
new file mode 100644
index 0000000..0d1b219
--- /dev/null
+++ b/docs/html/auto/images/assets/01_a_maps.png
Binary files differ
diff --git a/docs/html/auto/images/assets/01_b_now.png b/docs/html/auto/images/assets/01_b_now.png
new file mode 100644
index 0000000..043ec74
--- /dev/null
+++ b/docs/html/auto/images/assets/01_b_now.png
Binary files differ
diff --git a/docs/html/auto/images/assets/02_a_notif.gif b/docs/html/auto/images/assets/02_a_notif.gif
new file mode 100644
index 0000000..6a830ae
--- /dev/null
+++ b/docs/html/auto/images/assets/02_a_notif.gif
Binary files differ
diff --git a/docs/html/auto/images/assets/02_b_switcher.gif b/docs/html/auto/images/assets/02_b_switcher.gif
new file mode 100644
index 0000000..626f94b
--- /dev/null
+++ b/docs/html/auto/images/assets/02_b_switcher.gif
Binary files differ
diff --git a/docs/html/auto/images/assets/03_a_musict.png b/docs/html/auto/images/assets/03_a_musict.png
new file mode 100644
index 0000000..4e11243
--- /dev/null
+++ b/docs/html/auto/images/assets/03_a_musict.png
Binary files differ
diff --git a/docs/html/auto/images/assets/03_b_voice.gif b/docs/html/auto/images/assets/03_b_voice.gif
new file mode 100644
index 0000000..ddd13e4
--- /dev/null
+++ b/docs/html/auto/images/assets/03_b_voice.gif
Binary files differ
diff --git a/docs/html/auto/images/assets/do_01_switcher.png b/docs/html/auto/images/assets/do_01_switcher.png
new file mode 100644
index 0000000..b654a13
--- /dev/null
+++ b/docs/html/auto/images/assets/do_01_switcher.png
Binary files differ
diff --git a/docs/html/auto/images/assets/do_02_music.png b/docs/html/auto/images/assets/do_02_music.png
new file mode 100644
index 0000000..59fc8df
--- /dev/null
+++ b/docs/html/auto/images/assets/do_02_music.png
Binary files differ
diff --git a/docs/html/auto/images/assets/do_03_more.png b/docs/html/auto/images/assets/do_03_more.png
new file mode 100644
index 0000000..17040d1
--- /dev/null
+++ b/docs/html/auto/images/assets/do_03_more.png
Binary files differ
diff --git a/docs/html/auto/images/assets/do_04_mdrawer.png b/docs/html/auto/images/assets/do_04_mdrawer.png
new file mode 100644
index 0000000..de94c22
--- /dev/null
+++ b/docs/html/auto/images/assets/do_04_mdrawer.png
Binary files differ
diff --git a/docs/html/auto/images/assets/do_05_template.png b/docs/html/auto/images/assets/do_05_template.png
new file mode 100644
index 0000000..4e11243
--- /dev/null
+++ b/docs/html/auto/images/assets/do_05_template.png
Binary files differ
diff --git a/docs/html/auto/images/assets/do_06_gdrawer.png b/docs/html/auto/images/assets/do_06_gdrawer.png
new file mode 100644
index 0000000..b02c0e6
--- /dev/null
+++ b/docs/html/auto/images/assets/do_06_gdrawer.png
Binary files differ
diff --git a/docs/html/auto/images/assets/do_07_notif.png b/docs/html/auto/images/assets/do_07_notif.png
new file mode 100644
index 0000000..50ea565
--- /dev/null
+++ b/docs/html/auto/images/assets/do_07_notif.png
Binary files differ
diff --git a/docs/html/auto/images/carlogos.png b/docs/html/auto/images/carlogos.png
deleted file mode 100644
index 3522aa3..0000000
--- a/docs/html/auto/images/carlogos.png
+++ /dev/null
Binary files differ
diff --git a/docs/html/auto/images/figure02.png b/docs/html/auto/images/figure02.png
deleted file mode 100644
index 1b87224..0000000
--- a/docs/html/auto/images/figure02.png
+++ /dev/null
Binary files differ
diff --git a/docs/html/auto/images/figure03.png b/docs/html/auto/images/figure03.png
deleted file mode 100644
index 0c4e20d..0000000
--- a/docs/html/auto/images/figure03.png
+++ /dev/null
Binary files differ
diff --git a/docs/html/auto/images/figure04.png b/docs/html/auto/images/figure04.png
deleted file mode 100644
index 3e9c894..0000000
--- a/docs/html/auto/images/figure04.png
+++ /dev/null
Binary files differ
diff --git a/docs/html/auto/images/figure05.png b/docs/html/auto/images/figure05.png
deleted file mode 100644
index 9c1d9b8..0000000
--- a/docs/html/auto/images/figure05.png
+++ /dev/null
Binary files differ
diff --git a/docs/html/auto/images/figure06.png b/docs/html/auto/images/figure06.png
deleted file mode 100644
index 8140f0c..0000000
--- a/docs/html/auto/images/figure06.png
+++ /dev/null
Binary files differ
diff --git a/docs/html/auto/images/figure07.png b/docs/html/auto/images/figure07.png
deleted file mode 100644
index 82c1c76..0000000
--- a/docs/html/auto/images/figure07.png
+++ /dev/null
Binary files differ
diff --git a/docs/html/auto/images/figure08.png b/docs/html/auto/images/figure08.png
deleted file mode 100644
index f11e3a8..0000000
--- a/docs/html/auto/images/figure08.png
+++ /dev/null
Binary files differ
diff --git a/docs/html/auto/images/hero.jpg b/docs/html/auto/images/hero.jpg
index 3f9114f..34b5b5d 100644
--- a/docs/html/auto/images/hero.jpg
+++ b/docs/html/auto/images/hero.jpg
Binary files differ
diff --git a/docs/html/auto/images/logos/apps/iheartradio.png b/docs/html/auto/images/logos/apps/iheartradio.png
new file mode 100644
index 0000000..8feb38d
--- /dev/null
+++ b/docs/html/auto/images/logos/apps/iheartradio.png
Binary files differ
diff --git a/docs/html/auto/images/logos/apps/joyride.png b/docs/html/auto/images/logos/apps/joyride.png
new file mode 100644
index 0000000..8c2897e
--- /dev/null
+++ b/docs/html/auto/images/logos/apps/joyride.png
Binary files differ
diff --git a/docs/html/auto/images/logos/apps/mlb.png b/docs/html/auto/images/logos/apps/mlb.png
new file mode 100644
index 0000000..ddde4cd
--- /dev/null
+++ b/docs/html/auto/images/logos/apps/mlb.png
Binary files differ
diff --git a/docs/html/auto/images/logos/apps/pandora.png b/docs/html/auto/images/logos/apps/pandora.png
new file mode 100644
index 0000000..13fa1d3
--- /dev/null
+++ b/docs/html/auto/images/logos/apps/pandora.png
Binary files differ
diff --git a/docs/html/auto/images/logos/apps/pocketcasts.png b/docs/html/auto/images/logos/apps/pocketcasts.png
new file mode 100644
index 0000000..5227937
--- /dev/null
+++ b/docs/html/auto/images/logos/apps/pocketcasts.png
Binary files differ
diff --git a/docs/html/auto/images/logos/apps/songza.png b/docs/html/auto/images/logos/apps/songza.png
new file mode 100644
index 0000000..3bd7107
--- /dev/null
+++ b/docs/html/auto/images/logos/apps/songza.png
Binary files differ
diff --git a/docs/html/auto/images/logos/apps/spotify.png b/docs/html/auto/images/logos/apps/spotify.png
new file mode 100644
index 0000000..d039fd3
--- /dev/null
+++ b/docs/html/auto/images/logos/apps/spotify.png
Binary files differ
diff --git a/docs/html/auto/images/logos/apps/stitcher.png b/docs/html/auto/images/logos/apps/stitcher.png
new file mode 100644
index 0000000..b77da12
--- /dev/null
+++ b/docs/html/auto/images/logos/apps/stitcher.png
Binary files differ
diff --git a/docs/html/auto/images/logos/apps/tunein.png b/docs/html/auto/images/logos/apps/tunein.png
new file mode 100644
index 0000000..137ba81
--- /dev/null
+++ b/docs/html/auto/images/logos/apps/tunein.png
Binary files differ
diff --git a/docs/html/auto/images/logos/apps/umano.png b/docs/html/auto/images/logos/apps/umano.png
new file mode 100644
index 0000000..7b59f95
--- /dev/null
+++ b/docs/html/auto/images/logos/apps/umano.png
Binary files differ
diff --git a/docs/html/auto/images/logos/auto/acura.png b/docs/html/auto/images/logos/auto/acura.png
new file mode 100644
index 0000000..4ba69cc
--- /dev/null
+++ b/docs/html/auto/images/logos/auto/acura.png
Binary files differ
diff --git a/docs/html/auto/images/logos/auto/audi.png b/docs/html/auto/images/logos/auto/audi.png
new file mode 100644
index 0000000..9b99efe
--- /dev/null
+++ b/docs/html/auto/images/logos/auto/audi.png
Binary files differ
diff --git a/docs/html/auto/images/logos/auto/bentley.png b/docs/html/auto/images/logos/auto/bentley.png
new file mode 100644
index 0000000..ed8cf47
--- /dev/null
+++ b/docs/html/auto/images/logos/auto/bentley.png
Binary files differ
diff --git a/docs/html/auto/images/logos/auto/chevrolet.png b/docs/html/auto/images/logos/auto/chevrolet.png
new file mode 100644
index 0000000..e0980b0
--- /dev/null
+++ b/docs/html/auto/images/logos/auto/chevrolet.png
Binary files differ
diff --git a/docs/html/auto/images/logos/auto/chrysler.png b/docs/html/auto/images/logos/auto/chrysler.png
new file mode 100644
index 0000000..f366cba
--- /dev/null
+++ b/docs/html/auto/images/logos/auto/chrysler.png
Binary files differ
diff --git a/docs/html/auto/images/logos/auto/datsun.png b/docs/html/auto/images/logos/auto/datsun.png
new file mode 100644
index 0000000..059ffd8
--- /dev/null
+++ b/docs/html/auto/images/logos/auto/datsun.png
Binary files differ
diff --git a/docs/html/auto/images/logos/auto/fiat.png b/docs/html/auto/images/logos/auto/fiat.png
new file mode 100644
index 0000000..aaa5cf3
--- /dev/null
+++ b/docs/html/auto/images/logos/auto/fiat.png
Binary files differ
diff --git a/docs/html/auto/images/logos/auto/honda.png b/docs/html/auto/images/logos/auto/honda.png
new file mode 100644
index 0000000..62ee38f
--- /dev/null
+++ b/docs/html/auto/images/logos/auto/honda.png
Binary files differ
diff --git a/docs/html/auto/images/logos/auto/hyundai.png b/docs/html/auto/images/logos/auto/hyundai.png
new file mode 100644
index 0000000..4744641
--- /dev/null
+++ b/docs/html/auto/images/logos/auto/hyundai.png
Binary files differ
diff --git a/docs/html/auto/images/logos/auto/infinity.png b/docs/html/auto/images/logos/auto/infinity.png
new file mode 100644
index 0000000..ad77351
--- /dev/null
+++ b/docs/html/auto/images/logos/auto/infinity.png
Binary files differ
diff --git a/docs/html/auto/images/logos/auto/kia.png b/docs/html/auto/images/logos/auto/kia.png
new file mode 100644
index 0000000..f8046d9
--- /dev/null
+++ b/docs/html/auto/images/logos/auto/kia.png
Binary files differ
diff --git a/docs/html/auto/images/logos/auto/maserati.png b/docs/html/auto/images/logos/auto/maserati.png
new file mode 100644
index 0000000..22bcf6a
--- /dev/null
+++ b/docs/html/auto/images/logos/auto/maserati.png
Binary files differ
diff --git a/docs/html/auto/images/logos/auto/mazda.png b/docs/html/auto/images/logos/auto/mazda.png
new file mode 100644
index 0000000..2281c90
--- /dev/null
+++ b/docs/html/auto/images/logos/auto/mazda.png
Binary files differ
diff --git a/docs/html/auto/images/logos/auto/mercedesbenz.png b/docs/html/auto/images/logos/auto/mercedesbenz.png
new file mode 100644
index 0000000..05fab0f
--- /dev/null
+++ b/docs/html/auto/images/logos/auto/mercedesbenz.png
Binary files differ
diff --git a/docs/html/auto/images/logos/auto/mitsubishi.png b/docs/html/auto/images/logos/auto/mitsubishi.png
new file mode 100644
index 0000000..1405b19
--- /dev/null
+++ b/docs/html/auto/images/logos/auto/mitsubishi.png
Binary files differ
diff --git a/docs/html/auto/images/logos/auto/nissan.png b/docs/html/auto/images/logos/auto/nissan.png
new file mode 100644
index 0000000..63bc4f7
--- /dev/null
+++ b/docs/html/auto/images/logos/auto/nissan.png
Binary files differ
diff --git a/docs/html/auto/images/logos/auto/opel.png b/docs/html/auto/images/logos/auto/opel.png
new file mode 100644
index 0000000..7e25ed5
--- /dev/null
+++ b/docs/html/auto/images/logos/auto/opel.png
Binary files differ
diff --git a/docs/html/auto/images/logos/auto/renault.png b/docs/html/auto/images/logos/auto/renault.png
new file mode 100644
index 0000000..65a4ae3
--- /dev/null
+++ b/docs/html/auto/images/logos/auto/renault.png
Binary files differ
diff --git a/docs/html/auto/images/logos/auto/seat.png b/docs/html/auto/images/logos/auto/seat.png
new file mode 100644
index 0000000..9802ccf
--- /dev/null
+++ b/docs/html/auto/images/logos/auto/seat.png
Binary files differ
diff --git a/docs/html/auto/images/logos/auto/skoda.png b/docs/html/auto/images/logos/auto/skoda.png
new file mode 100755
index 0000000..7bc06b0
--- /dev/null
+++ b/docs/html/auto/images/logos/auto/skoda.png
Binary files differ
diff --git a/docs/html/auto/images/logos/auto/subaru.png b/docs/html/auto/images/logos/auto/subaru.png
new file mode 100644
index 0000000..7407e61
--- /dev/null
+++ b/docs/html/auto/images/logos/auto/subaru.png
Binary files differ
diff --git a/docs/html/auto/images/logos/auto/suzuki.png b/docs/html/auto/images/logos/auto/suzuki.png
new file mode 100644
index 0000000..85fd7e5
--- /dev/null
+++ b/docs/html/auto/images/logos/auto/suzuki.png
Binary files differ
diff --git a/docs/html/auto/images/logos/auto/volkswagen.png b/docs/html/auto/images/logos/auto/volkswagen.png
new file mode 100644
index 0000000..febadf4
--- /dev/null
+++ b/docs/html/auto/images/logos/auto/volkswagen.png
Binary files differ
diff --git a/docs/html/auto/images/logos/auto/volvo.png b/docs/html/auto/images/logos/auto/volvo.png
new file mode 100644
index 0000000..683af26
--- /dev/null
+++ b/docs/html/auto/images/logos/auto/volvo.png
Binary files differ
diff --git a/docs/html/auto/images/logos/hard/alpine.png b/docs/html/auto/images/logos/hard/alpine.png
new file mode 100644
index 0000000..55f0e8a
--- /dev/null
+++ b/docs/html/auto/images/logos/hard/alpine.png
Binary files differ
diff --git a/docs/html/auto/images/logos/hard/clarion.png b/docs/html/auto/images/logos/hard/clarion.png
new file mode 100644
index 0000000..2288b99
--- /dev/null
+++ b/docs/html/auto/images/logos/hard/clarion.png
Binary files differ
diff --git a/docs/html/auto/images/logos/hard/cloudcar.png b/docs/html/auto/images/logos/hard/cloudcar.png
new file mode 100644
index 0000000..9e7e8b7
--- /dev/null
+++ b/docs/html/auto/images/logos/hard/cloudcar.png
Binary files differ
diff --git a/docs/html/auto/images/logos/hard/delphi.png b/docs/html/auto/images/logos/hard/delphi.png
new file mode 100644
index 0000000..a2a03de
--- /dev/null
+++ b/docs/html/auto/images/logos/hard/delphi.png
Binary files differ
diff --git a/docs/html/auto/images/logos/hard/freescale.png b/docs/html/auto/images/logos/hard/freescale.png
new file mode 100644
index 0000000..2909944
--- /dev/null
+++ b/docs/html/auto/images/logos/hard/freescale.png
Binary files differ
diff --git a/docs/html/auto/images/logos/hard/fujitsuten.png b/docs/html/auto/images/logos/hard/fujitsuten.png
new file mode 100644
index 0000000..70269e3
--- /dev/null
+++ b/docs/html/auto/images/logos/hard/fujitsuten.png
Binary files differ
diff --git a/docs/html/auto/images/logos/hard/harman.png b/docs/html/auto/images/logos/hard/harman.png
new file mode 100644
index 0000000..0fb295a
--- /dev/null
+++ b/docs/html/auto/images/logos/hard/harman.png
Binary files differ
diff --git a/docs/html/auto/images/logos/hard/jvc.png b/docs/html/auto/images/logos/hard/jvc.png
new file mode 100644
index 0000000..6a9c7ad
--- /dev/null
+++ b/docs/html/auto/images/logos/hard/jvc.png
Binary files differ
diff --git a/docs/html/auto/images/logos/hard/kenwood.png b/docs/html/auto/images/logos/hard/kenwood.png
new file mode 100644
index 0000000..3c80098
--- /dev/null
+++ b/docs/html/auto/images/logos/hard/kenwood.png
Binary files differ
diff --git a/docs/html/auto/images/logos/hard/lg.png b/docs/html/auto/images/logos/hard/lg.png
new file mode 100644
index 0000000..52feeff
--- /dev/null
+++ b/docs/html/auto/images/logos/hard/lg.png
Binary files differ
diff --git a/docs/html/auto/images/logos/hard/panasonic.png b/docs/html/auto/images/logos/hard/panasonic.png
new file mode 100644
index 0000000..b6aaaf1
--- /dev/null
+++ b/docs/html/auto/images/logos/hard/panasonic.png
Binary files differ
diff --git a/docs/html/auto/images/logos/hard/parrot.png b/docs/html/auto/images/logos/hard/parrot.png
new file mode 100644
index 0000000..d5bf41f
--- /dev/null
+++ b/docs/html/auto/images/logos/hard/parrot.png
Binary files differ
diff --git a/docs/html/auto/images/logos/hard/pioneer.png b/docs/html/auto/images/logos/hard/pioneer.png
new file mode 100644
index 0000000..307d71a
--- /dev/null
+++ b/docs/html/auto/images/logos/hard/pioneer.png
Binary files differ
diff --git a/docs/html/auto/images/logos/hard/renesas.png b/docs/html/auto/images/logos/hard/renesas.png
new file mode 100644
index 0000000..69ecab7
--- /dev/null
+++ b/docs/html/auto/images/logos/hard/renesas.png
Binary files differ
diff --git a/docs/html/auto/images/logos/hard/symphonyteleca.png b/docs/html/auto/images/logos/hard/symphonyteleca.png
new file mode 100644
index 0000000..0b3ebe5
--- /dev/null
+++ b/docs/html/auto/images/logos/hard/symphonyteleca.png
Binary files differ
diff --git a/docs/html/auto/images/logos/hard/texasinstruments.png b/docs/html/auto/images/logos/hard/texasinstruments.png
new file mode 100644
index 0000000..87d80cb5
--- /dev/null
+++ b/docs/html/auto/images/logos/hard/texasinstruments.png
Binary files differ
diff --git a/docs/html/auto/index.jd b/docs/html/auto/index.jd
index c7a3a4e..09374ad 100644
--- a/docs/html/auto/index.jd
+++ b/docs/html/auto/index.jd
@@ -23,6 +23,82 @@
#hero-height {
height:calc(100% - 100px);
}
+.img-logo {
+ margin:0 auto;
+ display:block;
+ margin-bottom:-28px !important;
+}
+.img-logo-thin {
+ margin:0 auto;
+ display:block;
+ margin-bottom:-55px !important;
+}
+.col-5 {
+ width:170px;
+}
+.auto-img-container-cols {
+ position:relative;
+ margin-bottom:25px;
+ margin-top:25px;
+}
+.auto-img-frame-cols {
+ z-index:2;
+ position:relative;
+}
+.auto-img-shot-cols {
+ position:absolute;
+ top:5px;
+ left:2px;
+ z-index:1;
+}
+</style>
+
+
+ <style>
+.fullpage>#footer,
+#jd-content>.content-footer.wrap {
+ display:none;
+}
+</style>
+
+<style>
+#footer {
+ display: none;
+}
+.content-footer {
+ display: none;
+}
+#hero-height {
+ height:calc(100% - 110px);
+}
+.img-logo {
+ margin:0 auto;
+ display:block;
+ margin-bottom:-28px !important;
+}
+.img-logo-thin {
+ margin:0 auto;
+ display:block;
+ margin-bottom:-55px !important;
+}
+.col-5 {
+ width:170px;
+}
+.auto-img-container-cols {
+ position:relative;
+ margin-bottom:25px;
+ margin-top:25px;
+}
+.auto-img-frame-cols {
+ z-index:2;
+ position:relative;
+}
+.auto-img-shot-cols {
+ position:absolute;
+ top:5px;
+ left:2px;
+ z-index:1;
+}
</style>
@@ -40,13 +116,14 @@
<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.
+ <p style="width:450px">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;">
+ <a href="{@docRoot}auto/overview.html" class="landing-button landing-primary"
+ style="margin-top:40px;">
Developer Overview
</a>
</div>
@@ -67,21 +144,33 @@
<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 class="landing-section-h1">
+ <div class="landing-h1">Extending Android to Cars</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.
+ <div class="landing-subhead">Android Auto brings the Android experience to
+ cars with apps like Google Now and Maps.</div>
+ <div class="cols">
+ <div class="col-8">
+ <div class="auto-img-container-cols">
+ <img class="auto-img-frame-cols" src="{@docRoot}auto/images/assets/00_frame.png" />
+ <img class="auto-img-shot-cols" src="{@docRoot}auto/images/assets/01_b_now.png" />
+ </div>
+ </div>
+ <div class="col-8">
+ <div class="auto-img-container-cols">
+ <img class="auto-img-frame-cols" src="{@docRoot}auto/images/assets/00_frame.png" />
+ <img class="auto-img-shot-cols" src="{@docRoot}auto/images/assets/01_a_maps.png" />
+ </div>
+ </div>
+ </div>
+
+ <p>When users connect their Android phones to compatible vehicles, Android Auto
+ shows a standard interface that lets them start enabled apps and services.
+ Android Auto locks the handheld device when connected, so drivers
+ interact with Auto by using the vehicle's input controls, touch display, and voice.</p>
</p>
</div>
-
</div> <!-- end .wrap -->
</div> <!-- end .landing-section -->
@@ -89,74 +178,70 @@
<div class="landing-section">
<div class="wrap">
<div class="landing-section-header">
- <div class="landing-h1">One Platform</div>
+ <div class="landing-h1">Build for One Platform</div>
+ <div class="landing-subhead">Create apps with the Android APIs you're familiar with
+ and extend them to cars with the Auto SDK.
+ </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
+
+ <div class="cols">
+ <div class="col-8">
+ <div class="auto-img-container-cols">
+ <img class="auto-img-frame-cols" src="{@docRoot}auto/images/assets/00_frame.png" />
+ <img class="auto-img-shot-cols" src="{@docRoot}auto/images/assets/02_b_switcher.gif" />
+ </div>
+ </div>
+ <div class="col-8">
+ <div class="auto-img-container-cols">
+ <img class="auto-img-frame-cols" src="{@docRoot}auto/images/assets/00_frame.png" />
+ <img class="auto-img-shot-cols" src="{@docRoot}auto/images/assets/02_a_notif.gif" />
+ </div>
+ </div>
+ </div>
+ <p>Write your apps 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>
+ interfaces, knobs, and touch controls. Your users get the same experience on any compatible
+ vehicle such as a consistent app launcher and system events such as notifications.</p>
</div>
</div> <!-- end .wrap -->
</div> <!-- end .landing-section -->
- <div class="landing-section landing-gray-background" >
+
+ <div class="landing-section landing-gray-background">
<div class="wrap">
<div class="landing-section-header">
- <div class="landing-h1">Minimizing Distraction</div>
+ <div class="landing-h1">Minimize Distraction</div>
+ <div class="landing-subhead">
+ Standard UI templates for several app categories let users focus on the road.
+ </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 class="cols">
+ <div class="col-8">
+ <div class="auto-img-container-cols">
+ <img class="auto-img-frame-cols" src="{@docRoot}auto/images/assets/00_frame.png" />
+ <img class="auto-img-shot-cols" src="{@docRoot}auto/images/assets/03_b_voice.gif" />
+ </div>
+ </div>
+ <div class="col-8">
+ <div class="auto-img-container-cols">
+ <img class="auto-img-frame-cols" src="{@docRoot}auto/images/assets/00_frame.png" />
+ <img class="auto-img-shot-cols" src="{@docRoot}auto/images/assets/03_a_musict.png" />
+ </div>
+ </div>
+ </div>
+ <p>These templates define the user interaction model for all
+ apps and let you hook into a standard UI with touch and voice controls. The templates
+ meet international best practices for reducing driver
+ distraction while still letting you customize and brand them to properly deliver your
+ content.
+ </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">
@@ -180,8 +265,7 @@
<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">
+ <p>
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>
@@ -191,6 +275,299 @@
</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">See What Others Have Done</div>
+ <div class="landing-subhead">We're working with developers to bring many popular apps
+ to Android Auto</div>
+ </div>
+ <div class="landing-body">
+ <div class="cols">
+
+ <div class="col-4">
+ <img src="{@docRoot}auto/images/logos/apps/joyride.png"
+ width="160" height="160" class="img-logo" />
+ </div>
+ <div class="col-4">
+ <img src="{@docRoot}auto/images/logos/apps/mlb.png"
+ width="160" height="160" class="img-logo" />
+ </div>
+ <div class="col-4">
+ <img src="{@docRoot}auto/images/logos/apps/pandora.png"
+ width="160" height="160" class="img-logo" />
+ </div>
+ <div class="col-4">
+ <img src="{@docRoot}auto/images/logos/apps/pocketcasts.png"
+ width="160" height="160" class="img-logo" />
+ </div>
+ </div>
+ <div class="cols">
+ <div class="col-4">
+ <img src="{@docRoot}auto/images/logos/apps/songza.png"
+ width="160" height="160" class="img-logo" />
+ </div>
+ <div class="col-4">
+ <img src="{@docRoot}auto/images/logos/apps/stitcher.png"
+ width="160" height="160" class="img-logo" />
+ </div>
+ <div class="col-4">
+ <img src="{@docRoot}auto/images/logos/apps/tunein.png"
+ width="160" height="160" class="img-logo" />
+ </div>
+ <div class="col-4">
+ <img src="{@docRoot}auto/images/logos/apps/umano.png"
+ width="160" height="160" class="img-logo" />
+ </div>
+ </div>
+ <div class="cols" style="margin-top:40px">
+ <div class="col-4">
+ <img src="{@docRoot}auto/images/logos/apps/iheartradio.png"
+ width="160" height="160" class="img-logo" />
+ </div>
+ <div class="col-12">
+ <p><em>
+ "The Android Auto APIs provide an easy way to integrate the most important features and functionality of iHeartRadio’s robust music service into a safety-minded automotive infotainment solution. The process was seamless, utilizing a flexible construct that allowed us to quickly adapt our existing product without losing any of the core experience our listeners know and love."</em></p>
+
+ <b>Ryan Goff<br>
+ Director of Automotive Integrations for Clear Channel Media and Entertainment</b>
+ </div>
+ </div>
+ <div class="cols" style="margin-top:60px">
+
+ <div class="col-4">
+ <img src="{@docRoot}auto/images/logos/apps/spotify.png"
+ width="160" height="160" class="img-logo" />
+ </div>
+ <div class="col-12"><p style="margin-top:20px"><em>
+ "Android Auto offers Spotify the exciting opportunity to easily enable safe access to millions of songs while driving. We were able to quickly develop for the platform using the new Android voice and media API extensions. As a result, Android users will soon be able to continue the Spotify experience in their cars, including being able to play any song, artist, album or playlist by voice.</em></p>
+ </div>
+ </div>
+ </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">
+ <div class="landing-subhead">
+ Android Auto is coming soon to new cars from these manufacturers
+ </div>
+ </div>
+ <div class="cols">
+ <div class="col-5">
+ <img src="{@docRoot}auto/images/logos/auto/acura.png"
+ width="120" height="120" class="img-logo" />
+ </div>
+ <div class="col-5">
+ <img src="{@docRoot}auto/images/logos/auto/audi.png"
+ width="120" height="120" class="img-logo" />
+ </div>
+ <div class="col-5">
+ <img src="{@docRoot}auto/images/logos/auto/bentley.png"
+ width="120" height="120" class="img-logo" />
+ </div>
+ <div class="col-5">
+ <img src="{@docRoot}auto/images/logos/auto/chevrolet.png"
+ width="120" height="120" class="img-logo" />
+ </div>
+ <div class="col-5">
+ <img src="{@docRoot}auto/images/logos/auto/chrysler.png"
+ width="120" height="120" class="img-logo" />
+ </div>
+ </div>
+ <div class="cols">
+ <div class="col-5">
+ <img src="{@docRoot}auto/images/logos/auto/datsun.png"
+ width="120" height="120" class="img-logo" />
+ </div>
+ <div class="col-5">
+ <img src="{@docRoot}auto/images/logos/auto/fiat.png"
+ width="120" height="120" class="img-logo" />
+ </div>
+ <div class="col-5">
+ <img src="{@docRoot}auto/images/logos/auto/honda.png"
+ width="120" height="120" class="img-logo" />
+ </div>
+ <div class="col-5">
+ <img src="{@docRoot}auto/images/logos/auto/hyundai.png"
+ width="120" height="120" class="img-logo" />
+ </div>
+ <div class="col-5">
+ <img src="{@docRoot}auto/images/logos/auto/infinity.png"
+ width="120" height="120" class="img-logo" />
+ </div>
+ </div>
+ <div class="cols">
+ <div class="col-5">
+ <img src="{@docRoot}auto/images/logos/auto/kia.png"
+ width="120" height="120" class="img-logo" />
+ </div>
+ <div class="col-5">
+ <img src="{@docRoot}auto/images/logos/auto/maserati.png"
+ width="120" height="120" class="img-logo" />
+ </div>
+ <div class="col-5">
+ <img src="{@docRoot}auto/images/logos/auto/mazda.png"
+ width="120" height="120" class="img-logo" />
+ </div>
+ <div class="col-5">
+ <img src="{@docRoot}auto/images/logos/auto/mercedesbenz.png"
+ width="120" height="120" class="img-logo" />
+ </div>
+ <div class="col-5">
+ <img src="{@docRoot}auto/images/logos/auto/mitsubishi.png"
+ width="120" height="120" class="img-logo" />
+ </div>
+ </div>
+ <div class="cols">
+ <div class="col-5">
+ <img src="{@docRoot}auto/images/logos/auto/nissan.png"
+ width="120" height="120" class="img-logo" />
+ </div>
+ <div class="col-5">
+ <img src="{@docRoot}auto/images/logos/auto/opel.png"
+ width="120" height="120" class="img-logo" />
+ </div>
+ <div class="col-5">
+ <img src="{@docRoot}auto/images/logos/auto/renault.png"
+ width="120" height="120" class="img-logo" />
+ </div>
+ <div class="col-5">
+ <img src="{@docRoot}auto/images/logos/auto/seat.png"
+ width="120" height="120" class="img-logo" />
+ </div>
+ <div class="col-5">
+ <img src="{@docRoot}auto/images/logos/auto/skoda.png"
+ width="120" height="120" class="img-logo" />
+ </div>
+ </div>
+ <div class="cols">
+ <div class="col-5">
+ <img src="{@docRoot}auto/images/logos/auto/subaru.png"
+ width="120" height="120" class="img-logo" />
+ </div>
+ <div class="col-5">
+ <img src="{@docRoot}auto/images/logos/auto/suzuki.png"
+ width="120" height="120" class="img-logo" />
+ </div>
+ <div class="col-5">
+ <img src="{@docRoot}auto/images/logos/auto/volkswagen.png"
+ width="120" height="120" class="img-logo" />
+ </div>
+ <div class="col-5">
+ <img src="{@docRoot}auto/images/logos/auto/volvo.png"
+ width="120" height="120" class="img-logo" />
+ </div>
+ <div class="col-5">
+ <!--<img src="/auto/images/logos/auto/skoda.png"
+ width="120" height="120" class="img-logo" />-->
+ </div>
+ </div>
+
+ <div class="landing-body landing-align-center">
+ <div class="landing-subhead" style="margin-top:80px">
+ Android Auto is also coming soon to aftermarket systems from these manufacturers:
+ </div>
+ </div>
+ <div class="cols">
+ <div class="col-5">
+ <img src="{@docRoot}auto/images/logos/hard/alpine.png"
+ width="120" height="120" class="img-logo-thin" />
+ </div>
+ <div class="col-5">
+ <img src="{@docRoot}auto/images/logos/hard/clarion.png"
+ width="120" height="120" class="img-logo-thin" />
+ </div>
+ <div class="col-5">
+ <img src="{@docRoot}auto/images/logos/hard/cloudcar.png"
+ width="120" height="120" class="img-logo-thin" />
+ </div>
+ <div class="col-5">
+ <img src="{@docRoot}auto/images/logos/hard/delphi.png"
+ width="120" height="120" class="img-logo-thin" />
+ </div>
+ <div class="col-5">
+ <img src="{@docRoot}auto/images/logos/hard/freescale.png"
+ width="120" height="120" class="img-logo-thin" />
+ </div>
+ </div>
+ <div class="cols">
+ <div class="col-5">
+ <img src="{@docRoot}auto/images/logos/hard/fujitsuten.png"
+ width="120" height="120" class="img-logo-thin" />
+ </div>
+ <div class="col-5">
+ <img src="{@docRoot}auto/images/logos/hard/harman.png"
+ width="120" height="120" class="img-logo-thin" />
+ </div>
+ <div class="col-5">
+ <img src="{@docRoot}auto/images/logos/hard/jvc.png"
+ width="120" height="120" class="img-logo-thin" />
+ </div>
+ <div class="col-5">
+ <img src="{@docRoot}auto/images/logos/hard/kenwood.png"
+ width="120" height="120" class="img-logo-thin" />
+ </div>
+ <div class="col-5">
+ <img src="{@docRoot}auto/images/logos/hard/lg.png"
+ width="120" height="120" class="img-logo-thin" />
+ </div>
+ </div>
+ <div class="cols">
+ <div class="col-5">
+ <img src="{@docRoot}auto/images/logos/hard/panasonic.png"
+ width="120" height="120" class="img-logo-thin" />
+ </div>
+ <div class="col-5">
+ <img src="{@docRoot}auto/images/logos/hard/parrot.png"
+ width="120" height="120" class="img-logo-thin" />
+ </div>
+ <div class="col-5">
+ <img src="{@docRoot}auto/images/logos/hard/pioneer.png"
+ width="120" height="120" class="img-logo-thin" />
+ </div>
+ <div class="col-5">
+ <img src="{@docRoot}auto/images/logos/hard/renesas.png"
+ width="120" height="120" class="img-logo-thin" />
+ </div>
+ <div class="col-5">
+ <img src="{@docRoot}auto/images/logos/hard/symphonyteleca.png"
+ width="120" height="120" class="img-logo-thin" />
+ </div>
+ </div>
+ <div class="cols">
+ <div class="col-5">
+ <img src="{@docRoot}auto/images/logos/hard/texasinstruments.png"
+ width="120" height="120" class="img-logo-thin" />
+ </div>
+ <div class="col-5">
+ <!--<img src="/auto/images/logos/hard/.png"
+ width="120" height="120" class="img-logo-thin" />-->
+ </div>
+ <div class="col-5">
+ <!--<img src="/auto/images/logos/hard/.png"
+ width="120" height="120" class="img-logo-thin" />-->
+ </div>
+ <div class="col-5">
+ <!--<img src="/auto/images/logos/hard/.png"
+ width="120" height="120" class="img-logo-thin" />-->
+ </div>
+ <div class="col-5">
+ <!--<img src="/auto/images/logos/hard/.png"
+ width="120" height="120" class="img-logo-thin" />-->
+ </div>
+ </div>
+ </div> <!-- end .wrap -->
+ </div> <!-- end .landing-section -->
</div> <!-- end .landing-rest-of-page -->
@@ -205,7 +582,7 @@
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>
diff --git a/docs/html/auto/overview.jd b/docs/html/auto/overview.jd
index 8748bff..728dff7 100644
--- a/docs/html/auto/overview.jd
+++ b/docs/html/auto/overview.jd
@@ -13,6 +13,49 @@
#copyright {
margin-top:-35px;
}
+.auto-img-container {
+ position:relative;
+}
+.auto-img-frame {
+ z-index:2;
+ position:relative;
+}
+.auto-img-shot {
+ position:absolute;
+ top:9px;
+ left:8px;
+ z-index:1;
+}
+.auto-img-container-cols {
+ position:relative;
+ margin-top:10px;
+}
+.auto-img-frame-cols {
+ z-index:2;
+ position:relative;
+}
+.auto-img-shot-cols {
+ position:absolute;
+ top:0px;
+ left:0px;
+ z-index:1;
+ border:1px solid #;
+ -webkit-border-radius: 7px;
+ -moz-border-radius: 7px;
+ border-radius: 7px;
+}
+.auto-col-2 {
+ width:380px;
+ display: inline;
+ float: left;
+ margin-left: 10px;
+ margin-right: 10px;
+}
+.auto-img-container-single {
+ width:380px;
+ margin:0 auto;
+ margin-top:20px;
+}
</style>
<div style="width:780px; margin:0 auto;">
@@ -79,13 +122,13 @@
Android Auto experience on a regular Android device.</p>
-<h2 id="design" style="margin-top:30px">Design</h2>
+<h2 id="design">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>
+<h3 id="designprinciples">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
@@ -105,52 +148,15 @@
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>
+<h2 id="architecture">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" />
+<img src="{@docRoot}auto/images/figure01.png" alt="" id="figure1" />
<p class="img-caption">
<strong>Figure 1</strong> - Architecture of Android Auto.
</p>
@@ -180,7 +186,7 @@
</ul>
-<h2 id="uitemplates" style="margin-top:30px">UI Templates</h2>
+<h2 id="uitemplates">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
@@ -192,89 +198,98 @@
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>
+<h3 id="launchapp">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 class="auto-img-container-single">
+ <div class="auto-img-container">
+ <img class="auto-img-frame-cols" src="/auto/images/assets/00_frame.png" />
+ <img class="auto-img-shot-cols" src="/auto/images/assets/do_01_switcher.png" />
+ </div>
+ <p class="img-caption" style="margin-top:0px">
+ <strong>Figure 2.</strong> The Launcher template.
+ </p>
</div>
-<h3 style="margin-top:25px">Primary App Template</h3>
+<h3>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" />
+<div class="cols">
+<div class="auto-col-2">
+ <div class="auto-img-container-cols">
+ <img class="auto-img-frame-cols" src="{@docRoot}auto/images/assets/00_frame.png" />
+ <img class="auto-img-shot-cols" src="{@docRoot}auto/images/assets/do_05_template.png" />
+ </div>
+</div>
+<div class="auto-col-2">
+ <div class="auto-img-container-cols">
+ <img class="auto-img-frame-cols" src="{@docRoot}auto/images/assets/00_frame.png" />
+ <img class="auto-img-shot-cols" src="{@docRoot}auto/images/assets/do_02_music.png" />
+ </div>
+</div>
+</div>
<p class="img-caption">
<strong>Figure 4.</strong> A customized template.
</p>
-</div>
-<h3 id="useractions" style="margin-top:25px">User Actions</h3>
+
+
+<h3 id="useractions">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 class="auto-img-container-single">
+ <div class="auto-img-container">
+ <img class="auto-img-frame-cols" src="/auto/images/assets/00_frame.png" />
+ <img class="auto-img-shot-cols" src="/auto/images/assets/do_03_more.png" />
+ </div>
+ <p class="img-caption" style="margin-top:0px">
+ <strong>Figure 5.</strong> Custom extra actions.
+ </p>
</div>
-<h3 id="drawertransitions" style="margin-top:25px">Drawer Transitions</h3>
+<h3 id="drawertransitions">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 class="cols">
+<div class="auto-col-2">
+ <div class="auto-img-container-cols">
+ <img class="auto-img-frame-cols" src="{@docRoot}auto/images/assets/00_frame.png" />
+ <img class="auto-img-shot-cols" src="{@docRoot}auto/images/assets/do_06_gdrawer.png" />
+ </div>
</div>
+<div class="auto-col-2">
+ <div class="auto-img-container-cols">
+ <img class="auto-img-frame-cols" src="{@docRoot}auto/images/assets/00_frame.png" />
+ <img class="auto-img-shot-cols" src="{@docRoot}auto/images/assets/do_04_mdrawer.png" />
+ </div>
+</div>
+</div>
+<p class="img-caption">
+ <strong>Figure 4.</strong> Generic and customized drawer templates.
+</p>
-<h3 id="daynighttransitions" style="margin-top:25px">Day and Night Transitions</h3>
+<h3 id="daynighttransitions">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>
+<h3 id="customizetemplates">Customizing Templates</h3>
<p>To customize the templates, provide the following app-specific resources and actions
to the Android Auto media client.</p>
@@ -288,7 +303,7 @@
<p>If provided, the media client automatically uses them in the templated UI.</p>
-<h2 id="devprocess" style="margin-top:30px">Development Process</h2>
+<h2 id="devprocess">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
@@ -327,7 +342,7 @@
controls.</p>
-<h2 id="emulator" style="margin-top:30px">Testing Your App on an Android Device</h2>
+<h2 id="emulator">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
@@ -348,7 +363,7 @@
in the UI controls.</p>
-<h2 id="running" style="margin-top:30px">Running Your App on Android Auto</h2>
+<h2 id="running">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
diff --git a/docs/html/distribute/essentials/essentials_toc.cs b/docs/html/distribute/essentials/essentials_toc.cs
index 7084fdd..d0a1114 100644
--- a/docs/html/distribute/essentials/essentials_toc.cs
+++ b/docs/html/distribute/essentials/essentials_toc.cs
@@ -11,12 +11,6 @@
</div>
</li>
<li class="nav-section">
- <div class="nav-section empty" style="font-weight:normal"><a href="<?cs var:toroot?>distribute/essentials/gpfe-guidelines.html">
- <span class="en">Education Guidelines</span>
- </a>
- </div>
- </li>
- <li class="nav-section">
<div class="nav-section empty" style="font-weight:normal"><a href="<?cs var:toroot?>distribute/essentials/optimizing-your-app.html">
<span class="en">Optimize Your App</span>
</a>
diff --git a/docs/html/distribute/essentials/gpfe-guidelines.jd b/docs/html/distribute/essentials/gpfe-guidelines.jd
deleted file mode 100644
index 734bddc..0000000
--- a/docs/html/distribute/essentials/gpfe-guidelines.jd
+++ /dev/null
@@ -1,509 +0,0 @@
-page.title=Education Guidelines
-page.metaDescription=These guidelines and requirements help you develop great apps for students, which offer compelling content and an intuitive user experience on Android tablets.
-page.image=/distribute/images/edu-guidelines.jpg
-Xnonavpage=true
-
-@jd:body
-
-
-<div id="qv-wrapper"><div id="qv">
-<h2>Guidelines</h2>
-<ol>
-<li><a href="#basic-reqts">Basic Requirements</a></li>
-<li><a href="#monetizing-ads">Monetizing and Ads</a></li>
-<li><a href="#e-value">Educational Value</a></li>
-<li><a href="#quality">App Quality</a></li>
-<li><a href="#related-resources">Related Resources</a></li>
-</ol>
-
-<h2>
- Testing
-</h2>
-
-<ol>
- <li>
- <a href="#test-environment">Setting Up a Test Environment</a>
- </li>
-</ol>
-
-</div></div>
-
-<div style="margin:0 0 1em 0;">
- <img src="{@docRoot}distribute/images/edu-guidelines.jpg" style=
- "width:274px;">
-</div>
-
-<p>
- These guidelines and requirements help you develop great apps for students,
- which offer compelling content and an intuitive user experience on Android
- tablets.
-</p>
-
-<p>
- You’ll also need to ensure that your apps comply with the terms of the
- <a href=
- "https://play.google.com/about/developer-distribution-agreement-addendum.html">
- Google Play for Education Addendum</a>, <a href=
- "http://play.google.com/about/developer-content-policy.html">Google Play
- Developer Program Policies</a>, and <a href=
- "http://play.google.com/about/developer-distribution-agreement.html">Developer
- Distribution Agreement</a>.
-</p>
-
-<div class="headerLine">
- <h2 id="basic-reqts">
- Basic Requirements
- </h2>
-
-
-</div>
-
-<p>
- To participate, your apps must be designed for the K-12 market. The basic
- requirements that your apps must meet are:
-</p>
-
-<ul>
- <li>
- <p>
- Apps and the ads they contain must not collect personally identifiable
- information, other than user credentials or data required to operate and
- improve the app.
- </p>
- </li>
-
- <li>
- <p>
- Apps must not use student data for purposes unrelated to its educational
- function.
- </p>
- </li>
-
- <li>
- <p>
- Apps must have a content rating of "Everyone" or "Low Maturity" (apps
- with a "Medium Maturity" rating are allowed, if they have that rating
- solely because they allow communication between students).
- </p>
- </li>
-
- <li>
- <p>
- App content, including ads displayed by the app, must be consistent with
- the app's maturity rating. The app must not display any "offensive"
- content, as described in the <a href=
- "http://play.google.com/about/developer-content-policy.html">Google Play
- Developer Program Policies</a> and <a href=
- "https://support.google.com/googleplay/android-developer/answer/188189">content-rating
- guidelines</a>.
- </p>
- </li>
-
- <li>
- <p>
- Apps must comply with the Children’s Online Privacy Protection Act and
- all other applicable laws and regulations.
- </p>
- </li>
-</ul>
-
-<div class="headerLine">
- <h2 id="monetizing-ads">
- Monetizing and Ads
- </h2>
-
-
-</div>
-
-<p>
- In-app purchase is currently not supported with Google Play for Education, so
- a student device will block any transactions. To avoid confusion, be sure to
- remove any in-app purchase buttons and related UI elements from your apps.
- We’re investigating additional purchase mechanisms to enable more flexible
- pricing models for developers and schools.
-</p>
-
-<p>
- If your apps are priced In Google Play for Education, you must allow Google
- Play to offer teachers limited free trials before purchase (you provide this
- through business terms only, no development work is needed.)
-</p>
-
-<p>
- You can only choose not to remove in-app purchasing from your apps where all
- content and services are sold through Google Play for Education using In-app
- Billing. If you choose not to remove In-app Billing features, ensure that:
-</p>
-
-<ul>
- <li>
- <p>
- Users can access your apps’ core functionality for a classroom setting
- without an in-app purchase.
- </p>
- </li>
-
- <li>
- <p>
- In-app purchases are clearly identifiable in your UI.
- </p>
- </li>
-
- <li>
- <p>
- You declare the use of in-app purchases at <a href=
- "{@docRoot}distribute/googleplay/edu/start.html#publish">opt-in</a>.
- </p>
- </li>
-</ul>
-
-<p>
- For each app that you publish, you can set a single price that applies to
- both Google Play and Google Play for Education. You can’t set a different
- price for a given app (based on a single package name) in Google Play for
- Education.
-</p>
-
-<p>
- If your apps display ads, you should disable the display of ads if possible,
- or ensure that:
-</p>
-
-<ul>
- <li>Ads are not distracting for students or teachers (this includes
- Flash-based ads, video ads, and ads that flash or move)
- </li>
-
- <li>Interstitial ads are not served in the app
- </li>
-
- <li>Ad walls do not appear in the app UI
- </li>
-
- <li>Ads do not occupy a significant portion of the screen
- </li>
-
- <li>Ads content does not exceed the maturity rating of the app.
- </li>
-
- <li>
- <p>
- You declare the use of ads at <a href=
- "{@docRoot}distribute/googleplay/edu/start.html#publish">opt-in</a>.
- </p>
- </li>
-</ul>
-
-<div class="headerLine">
- <h2 id="e-value">
- Educational Value
- </h2>
-
-
-</div>
-
-<div class="figure">
- <img src="{@docRoot}images/gp-e-value.png" class="border-img">
-</div>
-
-<p>
- Apps submitted to Google Play for Education will be evaluated by a
- third-party educator network, which will review them based on alignment with
- <a href="http://www.corestandards.org/">Common Core Standards</a> and other
- educational considerations. This will help make your content more
- discoverable for teachers and administrators as they browse by grade level,
- subject, core curriculum, and other parameters.
-</p>
-
-<p>
- Apps with highest educational value will have these characteristics:
-</p>
-
-<ul>
- <li>
- <p>
- Designed for use in K-12 classrooms.
- </p>
- </li>
-
- <li>
- <p>
- Aligned with a common core standard or support common-core learning.
- </p>
- </li>
-
- <li>
- <p>
- Simple, easy to use, and intuitive for the grade levels the apps are
- targeting. Apps are relatively easy to navigate without teacher guidance.
- Not distracting or overwhelming to students.
- </p>
- </li>
-
- <li>
- <p>
- Enjoyable and interactive. Apps are engaging to students and lets them
- control their experience.
- </p>
- </li>
-
- <li>
- <p>
- Versatile. Apps have features that make them useful for more than one
- classroom function or lesson throughout the school year.
- </p>
- </li>
-
- <li>
- <p>
- Supports the "4Cs":
- </p>
-
- <ul>
- <li>
- <p>
- <em>Creativity</em> — Allows students to create in order to
- express understanding of the learning objectives, and try new
- approaches, innovation, and invention to get things done.
- </p>
- </li>
-
- <li>
- <p>
- <em>Critical thinking</em> — Allows students to look at
- problems in a new way, linking learning across subjects and
- disciplines.
- </p>
- </li>
-
- <li>
- <p>
- <em>Collaboration</em> — Allows students and (if appropriate)
- educators to work together to reach a goal.
- </p>
- </li>
-
- <li>
- <p>
- <em>Communication</em> — Allows students to comprehend,
- critique and share thoughts, questions, ideas, and solutions.
- </p>
- </li>
- </ul>
- </li>
-</ul>
-
-<p>
- As you design and develop your apps, make sure they offer high educational
- value by addressing as many of these characteristics as possible.
-</p>
-
-<div class="headerLine">
- <h2 id="quality">
- App Quality
- </h2>
-
-
-</div>
-
-<div class="figure">
- <img src="{@docRoot}images/gp-edu-quality.png">
-</div>
-
-<p>
- Your apps should be designed to perform well and look great on Android
- tablets, and they should offer the best user experience possible.
-</p>
-
-<p>
- High quality apps are engaging, intuitive, and offer compelling content.
- Google Play for Education will highlight high-quality apps for easy discovery
- in the store. Here are some recommendations for making your app easy for
- students and teachers to enjoy:
-</p>
-
-<ul>
- <li>
- <p>
- Meet the Core Quality Guidelines:
- </p>
-
- <ul>
- <li>
- <p>
- Follow <a href="{@docRoot}design/index.html">Android Design
- Guidelines</a>. Pay special attention to the sections on <a href=
- "{@docRoot}design/patterns/actionbar.html">Action Bar</a>, <a href=
- "{@docRoot}design/patterns/navigation.html">Navigation</a>, and
- <a href="{@docRoot}design/patterns/pure-android.html">Pure
- Android</a>.
- </p>
- </li>
-
- <li>
- <p>
- Test your apps against the <a href=
- "{@docRoot}distribute/essentials/quality/core.html">Core Quality
- Guidelines</a>.
- </p>
- </li>
- </ul>
- </li>
-
- <li>
- <p>
- Meet the Tablet App Quality guidelines:
- </p>
-
- <ul>
- <li>
- <p>
- Follow our best practices for tablet app development.
- </p>
- </li>
-
- <li>
- <p>
- Review the <a href=
- "{@docRoot}distribute/essentials/quality/tablets.html">Tablet App
- Quality</a> guidelines and <a href=
- "http://android-developers.blogspot.com/2012/11/designing-for-tablets-were-here-to-help.html">
- blog post on designing for tablets.</a>
- </p>
-
- <ul>
- <li>Check your Optimization Tips in the <a href=
- "https://play.google.com/apps/publish/">Developer Console</a> (if
- you've already uploaded your apps.)
- </li>
- </ul>
- </li>
-
- <li>
- <p>
- Strive for simplicity and highest usability for students:
- </p>
-
- <ul>
- <li>
- <p>
- Design your app so that teachers and students can use all the
- capabilities of your app without having to sign-in to multiple
- accounts and remember multiple passwords.
- </p>
- </li>
-
- <li>
- <p>
- Every student or teacher using a Google Play for Education tablet
- will already be signed in with a Google account on the device.
- You can take advantage of that to provide a simple, seamless
- sign-in experience in your app. A recommended approach is to use
- <a href="{@docRoot}google/play-services/auth.html">Google OAuth 2
- authorization</a> through Google Play Services.
- </p>
- </li>
- </ul>
- </li>
- </ul>
- </li>
-</ul>
-
-<div class="headerLine">
- <h2 id="test-environment">
- Test Environment
- </h2>
-
-
-</div>
-
-<p>
- To test your app and assess it against the guidelines in this document, it's
- recommended that you <a href=
- "{@docRoot}distribute/essentials/quality/tablets.html#test-environment">set
- up a test environment</a> that replicates the actual environment in which
- students and teachers will run your app.
-</p>
-
-<h3>
- Test conditions
-</h3>
-
-<p>
- Make sure to test your apps under conditions that simulate those of schools.
- For example, Google Play for Education lets administrators <a href=
- "https://support.google.com/a/answer/182442?hl=en">control or disable certain
- capabilities</a> for students, so it's good to test your app with those
- capabilities disabled. Below are some conditions to test your apps for, to
- ensure best results in the Google Play for Education environment:
-</p>
-
-<ul>
- <li>
- <p>
- <em>Android version</em> — Test the apps on devices running Android
- 4.2. Google Play for Education devices will be running Android 4.2 or
- higher (API level 17+).
- </p>
- </li>
-
- <li>
- <p>
- <em>Proxy server</em> — Test the apps in a network environment that
- uses proxies. Many schools use proxies.
- </p>
- </li>
-
- <li>
- <p>
- <em>No location services</em> — Test the apps to make sure they
- work properly with location services disabled. Many schools will disable
- location services for student devices.
- </p>
- </li>
-
- <li>
- <p>
- <em>No In-app Billing</em> — Test the apps to make sure they work
- properly without access to In-app Billing. In-app purchases are blocked
- on Google Play for Education devices.
- </p>
- </li>
-
- <li>
- <p>
- <em>No Bluetooth</em> — Test the apps to make sure they work
- properly when Bluetooth is disabled. Many schools will disable Bluetooth
- on student devices.
- </p>
- </li>
-
- <li>
- <p>
- <em>No access to network</em> — Test the app to make sure it works
- properly when the device cannot connect to the internet.
- </p>
- </li>
-</ul>
-
-<div class="headerLine">
-<h2>Related Resources</h2>
-</div>
-
-<div class="dynamic-grid">
-<h3>FOR DEVELOPERS</h3>
-
-<div class="resource-widget resource-flow-layout col-13"
- data-query="collection:distribute/essentials/eduessentials/developers"
- data-sortOrder="-timestamp"
- data-cardSizes="6x3,6x3,6x3"
- data-maxResults="6"></div>
-
-<h3>FOR TEACHERS AND EDUCATORS</h3>
-
-<div class="resource-widget resource-flow-layout col-13"
- data-query="collection:distribute/essentials/eduessentials/educators"
- data-sortOrder="-timestamp"
- data-cardSizes="6x3,6x3,6x3"
- data-maxResults="3"></div>
-</div>
\ No newline at end of file
diff --git a/docs/html/distribute/googleplay/edu/about.jd b/docs/html/distribute/googleplay/edu/about.jd
index e73356e..60d9402 100644
--- a/docs/html/distribute/googleplay/edu/about.jd
+++ b/docs/html/distribute/googleplay/edu/about.jd
@@ -9,7 +9,7 @@
<p>
Google Play for Education is an extension of Google Play designed for
- schools. Here educators can discover apps approved by teachers for teachers,
+ schools. Here educators can discover Android and Chrome apps approved by teachers for teachers,
as well as educational videos and a collection of classic books for their
classroom.
</p>
@@ -22,7 +22,7 @@
</p>
-<div class="resource-widget resource-flow-layout col-13"
+<div class="resource-widget resource-flow-layout col-13" style="height:323px"
data-query="collection:distribute/googleplay/gpfe/highlight"
data-sortOrder="-timestamp"
data-cardSizes="18x6,"
diff --git a/docs/html/distribute/googleplay/edu/faq.jd b/docs/html/distribute/googleplay/edu/faq.jd
deleted file mode 100644
index 36e2064..0000000
--- a/docs/html/distribute/googleplay/edu/faq.jd
+++ /dev/null
@@ -1,433 +0,0 @@
-page.title=Education FAQ
-meta.tags="gpfe, edu"
-page.metaDescription=Answers to frequent questions about Google Play for Education.
-page.image=/distribute/images/gpfe-faq.jpg
-
-@jd:body
-
-<div id="qv-wrapper">
- <div id="qv">
- <h2>
- Topics
- </h2>
-
- <ol>
- <li>
- <a href="#business-model-and-monetization">Business Model and
- Monetization</a>
- </li>
-
- <li>
- <a href="#free-trials">Free Trials</a>
- </li>
-
- <li>
- <a href="#discovery">Discovery</a>
- </li>
-
- <li>
- <a href="#app-review-process">App Review Process</a>
- </li>
-
- <li>
- <a href="#app-features">App Features</a>
- </li>
-
- <li>
- <a href="#marketing-and-roi">Marketing and ROI</a>
- </li>
-
- <li>
- <a href="#devices">Devices</a>
- </li>
-
- <li>
- <a href="#accounts">Accounts</a>
- </li>
-
- <li>
- <a href="#related-resources">Related Resources</a>
- </li>
- </ol>
- </div>
-</div>
-
-<p>
- This page provides answers to common questions that you might have about
- Google Play for Education.
-</p>
-
-<div class="headerLine">
- <h2 id="business-model-and-monetization">
- Business Model and Monetization
- </h2>
-
-
-</div>
-
-<p>
- <strong>What is Google Play for Education?</strong>
-</p>
-
-<p>
- Google Play for Education is a new online destination designed for schools.
- Teachers can discover educational apps, books, and videos to meet the needs
- of a single student, a classroom, or a whole district. Educators can browse
- apps by grade, subject, keyword, or standard including Common Core State
- Standards. Purchasing is done using a PO with no credit card required. Apps
- are distributed to tablets instantly through the cloud.
-</p>
-
-<p>
- <strong>Is Google Play for Education primarily for students or
- educators?</strong>
-</p>
-
-<p>
- The store on Google Play for Education is for educators, but its content is
- for both educators and students. Teachers and administrators have the ability
- to make purchases and control who within their school has access to the
- purchase flows.
-</p>
-
-<div class="figure">
- <img src="{@docRoot}distribute/images/gpfe-faq.jpg" style=
- "width:480px;margin:1em 0em 1.5em 1.5em;">
-</div>
-
-<p>
- <strong>Will Google Play for Education support subscription
- purchases?</strong>
-</p>
-
-<p>
- Currently, Google Play for Education supports one-time purchases. We’re
- investigating additional purchase mechanisms to enable more flexible pricing
- models for developers and schools.
-</p>
-
-<p>
- <strong>Why is it recommended that in-app purchase features are
- removed?</strong>
-</p>
-
-<p>
- In-app Billing is currently not supported with Google Play for Education, and
- a student device will block the Google Play transaction if a student attempts
- to make an in-app purchase. To avoid confusing students, we recommend not
- including any in-app purchase buttons and other UI in your apps. We’re
- investigating additional purchase mechanisms to enable more flexible pricing
- models for developers and schools.
-</p>
-
-<p>
- <strong>Is Google Play for Education restricted so only its users can
- purchase from the Google Play for Education? Or will anyone be able to
- purchase from it?</strong>
-</p>
-
-<p>
- Currently, only schools that are signed up for Google Play for Education can
- make purchases on it.
-</p>
-
-<p>
- <strong>Can I set different prices for my apps in Google Play for Education
- and Google Play?</strong>
-</p>
-
-<p>
- You set a single price for each app that applies to both Google Play and
- Google Play for Education. You can’t set a different price for a given app
- (based on a single package name) in Google Play for Education.
-</p>
-
-<div class="headerLine">
- <h2 id="free-trials">
- Free Trials
- </h2>
-
-
-</div>
-
-<p>
- <strong>Can I offer free trials through Google Play for Education?</strong>
-</p>
-
-<p>
- Google Play for Education doesn't currently support free trials. If you want,
- you can offer a free version of your app with limited functionality in Google
- Play for Education, but that app would need to be separate from your paid app
- and be reviewed separately for educational content.
-</p>
-
-<p>
- <strong>Can I offer a free trial through Google Play's "In-app Subscriptions
- with Free Trials" feature?</strong>
-</p>
-
-<p>
- Google Play for Education doesn’t currently support In-app Billing or In-app
- Subscriptions with free trials.
-</p>
-
-<div class="headerLine">
- <h2 id="discovery">
- Discovery
- </h2>
-
-
-</div>
-
-<p>
- <strong>What are the categories in Google Play for Education?</strong>
-</p>
-
-<p>
- Google Play for Education includes categories for all grade levels from
- Kindergarten to 12 and the following subjects: English Language Arts, World
- Languages, Mathematics, Science, Social Science, Elective, Open Education
- Resources (OER), and Tools.
-</p>
-
-<p>
- <strong>I created an app specifically for Google Play for Education and don’t
- want it to show up in Google Play. Is this possible?</strong>
-</p>
-
-<p>
- Currently, it’s not possible to publish an app on Google Play for Education
- and make it unavailable on Google Play.
-</p>
-
-<p>
- <strong>If my app offers content for every level of education, how will it
- fit the Common Core State Standard filters?</strong>
-</p>
-
-<p>
- If your app applies to multiple levels of education, then the app will show
- up in filtered results for multiple levels.
-</p>
-
-<div class="headerLine">
- <h2 id="app-review-process">
- App Review Process
- </h2>
-
-
-</div>
-
-<p>
- <strong>How are apps being reviewed? By whom and against what
- criteria?</strong>
-</p>
-
-<p>
- Apps are being reviewed by a third-party network of educators. These
- educators assign the appropriate subject, grade, and Common Core State
- Standards metadata, as well as evaluating whether the app meets the Google
- Play for Education <a href=
- "{@docRoot}distribute/essentials/gpfe-guidelines.html">criteria for classroom
- use</a>.
-</p>
-
-<p>
- <strong>How do I update my apps in Google Play for Education?</strong>
-</p>
-
-<p>
- You can update your apps on Google Play for Education in the same manner you
- do on Google Play. App updates will not be reviewed prior to being made
- available through Google Play for Education. However, we will periodically
- review updated apps for quality.
-</p>
-
-<p>
- <strong>Does the app maturity rating reflect solely on what a user can do
- within my Android app, or does the web version of my app influence the rating
- as well?</strong>
-</p>
-
-<p>
- The maturity rating that you set for an Android app refers only to the
- content displayed in that app.
-</p>
-
-<div class="headerLine">
- <h2 id="app-features">
- App Features
- </h2>
-
-
-</div>
-
-<p>
- <strong>Do I need separate builds of my phone and tablet apps for Google Play
- for Education, or is it the exact same app that lives on Google
- Play?</strong>
-</p>
-
-<p>
- We recommend you create one app and use it in both Google Play and Google
- Play for Education.
-</p>
-
-<p>
- <strong>What is the best way to get students’ work within apps sent back to
- their teachers?</strong>
-</p>
-
-<p>
- Teachers have mentioned that many apps achieve this by email from a third
- party, which isn’t optimal for schools. As many schools use Google Apps for
- Education, consider integrating your apps with Google Drive using the
- <a href="https://developers.google.com/drive/about-sdk">SDK</a>.
-</p>
-
-<p>
- <strong>How can developers test the teacher experience in Google Play for
- Education? Is there a way to get an account to test it?</strong>
-</p>
-
-<p>
- Currently, we are unable to provide developers with a test account to test
- the Google Play for Education user experience. We’re investigating ways to
- allow developers to simulate the environment.
-</p>
-
-<p>
- <strong>If I already have an app in the Chrome Apps Pack will I get some help
- migrating this to Android?</strong>
-</p>
-
-<p>
- If you’d like to reach tablet users in schools we encourage you to build a
- native app for the optimal user experience. Considerations for building your
- apps can be found in the <a href=
- "{@docRoot}distribute/essentials/gpfe-guidelines.html">Google Play for
- Education Guidelines</a>.
-</p>
-
-<div class="headerLine">
- <h2 id="marketing-and-roi">
- Marketing and ROI
- </h2>
-
-
-</div>
-
-<p>
- <strong>What are you doing to promote these apps to educators?</strong>
-</p>
-
-<p>
- Google Play for Education is an extension of Google Play targeting schools
- and making the discovery of educational apps easier. It helps your apps gain
- visibility with the right audiences, without having to knock on school doors.
- We’re constantly referring to the highest quality apps in our educator
- outreach. We’ve also developed a series of collections to help educators
- quickly browse apps for the most common use cases.
-</p>
-
-<p>
- <strong>How many installs have similar apps had on Google Play for Education?
- How much can I expect to make if I do an ROI analysis?</strong>
-</p>
-
-<p>
- While we cannot disclose specific numbers, Google Play app listings provide
- app download ranges for all apps.
-</p>
-
-<p>
- <strong>What is the seasonality like for the education market? What are the
- key timing considerations for app developers?</strong>
-</p>
-
-<p>
- In the United States, school districts’ budget decisions go through a
- planning phase in the Spring with budgets being released on July 1. We’ve
- observed high purchase-volumes in the second quarter of the calendar year, to
- use up end-of-year budgets. New budget purchases begin in the third quarter
- of the calendar year.
-</p>
-
-<p>
- <strong>Is there a way to offer a special deal, such as a discount, only on
- Google Play for Education and not on Google Play?</strong>
-</p>
-
-<p>
- No, this isn’t possible. Pricing, including special offers, must be the same
- between Google Play for Education and Google Play.
-</p>
-
-<div class="headerLine">
- <h2 id="devices">
- Devices
- </h2>
-
-
-</div>
-
-<p>
- <strong>Which devices are available in the program? Will more be
- available?</strong>
-</p>
-
-<p>
- Nexus 7 is available for shipment now, and the Asus Transformer, HP Slate 8
- Pro, and Galaxy Tab for Education will be available in early 2014. We look
- forward to welcoming more Android devices into the Google in Education family
- soon.
-</p>
-
-<p>
- <strong>Can the devices be shared among many students?</strong>
-</p>
-
-<p>
- No. Currently, this program is for one-to-one use. Each student can login to
- one specific tablet that is allocated to them.
-</p>
-
-<div class="headerLine">
- <h2 id="accounts">
- Accounts
- </h2>
-
-
-</div>
-
-<p>
- <strong>Will an app know whether a user is a teacher or student?</strong>
-</p>
-
-<p>
- No, the app has no mechanism for knowing if it’s running on a teacher’s
- device or a student’s device. We recommend developers use their own user
- database to enable this feature, where logins can be based on Google Account
- information.
-</p>
-
-<p>
- <strong>What log-in method do you recommend for an app on Google Play for
- Education?</strong>
-</p>
-
-<p>
- One of the key pieces of feedback we’ve heard multiple times from various
- schools is that they prefer apps that offer Google Single Sign-on, so that
- teachers and students don’t need to remember multiple log-in credentials. As
- schools in the program use Google Accounts and Google Apps for Education,
- offering Google Single Sign-on is ideal.
-</p>
-<div class="headerLine"><h2 id="related-resources">Related Resources</h2></div>
-
-<div class="resource-widget resource-flow-layout col-13"
- data-query="collection:distribute/toolsreference/gpfefaq"
- data-sortOrder="-timestamp"
- data-cardSizes="6x3,6x3,6x3,9x3,9x3,9x3"
- data-maxResults="6"></div>
-
diff --git a/docs/html/distribute/googleplay/edu/start.jd b/docs/html/distribute/googleplay/edu/start.jd
index 4886b5a..136611c 100644
--- a/docs/html/distribute/googleplay/edu/start.jd
+++ b/docs/html/distribute/googleplay/edu/start.jd
@@ -1,4 +1,4 @@
-page.title=Get Started with Education
+page.title=Publish Android Apps for Education
page.image=/distribute/images/play-education.jpg
meta.tags="education", "guidelines", "quality"
page.tags="education", "addendum"
@@ -16,21 +16,23 @@
</ol>
</div></div>
<p>
- If you've got great apps for education and want to reach even more teachers
+ If you've got great Android apps for education and want to reach even more teachers
and students, you can join the <strong>Google Play for Education</strong>
program in a few simple steps. You do everything using the familiar tools and
processes in Google Play.
</p>
<p>
- Note that Google Play for Education is currently available to <strong>K-12
- schools in the United States</strong> only.
+Note that Google Play for Education is currently available to <strong>K-12 schools in the United
+States</strong> only.</p>
+
+<p>If you have an educational Chrome app instead of an Android app, you can learn more about
+Chrome Apps in Google Play for Education at <a href=
+"https://developers.google.com/edu">developers.google.com/edu</a>.
</p>
-<div class="center-img">
- <img src="{@docRoot}images/gpfe-start-0.jpg" style=
- "border:1px solid #ddd;padding:0px;width:100%;">
-</div>
+<img src="{@docRoot}images/gpfe-start-0.jpg" style=
+ "border:1px solid #ddd;padding:0px" width="760" height="403">
<div class="headerLine">
<h2 id="register">
diff --git a/docs/html/distribute/googleplay/googleplay_toc.cs b/docs/html/distribute/googleplay/googleplay_toc.cs
index 4196c39..36e424a 100644
--- a/docs/html/distribute/googleplay/googleplay_toc.cs
+++ b/docs/html/distribute/googleplay/googleplay_toc.cs
@@ -25,13 +25,7 @@
</li>
<li class="nav-section">
<div class="nav-section empty" style="font-weight:normal"><a href="<?cs var:toroot?>distribute/googleplay/edu/start.html">
- <span class="en">Get Started with Education</span>
- </a>
- </div>
- </li>
- <li class="nav-section">
- <div class="nav-section empty" style="font-weight:normal"><a href="<?cs var:toroot?>distribute/googleplay/edu/faq.html">
- <span class="en">Education FAQ</span>
+ <span class="en">Publish Android Apps for Education</span>
</a>
</div>
</li>
diff --git a/docs/html/google/play-services/index.jd b/docs/html/google/play-services/index.jd
index f5d4574..eec4f5a 100644
--- a/docs/html/google/play-services/index.jd
+++ b/docs/html/google/play-services/index.jd
@@ -11,10 +11,8 @@
<div class="col-6">
<h1 itemprop="name" style="margin-bottom:0;">Google Play Services</h1>
- <p itemprop="description">
- </p>
-
- <p>Give your apps more features to attract users on a wider range of devices.
+ <p itemprop="description">Give your apps more features to attract users
+ on a wider range of devices.
With Google Play services, your app can take advantage
of the latest, Google-powered features such as Maps, Google+, and more,
with automatic platform updates distributed as an APK through
diff --git a/docs/html/guide/guide_toc.cs b/docs/html/guide/guide_toc.cs
index ff08312..ea36405 100644
--- a/docs/html/guide/guide_toc.cs
+++ b/docs/html/guide/guide_toc.cs
@@ -373,6 +373,9 @@
<li><a href="<?cs var:toroot ?>guide/topics/media/mediarouteprovider.html">
<span class="en">Media Route Provider</span></a>
</li>
+ <li><a href="<?cs var:toroot ?>guide/topics/media/exoplayer.html">
+ <span class="en">ExoPlayer</span></a>
+ </li>
<li><a href="<?cs var:toroot ?>guide/appendix/media-formats.html">
<span class="en">Supported Media Formats</span></a>
</li>
diff --git a/docs/html/guide/topics/media/exoplayer.jd b/docs/html/guide/topics/media/exoplayer.jd
new file mode 100644
index 0000000..17b4669
--- /dev/null
+++ b/docs/html/guide/topics/media/exoplayer.jd
@@ -0,0 +1,514 @@
+page.title=ExoPlayer
+page.tags="audio","video","adaptive","streaming","DASH","smoothstreaming"
+@jd:body
+
+<div id="qv-wrapper">
+ <div id="qv">
+ <h2>In this document</h2>
+ <ol>
+ <li><a href="#overview">Overview</a></li>
+ <li><a href="#trackrenderer">TrackRenderer</a></li>
+ <li><a href="#samplesource">SampleSource</a>
+ <ol>
+ <li><a href="#mediaextractor">Providing media using MediaExtractor</a></li>
+ <li><a href="#adaptive-playback">Providing media for adaptive playback</a>
+ <ol>
+ <li><a href="#format-selection">Format selection for adaptive playback</a></li>
+ </ol>
+ </li>
+ </ol>
+ <li><a href="#events">Player Events</a>
+ <ol>
+ <li><a href="#high-events">High level events</a></li>
+ <li><a href="#low-events">Low level events</a></li>
+ </ol>
+ </li>
+ <li><a href="#sending-messages">Sending messages to components</a></li>
+ <li><a href="#customizing">Customizing ExoPlayer</a>
+ <ol>
+ <li><a href="#custom-guidelines">Custom component guidelines</a></li>
+ </ol>
+ </li>
+ <li><a href="#drm">Digital Rights Management</a></li>
+ </ol>
+ <h2>Key Classes</h2>
+ <ol>
+ <li>{@link android.media.MediaCodec}</li>
+ <li>{@link android.media.MediaExtractor}</li>
+ <li>{@link android.media.AudioTrack}</li>
+ </ol>
+ <h2>Related Samples</h2>
+ <ol>
+ <li><a class="external-link" href="https://github.com/google/ExoPlayer">
+ ExoPlayer Project</a></li>
+ <li><a class="external-link" href="http://google.github.io/ExoPlayer/doc/reference/packages.html">
+ Class Reference</a></li>
+ </ol>
+ </div>
+</div>
+
+
+<p>Playing videos and music is a popular activity on Android devices. The Android framework
+ provides {@link android.media.MediaPlayer} as a quick solution for playing media with minimal
+ code, and the {@link android.media.MediaCodec} and {@link android.media.MediaExtractor} classes
+ are provided for building custom media players. The open source project, ExoPlayer, is a
+ solution between these two options, providing a pre-built player that you can extend.</p>
+
+<p>ExoPlayer supports features not currently provided by
+ {@link android.media.MediaPlayer}, including Dynamic adaptive streaming
+ over HTTP (DASH), SmoothStreaming, and persistent caching. ExoPlayer can be extended
+ to handle additional media formats, and because you include it as part of your app code,
+ you can update it along with your app.</p>
+
+<p>This guide describes how to use ExoPlayer for playing Android supported media formats, as well as
+ DASH and SmoothStreaming playback. This guide also discusses ExoPlayer events, messages, DRM
+ support and guidelines for customizing the player.</p>
+
+<p class="note">
+ <strong>Note:</strong> ExoPlayer is an open source project that is not part of the Android
+ framework and is distributed separately from the Android SDK. The project contains a library and
+ a demo app that shows both simple and more advanced use of ExoPlayer:</p>
+
+<ul>
+ <li><a class="external-link" href="https://github.com/google/ExoPlayer/tree/master/library">
+ ExoPlayer Library</a> — This part of the project contains the core library classes.</li>
+ <li><a class="external-link" href="https://github.com/google/ExoPlayer/tree/master/demo/src/main/java/com/google/android/exoplayer/demo/simple">
+ Simple Demo</a> — This part of the app demonstrates a basic use of ExoPlayer.</li>
+ <li><a class="external-link" href="https://github.com/google/ExoPlayer/tree/master/demo/src/main/java/com/google/android/exoplayer/demo/full">
+ Full Demo</a> — This part of the app demonstrates more advanced features,
+ including the ability to select between multiple audio tracks, a background audio mode,
+ event logging and DRM protected playback. </li>
+</ul>
+
+
+<h2 id="overview">Overview</h2>
+
+<p>ExoPlayer is a media player built on top of the {@link android.media.MediaExtractor} and
+ {@link android.media.MediaCodec} APIs released in Android 4.1 (API level 16). At the core of this
+ library is the {@code ExoPlayer} class. This class maintains the player’s global state, but makes few
+ assumptions about the nature of the media being played, such as how the media data is obtained,
+ how it is buffered or its format. You inject this functionality through ExoPlayer’s {@code
+ prepare()} method in the form of {@code TrackRenderer} objects.</p>
+
+<p>ExoPlayer provides default {@code TrackRenderer} implementations for audio and
+ video, which make use of the {@link android.media.MediaCodec} and {@link android.media.AudioTrack}
+ classes in the Android framework. Both renderers require a {@code SampleSource} object, from which
+ they obtain individual media samples for playback. Figure 1 shows the high level object model for
+ an ExoPlayer implementation configured to play audio and video using these components.</p>
+
+<img src="{@docRoot}images/exoplayer/object-model.png" alt="" id="figure1" />
+<p class="img-caption">
+ <strong>Figure 1.</strong> High level object model for an ExoPlayer configured to play audio
+ and video using {@code TrackRenderer} objects
+</p>
+
+
+<h2 id="trackrenderer">TrackRenderer</h2>
+
+<p>A {@code TrackRenderer} processes a component of media for playback, such as
+ video, audio or text. The ExoPlayer class invokes methods on its {@code TrackRenderer} instances from a
+ single playback thread, and by doing so causes each media component to be rendered as the global
+ playback position is advanced. The ExoPlayer library provides {@code MediaCodecVideoTrackRenderer} as
+ the default implementations rendering video and {@code MediaCodecAudioTrackRenderer} for audio.
+ Both implementations make use of {@link android.media.MediaCodec} to decode individual media
+ samples. They can handle all audio and video formats supported by a given Android device
+ (see <a href="http://developer.android.com/guide/appendix/media-formats.html">Supported Media
+ Formats</a> for details). The ExoPlayer library also provides an implementation for rendering
+ text called {@code TextTrackRenderer}.
+</p>
+
+<p>The code example below outlines the main steps required to instantiate an ExoPlayer to play video
+ and audio using the standard {@code TrackRenderer} implementations.</p>
+
+<pre>
+// 1. Instantiate the player.
+player = ExoPlayer.Factory.newInstance(RENDERER_COUNT);
+// 2. Construct renderers.
+MediaCodecVideoTrackRenderer videoRenderer = …
+MediaCodecAudioTrackRenderer audioRenderer = ...
+// 3. Inject the renderers through prepare.
+player.prepare(videoRenderer, audioRenderer);
+// 4. Pass the surface to the video renderer.
+player.sendMessage(videoRenderer, MediaCodecVideoTrackRenderer.MSG_SET_SURFACE,
+ surface);
+// 5. Start playback.
+player.setPlayWhenReady(true);
+...
+player.release(); // Don’t forget to release when done!
+</pre>
+
+<p>For a complete example, see the {@code SimplePlayerActivity} in the ExoPlayer demo app, which
+ correctly manages an ExoPlayer instance with respect to both the {@link android.app.Activity} and
+ {@link android.view.Surface} lifecycles.</p>
+
+
+<h2 id="samplesource">SampleSource</h2>
+
+<p>A standard {@code TrackRenderer} implementation requires a {@code SampleSource} to
+ be provided in its constructor. A {@code SampleSource} object provides format information and
+ media samples to be rendered. The ExoPlayer library provides {@code FrameworkSampleSource} and
+ {@code ChunkSampleSource}. The {@code FrameworkSampleSource} class uses {@link
+ android.media.MediaExtractor} to request, buffer and extract the media samples. The {@code
+ ChunkSampleSource} class provides adaptive playback using DASH or SmoothStreaming, and
+ implements networking, buffering and media extraction within the ExoPlayer library.</p>
+
+
+<h3 id="mediaextractor">Providing media using MediaExtractor</h3>
+
+<p>
+ In order to render media formats supported by the Android framework, the {@code
+ FrameworkSampleSource} class uses {@link android.media.MediaExtractor} for networking,
+ buffering and sample extraction functionality. By doing so, it supports any media container format
+ supported by the version of Android where it is running. For more information about media formats
+ supported by Android, see <a href="{@docRoot}guide/appendix/media-formats.html">Supported
+ Media Formats</a>.
+</p>
+
+<p>The diagram in Figure 2 shows the object model for an ExoPlayer implementation using
+ {@code FrameworkSampleSource}.</p>
+
+<img src="{@docRoot}images/exoplayer/frameworksamplesource.png" alt="" id="figure2" />
+<p class="img-caption">
+ <strong>Figure 2.</strong> Object model for an implementation of ExoPlayer that renders
+ media formats supported by Android using {@code FrameworkSampleSource}
+</p>
+
+<p>The following code example outlines how the video and audio renderers are constructed to
+ load the video from a specified URI.</p>
+
+<pre>
+FrameworkSampleSource sampleSource = new FrameworkSampleSource(
+ activity, uri, null, 2);
+MediaCodecVideoTrackRenderer videoRenderer = new MediaCodecVideoTrackRenderer(
+ sampleSource, null, true, MediaCodec.VIDEO_SCALING_MODE_SCALE_TO_FIT, 0,
+ mainHandler, playerActivity, 50);
+MediaCodecAudioTrackRenderer audioRenderer = new MediaCodecAudioTrackRenderer(
+ sampleSource, null, true);
+</pre>
+
+<p>The ExoPlayer demo app provides a complete implementation of this code in
+ {@code DefaultRendererBuilder}. The {@code SimplePlaybackActivity} class uses it to play one
+ of the videos available in the demo app. Note that in the example, video and audio
+ are muxed, meaning they are streamed together from a single URI. The {@code FrameworkSampleSource}
+ instance provides video samples to the {@code videoRenderer} object and audio samples to the
+ {@code audioRenderer} object as they are extracted from the media container format. It is also
+ possible to play demuxed media, where video and audio are streamed separately from different URIs.
+ This functionality can be achieved by having two {@code FrameworkSampleSource} instances instead
+ of one.</p>
+
+
+<h3 id="adaptive-playback">Providing media for adaptive playback</h3>
+
+<p>ExoPlayer supports adaptive streaming, which allows the quality of the
+ media data to be adjusted during playback based on the network conditions. DASH
+ and SmoothStreaming are examples of adaptive streaming technologies. Both these approaches
+ load media in small chunks (typically 2 to 10 seconds in duration). Whenever a chunk of media
+ is requested, the client selects from a number of possible formats. For example, a client may
+ select a high quality format if network conditions are good, or a low quality format if network
+ conditions are bad. In both techniques, video and audio are streamed separately.</p>
+
+<p>ExoPlayer supports adaptive playback through use of the {@code ChunkSampleSource} class,
+ which loads chunks of media data from which individual samples can be extracted. Each {@code
+ ChunkSampleSource} requires a {@code ChunkSource} object to be injected through its constructor,
+ which is responsible for providing media chunks from which to load and read samples. The {@code
+ DashMp4ChunkSource} and {@code SmoothStreamingChunkSource} classes provide DASH and SmoothStreaming
+ playback using the FMP4 container format. The {@code DashWebMChunkSource} class uses the WebM
+ container format to provide DASH playback.</p>
+
+<p>All of the standard {@code ChunkSource} implementations require a {@code FormatEvaluator} and
+ a {@code DataSource} to be injected through their constructors. The {@code FormatEvaluator}
+ objects select from the available formats before each chunk is loaded. The {@code DataSource}
+ objects are responsible for actually loading the data. Finally, the {@code ChunkSampleSources}
+ require a {@code LoadControl} object that controls the chunk buffering policy.</p>
+
+<p>The object model of an ExoPlayer configured for a DASH adaptive playback is shown in the
+ diagram below. This example uses an {@code HttpDataSource} object to stream the media over the
+ network. The video quality is varied at runtime using the adaptive implementation of {@code
+ FormatEvaluator}, while audio is played at a fixed quality level.</p>
+
+<img src="{@docRoot}images/exoplayer/adaptive-streaming.png" alt="" id="figure3" />
+<p class="img-caption">
+ <strong>Figure 3.</strong> Object model for a DASH adaptive playback using ExoPlayer
+</p>
+
+<p>The following code example outlines how the video and audio renderers are constructed.</p>
+
+<pre>
+Handler mainHandler = playerActivity.getMainHandler();
+LoadControl loadControl = new DefaultLoadControl(
+ new BufferPool(BUFFER_SEGMENT_SIZE));
+BandwidthMeter bandwidthMeter = new BandwidthMeter();
+
+// Build the video renderer.
+DataSource videoDataSource = new HttpDataSource(userAgent,
+ HttpDataSource.REJECT_PAYWALL_TYPES, bandwidthMeter);
+ChunkSource videoChunkSource = new DashMp4ChunkSource(videoDataSource,
+ new AdaptiveEvaluator(bandwidthMeter), videoRepresentations);
+ChunkSampleSource videoSampleSource = new ChunkSampleSource(videoChunkSource,
+ loadControl, VIDEO_BUFFER_SEGMENTS * BUFFER_SEGMENT_SIZE, true);
+MediaCodecVideoTrackRenderer videoRenderer = new MediaCodecVideoTrackRenderer(
+ videoSampleSource, null, true, MediaCodec.VIDEO_SCALING_MODE_SCALE_TO_FIT,
+ 0, mainHandler, playerActivity, 50);
+
+// Build the audio renderer.
+DataSource audioDataSource = new HttpDataSource(userAgent,
+ HttpDataSource.REJECT_PAYWALL_TYPES, bandwidthMeter);
+ChunkSource audioChunkSource = new DashMp4ChunkSource(audioDataSource,
+ new FormatEvaluator.FixedEvaluator(), audioRepresentation);
+SampleSource audioSampleSource = new ChunkSampleSource(audioChunkSource,
+ loadControl, AUDIO_BUFFER_SEGMENTS * BUFFER_SEGMENT_SIZE, true);
+MediaCodecAudioTrackRenderer audioRenderer = new MediaCodecAudioTrackRenderer(
+ audioSampleSource, null, true);
+</pre>
+
+<p>In this code, {@code videoRepresentations} and {@code audioRepresentation} are {@code
+ Representation} objects, each of which describes one of the available media streams. In the DASH
+ model, these streams are parsed from a media presentation description (MPD) file. The ExoPlayer
+ library provides a {@code MediaPresentationDescriptionParser} class to obtain {@code
+ Representation} objects from MPD files.</p>
+
+<p class="note">
+ <strong>Note:</strong> Building Representation objects from MPD files is not required. You can
+ build Representation objects from other data sources if necessary.
+</p>
+
+<p>The ExoPlayer demo app provides complete implementation of this code in
+ {@code DashVodRendererBuilder}. The {@code SimplePlaybackActivity} class uses this builder to
+ construct renderers for playing DASH sample videos in the demo app. It asynchronously fetches a
+ specified MPD file in order to construct the required {@code Representation} objects. For an
+ equivalent SmoothStreaming example, see the {@code SmoothStreamingRendererBuilder} class in the
+ demo app.</p>
+
+
+<h4 id="format-selection">Format selection for adaptive playback</h4>
+
+<p>For DASH and SmoothStreaming playback, consider both static format selection at the
+ start of playback and dynamic format selection during playback. Static format selection should be
+ used to filter out formats that should not be used throughout the playback, for example formats
+ with resolutions higher than the maximum supported by the playback device. Dynamic selection varies
+ the selected format during playback, typically to adapt video quality in response to changes in
+ network conditions.</p>
+
+<h5 id="static-selection">Static format selection</h5>
+
+<p>When preparing a player, you should consider filtering out some of the available formats if
+ they are not useable for playback. Static format selection allows you to filter out
+ formats that cannot be used on a particular device or are not compatible with your player.
+ For audio playback, this often means picking a single format to play and discarding the others.</p>
+
+<p>For video playback, filtering formats can be more complicated. Apps should first
+ eliminate any streams that whose resolution is too high to be played by the device. For H.264,
+ which is normally used for DASH and SmoothStreaming playback, ExoPlayer’s {@code MediaCodecUtil}
+ class provides a {@code maxH264DecodableFrameSize()} method that can be used to determine what
+ resolution streams the device is able to handle, as shown in the following code example:</p>
+
+<pre>
+int maxDecodableFrameSize = MediaCodecUtil.maxH264DecodableFrameSize();
+Format format = representation.format;
+if (format.width * format.height <= maxDecodableFrameSize) {
+ // The device can play this stream.
+ videoRepresentations.add(representation);
+} else {
+ // The device isn't capable of playing this stream.
+}
+</pre>
+
+<p>This approach is used to filter {@code Representations} in the {@code DashVodRendererBuilder}
+ class of the ExoPlayer demo app, and similarly to filter track indices in {@code
+ SmoothStreamingRendererBuilder}.</p>
+
+<p>In addition to eliminating unsupported formats, it should be noted that the ability to
+ seamlessly switch between H.264 streams of different resolution is an optional decoder feature
+ available in Android 4.3 (API level 16) and higher, and so is not supported by all devices. The
+ availability of an adaptive H.264 decoder can be queried using {@code MediaCodecUtil}, as shown in
+ the following code example:</p>
+
+<pre>
+boolean isAdaptive = MediaCodecUtil.getDecoderInfo(MimeTypes.VIDEO_H264).adaptive;
+</pre>
+
+<p>The {@code MediaCodecVideoTrackRenderer} class is still able to handle resolution changes on
+ devices that do not have adaptive decoders, however the switch is not seamless. Typically, the
+ switch creates a small discontinuity in visual output lasting around 50-100ms. For devices that
+ do not provide an adaptive decoder, app developers may choose to adapt between formats at
+ a single fixed resolution so as to avoid discontinuities. The ExoPlayer demo app
+ implementation does not pick a fixed resolution.</p>
+
+
+<h5 id="dynamic-selection">Dynamic format selection</h5>
+
+<p>During playback, you can use a {@code FormatEvaluator} to dynamically select from the
+ available video formats. The ExoPlayer library provides a {@code FormatEvaluator.Adaptive}
+ implementation for dynamically selecting between video formats based on the current network
+ conditions.</p>
+
+<p>This class provides a simple, general purpose reference implementation, however you are
+ encouraged to write your own {@code FormatEvaluator} implementation to best suit your particular
+ needs.</p>
+
+
+<h2 id="events">Player Events</h2>
+
+<p>During playback, your app can listen for events generated by the ExoPlayer that indicate the
+ overall state of the player. These events are useful as triggers for updating the app user
+ interface such as playback controls. Many ExoPlayer components also report their own component
+ specific low level events, which can be useful for performance monitoring.</p>
+
+
+<h3 id="high-events">High level events</h3>
+
+<p>ExoPlayer allows instances of {@code ExoPlayer.Listener} to be added and removed using its
+ {@code addListener()} and {@code removeListener()} methods. Registered listeners are notified of
+ changes in playback state, as well as when errors occur that cause playback to fail. For more
+ information about the valid playback states and the possible transitions between them, see the
+ ExoPlayer source code.</p>
+
+<p>Developers who implement custom playback controls should register a listener and use it to
+ update their controls as the player’s state changes. An app should also show an
+ appropriate error to the user if playback fails.</p>
+
+<h3 id="low-events">Low level events</h3>
+
+<p>In addition to high level listeners, many of the individual components provided by the
+ ExoPlayer library allow their own event listeners. For example, {@code
+ MediaCodecVideoTrackRenderer} has constructors that take a {@code
+ MediaCodecVideoTrackRenderer.EventListener}. In the ExoPlayer demo app, {@code SimplePlayerActivity}
+ acts as a listener so that it can adjust the dimensions of the target surface to have the correct
+ height and width ratio for the video being played:</p>
+
+<pre>
+@Override
+public void onVideoSizeChanged(int width, int height) {
+ surfaceView.setVideoWidthHeightRatio(height == 0 ? 1 : (float) width / height);
+}
+</pre>
+
+<p>The {@code RendererBuilder} classes in the ExoPlayer demo app inject the activity as the
+ listener, for example in the {@code DashVodRendererBuilder} class:</p>
+
+<pre>
+MediaCodecVideoTrackRenderer videoRenderer = new MediaCodecVideoTrackRenderer(
+ videoSampleSource, null, true, MediaCodec.VIDEO_SCALING_MODE_SCALE_TO_FIT,
+ 0, <strong>mainHandler, playerActivity</strong>, 50);
+</pre>
+
+<p>Note that you must pass a {@link android.os.Handler} object to the renderer, which determines
+ the thread on which the listener’s methods are invoked. In most cases, you should use a
+ {@link android.os.Handler} associated with the app’s main thread, as is the case in this example.
+ </p>
+
+<p>Listening to individual components can be useful for adjusting UI based on player events, as
+ in the example above. Listening to component events can also be helpful for logging performance
+ metrics. For example, {@code MediaCodecVideoTrackRenderer} notifies its listener of dropped video
+ frames. A developer may wish to log such metrics to track playback performance in their
+ app.</p>
+
+<p>Many components also notify their listeners when errors occur. Such errors may or may not
+ cause playback to fail. If an error does not cause playback to fail, it may still result in
+ degraded performance, and so you may wish to log all errors in order to track playback
+ performance. Note that an ExoPlayer instance always notifies its high level listeners of errors that
+ cause playback to fail, in addition to the listener of the individual component from which the error
+ originated. Hence, you should display error messages to users only from high level listeners.
+ Within individual component listeners, you should use error notifications only for informational
+ purposes.</p>
+
+
+<h2 id="sending-messages">Sending messages to components</h2>
+
+<p>Some ExoPlayer components allow changes in configuration during playback. By convention, you make
+ these changes by passing asynchronous messages through the ExoPlayer to the component.
+ This approach ensures both thread safety and that the configuration change is
+ executed in order with any other operations being performed on the player.</p>
+
+<p>The most common use of messaging is passing a target surface to
+ {@code MediaCodecVideoTrackRenderer}:</p>
+
+<pre>
+player.sendMessage(videoRenderer, MediaCodecVideoTrackRenderer.MSG_SET_SURFACE,
+ surface);
+</pre>
+
+<p>Note that if the surface needs to be cleared because
+ {@link android.view.SurfaceHolder.Callback#surfaceDestroyed
+ SurfaceHolder.Callback.surfaceDestroyed()} has been invoked, then you must send this
+ message using the blocking variant of {@code sendMessage()}:</p>
+<p>
+
+<pre>
+player.blockingSendMessage(videoRenderer,
+ MediaCodecVideoTrackRenderer.MSG_SET_SURFACE, null);
+</pre>
+
+<p>You must use a blocking message because the contract of {@link
+ android.view.SurfaceHolder.Callback#surfaceDestroyed surfaceDestroyed()} requires that the
+ app does not attempt to access the surface after the method returns. The {@code
+ SimplePlayerActivity} class in the demo app demonstrates how the surface should be set and
+ cleared.</p>
+
+
+<h2 id="customizing">Customizing ExoPlayer</h2>
+
+<p>One of the main benefits of ExoPlayer over {@link android.media.MediaPlayer} is the ability to
+ customize and extend the player to better suit the developer’s use case. The ExoPlayer library
+ is designed specifically with this in mind, defining a number of abstract base classes and
+ interfaces that make it possible for app developers to easily replace the default implementations
+ provided by the library. Here are some use cases for building custom components:</p>
+
+<ul>
+ <li><strong>{@code TrackRenderer}</strong> - You may want to implement a custom
+ {@code TrackRenderer} to handle media types other than audio and video. The {@code
+ TextTrackRenderer} class within the ExoPlayer library is an example of how to implement a
+ custom renderer. You could use the approach it demonstrates to render custom
+ overlays or annotations. Implementing this kind of functionality as a {@code TrackRenderer}
+ makes it easy to keep the overlays or annotations in sync with the other media being played.</li>
+ <li><strong>{@code SampleSource}</strong> - If you need to support a container format not
+ already handled by {@link android.media.MediaExtractor} or ExoPlayer, consider implementing a
+ custom {@code SampleSource} class.</li>
+ <li><strong>{@code FormatEvaluator}</strong> - The ExoPlayer library provides {@code
+ FormatEvaluator.Adaptive} as a simple reference implementation that switches between different
+ quality video formats based on the available bandwidth. App developers are encouraged to
+ develop their own adaptive {@code FormatEvaluator} implementations, which can be designed to
+ suit their use specific needs.</li>
+ <li><strong>{@code DataSource}</strong> - ExoPlayer’s upstream package already contains a
+ number of {@code DataSource} implementations for different use cases, such as writing and
+ reading to and from a persistent media cache. You may want to implement you own
+ {@code DataSource} class to load data in another way, such as a custom
+ protocol or HTTP stack for data input.</li>
+</ul>
+
+
+<h3 id="custom-guidelines">Custom component guidelines</h3>
+
+<p>If a custom component needs to report events back to the app, we recommend that you
+ do so using the same model as existing ExoPlayer components, where an event listener is passed
+ together with a {@link android.os.Handler} to the constructor of the component.</p>
+
+<p>We recommended that custom components use the same model as existing ExoPlayer components to
+ allow reconfiguration by the app during playback, as described in
+ <a href="#sending-messages">Sending messages to components</a>.
+ To do this, you should implement a {@code ExoPlayerComponent} and receive
+ configuration changes in its {@code handleMessage()} method. Your app should pass
+ configuration changes by calling ExoPlayer’s {@code sendMessage()} and {@code
+ blockingSendMessage()} methods.</p>
+
+
+<h2 id="drm">Digital Rights Management</h2>
+
+<p>On Android 4.3 (API level 18) and higher, ExoPlayer supports Digital Rights Managment (DRM)
+ protected playback. In order to play DRM protected content with ExoPlayer, your app must
+ inject a {@code DrmSessionManager} into the {@code MediaCodecVideoTrackRenderer} and {@code
+ MediaCodecAudioTrackRenderer} constructors. A {@code DrmSessionManager} object is responsible for
+ providing the {@code MediaCrypto} object required for decryption, as well as ensuring that the
+ required decryption keys are available to the underlying DRM module being used.</p>
+
+<p>The ExoPlayer library provides a default implementation of {@code DrmSessionManager}, called
+ {@code StreamingDrmSessionManager}, which uses {@link android.media.MediaDrm}. The session
+ manager supports any DRM scheme for which a modular DRM component exists on the device. All
+ Android devices are required to support Widevine modular DRM (with L3 security, although many
+ devices also support L1). Some devices may support additional schemes such as PlayReady.</p>
+
+<p>The {@code StreamingDrmSessionManager} class requires a {@code MediaDrmCallback} to be
+ injected into its constructor, which is responsible for actually making provisioning and key
+ requests. You should implement this interface to make network requests to your license
+ server and obtain the required keys. The {@code WidevineTestMediaDrmCallback} class in the
+ ExoPlayer demo app sends requests to a Widevine test server.</p>
diff --git a/docs/html/images/exoplayer/adaptive-streaming.png b/docs/html/images/exoplayer/adaptive-streaming.png
new file mode 100644
index 0000000..9fc650c9
--- /dev/null
+++ b/docs/html/images/exoplayer/adaptive-streaming.png
Binary files differ
diff --git a/docs/html/images/exoplayer/frameworksamplesource.png b/docs/html/images/exoplayer/frameworksamplesource.png
new file mode 100644
index 0000000..fd1e314
--- /dev/null
+++ b/docs/html/images/exoplayer/frameworksamplesource.png
Binary files differ
diff --git a/docs/html/images/exoplayer/object-model.png b/docs/html/images/exoplayer/object-model.png
new file mode 100644
index 0000000..e0d6e55
--- /dev/null
+++ b/docs/html/images/exoplayer/object-model.png
Binary files differ
diff --git a/docs/html/images/gpfe-start-0.jpg b/docs/html/images/gpfe-start-0.jpg
index e97381d..bb68aaa 100644
--- a/docs/html/images/gpfe-start-0.jpg
+++ b/docs/html/images/gpfe-start-0.jpg
Binary files differ
diff --git a/docs/html/images/home/auto.png b/docs/html/images/home/auto.png
new file mode 100644
index 0000000..233d69d
--- /dev/null
+++ b/docs/html/images/home/auto.png
Binary files differ
diff --git a/docs/html/images/home/tv.png b/docs/html/images/home/tv.png
new file mode 100644
index 0000000..47bf4b0
--- /dev/null
+++ b/docs/html/images/home/tv.png
Binary files differ
diff --git a/docs/html/images/home/wear.png b/docs/html/images/home/wear.png
new file mode 100644
index 0000000..c7a2045
--- /dev/null
+++ b/docs/html/images/home/wear.png
Binary files differ
diff --git a/docs/html/index.jd b/docs/html/index.jd
index 2177352..c2bf6b6 100644
--- a/docs/html/index.jd
+++ b/docs/html/index.jd
@@ -59,54 +59,23 @@
<div class="landing-section">
<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 class="landing-h1">Develop for Multiple Form Factors</div>
+ <div class="landing-subhead" style="margin-top: 20px;">
+ 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 class="landing-body">
+ <div class="landing-body" style="margin-top: 80px;">
<div class="landing-breakout cols">
-
- <!-- <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>-->
-
<div class="col-3-wide">
- <img src="" alt="">
-
- <p>Wearable</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>
+ <a href="{@docRoot}wear/index.html"><img src="{@docRoot}images/home/wear.png"></a>
</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 class="col-3-wide">
+ <a href="{@docRoot}tv/index.html"><img src="{@docRoot}images/home/tv.png"></a>
</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 class="col-3-wide">
+ <a href="{@docRoot}auto/index.html"><img src="{@docRoot}images/home/auto.png"></a>
</div>
-
</div>
</div>
</div> <!-- end .wrap -->
diff --git a/docs/html/jd_collections.js b/docs/html/jd_collections.js
index 6564aa8..a92236e 100644
--- a/docs/html/jd_collections.js
+++ b/docs/html/jd_collections.js
@@ -45,14 +45,14 @@
"resources": [
"distribute/googleplay/edu/about.html",
"distribute/googleplay/edu/start.html",
- "distribute/googleplay/edu/faq.html"
+ "https://developers.google.com/edu/faq"
]
},
"distribute/essentials": {
"resources": [
"distribute/essentials/quality/core.html",
"distribute/essentials/quality/tablets.html",
- "distribute/essentials/gpfe-guidelines.html",
+ "https://developers.google.com/edu/guidelines",
"distribute/essentials/optimizing-your-app.html",
"distribute/essentials/best-practices/apps.html",
"distribute/essentials/best-practices/games.html"
@@ -165,16 +165,18 @@
"title": "About Google Play for Education / Developers",
"resources": [
"distribute/googleplay/edu/start.html",
- "distribute/essentials/gpfe-guidelines.html",
- "distribute/googleplay/edu/faq.html",
- "distribute/essentials/quality/tablets.html"
+ "https://developers.google.com/edu/guidelines",
+ "https://developers.google.com/edu/faq",
+ "distribute/essentials/quality/tablets.html",
+ "https://developers.google.com/edu/",
+ "https://www.google.com/edu/tablets/#tablets-family"
]
},
"distribute/googleplay/gpfe/dev": {
"title": "About Google Play for Education / Developers",
"resources": [
"distribute/googleplay/edu/about.html",
- "distribute/essentials/gpfe-guidelines.html",
+ "https://developers.google.com/edu/guidelines",
"distribute/essentials/quality/tablets.html",
"distribute/googleplay/developer-console.html",
"http://play.google.com/about/developer-distribution-agreement-addendum.html",
@@ -206,7 +208,7 @@
"resources": [
"distribute/googleplay/developer-console.html",
"distribute/googleplay/edu/start.html",
- "distribute/googleplay/edu/faq.html"
+ "https://developers.google.com/edu/faq"
]
},
"distribute/essentials/eduessentials/educators": {
@@ -586,7 +588,7 @@
"resources": [
"distribute/essentials/quality/core.html",
"distribute/essentials/quality/tablets.html",
- "distribute/essentials/gpfe-guidelines.html"
+ "https://developers.google.com/edu/guidelines"
]
},
"distribute/toolsreference/launchchecklist/rating": {
diff --git a/docs/html/jd_extras.js b/docs/html/jd_extras.js
index 2f63700..eb7bfb6 100644
--- a/docs/html/jd_extras.js
+++ b/docs/html/jd_extras.js
@@ -219,7 +219,7 @@
"keywords": [],
"type": "support",
"titleFriendly": ""
- },
+ },
{
"lang": "en",
"group": "",
@@ -582,7 +582,7 @@
"image":"http://chart.googleapis.com/chart?chl=GL%201.1%20only%7CGL%202.0%7CGL%203.0&chf=bg%2Cs%2C00000000&chd=t%3A0.1%2C93.5%2C6.4&chco=c4df9b%2C6fad0c&chs=400x250&cht=p",
"lang":"en",
"type":"about"
- },
+ },
{
"lang": "en",
"group": "",
@@ -711,7 +711,7 @@
"timestamp": 1383243492000,
"image": "http://i1.ytimg.com/vi/vzvpcEffvaE/maxresdefault.jpg",
"title": "Introducing Google Play for Education",
- "summary": "Google Play for Education is a destination where schools can find great, teacher-approved, educational apps and videos on Play Store. Teachers can filter content by subject matter, grade and other criteria. Bulk purchase and instant distribution let educators bring your apps directly to classrooms and schools.",
+ "summary": "Google Play for Education is a destination where schools can find great, teacher-approved, educational content—from videos and books, to educational apps—all in one place. Teachers can filter content by subject matter, grade and other criteria. Bulk purchase and instant distribution let educators bring your apps directly to classrooms and schools.",
"keywords": [],
"type": "youtube",
"titleFriendly": ""
@@ -1139,5 +1139,57 @@
"keywords": ["analytics, user behavior"],
"type": "sdk",
"titleFriendly": ""
+ },
+ {
+ "lang": "en",
+ "group": "",
+ "tags": [],
+ "url": "https://developers.google.com/edu/guidelines",
+ "timestamp": null,
+ "image": "http://developer.android.com/distribute/images/edu-guidelines.jpg",
+ "title": "Education Guidelines",
+ "summary": "These guidelines and requirements help you develop great apps for students, which offer compelling content and an intuitive user experience on Android tablets.",
+ "keywords": [],
+ "type": "",
+ "titleFriendly": ""
+ },
+ {
+ "lang": "en",
+ "group": "",
+ "tags": [],
+ "url": "https://developers.google.com/edu/faq",
+ "timestamp": null,
+ "image": "http://developer.android.com/distribute/images/gpfe-faq.jpg",
+ "title": "Education FAQ",
+ "summary": "Answers to common questions you might have about Google Play for Education.",
+ "keywords": [],
+ "type": "",
+ "titleFriendly": ""
+ },
+ {
+ "lang": "en",
+ "group": "",
+ "tags": [],
+ "url": "https://developers.google.com/edu/",
+ "timestamp": null,
+ "image": "https://developers.google.com/edu/images/edu-guidelines.jpg",
+ "title": "Chrome Apps in Google Play for Education",
+ "summary": "Find out more about Chrome apps in Google Play for Education.",
+ "keywords": [],
+ "type": "",
+ "titleFriendly": ""
+ },
+ {
+ "lang": "en",
+ "group": "",
+ "tags": [],
+ "url": "https://www.google.com/edu/tablets/#tablets-family",
+ "timestamp": null,
+ "image": "https://www.google.com/edu/images/tablets/big-tablet.png",
+ "title": "Google Play for Education Tablets",
+ "summary": "Google Play for Education leverages a diverse set up tablets approved for the classroom which may help inform you how to build educational apps.",
+ "keywords": [],
+ "type": "",
+ "titleFriendly": ""
}
-]);
\ No newline at end of file
+]);
\ No newline at end of file
diff --git a/docs/html/preview/api-overview.jd b/docs/html/preview/api-overview.jd
index 8ec2470..d9cac48 100644
--- a/docs/html/preview/api-overview.jd
+++ b/docs/html/preview/api-overview.jd
@@ -1,4 +1,4 @@
-page.title=L Developer Preview APIs
+page.title=API Overview
excludeFromSuggestions=true
sdk.platform.apiLevel=20
@jd:body
@@ -18,7 +18,7 @@
<li><a href="#ART">New Android Runtime (ART)</a></li>
<li><a href="#BehaviorNotifications">If your app implements notifications...</a></li>
<li><a href="#BehaviorMediaControl">If your app uses RemoteControlClient...</a></li>
- <li><a href="#BehaviorGetRecentTasks">If your app uses ActivityManager.getRecentTasks()...</a></li>
+<li><a href="#BehaviorGetRecentTasks">If your app uses ActivityManager.getRecentTasks()...</a></li>
</ol>
</li>
<li><a href="#UI">User Interface</a>
@@ -69,7 +69,7 @@
<li><a href="#Enterprise">Enterprise</a>
<ol>
<li><a href="#ManagedProvisioning">Managed provisioning</a></li>
- <li><a href="#LockToAppMode">Lock-to-App mode</a></li>
+ <li><a href="#TaskLocking">Task locking</a></li>
</ol>
</li>
<li><a href="#Printing">Printing Framework</a>
@@ -163,10 +163,10 @@
backgrounds to match the new material design widgets. Make sure that all your
notifications look right with the new color scheme:</p>
-<div class="figure" style="width:220px">
+<div class="figure" style="width:320px">
<img src="images/hun-example.png"
srcset="images/hun-example@2x.png 2x"
- alt="" width="220" height="372" id="figure1" />
+ alt="" width="320" height="541" id="figure1" />
<p class="img-caption">
<strong>Figure 1.</strong> Fullscreen activity showing a heads-up notification
</p>
@@ -177,7 +177,7 @@
<li>Update or remove assets that involve color.</li>
<li>The system automatically inverts action icons in notifications. Use
- {@code android.app.Notification.Builder.setColor()} to set an accent color
+ {@code android.app.Notification. Builder.setColor()} to set an accent color
in a circle behind your {@link android.app.Notification#icon} image.</li>
<li>The system ignores all non-alpha channels in action icons and the main
@@ -188,7 +188,9 @@
<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, remove this code so that
-the system can present notifications correctly in <a href="#DoNotDisturb">Do Not Disturb</a> mode. Instead, use the {@link android.app.Notification.Builder} methods instead to add sounds and vibration.</p>
+the system can present notifications correctly in <a href="#DoNotDisturb">Do
+Not Disturb</a> mode. Instead, use the {@link android.app.Notification.Builder}
+methods instead to add sounds and vibration.</p>
<p>Notifications now appear in a small floating window
(also called a <em>heads-up notification</em>) when the device is active
@@ -218,40 +220,46 @@
providing a consistent experience for users across the lockscreen and
unlocked device.</p>
-<p>The L Developer Preview introduces a new {@code android.app.Notification.MediaStyle} template which is recommended for this purpose. {@code MediaStyle} converts notification actions that you added with {@link android.app.Notification.Builder#addAction(int, java.lang.CharSequence, android.app.PendingIntent) Notification.Builder.addAction()} into compact buttons embedded in your app's media playback notifications.</p>
+<p>The L Developer Preview introduces a new
+{@code android.app.Notification.MediaStyle} template which is recommended for
+this purpose. {@code MediaStyle} converts notification actions that you added
+with
+{@link android.app.Notification.Builder#addAction(int, java.lang.CharSequence,
+ android.app.PendingIntent)
+Notification.Builder.addAction()} into compact buttons embedded in your app's
+media playback notifications.</p>
<p>If you are using the new
-{@code android.media.session.MediaSession} class (see <a href="#MediaPlaybackControl">Media Playback Control</a> below), attach your session
-token with {@code Notification.MediaStyle.setMediaToken()} to inform the
-system that this notification controls an ongoing media session.</p>
+{@code android.media.session.MediaSession} class
+(see <a href="#MediaPlaybackControl">Media Playback Control</a> below), attach
+your session token with {@code Notification.MediaStyle.setMediaToken()} to
+inform the system that this notification controls an ongoing media session.</p>
<p>Call {@code
Notification.Builder.setVisibility(Notification.VISIBILITY_PUBLIC)} to mark a
-notification as safe to show atop any lockscreen (secure or otherwise). For more information, see
-<a href="#LockscreenNotifications">Lockscreen Notifications</a>.</p>
+notification as safe to show atop any lockscreen (secure or otherwise). For more
+information, see <a href="#LockscreenNotifications">Lockscreen Notifications</a>.</p>
<h3 id="BehaviorGetRecentTasks">If your app uses ActivityManager.getRecentTasks()...</h3>
-<p>With the introduction of the new <em>concurrent documents and activities tasks</em> feature in the upcoming
-release (see <a href="#Recents">Concurrent documents and activities in Recents
-screen</a> below),
+<p>With the introduction of the new <em>concurrent documents and activities
+tasks</em> feature in the upcoming release (see <a href="#Recents">Concurrent
+documents and activities in Recents screen</a> below),
the {@link android.app.ActivityManager#getRecentTasks
-ActivityManager.getRecentTasks()} method is now
-deprecated to improve user privacy. For backward
-compatibility, this method still returns 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>
+ActivityManager.getRecentTasks()} method is now deprecated to improve user
+privacy. For backward compatibility, this method still returns 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 upcoming release adds support for Android's new <em>material</em> design
-style. You can create
-apps with material design that are visually dynamic and have UI element transitions
-that feel natural to users. This support includes:</p>
+style. You can create apps with material design that are visually dynamic and
+have UI element transitions that feel natural to users. This support includes:</p>
<ul>
@@ -268,9 +276,9 @@
<a href="{@docRoot}preview/material/index.html">Material Design</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>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
@@ -287,8 +295,12 @@
<p>When {@code VISIBILITY_PRIVATE} is set, you can also provide a redacted
version of the notification content that hides personal details. For example,
-an SMS app might display a notification that shows "You have 3 new text messages." but hides the message content and senders. To provide this alternative notification, first create the replacement notification using {@link android.app.Notification.Builder}. When you create the private notification object, attach
-the replacement notification to it through the {@code Notification.Builder.setPublicVersion()} method.</p>
+an SMS app might display a notification that shows "You have 3 new text messages."
+but hides the message content and senders. To provide this alternative
+notification, first create the replacement notification using
+{@link android.app.Notification.Builder}. When you create the private
+notification object, attach the replacement notification to it through the
+{@code Notification.Builder.setPublicVersion()} method.</p>
<h3 id="DoNotDisturb">Do Not Disturb mode</h3>
@@ -354,7 +366,8 @@
<p>To insert a logical break so that the system treats your activity as a new
task, 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
+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>
@@ -381,7 +394,8 @@
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="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>
@@ -424,8 +438,10 @@
<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>
+<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>
@@ -434,7 +450,9 @@
</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>
+<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>
@@ -462,12 +480,13 @@
<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
+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 the
L Developer Preview, portions of the internal pipeline are not yet
floating-point.)
- <li>Your app can now supply audio data as a {@link java.nio.ByteBuffer}, in the same
-format as provided by {@link android.media.MediaCodec}.
+ <li>Your app can now supply audio data as a {@link java.nio.ByteBuffer}, in
+the same format as provided by {@link android.media.MediaCodec}.
<li>The {@code WRITE_NON_BLOCKING} option can simplify buffering and
multithreading for some apps.
</ul>
@@ -501,33 +520,40 @@
<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>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 subtree,
+giving apps read/write access to all contained documents without requiring user
+confirmation for each item.</p>
-<p>To get the absolute paths to directories on external storage devices where
-applications can store media files, call the new
-{@code android.content.Context.getExternalMediaDirs()} method. No
-additional
-permissions are needed by your app to read or write to the returned paths.
-In this context, "external storage devices" are those devices which the system
-considers 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>To select a directory subtree, build and send an
+{@code android.intent.action.OPEN_DOCUMENT_TREE} {@link android.content.Intent}.
+The system displays all
+{@link android.provider.DocumentsProvider} instances that support subtree selection,
+letting the user browse and select a directory. The returned URI represents access to the selected
+subtree. You can then use {@code DocumentsContract.buildChildDocumentsUriUsingTree()}
+and {@code DocumentsContract.buildDocumentUriUsingTree()} along with
+{@code ContentResolver.query()} to explore the subtree.</p>
-<p>You can bring up a system UI to allow the user to pick a directory subtree.
-To do so, send {@code android.intent.action.OPEN_DOCUMENT_TREE} in an
-{@link android.content.Intent}. If the call is successful, the system displays
-the {@link android.provider.DocumentsProvider} instances installed on the
-device for the user to select. When the user selects a directory from this UI,
-the system returns a URI representing the selected directory tree.</p>
+<p>The new {@code DocumentsContract.createDocument()} method lets you create
+new documents or directories anywhere under the subtree. To manage
+existing documents, use {@code DocumentsContract.renameDocument()} and
+{@code DocumentsContract.deleteDocument()}. Check {@code DocumentsContract.Document.COLUMN_FLAGS}
+to verify provider support for these calls before issuing them.</p>
-<p>If you want to access a document in an existing directory, call the
-{@code android.provider.DocumentsContract.buildDocumentViaUri()} method.
-Pass the method a URI representing the path to the parent directory, and the
-target document
-ID. The method returns a new {@link android.net.Uri} which your app can
-use to write media content with {@code DocumentsContract.createDocument()}.
+<p>If you're implementing a {@link android.provider.DocumentsProvider} and want
+to support subtree selection, implement {@code DocumentsProvider.isChildDocument()}
+and include {@code Documents.Contract.FLAG_SUPPORTS_IS_CHILD} in your
+{@code Root.COLUMN_FLAGS}.</p>
+
+<p>The L Developer Preview also introduces new package-specific directories on
+shared storage where your app can place media files for inclusion in
+{@link android.provider.MediaStore}. The new
+{@code android.content.Context.getExternalMediaDirs()} returns paths to these
+directories on all shared storage devices. Similarly to
+{@link android.content.Context#getExternalFilesDir(java.lang.String) Context.getExternalFilesDir()},
+no additional permissions are needed by your app to access the returned paths. The
+platform periodically scans for new media in these directories, but you can also
+use {@link android.media.MediaScannerConnection} to explicitly scan for new
+content.</p>
<h2 id="Wireless">Wireless & Connectivity</h2>
@@ -561,7 +587,8 @@
network.</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>
+<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>. Apps can use this capability
to make their presence known to
@@ -569,7 +596,8 @@
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.
+<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>
@@ -692,7 +720,7 @@
<img src="images/battery_historian.png"
srcset="images/battery_historian@2x.png 2x"
- alt="" width="440" height="240"
+ alt="" width="760" height="462"
id="figure2" />
<p class="img-caption">
<strong>Figure 2.</strong>HTML visualization generated by the Battery
@@ -726,7 +754,7 @@
<div class="figure" style="width:360px">
<img src="images/managed_apps_launcher.png"
srcset="images/managed_apps_launcher@2x.png 2x"
- alt="" width="360" height="572" id="figure3" />
+ alt="" width="360" height="609" id="figure3" />
<p class="img-caption">
<strong>Figure 3.</strong> Launcher screen showing managed apps (marked with
a lock badge)
@@ -734,17 +762,10 @@
</div>
<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 add a co-present but separate managed
-profile to a device with an existing personal account. The administrator has
-control over the managed profile.</li>
-<li><strong>Set device owner</strong>. Device administrators can also initiate a
-managed provisioning process to automatically provision a
-currently-unprovisioned device such that they have full control over the
-device.</li>
-</ul>
+an enterprise environment. A device administrator can
+initiate a managed provisioning process to add a co-present but separate <em>managed
+profile</em> to a device with an existing personal account. The administrator has
+control over the managed profile.</p>
<p>To start the managed provisioning process, send {@code
ACTION_PROVISION_MANAGED_PROFILE} in an {@link android.content.Intent}. If the
@@ -767,47 +788,71 @@
the managed apps visually prominent by appending a “work” badge to the icon
drawable with {@code android.os.UserManager.getBadgeDrawableForUser()}.</p>
-<h3 id="LockToAppMode">Lock-to-App mode</h3>
-<p>The L Developer Preview introduces a new <em>Lock-to-App</em> mode that
+<h3 id="TaskLocking">Task locking</h3>
+<p>The L Developer Preview introduces a new task locking API that
lets you temporarily restrict users from leaving your app or being interrupted
-by notifications. Once your app activates this mode, users will not be able to
-see notifications, access other apps, or return to the Home screen, until your
+by notifications. This could be used, for example, if you are developing an
+education app to support high stakes assessment requirements on Android.
+Once your app activates this mode, users will not be able to see
+notifications, access other apps, or return to the Home screen, until your
app exits the mode.</p>
-<p>To prevent unauthorized usage, the device on which you want to activate
-this mode must have managed profiles or must be fully controlled by a device administrator (see <a href="#ManagedProvisioning">Managed Provisioning</a> for more information). Furthermore, the device or managed profile owner must
-authorize apps to use this mode by calling {@code android.app.admin.DevicePolicyManager.setLockTaskComponents()}.</p>
+<p>To prevent unauthorized usage, only authorized apps can activate task locking.
+Furthermore, task locking authorization must be granted by a
+specially-configured <em>device owner</em> app, through the {@code android.app.admin.DevicePolicyManager.setLockTaskComponents()} method.</p>
-<p>Before activating this mode in your app, verify that your activity is authorized by calling {@code DevicePolicyManager.isLockTaskPermitted()}.</p>
+<p>To set up a device owner, follow these steps:</p>
+<ol>
+<li>Attach a device running an <a href="https://source.android.com/source/building-running.html">Android {@code userdebug} build</a> to your development machine.</li>
+<li>Install your device owner app.</li>
+<li>Create a {@code device_owner.xml} file and save it to the {@code /data/system}
+directory on the device.
+<pre>
+$ adb root
+$ adb shell stop
+$ rm /tmp/device_owner.xml
+$ echo "<?xml version='1.0' encoding='utf-8' standalone='yes' ?>"
+>> /tmp/device_owner.xml
+$ echo "&device-owner package=\"<your_device_owner_package>\"
+name=\"*<your_organization_name>\" />" >> /tmp/device_owner.xml
+$ adb push /tmp/device_owner.xml /data/system/device_owner.xml
+$ adb reboot
+</pre>
+</li>
+</ol>
-<p>To activate <em>Lock-to-App</em> mode, call
+<p>Before using the task locking API in your app, verify that your activity is
+authorized by calling {@code DevicePolicyManager.isLockTaskPermitted()}.</p>
+
+<p>To activate task locking, call
{@code android.app.Activity.startLockTask()} from your authorized activity.</p>
-<p>When <em>Lock-to-App</em> mode is active, the following behavior takes
-effect:</p>
+<p>When task locking is active, the following behavior takes effect:</p>
<ul>
-<li>The status bar is blank, and user notifications and status information is hidden.</li>
-<li>The Home and Recent Apps button is hidden.</li>
+<li>The status bar is blank, and user notifications and status information is
+hidden.</li>
+<li>The Home and Recent Apps buttons are hidden.</li>
<li>Other apps may not launch new activities.</li>
<li>The current app may start new activities, as long as doing so does not
create new tasks.</li>
+<li>The user remains locked on your app until an authorized activity calls
+{@code Activity.stopLockTask()}.</li>
</ul>
-<p>The device will remain in this mode until an authorized activity calls
-{@code Activity.stopLockTask()}.
-
<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
-{@link android.os.ParcelFileDescriptor} that is seekable (that is, the content 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 want to convert a portion of the document into
-a bitmap image (for example, to implement <a href="http://en.wikipedia.org/wiki/Tiled_rendering">tiled rendering</a> in order to zoom in on the document).</p>
+{@link android.os.ParcelFileDescriptor} that is seekable (that is, the content
+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 want to convert a portion of the
+document into a bitmap image (for example, to implement
+<a href="http://en.wikipedia.org/wiki/Tiled_rendering">tiled rendering</a> in
+order to zoom in on the document).</p>
<h2 id="TestingA11y">Testing & Accessibility </h2>
@@ -833,8 +878,7 @@
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} objects
-representing the
-windows information, call the new
+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 {@link android.view.accessibility.AccessibilityNodeInfo}.
@@ -845,13 +889,16 @@
<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
+<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}training/tv/index.html}">Android TV</a>user interface. Example:
+devices that support the
+<a href="{@docRoot}training/tv/index.html}">Android TV</a> user interface.
+Example:
<pre>
<uses-feature android:name="android.software.leanback"
android:required="true" />
@@ -866,7 +913,9 @@
</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
+<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>
diff --git a/docs/html/preview/google-play-services-wear.html b/docs/html/preview/google-play-services-wear.html
new file mode 100644
index 0000000..ad8891f
--- /dev/null
+++ b/docs/html/preview/google-play-services-wear.html
@@ -0,0 +1,95 @@
+<html><head>
+
+
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+<meta name="viewport" content="width=device-width">
+
+<meta name="Description" content="Google Play services will fully roll out to the hundreds of millions of Android devices in early July. Because of this, we usually wait to release the Google Play services SDK until all users receive the most updated Google Play services on their devices…">
+<link rel="shortcut icon" type="image/x-icon" href="/favicon.ico">
+<title>Google Play services Preview for Wear | Android Developers</title>
+
+<!-- STYLESHEETS -->
+<link rel="stylesheet" href="//fonts.googleapis.com/css?family=Roboto:light,regular,medium,thin,italic,mediumitalic,bold" title="roboto">
+<link href="/assets/css/default.css" rel="stylesheet" type="text/css">
+</head>
+<body>
+<div class="col-12" id="doc-col">
+
+<h1 itemprop="name">Google Play services Preview for Wear</h1>
+
+
+
+
+
+
+ <div id="jd-content">
+ <div class="jd-descr" itemprop="articleBody">
+<p>The Google Play services app is currently being rolled out to the hundreds of millions of
+Android devices and will complete in early July. Because of this, we usually wait to release the Google Play
+services SDK until all users receive the app. This guarantees that your newly-updated apps can
+run on the most devices as possible.</p>
+
+<p>However, if want to develop for Android Wear now, complete the following steps
+to get special access to all the things you need to start developing, without waiting
+for the rollout to complete. </p>
+
+<p class="warning"><b>Warning</b>: Do not publish any apps that use the new Google Play services
+APIs until the rollout is complete. Your apps will break on most user devices, which will
+degrade your user rating.</b>
+</p>
+
+<h2 style="margin-bottom: 0px;">1. Get Whitelisted for the Preview</h2><hr>
+
+<p>If you attended Google I/O, your registered Gmail account is automatically whitelisted for these
+preview resources. If you didn't attend Google I/O, sign up below to get access:</p>
+
+<a href="https://groups.google.com/forum/?hl=en#!forum/io14androidweardev">Get Whitelisted</a>
+
+<h2 style="margin-bottom: 0px;">2. Download Required Apps</h2><hr>
+<p>You'll need the following apps to get the most out of Android Wear:</p>
+
+
+<p>Here's a list of the apps you need:</p>
+<ul>
+<li><a href="https://play.google.com/apps/testing/com.google.android.gms">Google Play services</a>: Allows your Wear device to properly communicate with your handheld device. This is
+required to use the Android Wear Companion App.</li>
+ <li><a href="https://play.google.com/apps/testing/com.google.android.wearable.app">Android Wear
+ Companion</a>: The main user app to pair a handheld to a wearable and to provide syncing
+ of notifications and data.</li>
+ <li><a href="https://play.google.com/apps/testing/com.google.android.googlequicksearchbox">Google
+ Search</a>: A preview release of the Google Search handheld app that Wear communicates with
+ to carry out searches.</li>
+ <li><a href="https://play.google.com/apps/testing/com.google.android.keep">Google Keep</a>: To enable the "Take a note" command</li>
+ <li><a href="https://play.google.com/apps/testing/com.google.samples.apps.iosched">Google I/O 2014</a></li>
+ </ul>
+
+<p>To enable the preview versions of the apps, click each app link above and follow these
+instructions:</p>
+
+<ol>
+ <li>Click the <b>Become a Tester</b> button to opt-in to the preview version of the app. The page
+ confirms that you're a tester after clicking.</li>
+ <li>Click the <b>Download <app name> from the Play Store</b> link to go to Google Play
+ Store download page to get the app. The
+ following screenshot shows how the opt-in process looks like:
+<img style="margin-top:40px" src="/preview/images/opt-in.png"></li>
+ <li>When Google Play services is rolled out to all devices, go back to the app links provided
+ to opt-out of the preview versions of the apps. Check back here in a week for the status of
+ the rollout.</li>
+</ol>
+
+
+
+<h2 style="margin-bottom: 0px;">3. Start Building</h2><hr>
+<p>Check out the <a href="/training/building-wearables">Building Apps for Wearables</a>
+training classes for information on how to build for Wear.</p>
+ </div>
+
+
+
+
+ </div> <!-- end jd-content -->
+</div><!-- end doc-content -->
+</div> <!-- end body-content -->
+</body>
+</html>
\ No newline at end of file
diff --git a/docs/html/preview/images/android.png b/docs/html/preview/images/android.png
deleted file mode 100644
index 3aeaa98..0000000
--- a/docs/html/preview/images/android.png
+++ /dev/null
Binary files differ
diff --git a/docs/html/preview/images/battery_historian.png b/docs/html/preview/images/battery_historian.png
index 5b0db74..f1d4e40 100644
--- a/docs/html/preview/images/battery_historian.png
+++ b/docs/html/preview/images/battery_historian.png
Binary files differ
diff --git a/docs/html/preview/images/battery_historian@2x.png b/docs/html/preview/images/battery_historian@2x.png
index dbb5d5e..8c8a87f 100644
--- a/docs/html/preview/images/battery_historian@2x.png
+++ b/docs/html/preview/images/battery_historian@2x.png
Binary files differ
diff --git a/docs/html/preview/images/hun-example.png b/docs/html/preview/images/hun-example.png
index 9613a92..251b938 100644
--- a/docs/html/preview/images/hun-example.png
+++ b/docs/html/preview/images/hun-example.png
Binary files differ
diff --git a/docs/html/preview/images/hun-example@2x.png b/docs/html/preview/images/hun-example@2x.png
index 3cb8f5b..5b98a361 100644
--- a/docs/html/preview/images/hun-example@2x.png
+++ b/docs/html/preview/images/hun-example@2x.png
Binary files differ
diff --git a/docs/html/preview/images/managed_apps_launcher.png b/docs/html/preview/images/managed_apps_launcher.png
index 983d904..b5ef407 100644
--- a/docs/html/preview/images/managed_apps_launcher.png
+++ b/docs/html/preview/images/managed_apps_launcher.png
Binary files differ
diff --git a/docs/html/preview/images/managed_apps_launcher@2x.png b/docs/html/preview/images/managed_apps_launcher@2x.png
index d298fd2..90d7d51 100644
--- a/docs/html/preview/images/managed_apps_launcher@2x.png
+++ b/docs/html/preview/images/managed_apps_launcher@2x.png
Binary files differ
diff --git a/docs/html/preview/images/opt-in.png b/docs/html/preview/images/opt-in.png
new file mode 100644
index 0000000..51754af
--- /dev/null
+++ b/docs/html/preview/images/opt-in.png
Binary files differ
diff --git a/docs/html/preview/index.html b/docs/html/preview/index.html
index be2d360..ff4572b 100644
--- a/docs/html/preview/index.html
+++ b/docs/html/preview/index.html
@@ -257,7 +257,7 @@
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">
+ <a target="_blank" href="https://plus.sandbox.google.com/communities/113159138894928487684">
Discuss on Google+</a>
</p>
</div>
diff --git a/docs/html/preview/license.jd b/docs/html/preview/license.jd
new file mode 100644
index 0000000..5ff52ba
--- /dev/null
+++ b/docs/html/preview/license.jd
@@ -0,0 +1,143 @@
+page.title=License Agreement
+
+@jd:body
+
+<p>
+To get started with the Android SDK Preview, you must agree to the following terms and conditions.
+As described below, please note that this is a preview version of the Android SDK, subject to change, that you use at your own risk. The Android SDK Preview is not a stable release, and may contain errors and defects that can result in serious damage to your computer systems, devices and data.
+</p>
+
+<p>
+This is the Android SDK Preview License Agreement (the “License Agreement”).
+</p>
+<div class="sdk-terms" style="height:auto;border:0;padding:0;width:700px">
+1. Introduction
+
+1.1 The Android SDK Preview (referred to in the License Agreement as the “Preview” and specifically including the Android system files, packaged APIs, and Preview library files, if and when they are made available) is licensed to you subject to the terms of the License Agreement. The License Agreement forms a legally binding contract between you and Google in relation to your use of the Preview.
+
+1.2 "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.3 "Google" means Google Inc., a Delaware corporation with principal place of business at 1600 Amphitheatre Parkway, Mountain View, CA 94043, United States.
+
+2. Accepting the License Agreement
+
+2.1 In order to use the Preview, you must first agree to the License Agreement. You may not use the Preview if you do not accept the License Agreement.
+
+2.2 By clicking to accept and/or using the Preview, you hereby agree to the terms of the License Agreement.
+
+2.3 You may not use the Preview and may not accept the License Agreement if you are a person barred from receiving the 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 Preview.
+
+2.4 If you will use the Preview internally within your company or organization you agree to be bound by the License Agreement on behalf of your employer or other entity, and you represent and warrant that you have full legal authority to bind your employer or such entity to the License Agreement. If you do not have the requisite authority, you may not accept the License Agreement or use the Preview on behalf of your employer or other entity.
+
+3. Preview License from Google
+
+3.1 Subject to the terms of the License Agreement, Google grants you a royalty-free, non-assignable, non-exclusive, non-sublicensable, limited, revocable license to use the Preview, personally or internally within your company or organization, solely to develop applications to run on the Android platform.
+
+3.2 You agree that Google or third parties owns all legal right, title and interest in and to the Preview, including any Intellectual Property Rights that subsist in the 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 Preview for any purpose not expressly permitted by the 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 Preview or any part of the Preview; or (b) load any part of the Preview onto a mobile handset or any other hardware device except a personal computer, combine any part of the Preview with other software, or distribute any software or device incorporating a part of the Preview.
+
+3.4 You agree that you will not take any actions that may cause or result in the fragmentation of Android, including but not limited to distributing, participating in the creation of, or promoting in any way a software development kit derived from the Preview.
+
+3.5 Use, reproduction and distribution of components of the Preview licensed under an open source software license are governed solely by the terms of that open source software license and not the License Agreement. You agree to remain a licensee in good standing in regard to such open source software licenses under all the rights granted and to refrain from any actions that may terminate, suspend, or breach such rights.
+
+3.6 You agree that the form and nature of the Preview that Google provides may change without prior notice to you and that future versions of the Preview may be incompatible with applications developed on previous versions of the Preview. You agree that Google may stop (permanently or temporarily) providing the Preview (or any features within the Preview) to you or to users generally at Google's sole discretion, without prior notice to you.
+
+3.7 Nothing in the 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 Preview.
+
+4. Use of the Preview by You
+
+4.1 Google agrees that nothing in the License Agreement gives Google any right, title or interest from you (or your licensors) under the License Agreement in or to any software applications that you develop using the Preview, including any intellectual property rights that subsist in those applications.
+
+4.2 You agree to use the Preview and write applications only for purposes that are permitted by (a) the License Agreement, and (b) 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).
+
+4.3 You agree that if you use the Preview to develop applications, you will protect the privacy and legal rights of users. If 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 users provide you 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, each user has given you permission to do so.
+
+4.4 You agree that you will not engage in any activity with the 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 Google or any third party.
+
+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 and/or applications for Android, 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 the 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 The Preview is in development, and your testing and feedback are an important part of the development process. By using the Preview, you acknowledge that implementation of some features are still under development and that you should not rely on the Preview having the full functionality of a stable release. You agree not to publicly distribute or ship any application using this Preview as this Preview will no longer be supported after the official Android 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 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 Preview are being used and how they are being used. Before any of this information is collected, the 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 Preview and is maintained in accordance with Google's Privacy Policy located at http://www.google.com/policies/privacy/.
+
+7. Third Party Applications
+
+7.1 If you use the 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.
+
+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 the License Agreement
+
+9.1 the License Agreement will continue to apply until terminated by either you or Google as set out below.
+
+9.2 If you want to terminate the License Agreement, you may do so by ceasing your use of the Preview and any relevant developer credentials.
+
+9.3 Google may at any time, terminate the License Agreement, with or without cause, upon notice to you.
+
+9.4 The License Agreement will automatically terminate without notice or other action upon the earlier of:
+(A) when Google ceases to provide the Preview or certain parts of the Preview to users in the country in which you are resident or from which you use the service; and
+(B) Google issues a final release version of the Android SDK.
+
+9.5 When the License Agreement is terminated, the license granted to you in the License Agreement will terminate, you will immediately cease all use of the Preview, and the provisions of paragraphs 10, 11, 12 and 14 shall survive indefinitely.
+
+10. DISCLAIMERS
+
+10.1 YOU EXPRESSLY UNDERSTAND AND AGREE THAT YOUR USE OF THE PREVIEW IS AT YOUR SOLE RISK AND THAT THE PREVIEW IS PROVIDED "AS IS" AND "AS AVAILABLE" WITHOUT WARRANTY OF ANY KIND FROM GOOGLE.
+
+10.2 YOUR USE OF THE PREVIEW AND ANY MATERIAL DOWNLOADED OR OTHERWISE OBTAINED THROUGH THE USE OF THE 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. WITHOUT LIMITING THE FOREGOING, YOU UNDERSTAND THAT THE PREVIEW IS NOT A STABLE RELEASE AND MAY CONTAIN ERRORS, DEFECTS AND SECURITY VULNERABILITIES THAT CAN RESULT IN SIGNIFICANT DAMAGE, INCLUDING THE COMPLETE, IRRECOVERABLE LOSS OF USE OF YOUR COMPUTER SYSTEM OR OTHER DEVICE.
+
+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 Preview, (b) any application you develop on the Preview that infringes any Intellectual Property Rights of any person or defames any person or violates their rights of publicity or privacy, and (c) any non-compliance by you of the 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 Preview. When these changes are made, Google will make a new version of the License Agreement available on the website where the Preview is made available.
+
+14. General Legal Terms
+
+14.1 the License Agreement constitutes the whole legal agreement between you and Google and governs your use of the 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 Preview.
+
+14.2 You agree that if Google does not exercise or enforce any legal right or remedy which is contained in the 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 the License Agreement is invalid, then that provision will be removed from the License Agreement without affecting the rest of the License Agreement. The remaining provisions of the 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 the License Agreement and that such other companies shall be entitled to directly enforce, and rely upon, any provision of the 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 the License Agreement.
+
+14.5 EXPORT RESTRICTIONS. THE 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 PREVIEW. THESE LAWS INCLUDE RESTRICTIONS ON DESTINATIONS, END USERS AND END USE.
+
+14.6 The License Agreement may not be assigned or transferred by you without the prior written approval of Google, and any attempted assignment without such approval will be void. You shall not delegate your responsibilities or obligations under the License Agreement without the prior written approval of Google.
+
+14.7 The License Agreement, and your relationship with Google under the 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 the 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>
\ No newline at end of file
diff --git a/docs/html/preview/preview_toc.cs b/docs/html/preview/preview_toc.cs
index 5920ecc..75703a8 100644
--- a/docs/html/preview/preview_toc.cs
+++ b/docs/html/preview/preview_toc.cs
@@ -2,11 +2,7 @@
<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
+ <div class="nav-section-header empty"><a href="<?cs var:toroot ?>preview/setup-sdk.html">Set up the SDK
</a></div>
</li>
<li class="nav-section">
@@ -70,7 +66,7 @@
<li class="nav-section">
<div class="nav-section-header empty">
- <a href="<?cs var:toroot ?>preview/l-developer-preview-reference.zip">Reference</a>
+ <a href="<?cs var:toroot ?>preview/reference.html">Reference</a>
</div>
</li>
@@ -81,7 +77,12 @@
</li>
<li class="nav-section">
<div class="nav-section-header empty">
- <a href="<?cs var:toroot ?>preview/tos.html">Terms of Service</a>
+ <a href="<?cs var:toroot ?>preview/license.html">License Agreement</a>
+ </div>
+ </li>
+ <li class="nav-section" style="margin: 20px 0 0 3px;">
+ <div class="nav-section-header paging-links empty">
+ <a href="<?cs var:toroot ?>index.html" class="prev-page-link">Developer Home</a>
</div>
</li>
</ul>
diff --git a/docs/html/preview/reference.jd b/docs/html/preview/reference.jd
new file mode 100644
index 0000000..f70f7a2
--- /dev/null
+++ b/docs/html/preview/reference.jd
@@ -0,0 +1,13 @@
+page.title=Reference
+
+@jd:body
+
+<p>The reference documentation and API difference report are available as downloadable packages.
+</p>
+
+<ul>
+ <li><a href="{@docRoot}preview/l-developer-preview-reference.zip">L
+ Developer Preview reference</a></li>
+ <li><a href="{@docRoot}preview/l-developer-preview-api-diff.zip">L
+ Developer Preview difference report</a></li>
+</ul>
\ No newline at end of file
diff --git a/docs/html/preview/samples.jd b/docs/html/preview/samples.jd
index 67404b6..9bccb31 100644
--- a/docs/html/preview/samples.jd
+++ b/docs/html/preview/samples.jd
@@ -2,15 +2,4 @@
@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>
+<p> </p>
\ No newline at end of file
diff --git a/docs/html/preview/setup-devices.jd b/docs/html/preview/setup-devices.jd
deleted file mode 100644
index 86e4845..0000000
--- a/docs/html/preview/setup-devices.jd
+++ /dev/null
@@ -1,90 +0,0 @@
-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
index 32a33b6..66262dc 100644
--- a/docs/html/preview/setup-sdk.jd
+++ b/docs/html/preview/setup-sdk.jd
@@ -20,7 +20,96 @@
<b>Install</b>.</li>
</ol>
-<h2>Set up your environment</h2>
+<h2>Set Up Hardware and AVDs</h2>
+
+<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>
+
+<h3>Instal the L Preview System Image</h3>
+
+<!-- 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>Revert 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>
+
+
+<h3>Set up an AVD</h3>
+
+<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>
+
+<h2>Create a Project</h2>
<ol>
<li>Create a new Android project with the following properties:
diff --git a/docs/html/preview/support.jd b/docs/html/preview/support.jd
index 23ce6ff..9ab25dd 100644
--- a/docs/html/preview/support.jd
+++ b/docs/html/preview/support.jd
@@ -2,21 +2,85 @@
@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>If you've encountered bugs or have feedback about the L Developer Preview,
+<a href="https://code.google.com/p/android-developer-preview/">create an issue</a> on
+our issue tracker.</p>
-<p>Go to the Bug Tracker</p>
+<p>For more support,
+<a href="https://plus.google.com/communities/113159138894928487684">join
+the L Developer Preview Google+ community</a> to discuss your development experiences.
-<h2>Release Notes</h2>
+<h2 id="ReleaseNotes">Release Notes</h2>
<p>June 25, 2014 - Initial Release of the L Developer Preview</p>
+<h3 id="UserInterface">User interface</h3>
<ul>
- <li></li>
- <li></li>
- <li></li>
- <li></li>
- <li></li>
- <li></li>
- <li></li>
- </ul>
+<li>If your app launches an activity with
+{@link android.app.Activity#startActivity startActivity()}
+and an {@link android.content.Intent} set to
+{@link android.content.Intent#FLAG_ACTIVITY_CLEAR_WHEN_TASK_RESET}, the
+activity shows up as a separate task in the Recent apps screen. This is the
+same behavior as though your app used {@code Intent.FLAG_ACTIVITY_NEW_DOCUMENT}
+(see <a href="{@docRoot}preview/api-overview.html#Recents">Concurrent
+documents and activities in the Recents screen</a>). If you want your activity
+to remain in the same task that launched it, use
+{@link android.app.Activity#startActivityForResult
+startActivityForResult()} instead.</li>
+<li>System-rendered shadows for user interface (UI) elements in views may
+appear with visible spiky edges. To avoid this visual artifact, use a higher
+<a href="{@docRoot}preview/material/views-shadows.html#elevation">view
+elevation</a>.</li>
+<li>On very tall or wide views, view shadows may appear with additional rough
+visual artifacts around the view edges. To minimize this, avoid using view
+shadows with very narrow views.</li>
+<li>The {@code android.graphics.drawable.RippableDrawable} class does not
+respond to pointer location changes, except when the drawable is set as a
+{@link android.view.View} background.</li>
+</ul>
+
+<h3 id="Multimedia">Multimedia</h3>
+<ul>
+<li>The {@code android.hardware.camera2} APIs are supported only on Nexus 5
+devices.</li>
+<li>Saving a DNG file with the new {@code android.hardware.camera2.DngCreator}
+API fails if lens shading compensation map generation is not enabled. To
+capture images to DNG files, add the following code when creating your capture
+requests:
+<pre>
+CaptureRequest.Builder stillCaptureRequest =
+ mCameraDevice.createCaptureRequest(CameraDevice.TEMPLATE_STILL_CAPTURE);
+
+stillCaptureRequest.set(CaptureRequest.STATISTICS_LENS_SHADING_MAP_MODE,
+ CaptureRequest.STATISTICS_LENS_SHADING_MAP_MODE_ON);
+</pre></li>
+<li>Portions of the internal audio pipeline do not support floating-point format.</li>
+<li>The {@code android.media.AudioTrack.write(float[], int, int, int)} method
+currently does not work. Use the
+{@link android.media.AudioTrack#write(short[], int, int)
+AudioTrack.write(short[], int, int)} method instead.</li>
+</ul>
+
+<h3 id="UserInput">User input</h3>
+<ul><li>The System UI may crash unexpectedly while the device is charging, if
+ the locale is set to {@code fr} (FRENCH).</li></ul>
+
+<h3 id="Wireless">Wireless and Connectivity</h3>
+<ul><li>The {@code android.bluetooth.le} APIs are supported only on Nexus 5
+devices.</li></ul>
+
+<h3 id="Enterprise">Enterprise</h3>
+<ul>
+<li>The device may crash unexpectedly in these situations when using
+Android for Work functionality:
+<ul>
+<li>The user attempts to share a webpage (via <strong>Menu > Share</strong>)
+from a non-managed Chrome app to a managed Gmail app.</li>
+<li>The user attempts to share a webpage via Bluetooth from a managed Chrome app.</li>
+<li>The user attempts to share a webpage via Android Beam from a managed Chrome app.</li>
+</ul>
+</li>
+<li>Deleting the managed work profile (profile owner) may take several minutes
+to complete. You cannot create a new managed profile until the deletion
+operation is over.</li>
+</ul>
diff --git a/docs/html/preview/tos.jd b/docs/html/preview/tos.jd
deleted file mode 100644
index 602439f..0000000
--- a/docs/html/preview/tos.jd
+++ /dev/null
@@ -1,9 +0,0 @@
-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/installing/index.jd b/docs/html/sdk/installing/index.jd
index 3671726..304b53d 100644
--- a/docs/html/sdk/installing/index.jd
+++ b/docs/html/sdk/installing/index.jd
@@ -3,8 +3,8 @@
@jd:body
<style>
-.paging-links {
- margin:0 0 80px;
+p.paging-links {
+ margin:0 0 40px;
}
.paging-links .next-page-link {
right:initial;
@@ -14,6 +14,10 @@
margin-bottom:1em;
background:#eee;
}
+.landing-button {
+ min-width: 155px;
+ text-align: center;
+}
</style>
@@ -316,39 +320,32 @@
<!-- ################ 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
+<p>If you haven't already, <b><a href="{@docRoot}sdk/index.html">download
the Android SDK</a></b>. </p>
-<p>Otherwise, select which SDK package you want to install:</p>
+<p>Then, 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>
+<div class="cols" style="margin:30px 0 60px">
+<div class="col-4" style="margin-left:0">
+<a href="{@docRoot}sdk/installing/index.html?pkg=adt" class="landing-button landing-secondary">
+Eclipse ADT
</a>
</div>
<div class="col-4">
-<a href="{@docRoot}sdk/installing/index.html?pkg=studio">
-<h3 class="large-link">Android Studio</h3></a>
+<a href="{@docRoot}sdk/installing/index.html?pkg=studio" class="landing-button landing-secondary">
+Android Studio
+</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>
+<a href="{@docRoot}sdk/installing/index.html?pkg=tools" class="landing-button landing-secondary">
+Stand-alone SDK Tools
+</a>
</div>
</div>
diff --git a/docs/html/wear/index.jd b/docs/html/wear/index.jd
index a4a7c88..1de09ee 100644
--- a/docs/html/wear/index.jd
+++ b/docs/html/wear/index.jd
@@ -68,7 +68,7 @@
</div> <!-- end .landing-section .landing-hero -->
- <div class="landing-rest-of-page">
+ <div class="landing-rest-of-page" style="margin-top:80px">
<div class="landing-section" id="extending-android-to-wearables">
<div class="wrap">
<div class="landing-section-header">
@@ -183,6 +183,56 @@
</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-h2">Building an Ecosystem</div>
+ <div class="landing-body landing-align-center">
+ <p class="landing-small">
+ We’re working with several partners to bring you watches powered by Android Wear later this year!
+ </p>
+ </div>
+ </div>
+
+ <div class="landing-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>
+ </div>
+ </div> <!-- end .wrap -->
+ </div>
+
+
<div class="landing-section landing-red-background">
<div class="wrap">
<div class="landing-section-header">
diff --git a/graphics/java/android/graphics/drawable/AnimatedVectorDrawable.java b/graphics/java/android/graphics/drawable/AnimatedVectorDrawable.java
index 968c0ec..c787fb0 100644
--- a/graphics/java/android/graphics/drawable/AnimatedVectorDrawable.java
+++ b/graphics/java/android/graphics/drawable/AnimatedVectorDrawable.java
@@ -34,10 +34,91 @@
import java.util.ArrayList;
/**
- * AnimatedVectorDrawable can use ObjectAnimator and AnimatorSet to animate
- * the property of the VectorDrawable.
+ * This class uses {@link android.animation.ObjectAnimator} and
+ * {@link android.animation.AnimatorSet} to animate the properties of a
+ * {@link android.graphics.drawable.VectorDrawable} to create an animated drawable.
+ * <p>
+ * AnimatedVectorDrawable are normally defined as 3 separate XML files.
+ * </p>
+ * <p>
+ * First is the XML file for {@link android.graphics.drawable.VectorDrawable}.
+ * Note that we allow the animation happen on the group's attributes and path's
+ * attributes, which requires they are uniquely named in this xml file. Groups
+ * and paths without animations do not need names.
+ * </p>
+ * <li>Here is a simple VectorDrawable in this vectordrawable.xml file.
+ * <pre>
+ * <vector xmlns:android="http://schemas.android.com/apk/res/android" >
+ * <size
+ * android:height="64dp"
+ * android:width="64dp" />
+ * <viewport
+ * android:viewportHeight="600"
+ * android:viewportWidth="600" />
+ * <group
+ * android:name="rotationGroup"
+ * android:pivotX="300.0"
+ * android:pivotY="300.0"
+ * android:rotation="45.0" >
+ * <path
+ * android:name="v"
+ * android:fill="#000000"
+ * android:pathData="M300,70 l 0,-70 70,70 0,0 -70,70z" />
+ * </group>
+ * </vector>
+ * </pre></li>
+ * <p>
+ * Second is the AnimatedVectorDrawable's xml file, which defines the target
+ * VectorDrawable, the target paths and groups to animate, the properties of the
+ * path and group to animate and the animations defined as the ObjectAnimators
+ * or AnimatorSets.
+ * </p>
+ * <li>Here is a simple AnimatedVectorDrawable defined in this avd.xml file.
+ * Note how we use the names to refer to the groups and paths in the vectordrawable.xml.
+ * <pre>
+ * <animated-vector xmlns:android="http://schemas.android.com/apk/res/android"
+ * android:drawable="@drawable/vectordrawable" >
+ * <target
+ * android:name="rotationGroup"
+ * android:animation="@anim/rotation" />
+ * <target
+ * android:name="v"
+ * android:animation="@anim/path_morph" />
+ * </animated-vector>
+ * </pre></li>
+ * <p>
+ * Last is the Animator xml file, which is the same as a normal ObjectAnimator
+ * or AnimatorSet.
+ * To complete this example, here are the 2 animator files used in avd.xml:
+ * rotation.xml and path_morph.xml.
+ * </p>
+ * <li>Here is the rotation.xml, which will rotate the target group for 360 degrees.
+ * <pre>
+ * <objectAnimator
+ * android:duration="6000"
+ * android:propertyName="rotation"
+ * android:valueFrom="0"
+ * android:valueTo="360" />
+ * </pre></li>
+ * <li>Here is the path_morph.xml, which will morph the path from one shape to
+ * the other. Note that the paths must be compatible for morphing.
+ * In more details, the paths should have exact same length of commands , and
+ * exact same length of parameters for each commands.
+ * Note that the path string are better stored in strings.xml for reusing.
+ * <pre>
+ * <set xmlns:android="http://schemas.android.com/apk/res/android">
+ * <objectAnimator
+ * android:duration="3000"
+ * android:propertyName="pathData"
+ * android:valueFrom="M300,70 l 0,-70 70,70 0,0 -70,70z"
+ * android:valueTo="M300,70 l 0,-70 70,0 0,140 -70,0 z"
+ * android:valueType="pathType"/>
+ * </set>
+ * </pre></li>
*
- * @hide
+ * @attr ref android.R.styleable#AnimatedVectorDrawable_drawable
+ * @attr ref android.R.styleable#AnimatedVectorDrawableTarget_name
+ * @attr ref android.R.styleable#AnimatedVectorDrawableTarget_animation
*/
public class AnimatedVectorDrawable extends Drawable implements Animatable {
private static final String LOGTAG = AnimatedVectorDrawable.class.getSimpleName();
diff --git a/graphics/java/android/graphics/drawable/BitmapDrawable.java b/graphics/java/android/graphics/drawable/BitmapDrawable.java
index 0a394d5..e080375 100644
--- a/graphics/java/android/graphics/drawable/BitmapDrawable.java
+++ b/graphics/java/android/graphics/drawable/BitmapDrawable.java
@@ -757,7 +757,18 @@
final int tileMode = a.getInt(R.styleable.BitmapDrawable_tileMode, TILE_MODE_UNDEFINED);
if (tileMode != TILE_MODE_UNDEFINED) {
- setTileModeInternal(tileMode);
+ final Shader.TileMode mode = parseTileMode(tileMode);
+ setTileModeXY(mode, mode);
+ }
+
+ final int tileModeX = a.getInt(R.styleable.BitmapDrawable_tileModeX, TILE_MODE_UNDEFINED);
+ if (tileModeX != TILE_MODE_UNDEFINED) {
+ setTileModeX(parseTileMode(tileModeX));
+ }
+
+ final int tileModeY = a.getInt(R.styleable.BitmapDrawable_tileModeY, TILE_MODE_UNDEFINED);
+ if (tileModeY != TILE_MODE_UNDEFINED) {
+ setTileModeY(parseTileMode(tileModeY));
}
// Update local properties.
@@ -783,20 +794,16 @@
}
}
- private void setTileModeInternal(final int tileMode) {
+ private static Shader.TileMode parseTileMode(int tileMode) {
switch (tileMode) {
- case TILE_MODE_DISABLED:
- setTileModeXY(null, null);
- break;
case TILE_MODE_CLAMP:
- setTileModeXY(Shader.TileMode.CLAMP, Shader.TileMode.CLAMP);
- break;
+ return Shader.TileMode.CLAMP;
case TILE_MODE_REPEAT:
- setTileModeXY(Shader.TileMode.REPEAT, Shader.TileMode.REPEAT);
- break;
+ return Shader.TileMode.REPEAT;
case TILE_MODE_MIRROR:
- setTileModeXY(Shader.TileMode.MIRROR, Shader.TileMode.MIRROR);
- break;
+ return Shader.TileMode.MIRROR;
+ default:
+ return null;
}
}
@@ -919,7 +926,9 @@
}
/**
- * Initializes local dynamic properties from state.
+ * Initializes local dynamic properties from state. This should be called
+ * after significant state changes, e.g. from the One True Constructor and
+ * after inflating or applying a theme.
*/
private void initializeWithState(BitmapState state, Resources res) {
if (res != null) {
diff --git a/graphics/java/android/graphics/drawable/GradientDrawable.java b/graphics/java/android/graphics/drawable/GradientDrawable.java
index 28cd869..0ccce93 100644
--- a/graphics/java/android/graphics/drawable/GradientDrawable.java
+++ b/graphics/java/android/graphics/drawable/GradientDrawable.java
@@ -140,12 +140,12 @@
private final RectF mRect = new RectF();
private Paint mLayerPaint; // internal, used if we use saveLayer()
- private boolean mRectIsDirty; // internal state
+ private boolean mGradientIsDirty; // internal state
private boolean mMutated;
private Path mRingPath;
private boolean mPathIsDirty = true;
- /** Current gradient radius, valid when {@link #mRectIsDirty} is false. */
+ /** Current gradient radius, valid when {@link #mGradientIsDirty} is false. */
private float mGradientRadius;
/**
@@ -383,7 +383,7 @@
*/
public void setGradientType(int gradient) {
mGradientState.setGradientType(gradient);
- mRectIsDirty = true;
+ mGradientIsDirty = true;
invalidateSelf();
}
@@ -402,7 +402,7 @@
*/
public void setGradientCenter(float x, float y) {
mGradientState.setGradientCenter(x, y);
- mRectIsDirty = true;
+ mGradientIsDirty = true;
invalidateSelf();
}
@@ -420,7 +420,7 @@
*/
public void setGradientRadius(float gradientRadius) {
mGradientState.setGradientRadius(gradientRadius, TypedValue.COMPLEX_UNIT_PX);
- mRectIsDirty = true;
+ mGradientIsDirty = true;
invalidateSelf();
}
@@ -454,7 +454,7 @@
*/
public void setUseLevel(boolean useLevel) {
mGradientState.mUseLevel = useLevel;
- mRectIsDirty = true;
+ mGradientIsDirty = true;
invalidateSelf();
}
@@ -482,7 +482,7 @@
*/
public void setOrientation(Orientation orientation) {
mGradientState.mOrientation = orientation;
- mRectIsDirty = true;
+ mGradientIsDirty = true;
invalidateSelf();
}
@@ -500,7 +500,7 @@
*/
public void setColors(int[] colors) {
mGradientState.setColors(colors);
- mRectIsDirty = true;
+ mGradientIsDirty = true;
invalidateSelf();
}
@@ -637,10 +637,11 @@
private void buildPathIfDirty() {
final GradientState st = mGradientState;
- if (mPathIsDirty || mRectIsDirty) {
+ if (mPathIsDirty) {
+ ensureValidRect();
mPath.reset();
mPath.addRoundRect(mRect, st.mRadiusArray, Path.Direction.CW);
- mPathIsDirty = mRectIsDirty = false;
+ mPathIsDirty = false;
}
}
@@ -828,27 +829,27 @@
super.onBoundsChange(r);
mRingPath = null;
mPathIsDirty = true;
- mRectIsDirty = true;
+ mGradientIsDirty = true;
}
@Override
protected boolean onLevelChange(int level) {
super.onLevelChange(level);
- mRectIsDirty = true;
+ mGradientIsDirty = true;
mPathIsDirty = true;
invalidateSelf();
return true;
}
/**
- * This checks mRectIsDirty, and if it is true, recomputes both our drawing
+ * This checks mGradientIsDirty, and if it is true, recomputes both our drawing
* rectangle (mRect) and the gradient itself, since it depends on our
* rectangle too.
* @return true if the resulting rectangle is not empty, false otherwise
*/
private boolean ensureValidRect() {
- if (mRectIsDirty) {
- mRectIsDirty = false;
+ if (mGradientIsDirty) {
+ mGradientIsDirty = false;
Rect bounds = getBounds();
float inset = 0;
@@ -1674,7 +1675,7 @@
initializeWithState(state);
- mRectIsDirty = true;
+ mGradientIsDirty = true;
mMutated = false;
}
diff --git a/graphics/java/android/graphics/drawable/ShapeDrawable.java b/graphics/java/android/graphics/drawable/ShapeDrawable.java
index 369bb59..86765dd 100644
--- a/graphics/java/android/graphics/drawable/ShapeDrawable.java
+++ b/graphics/java/android/graphics/drawable/ShapeDrawable.java
@@ -396,6 +396,9 @@
" for ShapeDrawable " + this);
}
}
+
+ // Update local properties.
+ initializeWithState(mShapeState, r);
}
@Override
@@ -410,6 +413,9 @@
final TypedArray a = t.resolveAttributes(state.mThemeAttrs, R.styleable.ShapeDrawable);
updateStateFromTypedArray(a);
a.recycle();
+
+ // Update local properties.
+ initializeWithState(state, t.getResources());
}
private void updateStateFromTypedArray(TypedArray a) {
@@ -431,6 +437,16 @@
R.styleable.ShapeDrawable_width, state.mIntrinsicWidth));
setIntrinsicHeight((int) a.getDimension(
R.styleable.ShapeDrawable_height, state.mIntrinsicHeight));
+
+ final int tintMode = a.getInt(R.styleable.ShapeDrawable_tintMode, -1);
+ if (tintMode != -1) {
+ state.mTintMode = Drawable.parseTintMode(tintMode, Mode.SRC_IN);
+ }
+
+ final ColorStateList tint = a.getColorStateList(R.styleable.ShapeDrawable_tint);
+ if (tint != null) {
+ state.mTint = tint;
+ }
}
private void updateShape() {
@@ -545,6 +561,10 @@
}
}
+ /**
+ * The one constructor to rule them all. This is called by all public
+ * constructors to set the state and initialize local properties.
+ */
private ShapeDrawable(ShapeState state, Resources res, Theme theme) {
if (theme != null && state.canApplyTheme()) {
mShapeState = new ShapeState(state);
@@ -553,7 +573,16 @@
mShapeState = state;
}
- mTintFilter = updateTintFilter(mTintFilter, mShapeState.mTint, mShapeState.mTintMode);
+ initializeWithState(state, res);
+ }
+
+ /**
+ * Initializes local dynamic properties from state. This should be called
+ * after significant state changes, e.g. from the One True Constructor and
+ * after inflating or applying a theme.
+ */
+ private void initializeWithState(ShapeState state, Resources res) {
+ mTintFilter = updateTintFilter(mTintFilter, state.mTint, state.mTintMode);
}
/**
diff --git a/graphics/java/android/graphics/drawable/VectorDrawable.java b/graphics/java/android/graphics/drawable/VectorDrawable.java
index 3773a9b..c98f2a1 100644
--- a/graphics/java/android/graphics/drawable/VectorDrawable.java
+++ b/graphics/java/android/graphics/drawable/VectorDrawable.java
@@ -237,34 +237,6 @@
return PixelFormat.TRANSLUCENT;
}
- /**
- * Sets padding for this shape, defined by a Rect object. Define the padding
- * in the Rect object as: left, top, right, bottom.
- */
- public void setPadding(Rect padding) {
- setPadding(padding.left, padding.top, padding.right, padding.bottom);
- }
-
- /**
- * Sets padding for the shape.
- *
- * @param left padding for the left side (in pixels)
- * @param top padding for the top (in pixels)
- * @param right padding for the right side (in pixels)
- * @param bottom padding for the bottom (in pixels)
- */
- public void setPadding(int left, int top, int right, int bottom) {
- if ((left | top | right | bottom) == 0) {
- mVectorState.mPadding = null;
- } else {
- if (mVectorState.mPadding == null) {
- mVectorState.mPadding = new Rect();
- }
- mVectorState.mPadding.set(left, top, right, bottom);
- }
- invalidateSelf();
- }
-
@Override
public int getIntrinsicWidth() {
return (int) mVectorState.mVPathRenderer.mBaseWidth;
@@ -276,16 +248,6 @@
}
@Override
- public boolean getPadding(Rect padding) {
- if (mVectorState.mPadding != null) {
- padding.set(mVectorState.mPadding);
- return true;
- } else {
- return super.getPadding(padding);
- }
- }
-
- @Override
public boolean canApplyTheme() {
return super.canApplyTheme() || mVectorState != null && mVectorState.canApplyTheme();
}
@@ -462,7 +424,6 @@
int[] mThemeAttrs;
int mChangingConfigurations;
VPathRenderer mVPathRenderer;
- Rect mPadding;
ColorStateList mTint;
Mode mTintMode;
@@ -472,7 +433,6 @@
mChangingConfigurations = copy.mChangingConfigurations;
// TODO: Make sure the constant state are handled correctly.
mVPathRenderer = new VPathRenderer(copy.mVPathRenderer);
- mPadding = new Rect(copy.mPadding);
mTint = copy.mTint;
mTintMode = copy.mTintMode;
}
diff --git a/libs/hwui/DisplayList.cpp b/libs/hwui/DisplayList.cpp
index f418c9b..e38b532 100644
--- a/libs/hwui/DisplayList.cpp
+++ b/libs/hwui/DisplayList.cpp
@@ -90,8 +90,8 @@
layers.clear();
}
-void DisplayListData::addChild(DrawDisplayListOp* op) {
- LOG_ALWAYS_FATAL_IF(!op->renderNode(), "DrawDisplayListOp with no render node!");
+void DisplayListData::addChild(DrawRenderNodeOp* op) {
+ LOG_ALWAYS_FATAL_IF(!op->renderNode(), "DrawRenderNodeOp with no render node!");
mChildren.push(op);
mReferenceHolders.push(op->renderNode());
diff --git a/libs/hwui/DisplayList.h b/libs/hwui/DisplayList.h
index 7b7dc16..bfffbb4 100644
--- a/libs/hwui/DisplayList.h
+++ b/libs/hwui/DisplayList.h
@@ -61,7 +61,7 @@
class SaveLayerOp;
class SaveOp;
class RestoreToCountOp;
-class DrawDisplayListOp;
+class DrawRenderNodeOp;
/**
* Holds data used in the playback a tree of DisplayLists.
@@ -133,8 +133,8 @@
return !displayListOps.size();
}
- void addChild(DrawDisplayListOp* childOp);
- const Vector<DrawDisplayListOp*>& children() { return mChildren; }
+ void addChild(DrawRenderNodeOp* childOp);
+ const Vector<DrawRenderNodeOp*>& children() { return mChildren; }
void refProperty(CanvasPropertyPrimitive* prop) {
mReferenceHolders.push(prop);
@@ -148,7 +148,7 @@
Vector< sp<VirtualLightRefBase> > mReferenceHolders;
// list of children display lists for quick, non-drawing traversal
- Vector<DrawDisplayListOp*> mChildren;
+ Vector<DrawRenderNodeOp*> mChildren;
void cleanupResources();
};
diff --git a/libs/hwui/DisplayListOp.h b/libs/hwui/DisplayListOp.h
index f8d620d..811af39 100644
--- a/libs/hwui/DisplayListOp.h
+++ b/libs/hwui/DisplayListOp.h
@@ -1465,23 +1465,23 @@
Functor* mFunctor;
};
-class DrawDisplayListOp : public DrawBoundedOp {
- friend class RenderNode; // grant DisplayList access to info of child
+class DrawRenderNodeOp : public DrawBoundedOp {
+ friend class RenderNode; // grant RenderNode access to info of child
public:
- DrawDisplayListOp(RenderNode* displayList, int flags, const mat4& transformFromParent)
- : DrawBoundedOp(0, 0, displayList->getWidth(), displayList->getHeight(), 0),
- mDisplayList(displayList), mFlags(flags), mTransformFromParent(transformFromParent) {}
+ DrawRenderNodeOp(RenderNode* renderNode, int flags, const mat4& transformFromParent)
+ : DrawBoundedOp(0, 0, renderNode->getWidth(), renderNode->getHeight(), 0),
+ mRenderNode(renderNode), mFlags(flags), mTransformFromParent(transformFromParent) {}
virtual void defer(DeferStateStruct& deferStruct, int saveCount, int level,
bool useQuickReject) {
- if (mDisplayList && mDisplayList->isRenderable() && !mSkipInOrderDraw) {
- mDisplayList->defer(deferStruct, level + 1);
+ if (mRenderNode && mRenderNode->isRenderable() && !mSkipInOrderDraw) {
+ mRenderNode->defer(deferStruct, level + 1);
}
}
virtual void replay(ReplayStateStruct& replayStruct, int saveCount, int level,
bool useQuickReject) {
- if (mDisplayList && mDisplayList->isRenderable() && !mSkipInOrderDraw) {
- mDisplayList->replay(replayStruct, level + 1);
+ if (mRenderNode && mRenderNode->isRenderable() && !mSkipInOrderDraw) {
+ mRenderNode->replay(replayStruct, level + 1);
}
}
@@ -1491,22 +1491,22 @@
}
virtual void output(int level, uint32_t logFlags) const {
- OP_LOG("Draw Display List %p, flags %#x", mDisplayList, mFlags);
- if (mDisplayList && (logFlags & kOpLogFlag_Recurse)) {
- mDisplayList->output(level + 1);
+ OP_LOG("Draw Display List %p, flags %#x", mRenderNode, mFlags);
+ if (mRenderNode && (logFlags & kOpLogFlag_Recurse)) {
+ mRenderNode->output(level + 1);
}
}
- virtual const char* name() { return "DrawDisplayList"; }
+ virtual const char* name() { return "DrawRenderNode"; }
- RenderNode* renderNode() { return mDisplayList; }
+ RenderNode* renderNode() { return mRenderNode; }
private:
- RenderNode* mDisplayList;
+ RenderNode* mRenderNode;
const int mFlags;
///////////////////////////
- // Properties below are used by DisplayList::computeOrderingImpl() and iterate()
+ // Properties below are used by RenderNode::computeOrderingImpl() and issueOperations()
///////////////////////////
/**
* Records transform vs parent, used for computing total transform without rerunning DL contents
@@ -1514,12 +1514,12 @@
const mat4 mTransformFromParent;
/**
- * Holds the transformation between the projection surface ViewGroup and this DisplayList
+ * Holds the transformation between the projection surface ViewGroup and this RenderNode
* drawing instance. Represents any translations / transformations done within the drawing of
* the compositing ancestor ViewGroup's draw, before the draw of the View represented by this
* DisplayList draw instance.
*
- * Note: doesn't include any transformation recorded within the DisplayList and its properties.
+ * Note: doesn't include transformation within the RenderNode, or its properties.
*/
mat4 mTransformFromCompositingAncestor;
bool mSkipInOrderDraw;
diff --git a/libs/hwui/DisplayListRenderer.cpp b/libs/hwui/DisplayListRenderer.cpp
index fc4d40b..b6d3f4b 100644
--- a/libs/hwui/DisplayListRenderer.cpp
+++ b/libs/hwui/DisplayListRenderer.cpp
@@ -169,18 +169,16 @@
return StatefulBaseRenderer::clipRegion(region, op);
}
-status_t DisplayListRenderer::drawDisplayList(RenderNode* displayList,
- Rect& dirty, int32_t flags) {
+status_t DisplayListRenderer::drawRenderNode(RenderNode* renderNode, Rect& dirty, int32_t flags) {
// dirty is an out parameter and should not be recorded,
// it matters only when replaying the display list
- if (displayList->stagingProperties().isProjectionReceiver()) {
+ if (renderNode->stagingProperties().isProjectionReceiver()) {
// use staging property, since recording on UI thread
mDisplayListData->projectionReceiveIndex = mDisplayListData->displayListOps.size();
}
- DrawDisplayListOp* op = new (alloc()) DrawDisplayListOp(displayList,
- flags, *currentTransform());
+ DrawRenderNodeOp* op = new (alloc()) DrawRenderNodeOp(renderNode, flags, *currentTransform());
addDrawOp(op);
mDisplayListData->addChild(op);
return DrawGlInfo::kStatusDone;
diff --git a/libs/hwui/DisplayListRenderer.h b/libs/hwui/DisplayListRenderer.h
index 2eaa671..1de656e 100644
--- a/libs/hwui/DisplayListRenderer.h
+++ b/libs/hwui/DisplayListRenderer.h
@@ -148,8 +148,7 @@
// Canvas draw operations - special
// ----------------------------------------------------------------------------
virtual status_t drawLayer(Layer* layer, float x, float y);
- virtual status_t drawDisplayList(RenderNode* displayList, Rect& dirty,
- int32_t replayFlags);
+ virtual status_t drawRenderNode(RenderNode* renderNode, Rect& dirty, int32_t replayFlags);
// TODO: rename for consistency
virtual status_t callDrawGLFunction(Functor* functor, Rect& dirty);
diff --git a/libs/hwui/Layer.cpp b/libs/hwui/Layer.cpp
index 24dd1d3..b6414e5 100644
--- a/libs/hwui/Layer.cpp
+++ b/libs/hwui/Layer.cpp
@@ -41,7 +41,7 @@
colorFilter = NULL;
deferredUpdateScheduled = false;
renderer = NULL;
- displayList = NULL;
+ renderNode = NULL;
fbo = 0;
stencil = NULL;
debugDrawUpdate = false;
@@ -141,10 +141,9 @@
}
}
-void Layer::updateDeferred(RenderNode* displayList,
- int left, int top, int right, int bottom) {
+void Layer::updateDeferred(RenderNode* renderNode, int left, int top, int right, int bottom) {
requireRenderer();
- this->displayList = displayList;
+ this->renderNode = renderNode;
const Rect r(left, top, right, bottom);
dirtyRect.unionWith(r);
deferredUpdateScheduled = true;
@@ -219,14 +218,14 @@
renderer->setupFrameState(dirtyRect.left, dirtyRect.top,
dirtyRect.right, dirtyRect.bottom, !isBlend());
- displayList->computeOrdering();
- displayList->defer(deferredState, 0);
+ renderNode->computeOrdering();
+ renderNode->defer(deferredState, 0);
deferredUpdateScheduled = false;
}
void Layer::cancelDefer() {
- displayList = NULL;
+ renderNode = NULL;
deferredUpdateScheduled = false;
if (deferredList) {
delete deferredList;
@@ -246,7 +245,7 @@
renderer->finish();
dirtyRect.setEmpty();
- displayList = NULL;
+ renderNode = NULL;
}
}
@@ -255,14 +254,14 @@
renderer->prepareDirty(dirtyRect.left, dirtyRect.top, dirtyRect.right, dirtyRect.bottom,
!isBlend());
- renderer->drawDisplayList(displayList.get(), dirtyRect, RenderNode::kReplayFlag_ClipChildren);
+ renderer->drawRenderNode(renderNode.get(), dirtyRect, RenderNode::kReplayFlag_ClipChildren);
renderer->finish();
dirtyRect.setEmpty();
deferredUpdateScheduled = false;
- displayList = NULL;
+ renderNode = NULL;
}
}; // namespace uirenderer
diff --git a/libs/hwui/Layer.h b/libs/hwui/Layer.h
index 49610d5..741f4c3 100644
--- a/libs/hwui/Layer.h
+++ b/libs/hwui/Layer.h
@@ -85,8 +85,7 @@
regionRect.translate(layer.left, layer.top);
}
- void updateDeferred(RenderNode* displayList,
- int left, int top, int right, int bottom);
+ void updateDeferred(RenderNode* renderNode, int left, int top, int right, int bottom);
inline uint32_t getWidth() const {
return texture.width;
@@ -297,7 +296,7 @@
*/
bool deferredUpdateScheduled;
OpenGLRenderer* renderer;
- sp<RenderNode> displayList;
+ sp<RenderNode> renderNode;
Rect dirtyRect;
bool debugDrawUpdate;
bool hasDrawnSinceUpdate;
diff --git a/libs/hwui/OpenGLRenderer.cpp b/libs/hwui/OpenGLRenderer.cpp
index e1dfeae..afb65a6 100644
--- a/libs/hwui/OpenGLRenderer.cpp
+++ b/libs/hwui/OpenGLRenderer.cpp
@@ -474,8 +474,8 @@
///////////////////////////////////////////////////////////////////////////////
bool OpenGLRenderer::updateLayer(Layer* layer, bool inFrame) {
- if (layer->deferredUpdateScheduled && layer->renderer &&
- layer->displayList.get() && layer->displayList->isRenderable()) {
+ if (layer->deferredUpdateScheduled && layer->renderer
+ && layer->renderNode.get() && layer->renderNode->isRenderable()) {
ATRACE_CALL();
Rect& dirty = layer->dirtyRect;
@@ -1931,25 +1931,24 @@
// Drawing
///////////////////////////////////////////////////////////////////////////////
-status_t OpenGLRenderer::drawDisplayList(RenderNode* displayList, Rect& dirty,
- int32_t replayFlags) {
+status_t OpenGLRenderer::drawRenderNode(RenderNode* renderNode, Rect& dirty, int32_t replayFlags) {
status_t status;
// All the usual checks and setup operations (quickReject, setupDraw, etc.)
// will be performed by the display list itself
- if (displayList && displayList->isRenderable()) {
+ if (renderNode && renderNode->isRenderable()) {
// compute 3d ordering
- displayList->computeOrdering();
+ renderNode->computeOrdering();
if (CC_UNLIKELY(mCaches.drawDeferDisabled)) {
status = startFrame();
ReplayStateStruct replayStruct(*this, dirty, replayFlags);
- displayList->replay(replayStruct, 0);
+ renderNode->replay(replayStruct, 0);
return status | replayStruct.mDrawGlStatus;
}
bool avoidOverdraw = !mCaches.debugOverdraw && !mCountOverdraw; // shh, don't tell devs!
DeferredDisplayList deferredList(*currentClipRect(), avoidOverdraw);
DeferStateStruct deferStruct(deferredList, *this, replayFlags);
- displayList->defer(deferStruct, 0);
+ renderNode->defer(deferStruct, 0);
flushLayers();
status = startFrame();
diff --git a/libs/hwui/OpenGLRenderer.h b/libs/hwui/OpenGLRenderer.h
index 346a65c..066b267 100644
--- a/libs/hwui/OpenGLRenderer.h
+++ b/libs/hwui/OpenGLRenderer.h
@@ -158,7 +158,7 @@
int saveLayerDeferred(float left, float top, float right, float bottom,
const SkPaint* paint, int flags);
- virtual status_t drawDisplayList(RenderNode* displayList, Rect& dirty, int32_t replayFlags = 1);
+ virtual status_t drawRenderNode(RenderNode* displayList, Rect& dirty, int32_t replayFlags = 1);
virtual status_t drawLayer(Layer* layer, float x, float y);
virtual status_t drawBitmap(const SkBitmap* bitmap, float left, float top,
const SkPaint* paint);
diff --git a/libs/hwui/RenderNode.cpp b/libs/hwui/RenderNode.cpp
index 4cda178..e8f2dd2 100644
--- a/libs/hwui/RenderNode.cpp
+++ b/libs/hwui/RenderNode.cpp
@@ -323,8 +323,8 @@
info.prepareTextures = cache.prefetchAndMarkInUse(subtree->bitmapResources[i]);
}
for (size_t i = 0; i < subtree->children().size(); i++) {
- DrawDisplayListOp* op = subtree->children()[i];
- RenderNode* childNode = op->mDisplayList;
+ DrawRenderNodeOp* op = subtree->children()[i];
+ RenderNode* childNode = op->mRenderNode;
info.damageAccumulator->pushTransform(&op->mTransformFromParent);
childNode->prepareTreeImpl(info);
info.damageAccumulator->popTransform();
@@ -455,16 +455,16 @@
// transform properties are applied correctly to top level children
if (mDisplayListData == NULL) return;
for (unsigned int i = 0; i < mDisplayListData->children().size(); i++) {
- DrawDisplayListOp* childOp = mDisplayListData->children()[i];
- childOp->mDisplayList->computeOrderingImpl(childOp,
+ DrawRenderNodeOp* childOp = mDisplayListData->children()[i];
+ childOp->mRenderNode->computeOrderingImpl(childOp,
properties().getOutline().getPath(), &mProjectedNodes, &mat4::identity());
}
}
void RenderNode::computeOrderingImpl(
- DrawDisplayListOp* opState,
+ DrawRenderNodeOp* opState,
const SkPath* outlineOfProjectionSurface,
- Vector<DrawDisplayListOp*>* compositedChildrenOfProjectionSurface,
+ Vector<DrawRenderNodeOp*>* compositedChildrenOfProjectionSurface,
const mat4* transformFromProjectionSurface) {
mProjectedNodes.clear();
if (mDisplayListData == NULL || mDisplayListData->isEmpty()) return;
@@ -488,11 +488,11 @@
const bool isProjectionReceiver = mDisplayListData->projectionReceiveIndex >= 0;
bool haveAppliedPropertiesToProjection = false;
for (unsigned int i = 0; i < mDisplayListData->children().size(); i++) {
- DrawDisplayListOp* childOp = mDisplayListData->children()[i];
- RenderNode* child = childOp->mDisplayList;
+ DrawRenderNodeOp* childOp = mDisplayListData->children()[i];
+ RenderNode* child = childOp->mRenderNode;
const SkPath* projectionOutline = NULL;
- Vector<DrawDisplayListOp*>* projectionChildren = NULL;
+ Vector<DrawRenderNodeOp*>* projectionChildren = NULL;
const mat4* projectionTransform = NULL;
if (isProjectionReceiver && !child->properties().getProjectBackwards()) {
// if receiving projections, collect projecting descendent
@@ -571,16 +571,16 @@
issueOperations<ReplayOperationHandler>(replayStruct.mRenderer, handler);
}
-void RenderNode::buildZSortedChildList(Vector<ZDrawDisplayListOpPair>& zTranslatedNodes) {
+void RenderNode::buildZSortedChildList(Vector<ZDrawRenderNodeOpPair>& zTranslatedNodes) {
if (mDisplayListData == NULL || mDisplayListData->children().size() == 0) return;
for (unsigned int i = 0; i < mDisplayListData->children().size(); i++) {
- DrawDisplayListOp* childOp = mDisplayListData->children()[i];
- RenderNode* child = childOp->mDisplayList;
+ DrawRenderNodeOp* childOp = mDisplayListData->children()[i];
+ RenderNode* child = childOp->mRenderNode;
float childZ = child->properties().getZ();
if (!MathUtils::isZero(childZ)) {
- zTranslatedNodes.add(ZDrawDisplayListOpPair(childZ, childOp));
+ zTranslatedNodes.add(ZDrawRenderNodeOpPair(childZ, childOp));
childOp->mSkipInOrderDraw = true;
} else if (!child->properties().getProjectBackwards()) {
// regular, in order drawing DisplayList
@@ -627,7 +627,7 @@
template <class T>
int RenderNode::issueOperationsOfNegZChildren(
- const Vector<ZDrawDisplayListOpPair>& zTranslatedNodes,
+ const Vector<ZDrawRenderNodeOpPair>& zTranslatedNodes,
OpenGLRenderer& renderer, T& handler) {
if (zTranslatedNodes.isEmpty()) return -1;
@@ -643,7 +643,7 @@
template <class T>
void RenderNode::issueOperationsOfPosZChildren(int shadowRestoreTo,
- const Vector<ZDrawDisplayListOpPair>& zTranslatedNodes,
+ const Vector<ZDrawRenderNodeOpPair>& zTranslatedNodes,
OpenGLRenderer& renderer, T& handler) {
if (zTranslatedNodes.isEmpty()) return;
@@ -658,7 +658,7 @@
#define SHADOW_DELTA 0.1f
template <class T>
-void RenderNode::issueOperationsOf3dChildren(const Vector<ZDrawDisplayListOpPair>& zTranslatedNodes,
+void RenderNode::issueOperationsOf3dChildren(const Vector<ZDrawRenderNodeOpPair>& zTranslatedNodes,
ChildrenSelectMode mode, OpenGLRenderer& renderer, T& handler) {
const int size = zTranslatedNodes.size();
if (size == 0
@@ -693,8 +693,8 @@
float lastCasterZ = 0.0f;
while (shadowIndex < endIndex || drawIndex < endIndex) {
if (shadowIndex < endIndex) {
- DrawDisplayListOp* casterOp = zTranslatedNodes[shadowIndex].value;
- RenderNode* caster = casterOp->mDisplayList;
+ DrawRenderNodeOp* casterOp = zTranslatedNodes[shadowIndex].value;
+ RenderNode* caster = casterOp->mRenderNode;
const float casterZ = zTranslatedNodes[shadowIndex].key;
// attempt to render the shadow if the caster about to be drawn is its caster,
// OR if its caster's Z value is similar to the previous potential caster
@@ -711,8 +711,8 @@
// since it modifies the renderer's matrix
int restoreTo = renderer.save(SkCanvas::kMatrix_SaveFlag);
- DrawDisplayListOp* childOp = zTranslatedNodes[drawIndex].value;
- RenderNode* child = childOp->mDisplayList;
+ DrawRenderNodeOp* childOp = zTranslatedNodes[drawIndex].value;
+ RenderNode* child = childOp->mRenderNode;
renderer.concatMatrix(childOp->mTransformFromParent);
childOp->mSkipInOrderDraw = false; // this is horrible, I'm so sorry everyone
@@ -761,7 +761,7 @@
// draw projected nodes
for (size_t i = 0; i < mProjectedNodes.size(); i++) {
- DrawDisplayListOp* childOp = mProjectedNodes[i];
+ DrawRenderNodeOp* childOp = mProjectedNodes[i];
// matrix save, concat, and restore can be done safely without allocating operations
int restoreTo = renderer.save(SkCanvas::kMatrix_SaveFlag);
@@ -833,7 +833,7 @@
handler(new (alloc) DrawLayerOp(mLayer, 0, 0),
renderer.getSaveCount() - 1, properties().getClipToBounds());
} else {
- Vector<ZDrawDisplayListOpPair> zTranslatedNodes;
+ Vector<ZDrawRenderNodeOpPair> zTranslatedNodes;
buildZSortedChildList(zTranslatedNodes);
// for 3d root, draw children with negative z values
diff --git a/libs/hwui/RenderNode.h b/libs/hwui/RenderNode.h
index c510ac6..2fa6078 100644
--- a/libs/hwui/RenderNode.h
+++ b/libs/hwui/RenderNode.h
@@ -67,7 +67,7 @@
class SaveLayerOp;
class SaveOp;
class RestoreToCountOp;
-class DrawDisplayListOp;
+class DrawRenderNodeOp;
/**
* Primary class for storing recorded canvas commands, as well as per-View/ViewGroup display properties.
@@ -195,9 +195,9 @@
virtual void damageSelf(TreeInfo& info);
private:
- typedef key_value_pair_t<float, DrawDisplayListOp*> ZDrawDisplayListOpPair;
+ typedef key_value_pair_t<float, DrawRenderNodeOp*> ZDrawRenderNodeOpPair;
- static size_t findNonNegativeIndex(const Vector<ZDrawDisplayListOpPair>& nodes) {
+ static size_t findNonNegativeIndex(const Vector<ZDrawRenderNodeOpPair>& nodes) {
for (size_t i = 0; i < nodes.size(); i++) {
if (nodes[i].key >= 0.0f) return i;
}
@@ -211,29 +211,29 @@
void applyViewPropertyTransforms(mat4& matrix, bool true3dTransform = false);
- void computeOrderingImpl(DrawDisplayListOp* opState,
+ void computeOrderingImpl(DrawRenderNodeOp* opState,
const SkPath* outlineOfProjectionSurface,
- Vector<DrawDisplayListOp*>* compositedChildrenOfProjectionSurface,
+ Vector<DrawRenderNodeOp*>* compositedChildrenOfProjectionSurface,
const mat4* transformFromProjectionSurface);
template <class T>
inline void setViewProperties(OpenGLRenderer& renderer, T& handler);
- void buildZSortedChildList(Vector<ZDrawDisplayListOpPair>& zTranslatedNodes);
+ void buildZSortedChildList(Vector<ZDrawRenderNodeOpPair>& zTranslatedNodes);
template<class T>
inline void issueDrawShadowOperation(const Matrix4& transformFromParent, T& handler);
template <class T>
inline int issueOperationsOfNegZChildren(
- const Vector<ZDrawDisplayListOpPair>& zTranslatedNodes,
+ const Vector<ZDrawRenderNodeOpPair>& zTranslatedNodes,
OpenGLRenderer& renderer, T& handler);
template <class T>
inline void issueOperationsOfPosZChildren(int shadowRestoreTo,
- const Vector<ZDrawDisplayListOpPair>& zTranslatedNodes,
+ const Vector<ZDrawRenderNodeOpPair>& zTranslatedNodes,
OpenGLRenderer& renderer, T& handler);
template <class T>
- inline void issueOperationsOf3dChildren(const Vector<ZDrawDisplayListOpPair>& zTranslatedNodes,
+ inline void issueOperationsOf3dChildren(const Vector<ZDrawRenderNodeOpPair>& zTranslatedNodes,
ChildrenSelectMode mode, OpenGLRenderer& renderer, T& handler);
template <class T>
@@ -241,7 +241,7 @@
/**
* Issue the RenderNode's operations into a handler, recursing for subtrees through
- * DrawDisplayListOp's defer() or replay() methods
+ * DrawRenderNodeOp's defer() or replay() methods
*/
template <class T>
inline void issueOperations(OpenGLRenderer& renderer, T& handler);
@@ -292,7 +292,7 @@
*/
// for projection surfaces, contains a list of all children items
- Vector<DrawDisplayListOp*> mProjectedNodes;
+ Vector<DrawRenderNodeOp*> mProjectedNodes;
}; // class RenderNode
} /* namespace uirenderer */
diff --git a/libs/hwui/Renderer.h b/libs/hwui/Renderer.h
index 320895c..d68b932 100644
--- a/libs/hwui/Renderer.h
+++ b/libs/hwui/Renderer.h
@@ -233,7 +233,7 @@
// Canvas draw operations - special
// ----------------------------------------------------------------------------
virtual status_t drawLayer(Layer* layer, float x, float y) = 0;
- virtual status_t drawDisplayList(RenderNode* displayList, Rect& dirty,
+ virtual status_t drawRenderNode(RenderNode* renderNode, Rect& dirty,
int32_t replayFlags) = 0;
// TODO: rename for consistency
diff --git a/libs/hwui/renderthread/CanvasContext.cpp b/libs/hwui/renderthread/CanvasContext.cpp
index dc1951b..eab9810 100644
--- a/libs/hwui/renderthread/CanvasContext.cpp
+++ b/libs/hwui/renderthread/CanvasContext.cpp
@@ -469,7 +469,7 @@
void CanvasContext::draw() {
LOG_ALWAYS_FATAL_IF(!mCanvas || mEglSurface == EGL_NO_SURFACE,
- "drawDisplayList called on a context with no canvas or surface!");
+ "drawRenderNode called on a context with no canvas or surface!");
profiler().markPlaybackStart();
@@ -496,7 +496,7 @@
}
Rect outBounds;
- status |= mCanvas->drawDisplayList(mRootRenderNode.get(), outBounds);
+ status |= mCanvas->drawRenderNode(mRootRenderNode.get(), outBounds);
profiler().draw(mCanvas);
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/ExpandableNotificationRow.java b/packages/SystemUI/src/com/android/systemui/statusbar/ExpandableNotificationRow.java
index 5bad602..5981898 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/ExpandableNotificationRow.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/ExpandableNotificationRow.java
@@ -212,13 +212,6 @@
return mShowingPublic ? mRowMinHeight : mMaxExpandHeight;
}
- /**
- * @return the potential height this view could expand in addition.
- */
- public int getExpandPotential() {
- return getIntrinsicHeight() - getActualHeight();
- }
-
@Override
public boolean isContentExpandable() {
NotificationContentView showingLayout = getShowingLayout();
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/NotificationContentView.java b/packages/SystemUI/src/com/android/systemui/statusbar/NotificationContentView.java
index 5cde979..f919501 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/NotificationContentView.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/NotificationContentView.java
@@ -17,12 +17,16 @@
package com.android.systemui.statusbar;
import android.content.Context;
+import android.graphics.Paint;
+import android.graphics.PorterDuff;
+import android.graphics.PorterDuffXfermode;
import android.graphics.Rect;
import android.util.AttributeSet;
-import android.view.Gravity;
import android.view.View;
-
+import android.view.animation.Interpolator;
+import android.view.animation.LinearInterpolator;
import android.widget.FrameLayout;
+
import com.android.systemui.R;
/**
@@ -32,6 +36,8 @@
*/
public class NotificationContentView extends FrameLayout {
+ private static final long ANIMATION_DURATION_LENGTH = 170;
+
private final Rect mClipBounds = new Rect();
private View mContractedChild;
@@ -41,10 +47,17 @@
private int mClipTopAmount;
private int mActualHeight;
+ private final Interpolator mLinearInterpolator = new LinearInterpolator();
+
+ private boolean mContractedVisible = true;
+
+ private Paint mFadePaint = new Paint();
+
public NotificationContentView(Context context, AttributeSet attrs) {
super(context, attrs);
mSmallHeight = getResources().getDimensionPixelSize(R.dimen.notification_min_height);
mActualHeight = mSmallHeight;
+ mFadePaint.setXfermode(new PorterDuffXfermode(PorterDuff.Mode.ADD));
}
@Override
@@ -60,7 +73,7 @@
sanitizeContractedLayoutParams(child);
addView(child);
mContractedChild = child;
- selectLayout();
+ selectLayout(false /* animate */, true /* force */);
}
public void setExpandedChild(View child) {
@@ -69,12 +82,12 @@
}
addView(child);
mExpandedChild = child;
- selectLayout();
+ selectLayout(false /* animate */, true /* force */);
}
public void setActualHeight(int actualHeight) {
mActualHeight = actualHeight;
- selectLayout();
+ selectLayout(true /* animate */, false /* force */);
updateClipping();
}
@@ -104,26 +117,60 @@
contractedChild.setLayoutParams(lp);
}
- private void selectLayout() {
- if (mActualHeight <= mSmallHeight || mExpandedChild == null) {
- if (mContractedChild != null && mContractedChild.getVisibility() != View.VISIBLE) {
- mContractedChild.setVisibility(View.VISIBLE);
- }
- if (mExpandedChild != null && mExpandedChild.getVisibility() != View.INVISIBLE) {
- mExpandedChild.setVisibility(View.INVISIBLE);
- }
- } else {
- if (mExpandedChild.getVisibility() != View.VISIBLE) {
- mExpandedChild.setVisibility(View.VISIBLE);
- }
- if (mContractedChild != null && mContractedChild.getVisibility() != View.INVISIBLE) {
- mContractedChild.setVisibility(View.INVISIBLE);
+ private void selectLayout(boolean animate, boolean force) {
+ if (mContractedChild == null) {
+ return;
+ }
+ boolean showContractedChild = showContractedChild();
+ if (showContractedChild != mContractedVisible || force) {
+ if (animate && mExpandedChild != null) {
+ runSwitchAnimation(showContractedChild);
+ } else if (mExpandedChild != null) {
+ mContractedChild.setVisibility(showContractedChild ? View.VISIBLE : View.INVISIBLE);
+ mContractedChild.setAlpha(showContractedChild ? 1f : 0f);
+ mExpandedChild.setVisibility(showContractedChild ? View.INVISIBLE : View.VISIBLE);
+ mExpandedChild.setAlpha(showContractedChild ? 0f : 1f);
}
}
+ mContractedVisible = showContractedChild;
+ }
+
+ private void runSwitchAnimation(final boolean showContractedChild) {
+ mContractedChild.setVisibility(View.VISIBLE);
+ mExpandedChild.setVisibility(View.VISIBLE);
+ mContractedChild.setLayerType(LAYER_TYPE_HARDWARE, mFadePaint);
+ mExpandedChild.setLayerType(LAYER_TYPE_HARDWARE, mFadePaint);
+ setLayerType(LAYER_TYPE_HARDWARE, null);
+ mContractedChild.animate()
+ .alpha(showContractedChild ? 1f : 0f)
+ .setDuration(ANIMATION_DURATION_LENGTH)
+ .setInterpolator(mLinearInterpolator);
+ mExpandedChild.animate()
+ .alpha(showContractedChild ? 0f : 1f)
+ .setDuration(ANIMATION_DURATION_LENGTH)
+ .setInterpolator(mLinearInterpolator)
+ .withEndAction(new Runnable() {
+ @Override
+ public void run() {
+ mContractedChild.setLayerType(LAYER_TYPE_NONE, null);
+ mExpandedChild.setLayerType(LAYER_TYPE_NONE, null);
+ setLayerType(LAYER_TYPE_NONE, null);
+ mContractedChild.setVisibility(showContractedChild
+ ? View.VISIBLE
+ : View.INVISIBLE);
+ mExpandedChild.setVisibility(showContractedChild
+ ? View.INVISIBLE
+ : View.VISIBLE);
+ }
+ });
+ }
+
+ private boolean showContractedChild() {
+ return mActualHeight <= mSmallHeight || mExpandedChild == null;
}
public void notifyContentUpdated() {
- selectLayout();
+ selectLayout(false /* animate */, true /* force */);
}
public boolean isContentExpandable() {
diff --git a/services/core/java/com/android/server/NetworkManagementService.java b/services/core/java/com/android/server/NetworkManagementService.java
index 7022294..f9c7a78 100644
--- a/services/core/java/com/android/server/NetworkManagementService.java
+++ b/services/core/java/com/android/server/NetworkManagementService.java
@@ -63,6 +63,7 @@
import android.telephony.DataConnectionRealTimeInfo;
import android.telephony.PhoneStateListener;
import android.telephony.SubscriptionManager;
+import android.telephony.TelephonyManager;
import android.util.Log;
import android.util.Slog;
import android.util.SparseBooleanArray;
@@ -240,15 +241,22 @@
mThread = new Thread(mConnector, NETD_TAG);
mDaemonHandler = new Handler(FgThread.get().getLooper());
- mPhoneStateListener = new PhoneStateListener(
- SubscriptionManager.DEFAULT_SUB_ID, // FIXME: What Subscription should be used??
+
+ mPhoneStateListener = new PhoneStateListener(SubscriptionManager.DEFAULT_SUB_ID,
mDaemonHandler.getLooper()) {
+ @Override
public void onDataConnectionRealTimeInfoChanged(
DataConnectionRealTimeInfo dcRtInfo) {
+ if (DBG) Slog.d(TAG, "onDataConnectionRealTimeInfoChanged: " + dcRtInfo);
notifyInterfaceClassActivity(ConnectivityManager.TYPE_MOBILE,
dcRtInfo.getDcPowerState(), dcRtInfo.getTime(), true);
}
};
+ TelephonyManager tm = (TelephonyManager)context.getSystemService(Context.TELEPHONY_SERVICE);
+ if (tm != null) {
+ tm.listen(mPhoneStateListener,
+ PhoneStateListener.LISTEN_DATA_CONNECTION_REAL_TIME_INFO);
+ }
// Add ourself to the Watchdog monitors.
Watchdog.getInstance().addMonitor(this);
diff --git a/services/core/java/com/android/server/am/TaskRecord.java b/services/core/java/com/android/server/am/TaskRecord.java
index 986321d..e9afc36 100644
--- a/services/core/java/com/android/server/am/TaskRecord.java
+++ b/services/core/java/com/android/server/am/TaskRecord.java
@@ -114,6 +114,10 @@
/** If original intent did not allow relinquishing task identity, save that information */
boolean mNeverRelinquishIdentity = true;
+ // Used in the unique case where we are clearing the task in order to reuse it. In that case we
+ // do not want to delete the stack when the task goes empty.
+ boolean mReuseTask = false;
+
final ActivityManagerService mService;
TaskRecord(ActivityManagerService service, int _taskId, ActivityInfo info, Intent _intent,
@@ -282,6 +286,11 @@
foundFront = true;
}
}
+ if (!foundFront && numActivities > 0) {
+ // All activities of this task are finishing. As we ought to have a frontOfTask
+ // activity, make the bottom activity front.
+ mActivities.get(0).frontOfTask = true;
+ }
}
/**
@@ -339,7 +348,7 @@
mService.notifyTaskPersisterLocked(this, false);
}
if (mActivities.isEmpty()) {
- return true;
+ return !mReuseTask;
}
updateEffectiveIntent();
return false;
@@ -383,7 +392,9 @@
* Completely remove all activities associated with an existing task.
*/
final void performClearTaskLocked() {
+ mReuseTask = true;
performClearTaskAtIndexLocked(0);
+ mReuseTask = false;
}
/**
diff --git a/services/core/java/com/android/server/hdmi/HdmiCecLocalDeviceTv.java b/services/core/java/com/android/server/hdmi/HdmiCecLocalDeviceTv.java
index 52c092c..420304e 100644
--- a/services/core/java/com/android/server/hdmi/HdmiCecLocalDeviceTv.java
+++ b/services/core/java/com/android/server/hdmi/HdmiCecLocalDeviceTv.java
@@ -253,20 +253,35 @@
mDeviceInfos.clear();
}
+ void changeSystemAudioMode(boolean enabled, IHdmiControlCallback callback) {
+ assertRunOnServiceThread();
+ HdmiCecDeviceInfo avr = getAvrDeviceInfo();
+ if (avr == null) {
+ invokeCallback(callback, HdmiCec.RESULT_SOURCE_NOT_AVAILABLE);
+ return;
+ }
+
+ addAndStartAction(
+ new SystemAudioActionFromTv(this, avr.getLogicalAddress(), enabled, callback));
+ }
+
+ boolean canChangeSystemAudioMode() {
+ // TODO: once have immutable device info, test whether avr info exists or not.
+ return false;
+ }
+
void setSystemAudioMode(boolean on) {
synchronized (mLock) {
if (on != mSystemAudioMode) {
mSystemAudioMode = on;
// TODO: Need to set the preference for SystemAudioMode.
- // TODO: Need to handle the notification of changing the mode and
- // to identify the notification should be handled in the service or TvSettings.
+ mService.announceSystemAudioModeChange(on);
}
}
}
boolean getSystemAudioMode() {
synchronized (mLock) {
- assertRunOnServiceThread();
return mSystemAudioMode;
}
}
@@ -336,7 +351,7 @@
return false;
}
SystemAudioActionFromAvr action = new SystemAudioActionFromAvr(this,
- message.getSource(), HdmiUtils.parseCommandParamSystemAudioStatus(message));
+ message.getSource(), HdmiUtils.parseCommandParamSystemAudioStatus(message), null);
addAndStartAction(action);
return true;
}
diff --git a/services/core/java/com/android/server/hdmi/HdmiControlService.java b/services/core/java/com/android/server/hdmi/HdmiControlService.java
index d323f34..7774878 100644
--- a/services/core/java/com/android/server/hdmi/HdmiControlService.java
+++ b/services/core/java/com/android/server/hdmi/HdmiControlService.java
@@ -27,6 +27,7 @@
import android.hardware.hdmi.IHdmiControlService;
import android.hardware.hdmi.IHdmiDeviceEventListener;
import android.hardware.hdmi.IHdmiHotplugEventListener;
+import android.hardware.hdmi.IHdmiSystemAudioModeChangeListener;
import android.os.Build;
import android.os.Handler;
import android.os.HandlerThread;
@@ -113,6 +114,14 @@
private final ArrayList<DeviceEventListenerRecord> mDeviceEventListenerRecords =
new ArrayList<>();
+ // List of listeners registered by callers that want to get notified of
+ // system audio mode changes.
+ private final ArrayList<IHdmiSystemAudioModeChangeListener>
+ mSystemAudioModeChangeListeners = new ArrayList<>();
+ // List of records for system audio mode change to handle the the caller killed in action.
+ private final ArrayList<SystemAudioModeChangeListenerRecord>
+ mSystemAudioModeChangeListenerRecords = new ArrayList<>();
+
// Handler used to run a task in service thread.
private final Handler mHandler = new Handler();
@@ -447,6 +456,12 @@
// TODO: Hook up with AudioManager.
}
+ void announceSystemAudioModeChange(boolean enabled) {
+ for (IHdmiSystemAudioModeChangeListener listener : mSystemAudioModeChangeListeners) {
+ invokeSystemAudioModeChange(listener, enabled);
+ }
+ }
+
private HdmiCecDeviceInfo createDeviceInfo(int logicalAddress, int deviceType) {
// TODO: find better name instead of model name.
String displayName = Build.MODEL;
@@ -480,7 +495,7 @@
}
@Override
- public void binderDied() {
+ public void binderDied() {
synchronized (mLock) {
mDeviceEventListenerRecords.remove(this);
mDeviceEventListeners.remove(mListener);
@@ -488,6 +503,22 @@
}
}
+ private final class SystemAudioModeChangeListenerRecord implements IBinder.DeathRecipient {
+ private IHdmiSystemAudioModeChangeListener mListener;
+
+ public SystemAudioModeChangeListenerRecord(IHdmiSystemAudioModeChangeListener listener) {
+ mListener = listener;
+ }
+
+ @Override
+ public void binderDied() {
+ synchronized (mLock) {
+ mSystemAudioModeChangeListenerRecords.remove(this);
+ mSystemAudioModeChangeListeners.remove(mListener);
+ }
+ }
+ }
+
private void enforceAccessPermission() {
getContext().enforceCallingOrSelfPermission(PERMISSION, TAG);
}
@@ -605,7 +636,7 @@
enforceAccessPermission();
runOnServiceThread(new Runnable() {
@Override
- public void run() {
+ public void run() {
HdmiControlService.this.addDeviceEventListener(listener);
}
});
@@ -616,6 +647,57 @@
enforceAccessPermission();
return mPortInfo;
}
+
+ @Override
+ public boolean canChangeSystemAudioMode() {
+ enforceAccessPermission();
+ HdmiCecLocalDeviceTv tv = tv();
+ if (tv == null) {
+ return false;
+ }
+ return tv.canChangeSystemAudioMode();
+ }
+
+ @Override
+ public boolean getSystemAudioMode() {
+ enforceAccessPermission();
+ HdmiCecLocalDeviceTv tv = tv();
+ if (tv == null) {
+ return false;
+ }
+ return tv.getSystemAudioMode();
+ }
+
+ @Override
+ public void setSystemAudioMode(final boolean enabled, final IHdmiControlCallback callback) {
+ enforceAccessPermission();
+ runOnServiceThread(new Runnable() {
+ @Override
+ public void run() {
+ HdmiCecLocalDeviceTv tv = tv();
+ if (tv == null) {
+ Slog.w(TAG, "Local tv device not available");
+ invokeCallback(callback, HdmiCec.RESULT_SOURCE_NOT_AVAILABLE);
+ return;
+ }
+ tv.changeSystemAudioMode(enabled, callback);
+ }
+ });
+ }
+
+ @Override
+ public void addSystemAudioModeChangeListener(
+ final IHdmiSystemAudioModeChangeListener listener) {
+ enforceAccessPermission();
+ HdmiControlService.this.addSystemAudioModeChangeListner(listener);
+ }
+
+ @Override
+ public void removeSystemAudioModeChangeListener(
+ final IHdmiSystemAudioModeChangeListener listener) {
+ enforceAccessPermission();
+ HdmiControlService.this.removeSystemAudioModeChangeListener(listener);
+ }
}
private void oneTouchPlay(final IHdmiControlCallback callback) {
@@ -693,6 +775,35 @@
}
}
+ private void addSystemAudioModeChangeListner(IHdmiSystemAudioModeChangeListener listener) {
+ SystemAudioModeChangeListenerRecord record = new SystemAudioModeChangeListenerRecord(
+ listener);
+ try {
+ listener.asBinder().linkToDeath(record, 0);
+ } catch (RemoteException e) {
+ Slog.w(TAG, "Listener already died");
+ return;
+ }
+ synchronized (mLock) {
+ mSystemAudioModeChangeListeners.add(listener);
+ mSystemAudioModeChangeListenerRecords.add(record);
+ }
+ }
+
+ private void removeSystemAudioModeChangeListener(IHdmiSystemAudioModeChangeListener listener) {
+ synchronized (mLock) {
+ for (SystemAudioModeChangeListenerRecord record :
+ mSystemAudioModeChangeListenerRecords) {
+ if (record.mListener.asBinder() == listener) {
+ listener.asBinder().unlinkToDeath(record, 0);
+ mSystemAudioModeChangeListenerRecords.remove(record);
+ break;
+ }
+ }
+ mSystemAudioModeChangeListeners.remove(listener);
+ }
+ }
+
private void invokeCallback(IHdmiControlCallback callback, int result) {
try {
callback.onComplete(result);
@@ -701,6 +812,15 @@
}
}
+ private void invokeSystemAudioModeChange(IHdmiSystemAudioModeChangeListener listener,
+ boolean enabled) {
+ try {
+ listener.onStatusChanged(enabled);
+ } catch (RemoteException e) {
+ Slog.e(TAG, "Invoking callback failed:" + e);
+ }
+ }
+
private void announceHotplugEvent(int portId, boolean connected) {
HdmiHotplugEvent event = new HdmiHotplugEvent(portId, connected);
synchronized (mLock) {
diff --git a/services/core/java/com/android/server/hdmi/SystemAudioAction.java b/services/core/java/com/android/server/hdmi/SystemAudioAction.java
index 92418ab..959a38e 100644
--- a/services/core/java/com/android/server/hdmi/SystemAudioAction.java
+++ b/services/core/java/com/android/server/hdmi/SystemAudioAction.java
@@ -16,8 +16,12 @@
package com.android.server.hdmi;
+import android.annotation.Nullable;
import android.hardware.hdmi.HdmiCec;
import android.hardware.hdmi.HdmiCecMessage;
+import android.hardware.hdmi.IHdmiControlCallback;
+import android.os.RemoteException;
+import android.util.Slog;
/**
* Base feature action class for SystemAudioActionFromTv and SystemAudioActionFromAvr.
@@ -39,6 +43,8 @@
// The target audio status of the action, whether to enable the system audio mode or not.
protected boolean mTargetAudioStatus;
+ @Nullable private final IHdmiControlCallback mCallback;
+
private int mSendRetryCount = 0;
/**
@@ -47,13 +53,16 @@
* @param source {@link HdmiCecLocalDevice} instance
* @param avrAddress logical address of AVR device
* @param targetStatus Whether to enable the system audio mode or not
+ * @param callback callback interface to be notified when it's done
* @throw IllegalArugmentException if device type of sourceAddress and avrAddress is invalid
*/
- SystemAudioAction(HdmiCecLocalDevice source, int avrAddress, boolean targetStatus) {
+ SystemAudioAction(HdmiCecLocalDevice source, int avrAddress, boolean targetStatus,
+ IHdmiControlCallback callback) {
super(source);
HdmiUtils.verifyAddressType(avrAddress, HdmiCec.DEVICE_AUDIO_SYSTEM);
mAvrLogicalAddress = avrAddress;
mTargetAudioStatus = targetStatus;
+ mCallback = callback;
}
protected void sendSystemAudioModeRequest() {
@@ -69,7 +78,7 @@
addTimer(mState, mTargetAudioStatus ? ON_TIMEOUT_MS : OFF_TIMEOUT_MS);
} else {
setSystemAudioMode(false);
- finish();
+ finishWithCallback(HdmiCec.RESULT_EXCEPTION);
}
}
});
@@ -79,7 +88,7 @@
if (!mTargetAudioStatus // Don't retry for Off case.
|| mSendRetryCount++ >= MAX_SEND_RETRY_COUNT) {
setSystemAudioMode(false);
- finish();
+ finishWithCallback(HdmiCec.RESULT_TIMEOUT);
return;
}
sendSystemAudioModeRequest();
@@ -107,7 +116,7 @@
// Unexpected response, consider the request is newly initiated by AVR.
// To return 'false' will initiate new SystemAudioActionFromAvr by the control
// service.
- finish();
+ finishWithCallback(HdmiCec.RESULT_EXCEPTION);
return false;
}
default:
@@ -116,7 +125,7 @@
}
protected void startAudioStatusAction() {
- addAndStartAction(new SystemAudioStatusAction(tv(), mAvrLogicalAddress));
+ addAndStartAction(new SystemAudioStatusAction(tv(), mAvrLogicalAddress, mCallback));
finish();
}
@@ -136,4 +145,17 @@
return;
}
}
+
+ // TODO: if IHdmiControlCallback is general to other FeatureAction,
+ // move it into FeatureAction.
+ protected void finishWithCallback(int returnCode) {
+ if (mCallback != null) {
+ try {
+ mCallback.onComplete(returnCode);
+ } catch (RemoteException e) {
+ Slog.e(TAG, "Failed to invoke callback.", e);
+ }
+ }
+ finish();
+ }
}
diff --git a/services/core/java/com/android/server/hdmi/SystemAudioActionFromAvr.java b/services/core/java/com/android/server/hdmi/SystemAudioActionFromAvr.java
index b743c64..9d34589 100644
--- a/services/core/java/com/android/server/hdmi/SystemAudioActionFromAvr.java
+++ b/services/core/java/com/android/server/hdmi/SystemAudioActionFromAvr.java
@@ -17,6 +17,7 @@
package com.android.server.hdmi;
import android.hardware.hdmi.HdmiCec;
+import android.hardware.hdmi.IHdmiControlCallback;
/**
* Feature action that handles System Audio initiated by AVR devices.
@@ -28,11 +29,12 @@
* @param source {@link HdmiCecLocalDevice} instance
* @param avrAddress logical address of AVR device
* @param targetStatus Whether to enable the system audio mode or not
+ * @param callback callback interface to be notified when it's done
* @throw IllegalArugmentException if device type of tvAddress and avrAddress is invalid
*/
SystemAudioActionFromAvr(HdmiCecLocalDevice source, int avrAddress,
- boolean targetStatus) {
- super(source, avrAddress, targetStatus);
+ boolean targetStatus, IHdmiControlCallback callback) {
+ super(source, avrAddress, targetStatus, callback);
HdmiUtils.verifyAddressType(getSourceAddress(), HdmiCec.DEVICE_TV);
}
@@ -45,7 +47,7 @@
private void handleSystemAudioActionFromAvr() {
if (mTargetAudioStatus == tv().getSystemAudioMode()) {
- finish();
+ finishWithCallback(HdmiCec.RESULT_SUCCESS);
return;
}
if (tv().isInPresetInstallationMode()) {
@@ -62,7 +64,7 @@
startAudioStatusAction();
} else {
setSystemAudioMode(false);
- finish();
+ finishWithCallback(HdmiCec.RESULT_SUCCESS);
}
}
}
diff --git a/services/core/java/com/android/server/hdmi/SystemAudioActionFromTv.java b/services/core/java/com/android/server/hdmi/SystemAudioActionFromTv.java
index e0c4ff4..2d8f3fc 100644
--- a/services/core/java/com/android/server/hdmi/SystemAudioActionFromTv.java
+++ b/services/core/java/com/android/server/hdmi/SystemAudioActionFromTv.java
@@ -17,6 +17,7 @@
package com.android.server.hdmi;
import android.hardware.hdmi.HdmiCec;
+import android.hardware.hdmi.IHdmiControlCallback;
/**
@@ -29,11 +30,12 @@
* @param sourceAddress {@link HdmiCecLocalDevice} instance
* @param avrAddress logical address of AVR device
* @param targetStatus Whether to enable the system audio mode or not
+ * @param callback callback interface to be notified when it's done
* @throw IllegalArugmentException if device type of tvAddress is invalid
*/
SystemAudioActionFromTv(HdmiCecLocalDevice sourceAddress, int avrAddress,
- boolean targetStatus) {
- super(sourceAddress, avrAddress, targetStatus);
+ boolean targetStatus, IHdmiControlCallback callback) {
+ super(sourceAddress, avrAddress, targetStatus, callback);
HdmiUtils.verifyAddressType(getSourceAddress(), HdmiCec.DEVICE_TV);
}
diff --git a/services/core/java/com/android/server/hdmi/SystemAudioAutoInitiationAction.java b/services/core/java/com/android/server/hdmi/SystemAudioAutoInitiationAction.java
index e4d82ef..845eaa9 100644
--- a/services/core/java/com/android/server/hdmi/SystemAudioAutoInitiationAction.java
+++ b/services/core/java/com/android/server/hdmi/SystemAudioAutoInitiationAction.java
@@ -77,14 +77,14 @@
// If the last setting is system audio, turn on system audio whatever AVR status is.
if (tv().getSystemAudioMode()) {
if (canChangeSystemAudio()) {
- addAndStartAction(new SystemAudioActionFromTv(tv(), mAvrAddress, true));
+ addAndStartAction(new SystemAudioActionFromTv(tv(), mAvrAddress, true, null));
}
} else {
// If the last setting is non-system audio, turn off system audio mode
// and update system audio status (volume or mute).
tv().setSystemAudioMode(false);
if (canChangeSystemAudio()) {
- addAndStartAction(new SystemAudioStatusAction(tv(), mAvrAddress));
+ addAndStartAction(new SystemAudioStatusAction(tv(), mAvrAddress, null));
}
}
finish();
@@ -106,7 +106,7 @@
private void handleSystemAudioModeStatusTimeout() {
if (tv().getSystemAudioMode()) {
if (canChangeSystemAudio()) {
- addAndStartAction(new SystemAudioActionFromTv(tv(), mAvrAddress, true));
+ addAndStartAction(new SystemAudioActionFromTv(tv(), mAvrAddress, true, null));
}
} else {
tv().setSystemAudioMode(false);
diff --git a/services/core/java/com/android/server/hdmi/SystemAudioStatusAction.java b/services/core/java/com/android/server/hdmi/SystemAudioStatusAction.java
index 5f4fc23..89206a7 100644
--- a/services/core/java/com/android/server/hdmi/SystemAudioStatusAction.java
+++ b/services/core/java/com/android/server/hdmi/SystemAudioStatusAction.java
@@ -16,8 +16,11 @@
package com.android.server.hdmi;
+import android.annotation.Nullable;
import android.hardware.hdmi.HdmiCec;
import android.hardware.hdmi.HdmiCecMessage;
+import android.hardware.hdmi.IHdmiControlCallback;
+import android.os.RemoteException;
import android.util.Slog;
import com.android.server.hdmi.HdmiControlService.SendMessageCallback;
@@ -32,10 +35,13 @@
private static final int STATE_WAIT_FOR_REPORT_AUDIO_STATUS = 1;
private final int mAvrAddress;
+ @Nullable private final IHdmiControlCallback mCallback;
- SystemAudioStatusAction(HdmiCecLocalDevice source, int avrAddress) {
+ SystemAudioStatusAction(HdmiCecLocalDevice source, int avrAddress,
+ IHdmiControlCallback callback) {
super(source);
mAvrAddress = avrAddress;
+ mCallback = callback;
}
@Override
@@ -67,7 +73,9 @@
? HdmiConstants.UI_COMMAND_RESTORE_VOLUME_FUNCTION // SystemAudioMode: ON
: HdmiConstants.UI_COMMAND_MUTE_FUNCTION; // SystemAudioMode: OFF
sendUserControlPressedAndReleased(uiCommand);
- finish();
+
+ // Still return SUCCESS to callback.
+ finishWithCallback(HdmiCec.RESULT_SUCCESS);
}
private void sendUserControlPressedAndReleased(int uiCommand) {
@@ -103,7 +111,7 @@
// Toggle AVR's mute status to match with the system audio status.
sendUserControlPressedAndReleased(HdmiConstants.UI_COMMAND_MUTE);
}
- finish();
+ finishWithCallback(HdmiCec.RESULT_SUCCESS);
} else {
Slog.e(TAG, "Invalid <Report Audio Status> message:" + cmd);
handleSendGiveAudioStatusFailure();
@@ -111,6 +119,17 @@
}
}
+ private void finishWithCallback(int returnCode) {
+ if (mCallback != null) {
+ try {
+ mCallback.onComplete(returnCode);
+ } catch (RemoteException e) {
+ Slog.e(TAG, "Failed to invoke callback.", e);
+ }
+ }
+ finish();
+ }
+
@Override
void handleTimerEvent(int state) {
if (mState != state) {
diff --git a/services/core/java/com/android/server/pm/PackageManagerService.java b/services/core/java/com/android/server/pm/PackageManagerService.java
index 90e263a..bf04235 100755
--- a/services/core/java/com/android/server/pm/PackageManagerService.java
+++ b/services/core/java/com/android/server/pm/PackageManagerService.java
@@ -53,7 +53,6 @@
import com.android.server.Watchdog;
import com.android.server.pm.Settings.DatabaseVersion;
import com.android.server.storage.DeviceStorageMonitorInternal;
-import com.android.server.storage.DeviceStorageMonitorInternal;
import org.xmlpull.v1.XmlPullParser;
import org.xmlpull.v1.XmlPullParserException;
@@ -91,7 +90,6 @@
import android.content.pm.PackageCleanItem;
import android.content.pm.PackageInfo;
import android.content.pm.PackageInfoLite;
-import android.content.pm.PackageInstallerParams;
import android.content.pm.PackageManager;
import android.content.pm.PackageParser.ActivityIntentInfo;
import android.content.pm.PackageParser.PackageParserException;
@@ -623,10 +621,10 @@
private final AtomicLong mLastWritten = new AtomicLong(0);
private final AtomicBoolean mBackgroundWriteRunning = new AtomicBoolean(false);
- private boolean mIsFirstBoot = false;
+ private boolean mIsHistoricalPackageUsageAvailable = true;
- boolean isFirstBoot() {
- return mIsFirstBoot;
+ boolean isHistoricalPackageUsageAvailable() {
+ return mIsHistoricalPackageUsageAvailable;
}
void write(boolean force) {
@@ -717,7 +715,7 @@
pkg.mLastPackageUsageTimeInMills = timeInMillis;
}
} catch (FileNotFoundException expected) {
- mIsFirstBoot = true;
+ mIsHistoricalPackageUsageAvailable = false;
} catch (IOException e) {
Log.w(TAG, "Failed to read package usage times", e);
} finally {
@@ -1744,7 +1742,7 @@
@Override
public boolean isFirstBoot() {
- return !mRestoredSettings || mPackageUsage.isFirstBoot();
+ return !mRestoredSettings;
}
@Override
@@ -3363,6 +3361,26 @@
if (matches.get(i).getTargetUserId() == targetUserId) return true;
}
}
+
+ ArrayList<String> packageNames = null;
+ SparseArray<ArrayList<String>> fromSource =
+ mSettings.mCrossProfilePackageInfo.get(sourceUserId);
+ if (fromSource != null) {
+ packageNames = fromSource.get(targetUserId);
+ }
+ if (packageNames.contains(intent.getPackage())) {
+ return true;
+ }
+ // We need the package name, so we try to resolve with the loosest flags possible
+ List<ResolveInfo> resolveInfos = mActivities.queryIntent(
+ intent, resolvedType, PackageManager.GET_UNINSTALLED_PACKAGES, targetUserId);
+ int count = resolveInfos.size();
+ for (int i = 0; i < count; i++) {
+ ResolveInfo resolveInfo = resolveInfos.get(i);
+ if (packageNames.contains(resolveInfo.activityInfo.packageName)) {
+ return true;
+ }
+ }
return false;
}
@@ -3403,6 +3421,14 @@
synchronized (mPackages) {
final String pkgName = intent.getPackage();
if (pkgName == null) {
+ //Check if the intent needs to be forwarded to another user for this package
+ ArrayList<ResolveInfo> crossProfileResult =
+ queryIntentActivitiesCrossProfilePackage(
+ intent, resolvedType, flags, userId);
+ if (!crossProfileResult.isEmpty()) {
+ // Skip the current profile
+ return crossProfileResult;
+ }
List<ResolveInfo> result;
List<CrossProfileIntentFilter> matchingFilters =
getMatchingCrossProfileIntentFilters(intent, resolvedType, userId);
@@ -3426,6 +3452,13 @@
}
final PackageParser.Package pkg = mPackages.get(pkgName);
if (pkg != null) {
+ ArrayList<ResolveInfo> crossProfileResult =
+ queryIntentActivitiesCrossProfilePackage(
+ intent, resolvedType, flags, userId, pkg, pkgName);
+ if (!crossProfileResult.isEmpty()) {
+ // Skip the current profile
+ return crossProfileResult;
+ }
return mActivities.queryIntentForPackage(intent, resolvedType, flags,
pkg.activities, userId);
}
@@ -3446,7 +3479,8 @@
ResolveInfo resolveInfo = checkTargetCanHandle(filter, intent, resolvedType,
flags, sourceUserId);
if (resolveInfo != null) {
- return createForwardingResolveInfo(filter, sourceUserId);
+ return createForwardingResolveInfo(
+ filter, sourceUserId, filter.getTargetUserId());
}
}
}
@@ -3454,6 +3488,56 @@
return null;
}
+ private ArrayList<ResolveInfo> queryIntentActivitiesCrossProfilePackage(
+ Intent intent, String resolvedType, int flags, int userId) {
+ ArrayList<ResolveInfo> matchingResolveInfos = new ArrayList<ResolveInfo>();
+ SparseArray<ArrayList<String>> sourceForwardingInfo =
+ mSettings.mCrossProfilePackageInfo.get(userId);
+ if (sourceForwardingInfo != null) {
+ int NI = sourceForwardingInfo.size();
+ for (int i = 0; i < NI; i++) {
+ int targetUserId = sourceForwardingInfo.keyAt(i);
+ ArrayList<String> packageNames = sourceForwardingInfo.valueAt(i);
+ List<ResolveInfo> resolveInfos = mActivities.queryIntent(
+ intent, resolvedType, flags, targetUserId);
+ int NJ = resolveInfos.size();
+ for (int j = 0; j < NJ; j++) {
+ ResolveInfo resolveInfo = resolveInfos.get(j);
+ if (packageNames.contains(resolveInfo.activityInfo.packageName)) {
+ matchingResolveInfos.add(createForwardingResolveInfo(
+ resolveInfo.filter, userId, targetUserId));
+ }
+ }
+ }
+ }
+ return matchingResolveInfos;
+ }
+
+ private ArrayList<ResolveInfo> queryIntentActivitiesCrossProfilePackage(
+ Intent intent, String resolvedType, int flags, int userId, PackageParser.Package pkg,
+ String packageName) {
+ ArrayList<ResolveInfo> matchingResolveInfos = new ArrayList<ResolveInfo>();
+ SparseArray<ArrayList<String>> sourceForwardingInfo =
+ mSettings.mCrossProfilePackageInfo.get(userId);
+ if (sourceForwardingInfo != null) {
+ int NI = sourceForwardingInfo.size();
+ for (int i = 0; i < NI; i++) {
+ int targetUserId = sourceForwardingInfo.keyAt(i);
+ if (sourceForwardingInfo.valueAt(i).contains(packageName)) {
+ List<ResolveInfo> resolveInfos = mActivities.queryIntentForPackage(
+ intent, resolvedType, flags, pkg.activities, targetUserId);
+ int NJ = resolveInfos.size();
+ for (int j = 0; j < NJ; j++) {
+ ResolveInfo resolveInfo = resolveInfos.get(j);
+ matchingResolveInfos.add(createForwardingResolveInfo(
+ resolveInfo.filter, userId, targetUserId));
+ }
+ }
+ }
+ }
+ return matchingResolveInfos;
+ }
+
// Return matching ResolveInfo if any for skip current profile intent filters.
private ResolveInfo queryCrossProfileIntents(
List<CrossProfileIntentFilter> matchingFilters, Intent intent, String resolvedType,
@@ -3486,17 +3570,18 @@
List<ResolveInfo> resultTargetUser = mActivities.queryIntent(intent,
resolvedType, flags, filter.getTargetUserId());
if (resultTargetUser != null) {
- return createForwardingResolveInfo(filter, sourceUserId);
+ return createForwardingResolveInfo(filter, sourceUserId, filter.getTargetUserId());
}
return null;
}
- private ResolveInfo createForwardingResolveInfo(CrossProfileIntentFilter filter,
- int sourceUserId) {
+ private ResolveInfo createForwardingResolveInfo(IntentFilter filter,
+ int sourceUserId, int targetUserId) {
+ ResolveInfo forwardingResolveInfo = new ResolveInfo();
String className;
- int targetUserId = filter.getTargetUserId();
if (targetUserId == UserHandle.USER_OWNER) {
className = FORWARD_INTENT_TO_USER_OWNER;
+ forwardingResolveInfo.showTargetUserIcon = true;
} else {
className = FORWARD_INTENT_TO_MANAGED_PROFILE;
}
@@ -3504,13 +3589,13 @@
mAndroidApplication.packageName, className);
ActivityInfo forwardingActivityInfo = getActivityInfo(forwardingActivityComponentName, 0,
sourceUserId);
- ResolveInfo forwardingResolveInfo = new ResolveInfo();
forwardingResolveInfo.activityInfo = forwardingActivityInfo;
forwardingResolveInfo.priority = 0;
forwardingResolveInfo.preferredOrder = 0;
forwardingResolveInfo.match = 0;
forwardingResolveInfo.isDefault = true;
forwardingResolveInfo.filter = filter;
+ forwardingResolveInfo.targetUserId = targetUserId;
return forwardingResolveInfo;
}
@@ -4539,7 +4624,7 @@
// The exception is first boot of a non-eng device, which
// should do a full dexopt.
boolean eng = "eng".equals(SystemProperties.get("ro.build.type"));
- if (eng || !isFirstBoot()) {
+ if (eng || (!isFirstBoot() && mPackageUsage.isHistoricalPackageUsageAvailable())) {
// TODO: add a property to control this?
long dexOptLRUThresholdInMinutes;
if (eng) {
@@ -11604,6 +11689,22 @@
}
}
+ public void addCrossProfileIntentsForPackage(String packageName,
+ int sourceUserId, int targetUserId) {
+ mContext.enforceCallingOrSelfPermission(
+ android.Manifest.permission.INTERACT_ACROSS_USERS_FULL, null);
+ mSettings.addCrossProfilePackage(packageName, sourceUserId, targetUserId);
+ mSettings.writePackageRestrictionsLPr(sourceUserId);
+ }
+
+ public void removeCrossProfileIntentsForPackage(String packageName,
+ int sourceUserId, int targetUserId) {
+ mContext.enforceCallingOrSelfPermission(
+ android.Manifest.permission.INTERACT_ACROSS_USERS_FULL, null);
+ mSettings.removeCrossProfilePackage(packageName, sourceUserId, targetUserId);
+ mSettings.writePackageRestrictionsLPr(sourceUserId);
+ }
+
@Override
public void clearCrossProfileIntentFilters(int sourceUserId) {
mContext.enforceCallingOrSelfPermission(
diff --git a/services/core/java/com/android/server/pm/Settings.java b/services/core/java/com/android/server/pm/Settings.java
index 3483fae..1867ff3 100644
--- a/services/core/java/com/android/server/pm/Settings.java
+++ b/services/core/java/com/android/server/pm/Settings.java
@@ -31,12 +31,14 @@
import android.net.Uri;
import android.os.PatternMatcher;
import android.util.LogPrinter;
+
import com.android.internal.util.FastXmlSerializer;
import com.android.internal.util.JournaledFile;
import com.android.internal.util.XmlUtils;
import com.android.server.pm.PackageManagerService.DumpState;
import java.util.Collection;
+
import org.xmlpull.v1.XmlPullParser;
import org.xmlpull.v1.XmlPullParserException;
import org.xmlpull.v1.XmlSerializer;
@@ -134,6 +136,10 @@
"persistent-preferred-activities";
static final String TAG_CROSS_PROFILE_INTENT_FILTERS =
"crossProfile-intent-filters";
+ private static final String TAG_CROSS_PROFILE_PACKAGE_INFO = "cross-profile-package-info";
+ private static final String CROSS_PROFILE_PACKAGE_INFO_ATTR_TARGET_USER_ID = "target-user-id";
+ private static final String CROSS_PROFILE_PACKAGE_INFO_TAG_PACKAGE_NAME = "package-name";
+ private static final String CROSS_PROFILE_PACKAGE_INFO_ATTR_PACKAGE_NAME = "value";
//Old name. Kept for compatibility
static final String TAG_FORWARDING_INTENT_FILTERS =
"forwarding-intent-filters";
@@ -240,6 +246,11 @@
public final KeySetManager mKeySetManager = new KeySetManager(mPackages);
+ // A mapping of (sourceUserId, targetUserId, packageNames) for forwarding the intents of a
+ // package.
+ final SparseArray<SparseArray<ArrayList<String>>>
+ mCrossProfilePackageInfo = new SparseArray<SparseArray<ArrayList<String>>>();
+
Settings(Context context) {
this(context, Environment.getDataDirectory());
}
@@ -262,6 +273,47 @@
mBackupStoppedPackagesFilename = new File(mSystemDir, "packages-stopped-backup.xml");
}
+ public void addCrossProfilePackage(
+ String packageName, int sourceUserId, int targetUserId) {
+ synchronized(mCrossProfilePackageInfo) {
+ SparseArray<ArrayList<String>> sourceForwardingInfo =
+ mCrossProfilePackageInfo.get(sourceUserId);
+ if (sourceForwardingInfo == null) {
+ sourceForwardingInfo = new SparseArray<ArrayList<String>>();
+ mCrossProfilePackageInfo.put(sourceUserId, sourceForwardingInfo);
+ }
+ ArrayList<String> packageNames = sourceForwardingInfo.get(targetUserId);
+ if (packageNames == null) {
+ packageNames = new ArrayList<String>();
+ sourceForwardingInfo.put(targetUserId, packageNames);
+ }
+ if (!packageNames.contains(packageName)) {
+ packageNames.add(packageName);
+ }
+ }
+ }
+
+ public void removeCrossProfilePackage(
+ String packageName, int sourceUserId, int targetUserId) {
+ synchronized(mCrossProfilePackageInfo) {
+ SparseArray<ArrayList<String>> sourceForwardingInfo =
+ mCrossProfilePackageInfo.get(sourceUserId);
+ if (sourceForwardingInfo == null) {
+ return;
+ }
+ ArrayList<String> packageNames = sourceForwardingInfo.get(targetUserId);
+ if (packageNames != null && packageNames.contains(packageName)) {
+ packageNames.remove(packageName);
+ if (packageNames.isEmpty()) {
+ sourceForwardingInfo.remove(targetUserId);
+ if (sourceForwardingInfo.size() == 0) {
+ mCrossProfilePackageInfo.remove(sourceUserId);
+ }
+ }
+ }
+ }
+ }
+
PackageSetting getPackageLPw(PackageParser.Package pkg, PackageSetting origPackage,
String realName, SharedUserSetting sharedUser, File codePath, File resourcePath,
String nativeLibraryPathString, String cpuAbiString, int pkgFlags, UserHandle user, boolean add) {
@@ -1005,6 +1057,68 @@
}
}
+ private void readCrossProfilePackageInfoLPw(XmlPullParser parser, int userId)
+ throws XmlPullParserException, IOException {
+ int outerDepth = parser.getDepth();
+ int type;
+ while ((type = parser.next()) != XmlPullParser.END_DOCUMENT
+ && (type != XmlPullParser.END_TAG || parser.getDepth() > outerDepth)) {
+ if (type == XmlPullParser.END_TAG || type == XmlPullParser.TEXT) {
+ continue;
+ }
+ String tagName = parser.getName();
+ if (tagName.equals(TAG_ITEM)) {
+ String targetUserIdString = parser.getAttributeValue(null,
+ CROSS_PROFILE_PACKAGE_INFO_ATTR_TARGET_USER_ID);
+ if (targetUserIdString == null) {
+ String msg = "Missing element under " + TAG +": "
+ + CROSS_PROFILE_PACKAGE_INFO_ATTR_TARGET_USER_ID + " at " +
+ parser.getPositionDescription();
+ PackageManagerService.reportSettingsProblem(Log.WARN, msg);
+ continue;
+ }
+ int targetUserId = Integer.parseInt(targetUserIdString);
+ readCrossProfilePackageInfoForTargetLPw(parser, userId, targetUserId);
+ } else {
+ String msg = "Unknown element under " + TAG_CROSS_PROFILE_PACKAGE_INFO + ": " +
+ parser.getName();
+ PackageManagerService.reportSettingsProblem(Log.WARN, msg);
+ XmlUtils.skipCurrentTag(parser);
+ }
+ }
+ }
+
+ private void readCrossProfilePackageInfoForTargetLPw(
+ XmlPullParser parser, int sourceUserId, int targetUserId)
+ throws XmlPullParserException, IOException {
+ int outerDepth = parser.getDepth();
+ int type;
+ while ((type = parser.next()) != XmlPullParser.END_DOCUMENT
+ && (type != XmlPullParser.END_TAG || parser.getDepth() > outerDepth)) {
+ if (type == XmlPullParser.END_TAG || type == XmlPullParser.TEXT) {
+ continue;
+ }
+ String tagName = parser.getName();
+ if (tagName.equals(CROSS_PROFILE_PACKAGE_INFO_TAG_PACKAGE_NAME)) {
+ String packageName = parser.getAttributeValue(
+ null, CROSS_PROFILE_PACKAGE_INFO_ATTR_PACKAGE_NAME);
+ if (packageName == null) {
+ String msg = "Missing element under " + TAG +": "
+ + CROSS_PROFILE_PACKAGE_INFO_TAG_PACKAGE_NAME + " at " +
+ parser.getPositionDescription();
+ PackageManagerService.reportSettingsProblem(Log.WARN, msg);
+ continue;
+ }
+ addCrossProfilePackage(packageName, sourceUserId, targetUserId);
+ } else {
+ String msg = "Unknown element under " + TAG_ITEM + ": " +
+ parser.getName();
+ PackageManagerService.reportSettingsProblem(Log.WARN, msg);
+ XmlUtils.skipCurrentTag(parser);
+ }
+ }
+ }
+
void readPackageRestrictionsLPr(int userId) {
if (DEBUG_MU) {
Log.i(TAG, "Reading package restrictions for user=" + userId);
@@ -1136,6 +1250,8 @@
} else if (tagName.equals(TAG_FORWARDING_INTENT_FILTERS)
|| tagName.equals(TAG_CROSS_PROFILE_INTENT_FILTERS)) {
readCrossProfileIntentFiltersLPw(parser, userId);
+ } else if (tagName.equals(TAG_CROSS_PROFILE_PACKAGE_INFO)){
+ readCrossProfilePackageInfoLPw(parser, userId);
} else {
Slog.w(PackageManagerService.TAG, "Unknown element under <stopped-packages>: "
+ parser.getName());
@@ -1227,6 +1343,32 @@
serializer.endTag(null, TAG_CROSS_PROFILE_INTENT_FILTERS);
}
+ void writeCrossProfilePackageInfoLPr(XmlSerializer serializer, int userId)
+ throws IllegalArgumentException, IllegalStateException, IOException {
+ SparseArray<ArrayList<String>> sourceForwardingInfo = mCrossProfilePackageInfo.get(userId);
+ if (sourceForwardingInfo == null) {
+ return;
+ }
+ serializer.startTag(null, TAG_CROSS_PROFILE_PACKAGE_INFO);
+ int NI = sourceForwardingInfo.size();
+ for (int i = 0; i < NI; i++) {
+ int targetUserId = sourceForwardingInfo.keyAt(i);
+ ArrayList<String> packageNames = sourceForwardingInfo.valueAt(i);
+ serializer.startTag(null, TAG_ITEM);
+ serializer.attribute(null, CROSS_PROFILE_PACKAGE_INFO_ATTR_TARGET_USER_ID,
+ Integer.toString(targetUserId));
+ int NJ = packageNames.size();
+ for (int j = 0; j < NJ; j++) {
+ serializer.startTag(null, CROSS_PROFILE_PACKAGE_INFO_TAG_PACKAGE_NAME);
+ serializer.attribute(null, CROSS_PROFILE_PACKAGE_INFO_ATTR_PACKAGE_NAME,
+ packageNames.get(j));
+ serializer.endTag(null, CROSS_PROFILE_PACKAGE_INFO_TAG_PACKAGE_NAME);
+ }
+ serializer.endTag(null, TAG_ITEM);
+ }
+ serializer.endTag(null, TAG_CROSS_PROFILE_PACKAGE_INFO);
+ }
+
void writePackageRestrictionsLPr(int userId) {
if (DEBUG_MU) {
Log.i(TAG, "Writing package restrictions for user=" + userId);
@@ -1327,6 +1469,8 @@
writeCrossProfileIntentFiltersLPr(serializer, userId);
+ writeCrossProfilePackageInfoLPr(serializer, userId);
+
serializer.endTag(null, TAG_PACKAGE_RESTRICTIONS);
serializer.endDocument();
diff --git a/services/core/java/com/android/server/pm/UserManagerService.java b/services/core/java/com/android/server/pm/UserManagerService.java
index 1839259..a0cb098 100644
--- a/services/core/java/com/android/server/pm/UserManagerService.java
+++ b/services/core/java/com/android/server/pm/UserManagerService.java
@@ -412,13 +412,17 @@
@Override
public Bitmap getUserIcon(int userId) {
- checkManageUsersPermission("read users");
synchronized (mPackagesLock) {
UserInfo info = mUsers.get(userId);
if (info == null || info.partial) {
Slog.w(LOG_TAG, "getUserIcon: unknown user #" + userId);
return null;
}
+ int callingGroupId = mUsers.get(UserHandle.getCallingUserId()).profileGroupId;
+ if (callingGroupId == UserInfo.NO_PROFILE_GROUP_ID
+ || callingGroupId != info.profileGroupId) {
+ checkManageUsersPermission("get the icon of a user who is not related");
+ }
if (info.iconPath == null) {
return null;
}
diff --git a/services/core/java/com/android/server/trust/TrustManagerService.java b/services/core/java/com/android/server/trust/TrustManagerService.java
index b9ef492..32546df 100644
--- a/services/core/java/com/android/server/trust/TrustManagerService.java
+++ b/services/core/java/com/android/server/trust/TrustManagerService.java
@@ -186,16 +186,12 @@
if (resolveInfo.serviceInfo == null) continue;
String packageName = resolveInfo.serviceInfo.packageName;
- // STOPSHIP Reenable this check once the GMS Core prebuild library has the
- // permission.
- /*
if (pm.checkPermission(PERMISSION_PROVIDE_AGENT, packageName)
!= PackageManager.PERMISSION_GRANTED) {
Log.w(TAG, "Skipping agent because package " + packageName
+ " does not have permission " + PERMISSION_PROVIDE_AGENT + ".");
continue;
}
- */
ComponentName name = getComponentName(resolveInfo);
if (!enabledAgents.contains(name)) continue;
diff --git a/services/core/java/com/android/server/tv/TvInputHal.java b/services/core/java/com/android/server/tv/TvInputHal.java
index 1535e7a..23c0a4c 100644
--- a/services/core/java/com/android/server/tv/TvInputHal.java
+++ b/services/core/java/com/android/server/tv/TvInputHal.java
@@ -20,12 +20,19 @@
import android.media.tv.TvStreamConfig;
import android.os.Handler;
import android.os.HandlerThread;
+import android.os.Message;
import android.view.Surface;
+import android.util.Slog;
+
+import java.util.LinkedList;
+import java.util.Queue;
/**
* Provides access to the low-level TV input hardware abstraction layer.
*/
-final class TvInputHal {
+final class TvInputHal implements Handler.Callback {
+ private final static String TAG = TvInputHal.class.getSimpleName();
+
public final static int SUCCESS = 0;
public final static int ERROR_NO_INIT = -1;
public final static int ERROR_STALE_CONFIG = -2;
@@ -35,6 +42,12 @@
public static final int TYPE_BUILT_IN_TUNER = 2;
public static final int TYPE_PASSTHROUGH = 3;
+ public static final int EVENT_OPEN = 0;
+ // Below should be in sync with hardware/libhardware/include/hardware/tv_input.h
+ public static final int EVENT_DEVICE_AVAILABLE = 1;
+ public static final int EVENT_DEVICE_UNAVAILABLE = 2;
+ public static final int EVENT_STREAM_CONFIGURATION_CHANGED = 3;
+
public interface Callback {
public void onDeviceAvailable(
TvInputHardwareInfo info, TvStreamConfig[] configs);
@@ -50,7 +63,7 @@
int generation);
private static native void nativeClose(long ptr);
- private long mPtr = 0l;
+ private volatile long mPtr = 0;
private final Callback mCallback;
private final HandlerThread mThread = new HandlerThread("TV input HAL event thread");
private final Handler mHandler;
@@ -60,21 +73,23 @@
public TvInputHal(Callback callback) {
mCallback = callback;
mThread.start();
- mHandler = new Handler(mThread.getLooper());
+ mHandler = new Handler(mThread.getLooper(), this);
}
public void init() {
mPtr = nativeOpen();
+ mHandler.sendEmptyMessage(EVENT_OPEN);
}
public int setSurface(int deviceId, Surface surface, TvStreamConfig streamConfig) {
- if (mPtr == 0) {
+ long ptr = mPtr;
+ if (ptr == 0) {
return ERROR_NO_INIT;
}
if (mStreamConfigGeneration != streamConfig.getGeneration()) {
return ERROR_STALE_CONFIG;
}
- if (nativeSetSurface(mPtr, deviceId, streamConfig.getStreamId(), surface) == 0) {
+ if (nativeSetSurface(ptr, deviceId, streamConfig.getStreamId(), surface) == 0) {
return SUCCESS;
} else {
return ERROR_UNKNOWN;
@@ -82,44 +97,81 @@
}
public void close() {
- if (mPtr != 0l) {
- nativeClose(mPtr);
+ long ptr = mPtr;
+ if (ptr != 0l) {
+ nativeClose(ptr);
mThread.quitSafely();
}
}
- private synchronized void retrieveStreamConfigs(int deviceId) {
+ private synchronized void retrieveStreamConfigs(long ptr, int deviceId) {
++mStreamConfigGeneration;
- mStreamConfigs = nativeGetStreamConfigs(mPtr, deviceId, mStreamConfigGeneration);
+ mStreamConfigs = nativeGetStreamConfigs(ptr, deviceId, mStreamConfigGeneration);
}
// Called from native
- private void deviceAvailableFromNative(final TvInputHardwareInfo info) {
- mHandler.post(new Runnable() {
- @Override
- public void run() {
- retrieveStreamConfigs(info.getDeviceId());
+ private void deviceAvailableFromNative(TvInputHardwareInfo info) {
+ mHandler.sendMessage(
+ mHandler.obtainMessage(EVENT_DEVICE_AVAILABLE, info));
+ }
+
+ private void deviceUnavailableFromNative(int deviceId) {
+ mHandler.sendMessage(
+ mHandler.obtainMessage(EVENT_DEVICE_UNAVAILABLE, deviceId, 0));
+ }
+
+ private void streamConfigsChangedFromNative(int deviceId) {
+ mHandler.sendMessage(
+ mHandler.obtainMessage(EVENT_STREAM_CONFIGURATION_CHANGED, deviceId, 0));
+ }
+
+ // Handler.Callback implementation
+
+ private Queue<Message> mPendingMessageQueue = new LinkedList<Message>();
+
+ @Override
+ public boolean handleMessage(Message msg) {
+ long ptr = mPtr;
+ if (ptr == 0) {
+ mPendingMessageQueue.add(msg);
+ return true;
+ }
+ while (!mPendingMessageQueue.isEmpty()) {
+ handleMessageInternal(ptr, mPendingMessageQueue.remove());
+ }
+ handleMessageInternal(ptr, msg);
+ return true;
+ }
+
+ private void handleMessageInternal(long ptr, Message msg) {
+ switch (msg.what) {
+ case EVENT_OPEN:
+ // No-op
+ break;
+
+ case EVENT_DEVICE_AVAILABLE: {
+ TvInputHardwareInfo info = (TvInputHardwareInfo)msg.obj;
+ retrieveStreamConfigs(ptr, info.getDeviceId());
mCallback.onDeviceAvailable(info, mStreamConfigs);
+ break;
}
- });
- }
- private void deviceUnavailableFromNative(final int deviceId) {
- mHandler.post(new Runnable() {
- @Override
- public void run() {
+ case EVENT_DEVICE_UNAVAILABLE: {
+ int deviceId = msg.arg1;
mCallback.onDeviceUnavailable(deviceId);
+ break;
}
- });
- }
- private void streamConfigsChangedFromNative(final int deviceId) {
- mHandler.post(new Runnable() {
- @Override
- public void run() {
- retrieveStreamConfigs(deviceId);
+ case EVENT_STREAM_CONFIGURATION_CHANGED: {
+ int deviceId = msg.arg1;
+ retrieveStreamConfigs(ptr, deviceId);
mCallback.onStreamConfigurationChanged(deviceId, mStreamConfigs);
+ break;
}
- });
+
+ default:
+ Slog.e(TAG, "Unknown event: " + msg);
+ break;
+ }
}
}
diff --git a/services/core/jni/com_android_server_tv_TvInputHal.cpp b/services/core/jni/com_android_server_tv_TvInputHal.cpp
index 9cecdf0..7b8e6fd 100644
--- a/services/core/jni/com_android_server_tv_TvInputHal.cpp
+++ b/services/core/jni/com_android_server_tv_TvInputHal.cpp
@@ -75,7 +75,6 @@
static JTvInputHal* createInstance(JNIEnv* env, jobject thiz);
int setSurface(int deviceId, int streamId, const sp<Surface>& surface);
- void getStreamConfigs(int deviceId, jobjectArray* array);
const tv_stream_config_t* getStreamConfigs(int deviceId, int* numConfigs);
private:
diff --git a/telephony/java/com/android/internal/telephony/ISms.aidl b/telephony/java/com/android/internal/telephony/ISms.aidl
index 9e975e9..53429b6 100644
--- a/telephony/java/com/android/internal/telephony/ISms.aidl
+++ b/telephony/java/com/android/internal/telephony/ISms.aidl
@@ -223,6 +223,17 @@
void injectSmsPdu(in byte[] pdu, String format, in PendingIntent receivedIntent);
/**
+ * Update the status of a pending (send-by-IP) SMS message and resend by PSTN if necessary.
+ * This outbound message was handled by the carrier app. If the carrier app fails to send
+ * this message, it would be resent by PSTN.
+ *
+ * @param messageRef the reference number of the SMS message.
+ * @param success True if and only if the message was sent successfully. If its value is
+ * false, this message should be resent via PSTN.
+ */
+ void updateSmsSendStatus(int messageRef, boolean success);
+
+ /**
* Send a multi-part text based SMS.
*
* @param destinationAddress the address to send the message to
diff --git a/test-runner/src/android/test/mock/MockPackageManager.java b/test-runner/src/android/test/mock/MockPackageManager.java
index a3b32b3..1d10729 100644
--- a/test-runner/src/android/test/mock/MockPackageManager.java
+++ b/test-runner/src/android/test/mock/MockPackageManager.java
@@ -44,6 +44,7 @@
import android.content.pm.VerifierDeviceIdentity;
import android.content.res.Resources;
import android.content.res.XmlResourceParser;
+import android.graphics.Bitmap;
import android.graphics.drawable.Drawable;
import android.net.Uri;
import android.os.UserHandle;
@@ -724,4 +725,20 @@
public PackageInstaller getPackageInstaller() {
throw new UnsupportedOperationException();
}
+
+ /**
+ * @hide
+ */
+ @Override
+ public void addCrossProfileIntentsForPackage(String packageName, int sourceUserId,
+ int targetUserId) {
+ throw new UnsupportedOperationException();
+ }
+
+ /**
+ * @hide
+ */
+ public Bitmap getUserIcon(int userId) {
+ throw new UnsupportedOperationException();
+ }
}
diff --git a/tools/layoutlib/bridge/resources/bars/hdpi/ic_sysbar_back.png b/tools/layoutlib/bridge/resources/bars/hdpi/ic_sysbar_back.png
index 84e6bc8..b28624f 100644
--- a/tools/layoutlib/bridge/resources/bars/hdpi/ic_sysbar_back.png
+++ b/tools/layoutlib/bridge/resources/bars/hdpi/ic_sysbar_back.png
Binary files differ
diff --git a/tools/layoutlib/bridge/resources/bars/hdpi/ic_sysbar_home.png b/tools/layoutlib/bridge/resources/bars/hdpi/ic_sysbar_home.png
index 38e4f45..3f3e288 100644
--- a/tools/layoutlib/bridge/resources/bars/hdpi/ic_sysbar_home.png
+++ b/tools/layoutlib/bridge/resources/bars/hdpi/ic_sysbar_home.png
Binary files differ
diff --git a/tools/layoutlib/bridge/resources/bars/hdpi/ic_sysbar_recent.png b/tools/layoutlib/bridge/resources/bars/hdpi/ic_sysbar_recent.png
index bf9f300..06dcd20 100644
--- a/tools/layoutlib/bridge/resources/bars/hdpi/ic_sysbar_recent.png
+++ b/tools/layoutlib/bridge/resources/bars/hdpi/ic_sysbar_recent.png
Binary files differ
diff --git a/tools/layoutlib/bridge/resources/bars/ldrtl-hdpi/ic_sysbar_back.png b/tools/layoutlib/bridge/resources/bars/ldrtl-hdpi/ic_sysbar_back.png
index 782ebfe..e464347 100644
--- a/tools/layoutlib/bridge/resources/bars/ldrtl-hdpi/ic_sysbar_back.png
+++ b/tools/layoutlib/bridge/resources/bars/ldrtl-hdpi/ic_sysbar_back.png
Binary files differ
diff --git a/tools/layoutlib/bridge/resources/bars/ldrtl-hdpi/ic_sysbar_recent.png b/tools/layoutlib/bridge/resources/bars/ldrtl-hdpi/ic_sysbar_recent.png
deleted file mode 100644
index 677b471..0000000
--- a/tools/layoutlib/bridge/resources/bars/ldrtl-hdpi/ic_sysbar_recent.png
+++ /dev/null
Binary files differ
diff --git a/tools/layoutlib/bridge/resources/bars/ldrtl-mdpi/ic_sysbar_back.png b/tools/layoutlib/bridge/resources/bars/ldrtl-mdpi/ic_sysbar_back.png
index a1b8062..1b578a6 100644
--- a/tools/layoutlib/bridge/resources/bars/ldrtl-mdpi/ic_sysbar_back.png
+++ b/tools/layoutlib/bridge/resources/bars/ldrtl-mdpi/ic_sysbar_back.png
Binary files differ
diff --git a/tools/layoutlib/bridge/resources/bars/ldrtl-mdpi/ic_sysbar_recent.png b/tools/layoutlib/bridge/resources/bars/ldrtl-mdpi/ic_sysbar_recent.png
deleted file mode 100644
index fcdbefe..0000000
--- a/tools/layoutlib/bridge/resources/bars/ldrtl-mdpi/ic_sysbar_recent.png
+++ /dev/null
Binary files differ
diff --git a/tools/layoutlib/bridge/resources/bars/ldrtl-xhdpi/ic_sysbar_back.png b/tools/layoutlib/bridge/resources/bars/ldrtl-xhdpi/ic_sysbar_back.png
index 633d864..373e84a 100644
--- a/tools/layoutlib/bridge/resources/bars/ldrtl-xhdpi/ic_sysbar_back.png
+++ b/tools/layoutlib/bridge/resources/bars/ldrtl-xhdpi/ic_sysbar_back.png
Binary files differ
diff --git a/tools/layoutlib/bridge/resources/bars/ldrtl-xhdpi/ic_sysbar_recent.png b/tools/layoutlib/bridge/resources/bars/ldrtl-xhdpi/ic_sysbar_recent.png
deleted file mode 100644
index 4665e2a..0000000
--- a/tools/layoutlib/bridge/resources/bars/ldrtl-xhdpi/ic_sysbar_recent.png
+++ /dev/null
Binary files differ
diff --git a/tools/layoutlib/bridge/resources/bars/mdpi/ic_sysbar_back.png b/tools/layoutlib/bridge/resources/bars/mdpi/ic_sysbar_back.png
index a00bc5b..f878093 100644
--- a/tools/layoutlib/bridge/resources/bars/mdpi/ic_sysbar_back.png
+++ b/tools/layoutlib/bridge/resources/bars/mdpi/ic_sysbar_back.png
Binary files differ
diff --git a/tools/layoutlib/bridge/resources/bars/mdpi/ic_sysbar_home.png b/tools/layoutlib/bridge/resources/bars/mdpi/ic_sysbar_home.png
index dc3183b..8e9583b 100644
--- a/tools/layoutlib/bridge/resources/bars/mdpi/ic_sysbar_home.png
+++ b/tools/layoutlib/bridge/resources/bars/mdpi/ic_sysbar_home.png
Binary files differ
diff --git a/tools/layoutlib/bridge/resources/bars/mdpi/ic_sysbar_recent.png b/tools/layoutlib/bridge/resources/bars/mdpi/ic_sysbar_recent.png
index b07f611..e2a89c3 100644
--- a/tools/layoutlib/bridge/resources/bars/mdpi/ic_sysbar_recent.png
+++ b/tools/layoutlib/bridge/resources/bars/mdpi/ic_sysbar_recent.png
Binary files differ
diff --git a/tools/layoutlib/bridge/resources/bars/xhdpi/ic_sysbar_back.png b/tools/layoutlib/bridge/resources/bars/xhdpi/ic_sysbar_back.png
index bd60cd6..ec2951d 100644
--- a/tools/layoutlib/bridge/resources/bars/xhdpi/ic_sysbar_back.png
+++ b/tools/layoutlib/bridge/resources/bars/xhdpi/ic_sysbar_back.png
Binary files differ
diff --git a/tools/layoutlib/bridge/resources/bars/xhdpi/ic_sysbar_home.png b/tools/layoutlib/bridge/resources/bars/xhdpi/ic_sysbar_home.png
index c5bc5c9..254f757 100644
--- a/tools/layoutlib/bridge/resources/bars/xhdpi/ic_sysbar_home.png
+++ b/tools/layoutlib/bridge/resources/bars/xhdpi/ic_sysbar_home.png
Binary files differ
diff --git a/tools/layoutlib/bridge/resources/bars/xhdpi/ic_sysbar_recent.png b/tools/layoutlib/bridge/resources/bars/xhdpi/ic_sysbar_recent.png
index f621d9c..8a8e941 100644
--- a/tools/layoutlib/bridge/resources/bars/xhdpi/ic_sysbar_recent.png
+++ b/tools/layoutlib/bridge/resources/bars/xhdpi/ic_sysbar_recent.png
Binary files differ
diff --git a/tools/layoutlib/bridge/src/android/graphics/Paint_Delegate.java b/tools/layoutlib/bridge/src/android/graphics/Paint_Delegate.java
index 6ee307e..c7c2e97 100644
--- a/tools/layoutlib/bridge/src/android/graphics/Paint_Delegate.java
+++ b/tools/layoutlib/bridge/src/android/graphics/Paint_Delegate.java
@@ -81,8 +81,8 @@
private float mTextScaleX;
private float mTextSkewX;
private int mHintingMode = Paint.HINTING_ON;
- // Variant of the font.
- private FontVariant mFontVariant = FontVariant.NONE;
+ // Variant of the font. A paint's variant can only be compact or elegant.
+ private FontVariant mFontVariant = FontVariant.COMPACT;
private Xfermode_Delegate mXfermode;
private ColorFilter_Delegate mColorFilter;
diff --git a/tools/layoutlib/bridge/src/android/graphics/Typeface_Delegate.java b/tools/layoutlib/bridge/src/android/graphics/Typeface_Delegate.java
index 908bb64..20ccd0c 100644
--- a/tools/layoutlib/bridge/src/android/graphics/Typeface_Delegate.java
+++ b/tools/layoutlib/bridge/src/android/graphics/Typeface_Delegate.java
@@ -70,28 +70,46 @@
return sManager.getDelegate(nativeTypeface);
}
+ /**
+ * Return a list of fonts that match the style and variant. The list is ordered according to
+ * preference of fonts.
+ *
+ * @param variant The variant preferred. Can only be {@link FontVariant#COMPACT} or
+ * {@link FontVariant#ELEGANT}
+ */
public List<Font> getFonts(FontVariant variant) {
+ assert variant != FontVariant.NONE;
List<Font> fonts = new ArrayList<Font>(mFontFamilies.length);
- // If we are unable to find fonts matching the variant, we return the fonts from the
- // other variant since we always want to draw something, rather than nothing.
- // TODO: check this behaviour with platform.
- List<Font> otherVariantFonts = new ArrayList<Font>();
- for (FontFamily_Delegate ffd : mFontFamilies) {
+ for (int i = 0; i < mFontFamilies.length; i++) {
+ FontFamily_Delegate ffd = mFontFamilies[i];
if (ffd != null) {
Font font = ffd.getFont(mStyle);
if (font != null) {
- if (ffd.getVariant() == variant || ffd.getVariant() == FontVariant.NONE) {
+ FontVariant ffdVariant = ffd.getVariant();
+ if (ffdVariant == FontVariant.NONE) {
+ fonts.add(font);
+ continue;
+ }
+ // We cannot open each font and get locales supported, etc to match the fonts.
+ // As a workaround, we hardcode certain assumptions like Elegant and Compact
+ // always appear in pairs.
+ assert i < mFontFamilies.length - 1;
+ FontFamily_Delegate ffd2 = mFontFamilies[++i];
+ assert ffd2 != null;
+ FontVariant ffd2Variant = ffd2.getVariant();
+ Font font2 = ffd2.getFont(mStyle);
+ assert ffd2Variant != FontVariant.NONE && ffd2Variant != ffdVariant
+ && font2 != null;
+ // Add the font with the matching variant to the list.
+ if (variant == ffd.getVariant()) {
fonts.add(font);
} else {
- otherVariantFonts.add(font);
+ fonts.add(font2);
}
}
}
}
- if (fonts.size() > 0) {
- return fonts;
- }
- return otherVariantFonts;
+ return fonts;
}
// ---- native methods ----