Merge "Add a warning log when it takes long time to handle a message in TIS" into lmp-dev
diff --git a/api/current.txt b/api/current.txt
index 5607d08..fc042d2 100644
--- a/api/current.txt
+++ b/api/current.txt
@@ -612,12 +612,20 @@
field public static final int format12Hour = 16843722; // 0x10103ca
field public static final int format24Hour = 16843723; // 0x10103cb
field public static final int fragment = 16843491; // 0x10102e3
+ field public static final int fragmentAllowEnterTransitionOverlap = 16843977; // 0x10104c9
+ field public static final int fragmentAllowReturnTransitionOverlap = 16843978; // 0x10104ca
field public static final int fragmentCloseEnterAnimation = 16843495; // 0x10102e7
field public static final int fragmentCloseExitAnimation = 16843496; // 0x10102e8
+ field public static final int fragmentEnterTransition = 16843972; // 0x10104c4
+ field public static final int fragmentExitTransition = 16843971; // 0x10104c3
field public static final int fragmentFadeEnterAnimation = 16843497; // 0x10102e9
field public static final int fragmentFadeExitAnimation = 16843498; // 0x10102ea
field public static final int fragmentOpenEnterAnimation = 16843493; // 0x10102e5
field public static final int fragmentOpenExitAnimation = 16843494; // 0x10102e6
+ field public static final int fragmentReenterTransition = 16843976; // 0x10104c8
+ field public static final int fragmentReturnTransition = 16843974; // 0x10104c6
+ field public static final int fragmentSharedElementEnterTransition = 16843973; // 0x10104c5
+ field public static final int fragmentSharedElementReturnTransition = 16843975; // 0x10104c7
field public static final int freezesText = 16843116; // 0x101016c
field public static final int fromAlpha = 16843210; // 0x10101ca
field public static final int fromDegrees = 16843187; // 0x10101b3
@@ -1418,7 +1426,7 @@
field public static final int windowActionBarOverlay = 16843492; // 0x10102e4
field public static final int windowActionModeOverlay = 16843485; // 0x10102dd
field public static final int windowAllowEnterTransitionOverlap = 16843836; // 0x101043c
- field public static final int windowAllowExitTransitionOverlap = 16843835; // 0x101043b
+ field public static final int windowAllowReturnTransitionOverlap = 16843835; // 0x101043b
field public static final int windowAnimationStyle = 16842926; // 0x10100ae
field public static final int windowBackground = 16842836; // 0x1010054
field public static final int windowClipToOutline = 16843948; // 0x10104ac
@@ -4244,14 +4252,22 @@
method public void dump(java.lang.String, java.io.FileDescriptor, java.io.PrintWriter, java.lang.String[]);
method public final boolean equals(java.lang.Object);
method public final android.app.Activity getActivity();
+ method public boolean getAllowEnterTransitionOverlap();
+ method public boolean getAllowReturnTransitionOverlap();
method public final android.os.Bundle getArguments();
method public final android.app.FragmentManager getChildFragmentManager();
+ method public android.transition.Transition getEnterTransition();
+ method public android.transition.Transition getExitTransition();
method public final android.app.FragmentManager getFragmentManager();
method public final int getId();
method public android.app.LoaderManager getLoaderManager();
method public final android.app.Fragment getParentFragment();
+ method public android.transition.Transition getReenterTransition();
method public final android.content.res.Resources getResources();
method public final boolean getRetainInstance();
+ method public android.transition.Transition getReturnTransition();
+ method public android.transition.Transition getSharedElementEnterTransition();
+ method public android.transition.Transition getSharedElementReturnTransition();
method public final java.lang.String getString(int);
method public final java.lang.String getString(int, java.lang.Object...);
method public final java.lang.String getTag();
@@ -4300,11 +4316,21 @@
method public void onViewCreated(android.view.View, android.os.Bundle);
method public void onViewStateRestored(android.os.Bundle);
method public void registerForContextMenu(android.view.View);
+ method public void setAllowEnterTransitionOverlap(boolean);
+ method public void setAllowReturnTransitionOverlap(boolean);
method public void setArguments(android.os.Bundle);
+ method public void setEnterSharedElementTransitionListener(android.app.SharedElementListener);
+ method public void setEnterTransition(android.transition.Transition);
+ method public void setExitSharedElementTransitionListener(android.app.SharedElementListener);
+ method public void setExitTransition(android.transition.Transition);
method public void setHasOptionsMenu(boolean);
method public void setInitialSavedState(android.app.Fragment.SavedState);
method public void setMenuVisibility(boolean);
+ method public void setReenterTransition(android.transition.Transition);
method public void setRetainInstance(boolean);
+ method public void setReturnTransition(android.transition.Transition);
+ method public void setSharedElementEnterTransition(android.transition.Transition);
+ method public void setSharedElementReturnTransition(android.transition.Transition);
method public void setTargetFragment(android.app.Fragment, int);
method public void setUserVisibleHint(boolean);
method public void startActivity(android.content.Intent);
@@ -4404,7 +4430,6 @@
method public abstract android.app.FragmentTransaction setBreadCrumbTitle(java.lang.CharSequence);
method public abstract android.app.FragmentTransaction setCustomAnimations(int, int);
method public abstract android.app.FragmentTransaction setCustomAnimations(int, int, int, int);
- method public abstract android.app.FragmentTransaction setCustomTransition(int, int);
method public abstract android.app.FragmentTransaction setTransition(int);
method public abstract android.app.FragmentTransaction setTransitionStyle(int);
method public abstract android.app.FragmentTransaction show(android.app.Fragment);
@@ -5482,6 +5507,7 @@
field public static final int ENCRYPTION_STATUS_UNSUPPORTED = 0; // 0x0
field public static final java.lang.String EXTRA_ADD_EXPLANATION = "android.app.extra.ADD_EXPLANATION";
field public static final java.lang.String EXTRA_DEVICE_ADMIN = "android.app.extra.DEVICE_ADMIN";
+ field public static final java.lang.String EXTRA_PROVISIONING_ADMIN_EXTRAS_BUNDLE = "android.app.extra.ADMIN_EXTRA_BUNDLE";
field public static final java.lang.String EXTRA_PROVISIONING_DEFAULT_MANAGED_PROFILE_NAME = "android.app.extra.DEFAULT_MANAGED_PROFILE_NAME";
field public static final java.lang.String EXTRA_PROVISIONING_DEVICE_ADMIN_PACKAGE_CHECKSUM = "android.app.extra.DEVICE_ADMIN_PACKAGE_CHECKSUM";
field public static final java.lang.String EXTRA_PROVISIONING_DEVICE_ADMIN_PACKAGE_DOWNLOAD_COOKIE_HEADER = "android.app.extra.DEVICE_ADMIN_PACKAGE_DOWNLOAD_COOKIE_HEADER";
@@ -34732,7 +34758,7 @@
method public abstract void closePanel(int);
method public android.view.View findViewById(int);
method public boolean getAllowEnterTransitionOverlap();
- method public boolean getAllowExitTransitionOverlap();
+ method public boolean getAllowReturnTransitionOverlap();
method public final android.view.WindowManager.LayoutParams getAttributes();
method public final android.view.Window.Callback getCallback();
method public final android.view.Window getContainer();
@@ -34781,7 +34807,7 @@
method public abstract void restoreHierarchyState(android.os.Bundle);
method public abstract android.os.Bundle saveHierarchyState();
method public void setAllowEnterTransitionOverlap(boolean);
- method public void setAllowExitTransitionOverlap(boolean);
+ method public void setAllowReturnTransitionOverlap(boolean);
method public void setAttributes(android.view.WindowManager.LayoutParams);
method public abstract void setBackgroundDrawable(android.graphics.drawable.Drawable);
method public void setBackgroundDrawableResource(int);
@@ -35798,7 +35824,7 @@
method public boolean performPrivateCommand(java.lang.String, android.os.Bundle);
method public static final void removeComposingSpans(android.text.Spannable);
method public boolean reportFullscreenMode(boolean);
- method public boolean requestUpdateCursorAnchorInfo(int);
+ method public boolean requestCursorUpdates(int);
method public boolean sendKeyEvent(android.view.KeyEvent);
method public boolean setComposingRegion(int, int);
method public static void setComposingSpans(android.text.Spannable);
@@ -35957,15 +35983,15 @@
method public abstract boolean performEditorAction(int);
method public abstract boolean performPrivateCommand(java.lang.String, android.os.Bundle);
method public abstract boolean reportFullscreenMode(boolean);
- method public abstract boolean requestUpdateCursorAnchorInfo(int);
+ method public abstract boolean requestCursorUpdates(int);
method public abstract boolean sendKeyEvent(android.view.KeyEvent);
method public abstract boolean setComposingRegion(int, int);
method public abstract boolean setComposingText(java.lang.CharSequence, int);
method public abstract boolean setSelection(int, int);
+ field public static final int CURSOR_UPDATE_IMMEDIATE = 1; // 0x1
+ field public static final int CURSOR_UPDATE_MONITOR = 2; // 0x2
field public static final int GET_EXTRACTED_TEXT_MONITOR = 1; // 0x1
field public static final int GET_TEXT_WITH_STYLES = 1; // 0x1
- field public static final int REQUEST_UPDATE_CURSOR_ANCHOR_INFO_IMMEDIATE = 1; // 0x1
- field public static final int REQUEST_UPDATE_CURSOR_ANCHOR_INFO_MONITOR = 2; // 0x2
}
public class InputConnectionWrapper implements android.view.inputmethod.InputConnection {
@@ -35987,7 +36013,7 @@
method public boolean performEditorAction(int);
method public boolean performPrivateCommand(java.lang.String, android.os.Bundle);
method public boolean reportFullscreenMode(boolean);
- method public boolean requestUpdateCursorAnchorInfo(int);
+ method public boolean requestCursorUpdates(int);
method public boolean sendKeyEvent(android.view.KeyEvent);
method public boolean setComposingRegion(int, int);
method public boolean setComposingText(java.lang.CharSequence, int);
diff --git a/api/removed.txt b/api/removed.txt
index 36f8920..a910e78 100644
--- a/api/removed.txt
+++ b/api/removed.txt
@@ -50,6 +50,10 @@
package android.view.inputmethod {
+ public class BaseInputConnection implements android.view.inputmethod.InputConnection {
+ method public final boolean requestUpdateCursorAnchorInfo(int);
+ }
+
public final class CursorAnchorInfo implements android.os.Parcelable {
method public boolean isInsertionMarkerClipped();
field public static final int CHARACTER_RECT_TYPE_FULLY_VISIBLE = 1; // 0x1
@@ -64,6 +68,16 @@
method public android.view.inputmethod.CursorAnchorInfo.Builder setInsertionMarkerLocation(float, float, float, float, boolean);
}
+ public abstract interface InputConnection {
+ method public abstract boolean requestUpdateCursorAnchorInfo(int);
+ field public static final int REQUEST_UPDATE_CURSOR_ANCHOR_INFO_MONITOR = 2; // 0x2
+ field public static final int REQUEST_UPDATE_CURSOR_UPDATE_IMMEDIATE = 1; // 0x1
+ }
+
+ public class InputConnectionWrapper implements android.view.inputmethod.InputConnection {
+ method public final boolean requestUpdateCursorAnchorInfo(int);
+ }
+
}
package com.android.internal {
diff --git a/core/java/android/app/BackStackRecord.java b/core/java/android/app/BackStackRecord.java
index 67863a5..59f010c 100644
--- a/core/java/android/app/BackStackRecord.java
+++ b/core/java/android/app/BackStackRecord.java
@@ -23,15 +23,17 @@
import android.os.Parcelable;
import android.text.TextUtils;
import android.transition.Transition;
-import android.transition.TransitionInflater;
import android.transition.TransitionManager;
import android.transition.TransitionSet;
+import android.transition.TransitionUtils;
import android.util.ArrayMap;
import android.util.Log;
import android.util.LogWriter;
import android.util.Pair;
+import android.util.SparseArray;
import android.view.View;
import android.view.ViewGroup;
+import android.view.ViewTreeObserver;
import java.io.FileDescriptor;
import java.io.PrintWriter;
@@ -42,8 +44,6 @@
final int[] mOps;
final int mTransition;
final int mTransitionStyle;
- final int mCustomTransition;
- final int mSceneRoot;
final String mName;
final int mIndex;
final int mBreadCrumbTitleRes;
@@ -96,8 +96,6 @@
mBreadCrumbTitleText = bse.mBreadCrumbTitleText;
mBreadCrumbShortTitleRes = bse.mBreadCrumbShortTitleRes;
mBreadCrumbShortTitleText = bse.mBreadCrumbShortTitleText;
- mCustomTransition = bse.mCustomTransition;
- mSceneRoot = bse.mSceneRoot;
mSharedElementSourceNames = bse.mSharedElementSourceNames;
mSharedElementTargetNames = bse.mSharedElementTargetNames;
}
@@ -112,8 +110,6 @@
mBreadCrumbTitleText = TextUtils.CHAR_SEQUENCE_CREATOR.createFromParcel(in);
mBreadCrumbShortTitleRes = in.readInt();
mBreadCrumbShortTitleText = TextUtils.CHAR_SEQUENCE_CREATOR.createFromParcel(in);
- mCustomTransition = in.readInt();
- mSceneRoot = in.readInt();
mSharedElementSourceNames = in.createStringArrayList();
mSharedElementTargetNames = in.createStringArrayList();
}
@@ -164,8 +160,6 @@
bse.mBreadCrumbTitleText = mBreadCrumbTitleText;
bse.mBreadCrumbShortTitleRes = mBreadCrumbShortTitleRes;
bse.mBreadCrumbShortTitleText = mBreadCrumbShortTitleText;
- bse.mCustomTransition = mCustomTransition;
- bse.mSceneRoot = mSceneRoot;
bse.mSharedElementSourceNames = mSharedElementSourceNames;
bse.mSharedElementTargetNames = mSharedElementTargetNames;
bse.bumpBackStackNesting(1);
@@ -186,8 +180,6 @@
TextUtils.writeToParcel(mBreadCrumbTitleText, dest, 0);
dest.writeInt(mBreadCrumbShortTitleRes);
TextUtils.writeToParcel(mBreadCrumbShortTitleText, dest, 0);
- dest.writeInt(mCustomTransition);
- dest.writeInt(mSceneRoot);
dest.writeStringList(mSharedElementSourceNames);
dest.writeStringList(mSharedElementTargetNames);
}
@@ -254,8 +246,6 @@
int mBreadCrumbShortTitleRes;
CharSequence mBreadCrumbShortTitleText;
- int mCustomTransition;
- int mSceneRoot;
ArrayList<String> mSharedElementSourceNames;
ArrayList<String> mSharedElementTargetNames;
@@ -573,13 +563,6 @@
}
@Override
- public FragmentTransaction setCustomTransition(int sceneRootId, int transitionId) {
- mSceneRoot = sceneRootId;
- mCustomTransition = transitionId;
- return this;
- }
-
- @Override
public FragmentTransaction addSharedElement(View sharedElement, String name) {
String transitionName = sharedElement.getTransitionName();
if (transitionName == null) {
@@ -760,8 +743,15 @@
bumpBackStackNesting(1);
- TransitionState state = beginTransition(mSharedElementSourceNames,
- mSharedElementTargetNames);
+ SparseArray<Fragment> firstOutFragments = new SparseArray<Fragment>();
+ SparseArray<Fragment> lastInFragments = new SparseArray<Fragment>();
+
+ calculateFragments(firstOutFragments, lastInFragments);
+
+ TransitionState state = null;
+ if (firstOutFragments.size() != 0 || lastInFragments.size() != 0) {
+ state = beginTransition(firstOutFragments, lastInFragments, false);
+ }
Op op = mHead;
while (op != null) {
@@ -854,142 +844,606 @@
}
if (state != null) {
- updateTransitionEndState(state, mSharedElementTargetNames);
+ updateTransitionEndState(state, firstOutFragments, lastInFragments, false);
}
}
- private TransitionState beginTransition(ArrayList<String> sourceNames,
- ArrayList<String> targetNames) {
- if (mCustomTransition <= 0 || mSceneRoot <= 0) {
- return null;
+ private static void setFirstOut(SparseArray<Fragment> fragments, Fragment fragment) {
+ if (fragment != null) {
+ int containerId = fragment.mContainerId;
+ if (containerId != 0 && !fragment.isHidden() && fragment.isAdded() &&
+ fragment.getView() != null && fragments.get(containerId) == null) {
+ fragments.put(containerId, fragment);
+ }
}
- View rootView = mManager.mContainer.findViewById(mSceneRoot);
- if (!(rootView instanceof ViewGroup)) {
- throw new IllegalArgumentException("SceneRoot is not a ViewGroup");
- }
- TransitionState state = new TransitionState();
- // get Transition scene root and create Transitions
- state.sceneRoot = (ViewGroup) rootView;
- state.sceneRoot.captureTransitioningViews(state.transitioningViews);
+ }
- state.exitTransition = TransitionInflater.from(mManager.mActivity)
- .inflateTransition(mCustomTransition);
- state.sharedElementTransition = TransitionInflater.from(mManager.mActivity)
- .inflateTransition(mCustomTransition);
- state.enterTransition = TransitionInflater.from(mManager.mActivity)
- .inflateTransition(mCustomTransition);
+ private void setLastIn(SparseArray<Fragment> fragments, Fragment fragment) {
+ if (fragment != null) {
+ int containerId = fragment.mContainerId;
+ if (containerId != 0) {
+ fragments.put(containerId, fragment);
+ }
+ }
+ }
+
+ /**
+ * Finds the first removed fragment and last added fragments when going forward.
+ * If none of the fragments have transitions, then both lists will be empty.
+ *
+ * @param firstOutFragments The list of first fragments to be removed, keyed on the
+ * container ID. This list will be modified by the method.
+ * @param lastInFragments The list of last fragments to be added, keyed on the
+ * container ID. This list will be modified by the method.
+ */
+ private void calculateFragments(SparseArray<Fragment> firstOutFragments,
+ SparseArray<Fragment> lastInFragments) {
+ Op op = mHead;
+ while (op != null) {
+ switch (op.cmd) {
+ case OP_ADD:
+ setLastIn(lastInFragments, op.fragment);
+ break;
+ case OP_REPLACE: {
+ Fragment f = op.fragment;
+ if (mManager.mAdded != null) {
+ for (int i = 0; i < mManager.mAdded.size(); i++) {
+ Fragment old = mManager.mAdded.get(i);
+ if (f == null || old.mContainerId == f.mContainerId) {
+ if (old == f) {
+ f = null;
+ } else {
+ setFirstOut(firstOutFragments, old);
+ }
+ }
+ }
+ }
+ setLastIn(lastInFragments, f);
+ break;
+ }
+ case OP_REMOVE:
+ setFirstOut(firstOutFragments, op.fragment);
+ break;
+ case OP_HIDE:
+ setFirstOut(firstOutFragments, op.fragment);
+ break;
+ case OP_SHOW:
+ setLastIn(lastInFragments, op.fragment);
+ break;
+ case OP_DETACH:
+ setFirstOut(firstOutFragments, op.fragment);
+ break;
+ case OP_ATTACH:
+ setLastIn(lastInFragments, op.fragment);
+ break;
+ }
+
+ op = op.next;
+ }
+
+ if (!haveTransitions(firstOutFragments, lastInFragments, false)) {
+ firstOutFragments.clear();
+ lastInFragments.clear();
+ }
+ }
+
+ /**
+ * @return true if custom transitions exist on any fragment in firstOutFragments or
+ * lastInFragments or false otherwise.
+ */
+ private static boolean haveTransitions(SparseArray<Fragment> firstOutFragments,
+ SparseArray<Fragment> lastInFragments, boolean isBack) {
+ for (int i = firstOutFragments.size() - 1; i >= 0; i--) {
+ Fragment f = firstOutFragments.valueAt(i);
+ if (isBack) {
+ if (f.getReturnTransition() != null ||
+ f.getSharedElementReturnTransition() != null) {
+ return true;
+ }
+ } else if (f.getExitTransition() != null) {
+ return true;
+ }
+ }
+
+ for (int i = lastInFragments.size() - 1; i >= 0; i--) {
+ Fragment f = lastInFragments.valueAt(i);
+ if (isBack) {
+ if (f.getReenterTransition() != null) {
+ return true;
+ }
+ } else if (f.getEnterTransition() != null ||
+ f.getSharedElementEnterTransition() != null) {
+ return true;
+ }
+ }
+ return false;
+ }
+
+ /**
+ * Finds the first removed fragment and last added fragments when popping the back stack.
+ * If none of the fragments have transitions, then both lists will be empty.
+ *
+ * @param firstOutFragments The list of first fragments to be removed, keyed on the
+ * container ID. This list will be modified by the method.
+ * @param lastInFragments The list of last fragments to be added, keyed on the
+ * container ID. This list will be modified by the method.
+ */
+ public void calculateBackFragments(SparseArray<Fragment> firstOutFragments,
+ SparseArray<Fragment> lastInFragments) {
+ Op op = mHead;
+ while (op != null) {
+ switch (op.cmd) {
+ case OP_ADD:
+ setFirstOut(firstOutFragments, op.fragment);
+ break;
+ case OP_REPLACE:
+ if (op.removed != null) {
+ for (int i = op.removed.size() - 1; i >= 0; i--) {
+ setLastIn(lastInFragments, op.removed.get(i));
+ }
+ }
+ setFirstOut(firstOutFragments, op.fragment);
+ break;
+ case OP_REMOVE:
+ setLastIn(lastInFragments, op.fragment);
+ break;
+ case OP_HIDE:
+ setLastIn(lastInFragments, op.fragment);
+ break;
+ case OP_SHOW:
+ setFirstOut(firstOutFragments, op.fragment);
+ break;
+ case OP_DETACH:
+ setLastIn(lastInFragments, op.fragment);
+ break;
+ case OP_ATTACH:
+ setFirstOut(firstOutFragments, op.fragment);
+ break;
+ }
+
+ op = op.next;
+ }
+
+ if (!haveTransitions(firstOutFragments, lastInFragments, true)) {
+ firstOutFragments.clear();
+ lastInFragments.clear();
+ }
+ }
+
+ /**
+ * When custom fragment transitions are used, this sets up the state for each transition
+ * and begins the transition. A different transition is started for each fragment container
+ * and consists of up to 3 different transitions: the exit transition, a shared element
+ * transition and an enter transition.
+ *
+ * <p>The exit transition operates against the leaf nodes of the first fragment
+ * with a view that was removed. If no such fragment was removed, then no exit
+ * transition is executed. The exit transition comes from the outgoing fragment.</p>
+ *
+ * <p>The enter transition operates against the last fragment that was added. If
+ * that fragment does not have a view or no fragment was added, then no enter
+ * transition is executed. The enter transition comes from the incoming fragment.</p>
+ *
+ * <p>The shared element transition operates against all views and comes either
+ * from the outgoing fragment or the incoming fragment, depending on whether this
+ * is going forward or popping the back stack. When going forward, the incoming
+ * fragment's enter shared element transition is used, but when going back, the
+ * outgoing fragment's return shared element transition is used. Shared element
+ * transitions only operate if there is both an incoming and outgoing fragment.</p>
+ *
+ * @param firstOutFragments The list of first fragments to be removed, keyed on the
+ * container ID.
+ * @param lastInFragments The list of last fragments to be added, keyed on the
+ * container ID.
+ * @param isBack true if this is popping the back stack or false if this is a
+ * forward operation.
+ * @return The TransitionState used to complete the operation of the transition
+ * in {@link #updateTransitionEndState(android.app.BackStackRecord.TransitionState,
+ * android.util.SparseArray, android.util.SparseArray, boolean)}.
+ */
+ private TransitionState beginTransition(SparseArray<Fragment> firstOutFragments,
+ SparseArray<Fragment> lastInFragments, boolean isBack) {
+ TransitionState state = new TransitionState();
+
// Adding a non-existent target view makes sure that the transitions don't target
// any views by default. They'll only target the views we tell add. If we don't
// add any, then no views will be targeted.
- View nonExistentView = new View(mManager.mActivity);
- state.enterTransition.addTarget(nonExistentView);
- state.exitTransition.addTarget(nonExistentView);
- state.sharedElementTransition.addTarget(nonExistentView);
+ state.nonExistentView = new View(mManager.mActivity);
- setSharedElementEpicenter(state.enterTransition, state);
+ ArrayMap<String, View> tempViews1 = new ArrayMap<String, View>();
+ ArrayMap<String, View> tempViews2 = new ArrayMap<String, View>();
+ ArrayList<String> tempNames = new ArrayList<String>();
+ ArrayList<View> tempViewList = new ArrayList<View>();
- state.excludingTransition = new TransitionSet()
- .addTransition(state.exitTransition)
- .addTransition(state.enterTransition);
-
- if (sourceNames != null) {
- // Map shared elements.
- state.sceneRoot.findNamedViews(state.namedViews);
- state.namedViews.retainAll(sourceNames);
- View epicenterView = state.namedViews.get(sourceNames.get(0));
- if (epicenterView != null) {
- // The epicenter is only the first shared element.
- setEpicenter(state.exitTransition, epicenterView);
- setEpicenter(state.sharedElementTransition, epicenterView);
- }
- state.transitioningViews.removeAll(state.namedViews.values());
- state.excludingTransition.addTransition(state.sharedElementTransition);
- addTransitioningViews(state.sharedElementTransition, state.namedViews.values());
+ // Go over all leaving fragments.
+ for (int i = 0; i < firstOutFragments.size(); i++) {
+ int containerId = firstOutFragments.keyAt(i);
+ configureTransitions(containerId, state, isBack, firstOutFragments,
+ lastInFragments, tempViews1, tempViews2, tempNames, tempViewList);
}
- // Adds the (maybe) exiting views, not including the shared element.
- // If some stay, that's ok.
- addTransitioningViews(state.exitTransition, state.transitioningViews);
+ // Now go over all entering fragments that didn't have a leaving fragment.
+ for (int i = 0; i < lastInFragments.size(); i++) {
+ int containerId = lastInFragments.keyAt(i);
+ if (firstOutFragments.get(containerId) == null) {
+ configureTransitions(containerId, state, isBack, firstOutFragments,
+ lastInFragments, tempViews1, tempViews2, tempNames, tempViewList);
+ }
+ }
- // Prepare for shared element name mapping. This could be chained in the case
- // of popping several back stack states.
- state.excludingTransition.setNameOverrides(new ArrayMap<String, String>());
- setNameOverrides(state, sourceNames, targetNames);
-
- // Don't include any subtree in the views that are hidden when capturing the
- // view hierarchy transitions. They should be as if not there.
- excludeHiddenFragments(state, true);
-
- TransitionManager.beginDelayedTransition(state.sceneRoot, state.excludingTransition);
+ if (state.overallTransitions.size() == 0) {
+ state = null;
+ }
return state;
}
- private void updateTransitionEndState(TransitionState state, ArrayList<String> names) {
- // Find all views that are entering.
- ArrayList<View> enteringViews = new ArrayList<View>();
- state.sceneRoot.captureTransitioningViews(enteringViews);
- enteringViews.removeAll(state.transitioningViews);
+ private static Transition getEnterTransition(Fragment inFragment, boolean isBack) {
+ if (inFragment == null) {
+ return null;
+ }
+ return isBack ? inFragment.getReenterTransition() : inFragment.getEnterTransition();
+ }
- if (names != null) {
- // find all shared elements.
- state.namedViews.clear();
- state.sceneRoot.findNamedViews(state.namedViews);
- state.namedViews.retainAll(names);
- if (!state.namedViews.isEmpty()) {
- enteringViews.removeAll(state.namedViews.values());
- addTransitioningViews(state.sharedElementTransition, state.namedViews.values());
- // now we know the epicenter of the entering transition.
- state.mEnteringEpicenterView = state.namedViews.get(names.get(0));
+ private static Transition getExitTransition(Fragment outFragment, boolean isBack) {
+ if (outFragment == null) {
+ return null;
+ }
+ return isBack ? outFragment.getReturnTransition() : outFragment.getExitTransition();
+ }
+
+ private static Transition getSharedElementTransition(Fragment inFragment, Fragment outFragment,
+ boolean isBack) {
+ if (inFragment == null || outFragment == null) {
+ return null;
+ }
+ return isBack ? outFragment.getSharedElementReturnTransition() :
+ inFragment.getSharedElementEnterTransition();
+ }
+
+ private static Transition captureExitingViews(Transition exitTransition, Fragment outFragment,
+ ArrayList<View> viewList) {
+ if (exitTransition != null) {
+ View root = outFragment.getView();
+ viewList.clear();
+ root.captureTransitioningViews(viewList);
+ if (viewList.isEmpty()) {
+ exitTransition = null;
+ } else {
+ addTransitioningViews(exitTransition, viewList);
+ }
+ }
+ return exitTransition;
+ }
+
+ private ArrayMap<String, View> remapSharedElements(TransitionState state, Fragment outFragment,
+ ArrayMap<String, View> namedViews, ArrayMap<String, View> tempViews2, boolean isBack) {
+ if (mSharedElementSourceNames != null) {
+ outFragment.getView().findNamedViews(namedViews);
+ if (isBack) {
+ namedViews.retainAll(mSharedElementTargetNames);
+ } else {
+ namedViews = remapNames(mSharedElementSourceNames, mSharedElementTargetNames,
+ namedViews, tempViews2);
}
}
- // Add all entering views to the enter transition.
- addTransitioningViews(state.enterTransition, enteringViews);
-
- // Don't allow capturing state for the newly-hidden fragments.
- excludeHiddenFragments(state, false);
-
- // Allow capturing state for the newly-shown fragments
- includeVisibleFragments(state.excludingTransition);
- }
-
- private void addTransitioningViews(Transition transition, Collection<View> views) {
- if (views.isEmpty()) {
- // Add a view so that we can modify the valid views at the end of the
- // fragment transaction.
- transition.addTarget(new View(mManager.mActivity));
+ if (isBack) {
+ outFragment.mEnterTransitionListener.remapSharedElements(
+ mSharedElementTargetNames, namedViews);
+ setBackNameOverrides(state, namedViews, false);
} else {
- for (View view : views) {
- transition.addTarget(view);
+ outFragment.mExitTransitionListener.remapSharedElements(
+ mSharedElementTargetNames, namedViews);
+ setNameOverrides(state, namedViews, false);
+ }
+
+ return namedViews;
+ }
+
+ /**
+ * Prepares the enter transition by adding a non-existent view to the transition's target list
+ * and setting it epicenter callback. By adding a non-existent view to the target list,
+ * we can prevent any view from being targeted at the beginning of the transition.
+ * We will add to the views before the end state of the transition is captured so that the
+ * views will appear. At the start of the transition, we clear the list of targets so that
+ * we can restore the state of the transition and use it again.
+ */
+ private void prepareEnterTransition(TransitionState state, final Transition enterTransition,
+ final View container, final Fragment inFragment) {
+ if (enterTransition != null) {
+ final ArrayList<View> enteringViews = new ArrayList<View>();
+ final View nonExistentView = state.nonExistentView;
+ enterTransition.addTarget(state.nonExistentView);
+ enterTransition.addListener(new Transition.TransitionListenerAdapter() {
+ @Override
+ public void onTransitionStart(Transition transition) {
+ transition.removeListener(this);
+ transition.removeTarget(nonExistentView);
+ int numViews = enteringViews.size();
+ for (int i = 0; i < numViews; i++) {
+ transition.removeTarget(enteringViews.get(i));
+ }
+ }
+ });
+ container.getViewTreeObserver().addOnPreDrawListener(
+ new ViewTreeObserver.OnPreDrawListener() {
+ @Override
+ public boolean onPreDraw() {
+ container.getViewTreeObserver().removeOnPreDrawListener(this);
+ View view = inFragment.getView();
+ if (view != null) {
+ view.captureTransitioningViews(enteringViews);
+ addTransitioningViews(enterTransition, enteringViews);
+ }
+ return true;
+ }
+ });
+ setSharedElementEpicenter(enterTransition, state);
+ }
+ }
+
+ private static Transition mergeTransitions(Transition enterTransition,
+ Transition exitTransition, Transition sharedElementTransition, Fragment inFragment,
+ boolean isBack) {
+ boolean overlap = true;
+ if (enterTransition != null && exitTransition != null) {
+ overlap = isBack ? inFragment.getAllowReturnTransitionOverlap() :
+ inFragment.getAllowEnterTransitionOverlap();
+ }
+
+ Transition transition;
+ if (overlap) {
+ transition = TransitionUtils.mergeTransitions(enterTransition, exitTransition,
+ sharedElementTransition);
+ } else {
+ TransitionSet staggered = new TransitionSet()
+ .addTransition(exitTransition)
+ .addTransition(enterTransition)
+ .setOrdering(TransitionSet.ORDERING_SEQUENTIAL);
+ transition = TransitionUtils.mergeTransitions(staggered, sharedElementTransition);
+ }
+ return transition;
+ }
+
+ /**
+ * Configures custom transitions for a specific fragment container.
+ *
+ * @param containerId The container ID of the fragments to configure the transition for.
+ * @param state The Transition State to be shared with {@link #updateTransitionEndState(
+ * android.app.BackStackRecord.TransitionState, android.util.SparseArray,
+ * android.util.SparseArray, boolean)} later.
+ * @param firstOutFragments The list of first fragments to be removed, keyed on the
+ * container ID.
+ * @param lastInFragments The list of last fragments to be added, keyed on the
+ * container ID.
+ * @param isBack true if this is popping the back stack or false if this is a
+ * forward operation.
+ * @param tempViews1 A temporary mapping of names to Views, used to avoid allocation
+ * inside a loop.
+ * @param tempViews2 A temporary mapping of names to Views, used to avoid allocation
+ * inside a loop.
+ * @param tempNames A temporary list of Strings, used to avoid allocation inside a loop.
+ * @param tempViewList A temporary list of Views, used to avoid allocation inside a loop.
+ */
+ private void configureTransitions(int containerId, TransitionState state, boolean isBack,
+ SparseArray<Fragment> firstOutFragments, SparseArray<Fragment> lastInFragments,
+ ArrayMap<String, View> tempViews1, ArrayMap<String, View> tempViews2,
+ ArrayList<String> tempNames, ArrayList<View> tempViewList) {
+ ViewGroup sceneRoot = (ViewGroup) mManager.mContainer.findViewById(containerId);
+ if (sceneRoot != null) {
+ Fragment inFragment = lastInFragments.get(containerId);
+ Fragment outFragment = firstOutFragments.get(containerId);
+
+ Transition enterTransition = getEnterTransition(inFragment, isBack);
+ Transition sharedElementTransition = getSharedElementTransition(inFragment, outFragment,
+ isBack);
+ Transition exitTransition = getExitTransition(outFragment, isBack);
+ exitTransition = captureExitingViews(exitTransition, outFragment, tempViewList);
+
+ ArrayMap<String, View> namedViews = tempViews1;
+ namedViews.clear();
+ if (sharedElementTransition != null) {
+ namedViews = remapSharedElements(state,
+ outFragment, namedViews, tempViews2, isBack);
+ }
+
+ // Notify the start of the transition.
+ SharedElementListener listener = isBack ?
+ outFragment.mEnterTransitionListener :
+ inFragment.mEnterTransitionListener;
+ tempNames.clear();
+ tempNames.addAll(namedViews.keySet());
+ tempViewList.clear();
+ tempViewList.addAll(namedViews.values());
+ listener.setSharedElementStart(tempNames, tempViewList, null);
+
+ // Set the epicenter of the exit transition
+ if (mSharedElementTargetNames != null && exitTransition != null) {
+ View epicenterView = namedViews.get(mSharedElementTargetNames.get(0));
+ if (epicenterView != null) {
+ setEpicenter(exitTransition, epicenterView);
+ }
+ }
+
+ prepareEnterTransition(state, enterTransition, sceneRoot, inFragment);
+
+ Transition transition = mergeTransitions(enterTransition, exitTransition,
+ sharedElementTransition, inFragment, isBack);
+
+ if (transition != null) {
+ state.overallTransitions.put(containerId, transition);
+ transition.setNameOverrides(state.nameOverrides);
+ // We want to exclude hidden views later, so we need a non-null list in the
+ // transition now.
+ transition.excludeTarget(state.nonExistentView, true);
+ // Now exclude all currently hidden fragments.
+ excludeHiddenFragments(state, containerId, transition);
+ cleanupHiddenFragments(transition, state);
+ TransitionManager.beginDelayedTransition(sceneRoot, transition);
}
}
}
- private void excludeHiddenFragments(TransitionState state, boolean forceExclude) {
- if (mManager.mAdded != null) {
- for (int i = 0; i < mManager.mAdded.size(); i++) {
- Fragment fragment = mManager.mAdded.get(i);
- if (fragment.mView != null && fragment.mHidden
- && (forceExclude || !state.hiddenViews.contains(fragment.mView))) {
- state.excludingTransition.excludeTarget(fragment.mView, true);
- state.hiddenViews.add(fragment.mView);
+ /**
+ * Remaps a name-to-View map, substituting different names for keys.
+ *
+ * @param inMap A list of keys found in the map, in the order in toGoInMap
+ * @param toGoInMap A list of keys to use for the new map, in the order of inMap
+ * @param namedViews The current mapping
+ * @param tempMap A temporary mapping that will be filled with the new values.
+ * @return tempMap after it has been mapped with the new names as keys.
+ */
+ private static ArrayMap<String, View> remapNames(ArrayList<String> inMap,
+ ArrayList<String> toGoInMap, ArrayMap<String, View> namedViews,
+ ArrayMap<String, View> tempMap) {
+ tempMap.clear();
+ if (!namedViews.isEmpty()) {
+ int numKeys = inMap.size();
+ for (int i = 0; i < numKeys; i++) {
+ View view = namedViews.get(inMap.get(i));
+ if (view != null) {
+ tempMap.put(toGoInMap.get(i), view);
}
}
}
- if (forceExclude && state.hiddenViews.isEmpty()) {
- state.excludingTransition.excludeTarget(new View(mManager.mActivity), true);
+ return tempMap;
+ }
+
+ /**
+ * After making all fragment changes, this updates the custom transitions to take into
+ * account the entering views and any remapping.
+ *
+ * @param state The transition State as returned from {@link #beginTransition(
+ * android.util.SparseArray, android.util.SparseArray, boolean)}.
+ * @param outFragments The list of first fragments to be removed, keyed on the
+ * container ID.
+ * @param inFragments The list of last fragments to be added, keyed on the
+ * container ID.
+ * @param isBack true if this is popping the back stack or false if this is a
+ * forward operation.
+ */
+ private void updateTransitionEndState(TransitionState state, SparseArray<Fragment> outFragments,
+ SparseArray<Fragment> inFragments, boolean isBack) {
+ ArrayMap<String, View> tempViews1 = new ArrayMap<String, View>();
+ ArrayMap<String, View> tempViews2 = new ArrayMap<String, View>();
+ ArrayList<String> tempNames = new ArrayList<String>();
+ ArrayList<View> tempViews = new ArrayList<View>();
+
+ int numInFragments = inFragments.size();
+ for (int i = 0; i < numInFragments; i++) {
+ Fragment inFragment = inFragments.valueAt(i);
+ tempViews1.clear();
+ ArrayMap<String, View> namedViews = mapEnteringSharedElements(inFragment, tempViews1,
+ tempViews2, isBack);
+ // remap shared elements and set the name mapping used in the shared element transition.
+ if (isBack) {
+ inFragment.mExitTransitionListener.remapSharedElements(
+ mSharedElementTargetNames, namedViews);
+ setBackNameOverrides(state, namedViews, true);
+ } else {
+ inFragment.mEnterTransitionListener.remapSharedElements(
+ mSharedElementTargetNames, namedViews);
+ setNameOverrides(state, namedViews, true);
+ }
+
+ if (mSharedElementTargetNames != null && !namedViews.isEmpty()) {
+ // now we know the epicenter of the entering transition.
+ View epicenter = namedViews.get(mSharedElementTargetNames.get(0));
+ if (epicenter != null) {
+ state.enteringEpicenterView = epicenter;
+ }
+ }
+
+ int containerId = inFragments.keyAt(i);
+ SharedElementListener sharedElementListener = isBack ?
+ outFragments.get(containerId).mEnterTransitionListener :
+ inFragment.mEnterTransitionListener;
+ tempNames.clear();
+ tempNames.addAll(namedViews.keySet());
+ tempViews.clear();
+ tempViews.addAll(namedViews.values());
+ sharedElementListener.setSharedElementEnd(tempNames, tempViews, null);
+ }
+
+ // Don't include any newly-hidden fragments in the transition.
+ excludeHiddenFragments(state);
+ }
+
+ private ArrayMap<String, View> mapEnteringSharedElements(Fragment inFragment,
+ ArrayMap<String, View> namedViews, ArrayMap<String, View> tempViews2, boolean isBack) {
+ View root = inFragment.getView();
+ if (root != null) {
+ if (mSharedElementSourceNames != null) {
+ root.findNamedViews(namedViews);
+ if (isBack) {
+ namedViews = remapNames(mSharedElementSourceNames,
+ mSharedElementTargetNames, namedViews, tempViews2);
+ } else {
+ namedViews.retainAll(mSharedElementTargetNames);
+ }
+ }
+ }
+ return namedViews;
+ }
+
+ private static void cleanupHiddenFragments(Transition transition, TransitionState state) {
+ final ArrayList<View> hiddenViews = state.hiddenFragmentViews;
+ transition.addListener(new Transition.TransitionListenerAdapter() {
+ @Override
+ public void onTransitionStart(Transition transition) {
+ transition.removeListener(this);
+ int numViews = hiddenViews.size();
+ for (int i = 0; i < numViews; i++) {
+ transition.excludeTarget(hiddenViews.get(i), false);
+ }
+ }
+ });
+ }
+
+ private void excludeHiddenFragments(TransitionState state, int containerId,
+ Transition transition) {
+ if (mManager.mAdded != null) {
+ for (int i = 0; i < mManager.mAdded.size(); i++) {
+ Fragment fragment = mManager.mAdded.get(i);
+ if (fragment.mView != null && fragment.mContainer != null &&
+ fragment.mContainerId == containerId) {
+ if (fragment.mHidden) {
+ if (!state.hiddenFragmentViews.contains(fragment.mView)) {
+ transition.excludeTarget(fragment.mView, true);
+ state.hiddenFragmentViews.add(fragment.mView);
+ }
+ } else {
+ transition.excludeTarget(fragment.mView, false);
+ state.hiddenFragmentViews.remove(fragment.mView);
+ }
+ }
+ }
}
}
- private void includeVisibleFragments(Transition transition) {
- if (mManager.mAdded != null) {
- for (int i = 0; i < mManager.mAdded.size(); i++) {
- Fragment fragment = mManager.mAdded.get(i);
- if (fragment.mView != null && !fragment.mHidden) {
- transition.excludeTarget(fragment.mView, false);
+ private void excludeHiddenFragments(TransitionState state) {
+ int numTransitions = state.overallTransitions.size();
+ for (int i = 0; i < numTransitions; i++) {
+ Transition transition = state.overallTransitions.valueAt(i);
+ int containerId = state.overallTransitions.keyAt(i);
+ excludeHiddenFragments(state, containerId, transition);
+ }
+ }
+
+ private static void addTransitioningViews(Transition transition, final Collection<View> views) {
+ for (View view : views) {
+ transition.addTarget(view);
+ }
+
+ transition.addListener(new Transition.TransitionListenerAdapter() {
+ @Override
+ public void onTransitionStart(Transition transition) {
+ transition.removeListener(this);
+ for (View view : views) {
+ transition.removeTarget(view);
}
}
- }
+ });
}
private static void setEpicenter(Transition transition, View view) {
@@ -1010,16 +1464,17 @@
@Override
public Rect onGetEpicenter(Transition transition) {
- if (mEpicenter == null && state.mEnteringEpicenterView != null) {
+ if (mEpicenter == null && state.enteringEpicenterView != null) {
mEpicenter = new Rect();
- state.mEnteringEpicenterView.getBoundsOnScreen(mEpicenter);
+ state.enteringEpicenterView.getBoundsOnScreen(mEpicenter);
}
return mEpicenter;
}
});
}
- public TransitionState popFromBackStack(boolean doStateMove, TransitionState state) {
+ public TransitionState popFromBackStack(boolean doStateMove, TransitionState state,
+ SparseArray<Fragment> firstOutFragments, SparseArray<Fragment> lastInFragments) {
if (FragmentManagerImpl.DEBUG) {
Log.v(TAG, "popFromBackStack: " + this);
LogWriter logw = new LogWriter(Log.VERBOSE, TAG);
@@ -1029,8 +1484,10 @@
}
if (state == null) {
- state = beginTransition(mSharedElementTargetNames, mSharedElementSourceNames);
- } else {
+ if (firstOutFragments.size() != 0 || lastInFragments.size() != 0) {
+ state = beginTransition(firstOutFragments, lastInFragments, true);
+ }
+ } else if (!doStateMove) {
setNameOverrides(state, mSharedElementTargetNames, mSharedElementSourceNames);
}
@@ -1110,7 +1567,7 @@
mManager.moveToState(mManager.mCurState,
FragmentManagerImpl.reverseTransit(mTransition), mTransitionStyle, true);
if (state != null) {
- updateTransitionEndState(state, mSharedElementSourceNames);
+ updateTransitionEndState(state, firstOutFragments, lastInFragments, true);
state = null;
}
}
@@ -1122,15 +1579,17 @@
return state;
}
- private static void setNameOverride(Transition transition, String source, String target) {
- ArrayMap<String, String> overrides = transition.getNameOverrides();
- for (int index = 0; index < overrides.size(); index++) {
- if (source.equals(overrides.valueAt(index))) {
- overrides.setValueAt(index, target);
- return;
+ private static void setNameOverride(ArrayMap<String, String> overrides,
+ String source, String target) {
+ if (source != null && target != null && !source.equals(target)) {
+ for (int index = 0; index < overrides.size(); index++) {
+ if (source.equals(overrides.valueAt(index))) {
+ overrides.setValueAt(index, target);
+ return;
+ }
}
+ overrides.put(source, target);
}
- overrides.put(source, target);
}
private static void setNameOverrides(TransitionState state, ArrayList<String> sourceNames,
@@ -1139,7 +1598,36 @@
for (int i = 0; i < sourceNames.size(); i++) {
String source = sourceNames.get(i);
String target = targetNames.get(i);
- setNameOverride(state.excludingTransition, source, target);
+ setNameOverride(state.nameOverrides, source, target);
+ }
+ }
+ }
+
+ private void setBackNameOverrides(TransitionState state, ArrayMap<String, View> namedViews,
+ boolean isEnd) {
+ int count = mSharedElementTargetNames.size();
+ for (int i = 0; i < count; i++) {
+ String source = mSharedElementSourceNames.get(i);
+ String originalTarget = mSharedElementTargetNames.get(i);
+ String target = namedViews.get(originalTarget).getTransitionName();
+ if (isEnd) {
+ setNameOverride(state.nameOverrides, source, target);
+ } else {
+ setNameOverride(state.nameOverrides, target, source);
+ }
+ }
+ }
+
+ private void setNameOverrides(TransitionState state, ArrayMap<String, View> namedViews,
+ boolean isEnd) {
+ int count = namedViews.size();
+ for (int i = 0; i < count; i++) {
+ String source = namedViews.keyAt(i);
+ String target = namedViews.valueAt(i).getTransitionName();
+ if (isEnd) {
+ setNameOverride(state.nameOverrides, source, target);
+ } else {
+ setNameOverride(state.nameOverrides, target, source);
}
}
}
@@ -1161,14 +1649,11 @@
}
public class TransitionState {
- public ArrayList<View> hiddenViews = new ArrayList<View>();
- public ArrayList<View> transitioningViews = new ArrayList<View>();
- public ArrayMap<String, View> namedViews = new ArrayMap<String, View>();
- public Transition exitTransition;
- public Transition sharedElementTransition;
- public Transition enterTransition;
- public TransitionSet excludingTransition;
- public ViewGroup sceneRoot;
- public View mEnteringEpicenterView;
+ public SparseArray<Transition> overallTransitions = new SparseArray<Transition>();
+ public ArrayMap<String, String> nameOverrides = new ArrayMap<String, String>();
+ public ArrayList<View> hiddenFragmentViews = new ArrayList<View>();
+
+ public View enteringEpicenterView;
+ public View nonExistentView;
}
}
diff --git a/core/java/android/app/Fragment.java b/core/java/android/app/Fragment.java
index 2ff3d57..dbee81e 100644
--- a/core/java/android/app/Fragment.java
+++ b/core/java/android/app/Fragment.java
@@ -23,10 +23,14 @@
import android.content.Intent;
import android.content.res.Configuration;
import android.content.res.Resources;
+import android.content.res.TypedArray;
import android.os.Build;
import android.os.Bundle;
import android.os.Parcel;
import android.os.Parcelable;
+import android.transition.Transition;
+import android.transition.TransitionInflater;
+import android.transition.TransitionSet;
import android.util.AndroidRuntimeException;
import android.util.ArrayMap;
import android.util.AttributeSet;
@@ -58,11 +62,11 @@
final boolean mRetainInstance;
final boolean mDetached;
final Bundle mArguments;
-
+
Bundle mSavedFragmentState;
-
+
Fragment mInstance;
-
+
public FragmentState(Fragment frag) {
mClassName = frag.getClass().getName();
mIndex = frag.mIndex;
@@ -74,7 +78,7 @@
mDetached = frag.mDetached;
mArguments = frag.mArguments;
}
-
+
public FragmentState(Parcel in) {
mClassName = in.readString();
mIndex = in.readInt();
@@ -87,18 +91,18 @@
mArguments = in.readBundle();
mSavedFragmentState = in.readBundle();
}
-
+
public Fragment instantiate(Activity activity, Fragment parent) {
if (mInstance != null) {
return mInstance;
}
-
+
if (mArguments != null) {
mArguments.setClassLoader(activity.getClassLoader());
}
-
+
mInstance = Fragment.instantiate(activity, mClassName, mArguments);
-
+
if (mSavedFragmentState != null) {
mSavedFragmentState.setClassLoader(activity.getClassLoader());
mInstance.mSavedFragmentState = mSavedFragmentState;
@@ -117,7 +121,7 @@
return mInstance;
}
-
+
public int describeContents() {
return 0;
}
@@ -134,13 +138,13 @@
dest.writeBundle(mArguments);
dest.writeBundle(mSavedFragmentState);
}
-
+
public static final Parcelable.Creator<FragmentState> CREATOR
= new Parcelable.Creator<FragmentState>() {
public FragmentState createFromParcel(Parcel in) {
return new FragmentState(in);
}
-
+
public FragmentState[] newArray(int size) {
return new FragmentState[size];
}
@@ -299,17 +303,17 @@
* how you can determine if a fragment placed in a container is no longer
* running in a layout with that container and avoid creating its view hierarchy
* in that case.)
- *
+ *
* <p>The attributes of the <fragment> tag are used to control the
* LayoutParams provided when attaching the fragment's view to the parent
* container. They can also be parsed by the fragment in {@link #onInflate}
* as parameters.
- *
+ *
* <p>The fragment being instantiated must have some kind of unique identifier
* so that it can be re-associated with a previous instance if the parent
* activity needs to be destroyed and recreated. This can be provided these
* ways:
- *
+ *
* <ul>
* <li>If nothing is explicitly supplied, the view ID of the container will
* be used.
@@ -318,7 +322,7 @@
* <li><code>android:id</code> can be used in <fragment> to provide
* a specific identifier for the fragment.
* </ul>
- *
+ *
* <a name="BackStack"></a>
* <h3>Back Stack</h3>
*
@@ -347,7 +351,7 @@
public class Fragment implements ComponentCallbacks2, OnCreateContextMenuListener {
private static final ArrayMap<String, Class<?>> sClassMap =
new ArrayMap<String, Class<?>>();
-
+
static final int INVALID_STATE = -1; // Invalid state used as a null value.
static final int INITIALIZING = 0; // Not yet created.
static final int CREATED = 1; // Created.
@@ -355,9 +359,11 @@
static final int STOPPED = 3; // Fully created, not started.
static final int STARTED = 4; // Created and started, not resumed.
static final int RESUMED = 5; // Created started and resumed.
-
+
+ private static final Transition USE_DEFAULT_TRANSITION = new TransitionSet();
+
int mState = INITIALIZING;
-
+
// Non-null if the fragment's view hierarchy is currently animating away,
// meaning we need to wait a bit on completely destroying it. This is the
// animation that is running.
@@ -370,13 +376,13 @@
// When instantiated from saved state, this is the saved state.
Bundle mSavedFragmentState;
SparseArray<Parcelable> mSavedViewState;
-
+
// Index into active fragment array.
int mIndex = -1;
-
+
// Internal unique name for this fragment;
String mWho;
-
+
// Construction arguments;
Bundle mArguments;
@@ -391,25 +397,25 @@
// True if the fragment is in the list of added fragments.
boolean mAdded;
-
+
// If set this fragment is being removed from its activity.
boolean mRemoving;
// True if the fragment is in the resumed state.
boolean mResumed;
-
+
// Set to true if this fragment was instantiated from a layout file.
boolean mFromLayout;
-
+
// Set to true when the view has actually been inflated in its layout.
boolean mInLayout;
// True if this fragment has been restored from previously saved state.
boolean mRestored;
-
+
// Number of active back stack entries this fragment is in.
int mBackStackNesting;
-
+
// The fragment manager we are associated with. Set as soon as the
// fragment is used in a transaction; cleared after it has been removed
// from all transactions.
@@ -428,29 +434,29 @@
// was dynamically added to the view hierarchy, or the ID supplied in
// layout.
int mFragmentId;
-
+
// When a fragment is being dynamically added to the view hierarchy, this
// is the identifier of the parent container it is being added to.
int mContainerId;
-
+
// The optional named tag for this fragment -- usually used to find
// fragments that are not part of the layout.
String mTag;
-
+
// Set to true when the app has requested that this fragment be hidden
// from the user.
boolean mHidden;
-
+
// Set to true when the app has requested that this fragment be detached.
boolean mDetached;
// If set this fragment would like its instance retained across
// configuration changes.
boolean mRetainInstance;
-
+
// If set this fragment is being retained across the current config change.
boolean mRetaining;
-
+
// If set this fragment has menu items to contribute.
boolean mHasMenu;
@@ -459,16 +465,16 @@
// Used to verify that subclasses call through to super class.
boolean mCalled;
-
+
// If app has requested a specific animation, this is the one to use.
int mNextAnim;
-
+
// The parent container of the fragment after dynamically added to UI.
ViewGroup mContainer;
-
+
// The View generated for this fragment.
View mView;
-
+
// Whether this fragment should defer starting until after other fragments
// have been started and their loaders are finished.
boolean mDeferStart;
@@ -479,7 +485,19 @@
LoaderManagerImpl mLoaderManager;
boolean mLoadersStarted;
boolean mCheckedForLoaderManager;
-
+
+ private Transition mEnterTransition = null;
+ private Transition mReturnTransition = USE_DEFAULT_TRANSITION;
+ private Transition mExitTransition = null;
+ private Transition mReenterTransition = USE_DEFAULT_TRANSITION;
+ private Transition mSharedElementEnterTransition = null;
+ private Transition mSharedElementReturnTransition = USE_DEFAULT_TRANSITION;
+ private Boolean mAllowReturnTransitionOverlap;
+ private Boolean mAllowEnterTransitionOverlap;
+
+ SharedElementListener mEnterTransitionListener = SharedElementListener.NULL_LISTENER;
+ SharedElementListener mExitTransitionListener = SharedElementListener.NULL_LISTENER;
+
/**
* State information that has been retrieved from a fragment instance
* through {@link FragmentManager#saveFragmentInstanceState(Fragment)
@@ -543,7 +561,7 @@
* will not be called when the fragment is re-instantiated; instead,
* arguments can be supplied by the caller with {@link #setArguments}
* and later retrieved by the Fragment with {@link #getArguments}.
- *
+ *
* <p>Applications should generally not implement a constructor. The
* first place application code an run where the fragment is ready to
* be used is in {@link #onAttach(Activity)}, the point where the fragment
@@ -609,7 +627,7 @@
+ " empty constructor that is public", e);
}
}
-
+
final void restoreViewState(Bundle savedInstanceState) {
if (mSavedViewState != null) {
mView.restoreHierarchyState(mSavedViewState);
@@ -649,7 +667,7 @@
@Override final public int hashCode() {
return super.hashCode();
}
-
+
@Override
public String toString() {
StringBuilder sb = new StringBuilder(128);
@@ -669,7 +687,7 @@
sb.append('}');
return sb.toString();
}
-
+
/**
* Return the identifier this fragment is known by. This is either
* the android:id value supplied in a layout or the container view ID
@@ -678,14 +696,14 @@
final public int getId() {
return mFragmentId;
}
-
+
/**
* Get the tag name of the fragment, if specified.
*/
final public String getTag() {
return mTag;
}
-
+
/**
* Supply the construction arguments for this fragment. This can only
* be called before the fragment has been attached to its activity; that
@@ -760,7 +778,7 @@
final public Activity getActivity() {
return mActivity;
}
-
+
/**
* Return <code>getActivity().getResources()</code>.
*/
@@ -770,7 +788,7 @@
}
return mActivity.getResources();
}
-
+
/**
* Return a localized, styled CharSequence from the application's package's
* default string table.
@@ -870,7 +888,7 @@
final public boolean isRemoving() {
return mRemoving;
}
-
+
/**
* Return true if the layout is included as part of an activity view
* hierarchy via the <fragment> tag. This will always be true when
@@ -889,7 +907,7 @@
final public boolean isResumed() {
return mResumed;
}
-
+
/**
* Return true if the fragment is currently visible to the user. This means
* it: (1) has been added, (2) has its view attached to the window, and
@@ -899,7 +917,7 @@
return isAdded() && !isHidden() && mView != null
&& mView.getWindowToken() != null && mView.getVisibility() == View.VISIBLE;
}
-
+
/**
* Return true if the fragment has been hidden. By default fragments
* are shown. You can find out about changes to this state with
@@ -910,7 +928,7 @@
final public boolean isHidden() {
return mHidden;
}
-
+
/**
* Called when the hidden state (as returned by {@link #isHidden()} of
* the fragment has changed. Fragments start out not hidden; this will
@@ -920,7 +938,7 @@
*/
public void onHiddenChanged(boolean hidden) {
}
-
+
/**
* Control whether a fragment instance is retained across Activity
* re-creation (such as from a configuration change). This can only
@@ -942,16 +960,16 @@
}
mRetainInstance = retain;
}
-
+
final public boolean getRetainInstance() {
return mRetainInstance;
}
-
+
/**
* Report that this fragment would like to participate in populating
* the options menu by receiving a call to {@link #onCreateOptionsMenu}
* and related methods.
- *
+ *
* @param hasMenu If true, the fragment has menu items to contribute.
*/
public void setHasOptionsMenu(boolean hasMenu) {
@@ -1034,7 +1052,7 @@
public void startActivity(Intent intent) {
startActivity(intent, null);
}
-
+
/**
* Call {@link Activity#startActivity(Intent, Bundle)} from the fragment's
* containing Activity.
@@ -1081,13 +1099,13 @@
mActivity.startActivityFromFragment(this, intent, requestCode, options);
}
}
-
+
/**
* Receive the result from a previous call to
* {@link #startActivityForResult(Intent, int)}. This follows the
* related Activity API as described there in
* {@link Activity#onActivityResult(int, int, Intent)}.
- *
+ *
* @param requestCode The integer request code originally supplied to
* startActivityForResult(), allowing you to identify who this
* result came from.
@@ -1098,7 +1116,7 @@
*/
public void onActivityResult(int requestCode, int resultCode, Intent data) {
}
-
+
/**
* @hide Hack so that DialogFragment can make its Dialog before creating
* its views, and the view construction can use the dialog's context for
@@ -1115,7 +1133,7 @@
return mActivity.getLayoutInflater();
}
}
-
+
/**
* @deprecated Use {@link #onInflate(Activity, AttributeSet, Bundle)} instead.
*/
@@ -1131,7 +1149,7 @@
* tag in a layout file. Note this is <em>before</em> the fragment's
* {@link #onAttach(Activity)} has been called; all you should do here is
* parse the attributes and save them away.
- *
+ *
* <p>This is called every time the fragment is inflated, even if it is
* being inflated into a new instance with saved state. It typically makes
* sense to re-parse the parameters each time, to allow them to change with
@@ -1169,8 +1187,33 @@
public void onInflate(Activity activity, AttributeSet attrs, Bundle savedInstanceState) {
onInflate(attrs, savedInstanceState);
mCalled = true;
+
+ TypedArray a = activity.obtainStyledAttributes(attrs,
+ com.android.internal.R.styleable.Fragment);
+ mEnterTransition = loadTransition(activity, a, mEnterTransition, null,
+ com.android.internal.R.styleable.Fragment_fragmentEnterTransition);
+ mReturnTransition = loadTransition(activity, a, mReturnTransition, USE_DEFAULT_TRANSITION,
+ com.android.internal.R.styleable.Fragment_fragmentReturnTransition);
+ mExitTransition = loadTransition(activity, a, mExitTransition, null,
+ com.android.internal.R.styleable.Fragment_fragmentExitTransition);
+ mReenterTransition = loadTransition(activity, a, mReenterTransition, USE_DEFAULT_TRANSITION,
+ com.android.internal.R.styleable.Fragment_fragmentReenterTransition);
+ mSharedElementEnterTransition = loadTransition(activity, a, mSharedElementEnterTransition,
+ null, com.android.internal.R.styleable.Fragment_fragmentSharedElementEnterTransition);
+ mSharedElementReturnTransition = loadTransition(activity, a, mSharedElementReturnTransition,
+ USE_DEFAULT_TRANSITION,
+ com.android.internal.R.styleable.Fragment_fragmentSharedElementReturnTransition);
+ if (mAllowEnterTransitionOverlap == null) {
+ mAllowEnterTransitionOverlap = a.getBoolean(
+ com.android.internal.R.styleable.Fragment_fragmentAllowEnterTransitionOverlap, true);
+ }
+ if (mAllowReturnTransitionOverlap == null) {
+ mAllowReturnTransitionOverlap = a.getBoolean(
+ com.android.internal.R.styleable.Fragment_fragmentAllowReturnTransitionOverlap, true);
+ }
+ a.recycle();
}
-
+
/**
* Called when a fragment is first attached to its activity.
* {@link #onCreate(Bundle)} will be called after this.
@@ -1178,25 +1221,25 @@
public void onAttach(Activity activity) {
mCalled = true;
}
-
+
/**
* Called when a fragment loads an animation.
*/
public Animator onCreateAnimator(int transit, boolean enter, int nextAnim) {
return null;
}
-
+
/**
* Called to do initial creation of a fragment. This is called after
* {@link #onAttach(Activity)} and before
* {@link #onCreateView(LayoutInflater, ViewGroup, Bundle)}.
- *
+ *
* <p>Note that this can be called while the fragment's activity is
* still in the process of being created. As such, you can not rely
* on things like the activity's content view hierarchy being initialized
* at this point. If you want to do work once the activity itself is
* created, see {@link #onActivityCreated(Bundle)}.
- *
+ *
* @param savedInstanceState If the fragment is being re-created from
* a previous saved state, this is the state.
*/
@@ -1209,10 +1252,10 @@
* This is optional, and non-graphical fragments can return null (which
* is the default implementation). This will be called between
* {@link #onCreate(Bundle)} and {@link #onActivityCreated(Bundle)}.
- *
+ *
* <p>If you return a View from here, you will later be called in
* {@link #onDestroyView} when the view is being released.
- *
+ *
* @param inflater The LayoutInflater object that can be used to inflate
* any views in the fragment,
* @param container If non-null, this is the parent view that the fragment's
@@ -1220,7 +1263,7 @@
* but this can be used to generate the LayoutParams of the view.
* @param savedInstanceState If non-null, this fragment is being re-constructed
* from a previous saved state as given here.
- *
+ *
* @return Return the View for the fragment's UI, or null.
*/
@Nullable
@@ -1241,18 +1284,18 @@
*/
public void onViewCreated(View view, @Nullable Bundle savedInstanceState) {
}
-
+
/**
* Get the root view for the fragment's layout (the one returned by {@link #onCreateView}),
* if provided.
- *
+ *
* @return The fragment's root view, or null if it has no layout.
*/
@Nullable
public View getView() {
return mView;
}
-
+
/**
* Called when the fragment's activity has been created and this
* fragment's view hierarchy instantiated. It can be used to do final
@@ -1292,7 +1335,7 @@
*/
public void onStart() {
mCalled = true;
-
+
if (!mLoadersStarted) {
mLoadersStarted = true;
if (!mCheckedForLoaderManager) {
@@ -1304,7 +1347,7 @@
}
}
}
-
+
/**
* Called when the fragment is visible to the user and actively running.
* This is generally
@@ -1314,7 +1357,7 @@
public void onResume() {
mCalled = true;
}
-
+
/**
* Called to ask the fragment to save its current dynamic state, so it
* can later be reconstructed in a new instance of its process is
@@ -1336,11 +1379,11 @@
*/
public void onSaveInstanceState(Bundle outState) {
}
-
+
public void onConfigurationChanged(Configuration newConfig) {
mCalled = true;
}
-
+
/**
* Called when the Fragment is no longer resumed. This is generally
* tied to {@link Activity#onPause() Activity.onPause} of the containing
@@ -1349,7 +1392,7 @@
public void onPause() {
mCalled = true;
}
-
+
/**
* Called when the Fragment is no longer started. This is generally
* tied to {@link Activity#onStop() Activity.onStop} of the containing
@@ -1358,11 +1401,11 @@
public void onStop() {
mCalled = true;
}
-
+
public void onLowMemory() {
mCalled = true;
}
-
+
public void onTrimMemory(int level) {
mCalled = true;
}
@@ -1379,7 +1422,7 @@
public void onDestroyView() {
mCalled = true;
}
-
+
/**
* Called when the fragment is no longer in use. This is called
* after {@link #onStop()} and before {@link #onDetach()}.
@@ -1434,16 +1477,16 @@
public void onDetach() {
mCalled = true;
}
-
+
/**
* Initialize the contents of the Activity's standard options menu. You
* should place your menu items in to <var>menu</var>. For this method
* to be called, you must have first called {@link #setHasOptionsMenu}. See
* {@link Activity#onCreateOptionsMenu(Menu) Activity.onCreateOptionsMenu}
* for more information.
- *
+ *
* @param menu The options menu in which you place your items.
- *
+ *
* @see #setHasOptionsMenu
* @see #onPrepareOptionsMenu
* @see #onOptionsItemSelected
@@ -1458,10 +1501,10 @@
* dynamically modify the contents. See
* {@link Activity#onPrepareOptionsMenu(Menu) Activity.onPrepareOptionsMenu}
* for more information.
- *
+ *
* @param menu The options menu as last shown or first initialized by
* onCreateOptionsMenu().
- *
+ *
* @see #setHasOptionsMenu
* @see #onCreateOptionsMenu
*/
@@ -1477,7 +1520,7 @@
*/
public void onDestroyOptionsMenu() {
}
-
+
/**
* This hook is called whenever an item in your options menu is selected.
* The default implementation simply returns false to have the normal
@@ -1485,15 +1528,15 @@
* its Handler as appropriate). You can use this method for any items
* for which you would like to do processing without those other
* facilities.
- *
+ *
* <p>Derived classes should call through to the base class for it to
* perform the default menu handling.
- *
+ *
* @param item The menu item that was selected.
- *
+ *
* @return boolean Return false to allow normal menu processing to
* proceed, true to consume it here.
- *
+ *
* @see #onCreateOptionsMenu
*/
public boolean onOptionsItemSelected(MenuItem item) {
@@ -1503,13 +1546,13 @@
/**
* This hook is called whenever the options menu is being closed (either by the user canceling
* the menu with the back/menu button, or when an item is selected).
- *
+ *
* @param menu The options menu as last shown or first initialized by
* onCreateOptionsMenu().
*/
public void onOptionsMenuClosed(Menu menu) {
}
-
+
/**
* Called when a context menu for the {@code view} is about to be shown.
* Unlike {@link #onCreateOptionsMenu}, this will be called every
@@ -1537,25 +1580,25 @@
* {@link OnCreateContextMenuListener} on the view to this fragment, so
* {@link #onCreateContextMenu(ContextMenu, View, ContextMenuInfo)} will be
* called when it is time to show the context menu.
- *
+ *
* @see #unregisterForContextMenu(View)
* @param view The view that should show a context menu.
*/
public void registerForContextMenu(View view) {
view.setOnCreateContextMenuListener(this);
}
-
+
/**
* Prevents a context menu to be shown for the given view. This method will
* remove the {@link OnCreateContextMenuListener} on the view.
- *
+ *
* @see #registerForContextMenu(View)
* @param view The view that should stop showing a context menu.
*/
public void unregisterForContextMenu(View view) {
view.setOnCreateContextMenuListener(null);
}
-
+
/**
* This hook is called whenever an item in a context menu is selected. The
* default implementation simply returns false to have the normal processing
@@ -1568,7 +1611,7 @@
* <p>
* Derived classes should call through to the base class for it to perform
* the default menu handling.
- *
+ *
* @param item The context menu item that was selected.
* @return boolean Return false to allow normal context menu processing to
* proceed, true to consume it here.
@@ -1576,7 +1619,284 @@
public boolean onContextItemSelected(MenuItem item) {
return false;
}
-
+
+ /**
+ * When custom transitions are used with Fragments, the enter transition listener
+ * is called when this Fragment is attached or detached when not popping the back stack.
+ *
+ * @param listener Used to manipulate the shared element transitions on this Fragment
+ * when added not as a pop from the back stack.
+ */
+ public void setEnterSharedElementTransitionListener(SharedElementListener listener) {
+ if (listener == null) {
+ listener = SharedElementListener.NULL_LISTENER;
+ }
+ mEnterTransitionListener = listener;
+ }
+
+ /**
+ * When custom transitions are used with Fragments, the exit transition listener
+ * is called when this Fragment is attached or detached when popping the back stack.
+ *
+ * @param listener Used to manipulate the shared element transitions on this Fragment
+ * when added as a pop from the back stack.
+ */
+ public void setExitSharedElementTransitionListener(SharedElementListener listener) {
+ if (listener == null) {
+ listener = SharedElementListener.NULL_LISTENER;
+ }
+ mExitTransitionListener = listener;
+ }
+
+ /**
+ * Sets the Transition that will be used to move Views into the initial scene. The entering
+ * Views will be those that are regular Views or ViewGroups that have
+ * {@link ViewGroup#isTransitionGroup} return true. Typical Transitions will extend
+ * {@link android.transition.Visibility} as entering is governed by changing visibility from
+ * {@link View#INVISIBLE} to {@link View#VISIBLE}. If <code>transition</code> is null,
+ * entering Views will remain unaffected.
+ *
+ * @param transition The Transition to use to move Views into the initial Scene.
+ * @attr ref android.R.styleable#Fragment_fragmentEnterTransition
+ */
+ public void setEnterTransition(Transition transition) {
+ mEnterTransition = transition;
+ }
+
+ /**
+ * Returns the Transition that will be used to move Views into the initial scene. The entering
+ * Views will be those that are regular Views or ViewGroups that have
+ * {@link ViewGroup#isTransitionGroup} return true. Typical Transitions will extend
+ * {@link android.transition.Visibility} as entering is governed by changing visibility from
+ * {@link View#INVISIBLE} to {@link View#VISIBLE}.
+ *
+ * @return the Transition to use to move Views into the initial Scene.
+ * @attr ref android.R.styleable#Fragment_fragmentEnterTransition
+ */
+ public Transition getEnterTransition() {
+ return mEnterTransition;
+ }
+
+ /**
+ * Sets the Transition that will be used to move Views out of the scene when the Fragment is
+ * preparing to be removed, hidden, or detached because of popping the back stack. The exiting
+ * Views will be those that are regular Views or ViewGroups that have
+ * {@link ViewGroup#isTransitionGroup} return true. Typical Transitions will extend
+ * {@link android.transition.Visibility} as entering is governed by changing visibility from
+ * {@link View#VISIBLE} to {@link View#INVISIBLE}. If <code>transition</code> is null,
+ * entering Views will remain unaffected. If nothing is set, the default will be to
+ * use the same value as set in {@link #setEnterTransition(android.transition.Transition)}.
+ *
+ * @param transition The Transition to use to move Views out of the Scene when the Fragment
+ * is preparing to close.
+ * @attr ref android.R.styleable#Fragment_fragmentExitTransition
+ */
+ public void setReturnTransition(Transition transition) {
+ mReturnTransition = transition;
+ }
+
+ /**
+ * Returns the Transition that will be used to move Views out of the scene when the Fragment is
+ * preparing to be removed, hidden, or detached because of popping the back stack. The exiting
+ * Views will be those that are regular Views or ViewGroups that have
+ * {@link ViewGroup#isTransitionGroup} return true. Typical Transitions will extend
+ * {@link android.transition.Visibility} as entering is governed by changing visibility from
+ * {@link View#VISIBLE} to {@link View#INVISIBLE}. If <code>transition</code> is null,
+ * entering Views will remain unaffected.
+ *
+ * @return the Transition to use to move Views out of the Scene when the Fragment
+ * is preparing to close.
+ * @attr ref android.R.styleable#Fragment_fragmentExitTransition
+ */
+ public Transition getReturnTransition() {
+ return mReturnTransition == USE_DEFAULT_TRANSITION ? getEnterTransition()
+ : mReturnTransition;
+ }
+
+ /**
+ * Sets the Transition that will be used to move Views out of the scene when the
+ * fragment is removed, hidden, or detached when not popping the back stack.
+ * The exiting Views will be those that are regular Views or ViewGroups that
+ * have {@link ViewGroup#isTransitionGroup} return true. Typical Transitions will extend
+ * {@link android.transition.Visibility} as exiting is governed by changing visibility
+ * from {@link View#VISIBLE} to {@link View#INVISIBLE}. If transition is null, the views will
+ * remain unaffected.
+ *
+ * @param transition The Transition to use to move Views out of the Scene when the Fragment
+ * is being closed not due to popping the back stack.
+ * @attr ref android.R.styleable#Fragment_fragmentExitTransition
+ */
+ public void setExitTransition(Transition transition) {
+ mExitTransition = transition;
+ }
+
+ /**
+ * Returns the Transition that will be used to move Views out of the scene when the
+ * fragment is removed, hidden, or detached when not popping the back stack.
+ * The exiting Views will be those that are regular Views or ViewGroups that
+ * have {@link ViewGroup#isTransitionGroup} return true. Typical Transitions will extend
+ * {@link android.transition.Visibility} as exiting is governed by changing visibility
+ * from {@link View#VISIBLE} to {@link View#INVISIBLE}. If transition is null, the views will
+ * remain unaffected.
+ *
+ * @return the Transition to use to move Views out of the Scene when the Fragment
+ * is being closed not due to popping the back stack.
+ * @attr ref android.R.styleable#Fragment_fragmentExitTransition
+ */
+ public Transition getExitTransition() {
+ return mExitTransition;
+ }
+
+ /**
+ * Sets the Transition that will be used to move Views in to the scene when returning due
+ * to popping a back stack. The entering Views will be those that are regular Views
+ * or ViewGroups that have {@link ViewGroup#isTransitionGroup} return true. Typical Transitions
+ * will extend {@link android.transition.Visibility} as exiting is governed by changing
+ * visibility from {@link View#VISIBLE} to {@link View#INVISIBLE}. If transition is null,
+ * the views will remain unaffected. If nothing is set, the default will be to use the same
+ * transition as {@link #setExitTransition(android.transition.Transition)}.
+ *
+ * @param transition The Transition to use to move Views into the scene when reentering from a
+ * previously-started Activity.
+ * @attr ref android.R.styleable#Fragment_fragmentReenterTransition
+ */
+ public void setReenterTransition(Transition transition) {
+ mReenterTransition = transition;
+ }
+
+ /**
+ * Returns the Transition that will be used to move Views in to the scene when returning due
+ * to popping a back stack. The entering Views will be those that are regular Views
+ * or ViewGroups that have {@link ViewGroup#isTransitionGroup} return true. Typical Transitions
+ * will extend {@link android.transition.Visibility} as exiting is governed by changing
+ * visibility from {@link View#VISIBLE} to {@link View#INVISIBLE}. If transition is null,
+ * the views will remain unaffected. If nothing is set, the default will be to use the same
+ * transition as {@link #setExitTransition(android.transition.Transition)}.
+ *
+ * @return the Transition to use to move Views into the scene when reentering from a
+ * previously-started Activity.
+ * @attr ref android.R.styleable#Fragment_fragmentReenterTransition
+ */
+ public Transition getReenterTransition() {
+ return mReenterTransition == USE_DEFAULT_TRANSITION ? getExitTransition()
+ : mReenterTransition;
+ }
+
+ /**
+ * Sets the Transition that will be used for shared elements transferred into the content
+ * Scene. Typical Transitions will affect size and location, such as
+ * {@link android.transition.ChangeBounds}. A null
+ * value will cause transferred shared elements to blink to the final position.
+ *
+ * @param transition The Transition to use for shared elements transferred into the content
+ * Scene.
+ * @attr ref android.R.styleable#Fragment_fragmentSharedElementEnterTransition
+ */
+ public void setSharedElementEnterTransition(Transition transition) {
+ mSharedElementEnterTransition = transition;
+ }
+
+ /**
+ * Returns the Transition that will be used for shared elements transferred into the content
+ * Scene. Typical Transitions will affect size and location, such as
+ * {@link android.transition.ChangeBounds}. A null
+ * value will cause transferred shared elements to blink to the final position.
+ *
+ * @return The Transition to use for shared elements transferred into the content
+ * Scene.
+ * @attr ref android.R.styleable#Fragment_fragmentSharedElementEnterTransition
+ */
+ public Transition getSharedElementEnterTransition() {
+ return mSharedElementEnterTransition;
+ }
+
+ /**
+ * Sets the Transition that will be used for shared elements transferred back during a
+ * pop of the back stack. This Transition acts in the leaving Fragment.
+ * Typical Transitions will affect size and location, such as
+ * {@link android.transition.ChangeBounds}. A null
+ * value will cause transferred shared elements to blink to the final position.
+ * If no value is set, the default will be to use the same value as
+ * {@link #setSharedElementEnterTransition(android.transition.Transition)}.
+ *
+ * @param transition The Transition to use for shared elements transferred out of the content
+ * Scene.
+ * @attr ref android.R.styleable#Fragment_fragmentSharedElementReturnTransition
+ */
+ public void setSharedElementReturnTransition(Transition transition) {
+ mSharedElementReturnTransition = transition;
+ }
+
+ /**
+ * Return the Transition that will be used for shared elements transferred back during a
+ * pop of the back stack. This Transition acts in the leaving Fragment.
+ * Typical Transitions will affect size and location, such as
+ * {@link android.transition.ChangeBounds}. A null
+ * value will cause transferred shared elements to blink to the final position.
+ * If no value is set, the default will be to use the same value as
+ * {@link #setSharedElementEnterTransition(android.transition.Transition)}.
+ *
+ * @return The Transition to use for shared elements transferred out of the content
+ * Scene.
+ * @attr ref android.R.styleable#Fragment_fragmentSharedElementReturnTransition
+ */
+ public Transition getSharedElementReturnTransition() {
+ return mSharedElementReturnTransition == USE_DEFAULT_TRANSITION ?
+ getSharedElementEnterTransition() : mSharedElementReturnTransition;
+ }
+
+ /**
+ * Sets whether the the exit transition and enter transition overlap or not.
+ * When true, the enter transition will start as soon as possible. When false, the
+ * enter transition will wait until the exit transition completes before starting.
+ *
+ * @param allow true to start the enter transition when possible or false to
+ * wait until the exiting transition completes.
+ * @attr ref android.R.styleable#Fragment_fragmentAllowEnterTransitionOverlap
+ */
+ public void setAllowEnterTransitionOverlap(boolean allow) {
+ mAllowEnterTransitionOverlap = allow;
+ }
+
+ /**
+ * Returns whether the the exit transition and enter transition overlap or not.
+ * When true, the enter transition will start as soon as possible. When false, the
+ * enter transition will wait until the exit transition completes before starting.
+ *
+ * @return true when the enter transition should start as soon as possible or false to
+ * when it should wait until the exiting transition completes.
+ * @attr ref android.R.styleable#Fragment_fragmentAllowEnterTransitionOverlap
+ */
+ public boolean getAllowEnterTransitionOverlap() {
+ return (mAllowEnterTransitionOverlap == null) ? true : mAllowEnterTransitionOverlap;
+ }
+
+ /**
+ * Sets whether the the return transition and reenter transition overlap or not.
+ * When true, the reenter transition will start as soon as possible. When false, the
+ * reenter transition will wait until the return transition completes before starting.
+ *
+ * @param allow true to start the reenter transition when possible or false to wait until the
+ * return transition completes.
+ * @attr ref android.R.styleable#Fragment_fragmentAllowReturnTransitionOverlap
+ */
+ public void setAllowReturnTransitionOverlap(boolean allow) {
+ mAllowReturnTransitionOverlap = allow;
+ }
+
+ /**
+ * Returns whether the the return transition and reenter transition overlap or not.
+ * When true, the reenter transition will start as soon as possible. When false, the
+ * reenter transition will wait until the return transition completes before starting.
+ *
+ * @return true to start the reenter transition when possible or false to wait until the
+ * return transition completes.
+ * @attr ref android.R.styleable#Fragment_fragmentAllowReturnTransitionOverlap
+ */
+ public boolean getAllowReturnTransitionOverlap() {
+ return (mAllowReturnTransitionOverlap == null) ? true : mAllowReturnTransitionOverlap;
+ }
+
/**
* Print the Fragments's state into the given stream.
*
@@ -1588,53 +1908,53 @@
*/
public void dump(String prefix, FileDescriptor fd, PrintWriter writer, String[] args) {
writer.print(prefix); writer.print("mFragmentId=#");
- writer.print(Integer.toHexString(mFragmentId));
- writer.print(" mContainerId=#");
- writer.print(Integer.toHexString(mContainerId));
- writer.print(" mTag="); writer.println(mTag);
+ writer.print(Integer.toHexString(mFragmentId));
+ writer.print(" mContainerId=#");
+ writer.print(Integer.toHexString(mContainerId));
+ writer.print(" mTag="); writer.println(mTag);
writer.print(prefix); writer.print("mState="); writer.print(mState);
- writer.print(" mIndex="); writer.print(mIndex);
- writer.print(" mWho="); writer.print(mWho);
- writer.print(" mBackStackNesting="); writer.println(mBackStackNesting);
+ writer.print(" mIndex="); writer.print(mIndex);
+ writer.print(" mWho="); writer.print(mWho);
+ writer.print(" mBackStackNesting="); writer.println(mBackStackNesting);
writer.print(prefix); writer.print("mAdded="); writer.print(mAdded);
- writer.print(" mRemoving="); writer.print(mRemoving);
- writer.print(" mResumed="); writer.print(mResumed);
- writer.print(" mFromLayout="); writer.print(mFromLayout);
- writer.print(" mInLayout="); writer.println(mInLayout);
+ writer.print(" mRemoving="); writer.print(mRemoving);
+ writer.print(" mResumed="); writer.print(mResumed);
+ writer.print(" mFromLayout="); writer.print(mFromLayout);
+ writer.print(" mInLayout="); writer.println(mInLayout);
writer.print(prefix); writer.print("mHidden="); writer.print(mHidden);
- writer.print(" mDetached="); writer.print(mDetached);
- writer.print(" mMenuVisible="); writer.print(mMenuVisible);
- writer.print(" mHasMenu="); writer.println(mHasMenu);
+ writer.print(" mDetached="); writer.print(mDetached);
+ writer.print(" mMenuVisible="); writer.print(mMenuVisible);
+ writer.print(" mHasMenu="); writer.println(mHasMenu);
writer.print(prefix); writer.print("mRetainInstance="); writer.print(mRetainInstance);
- writer.print(" mRetaining="); writer.print(mRetaining);
- writer.print(" mUserVisibleHint="); writer.println(mUserVisibleHint);
+ writer.print(" mRetaining="); writer.print(mRetaining);
+ writer.print(" mUserVisibleHint="); writer.println(mUserVisibleHint);
if (mFragmentManager != null) {
writer.print(prefix); writer.print("mFragmentManager=");
- writer.println(mFragmentManager);
+ writer.println(mFragmentManager);
}
if (mActivity != null) {
writer.print(prefix); writer.print("mActivity=");
- writer.println(mActivity);
+ writer.println(mActivity);
}
if (mParentFragment != null) {
writer.print(prefix); writer.print("mParentFragment=");
- writer.println(mParentFragment);
+ writer.println(mParentFragment);
}
if (mArguments != null) {
writer.print(prefix); writer.print("mArguments="); writer.println(mArguments);
}
if (mSavedFragmentState != null) {
writer.print(prefix); writer.print("mSavedFragmentState=");
- writer.println(mSavedFragmentState);
+ writer.println(mSavedFragmentState);
}
if (mSavedViewState != null) {
writer.print(prefix); writer.print("mSavedViewState=");
- writer.println(mSavedViewState);
+ writer.println(mSavedViewState);
}
if (mTarget != null) {
writer.print(prefix); writer.print("mTarget="); writer.print(mTarget);
- writer.print(" mTargetRequestCode=");
- writer.println(mTargetRequestCode);
+ writer.print(" mTargetRequestCode=");
+ writer.println(mTargetRequestCode);
}
if (mNextAnim != 0) {
writer.print(prefix); writer.print("mNextAnim="); writer.println(mNextAnim);
@@ -1648,7 +1968,7 @@
if (mAnimatingAway != null) {
writer.print(prefix); writer.print("mAnimatingAway="); writer.println(mAnimatingAway);
writer.print(prefix); writer.print("mStateAfterAnimating=");
- writer.println(mStateAfterAnimating);
+ writer.println(mStateAfterAnimating);
}
if (mLoaderManager != null) {
writer.print(prefix); writer.println("Loader Manager:");
@@ -1886,7 +2206,7 @@
throw new SuperNotCalledException("Fragment " + this
+ " did not call through to super.onStop()");
}
-
+
if (mLoadersStarted) {
mLoadersStarted = false;
if (!mCheckedForLoaderManager) {
@@ -1929,4 +2249,23 @@
+ " did not call through to super.onDestroy()");
}
}
+
+ private static Transition loadTransition(Context context, TypedArray typedArray,
+ Transition currentValue, Transition defaultValue, int id) {
+ if (currentValue != defaultValue) {
+ return currentValue;
+ }
+ int transitionId = typedArray.getResourceId(id, 0);
+ Transition transition = defaultValue;
+ if (transitionId != 0 && transitionId != com.android.internal.R.transition.no_transition) {
+ TransitionInflater inflater = TransitionInflater.from(context);
+ transition = inflater.inflateTransition(transitionId);
+ if (transition instanceof TransitionSet &&
+ ((TransitionSet)transition).getTransitionCount() == 0) {
+ transition = null;
+ }
+ }
+ return transition;
+ }
+
}
diff --git a/core/java/android/app/FragmentManager.java b/core/java/android/app/FragmentManager.java
index 1df1d42d..ef69fdd 100644
--- a/core/java/android/app/FragmentManager.java
+++ b/core/java/android/app/FragmentManager.java
@@ -1497,7 +1497,10 @@
return false;
}
final BackStackRecord bss = mBackStack.remove(last);
- bss.popFromBackStack(true, null);
+ SparseArray<Fragment> firstOutFragments = new SparseArray<Fragment>();
+ SparseArray<Fragment> lastInFragments = new SparseArray<Fragment>();
+ bss.calculateBackFragments(firstOutFragments, lastInFragments);
+ bss.popFromBackStack(true, null, firstOutFragments, lastInFragments);
reportBackStackChanged();
} else {
int index = -1;
@@ -1541,10 +1544,16 @@
states.add(mBackStack.remove(i));
}
final int LAST = states.size()-1;
+ SparseArray<Fragment> firstOutFragments = new SparseArray<Fragment>();
+ SparseArray<Fragment> lastInFragments = new SparseArray<Fragment>();
+ for (int i=0; i<=LAST; i++) {
+ states.get(i).calculateBackFragments(firstOutFragments, lastInFragments);
+ }
BackStackRecord.TransitionState state = null;
for (int i=0; i<=LAST; i++) {
if (DEBUG) Log.v(TAG, "Popping back stack state: " + states.get(i));
- state = states.get(i).popFromBackStack(i == LAST, state);
+ state = states.get(i).popFromBackStack(i == LAST, state,
+ firstOutFragments, lastInFragments);
}
reportBackStackChanged();
}
diff --git a/core/java/android/app/FragmentTransaction.java b/core/java/android/app/FragmentTransaction.java
index 1077bac..25cd3cc 100644
--- a/core/java/android/app/FragmentTransaction.java
+++ b/core/java/android/app/FragmentTransaction.java
@@ -172,19 +172,16 @@
public abstract FragmentTransaction setTransition(int transit);
/**
- * Set a {@link android.transition.Transition} resource id to use with this transaction.
- * <var>transitionId</var> will be played for fragments when going forward and when popping
- * the back stack.
- * @param sceneRootId The ID of the element acting as the scene root for the transition.
- * This should be a ViewGroup containing all Fragments in the transaction.
- * @param transitionId The resource ID for the Transition used during the Fragment transaction.
+ * TODO: remove from API
+ * @hide
*/
- public abstract FragmentTransaction setCustomTransition(int sceneRootId, int transitionId);
+ public FragmentTransaction setCustomTransition(int sceneRootId, int transitionId) {
+ return this;
+ }
/**
- * 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 transitionName in the View hierarchy.
+ * Used with to map a View from a removed or hidden Fragment to a View from a shown
+ * or added Fragment.
* @param sharedElement A View in a disappearing Fragment to match with a View in an
* appearing Fragment.
* @param name The transitionName for a View in an appearing Fragment to match to the shared
diff --git a/core/java/android/app/Notification.java b/core/java/android/app/Notification.java
index 800734a..6cc6fb2 100644
--- a/core/java/android/app/Notification.java
+++ b/core/java/android/app/Notification.java
@@ -1423,6 +1423,7 @@
extras.remove(Notification.EXTRA_LARGE_ICON);
extras.remove(Notification.EXTRA_LARGE_ICON_BIG);
extras.remove(Notification.EXTRA_PICTURE);
+ extras.remove(Notification.EXTRA_BIG_TEXT);
// Prevent light notifications from being rebuilt.
extras.remove(Builder.EXTRA_NEEDS_REBUILD);
}
diff --git a/core/java/android/app/admin/DevicePolicyManager.java b/core/java/android/app/admin/DevicePolicyManager.java
index 69b1139..9ed8960 100644
--- a/core/java/android/app/admin/DevicePolicyManager.java
+++ b/core/java/android/app/admin/DevicePolicyManager.java
@@ -115,6 +115,18 @@
= "android.app.action.ACTION_PROVISION_MANAGED_PROFILE";
/**
+ * A {@link Parcelable} extra of type {@link PersistableBundle} that allows a mobile device
+ * management application that starts managed profile provisioning to pass data to itself on the
+ * managed profile when provisioning completes. The mobile device management application sends
+ * this extra in an intent with the action {@link #ACTION_PROVISION_MANAGED_PROFILE} and
+ * receives it in {@link DeviceAdminReceiver#onProfileProvisioningComplete} via an intent with
+ * the action {@link DeviceAdminReceiver#ACTION_PROFILE_PROVISIONING_COMPLETE}. The bundle is
+ * not changed during the managed profile provisioning.
+ */
+ public static final String EXTRA_PROVISIONING_ADMIN_EXTRAS_BUNDLE =
+ "android.app.extra.ADMIN_EXTRA_BUNDLE";
+
+ /**
* A String extra holding the package name of the mobile device management application that
* will be set as the profile owner or device owner.
*
diff --git a/core/java/android/net/NetworkInfo.java b/core/java/android/net/NetworkInfo.java
index d279412..7664c95 100644
--- a/core/java/android/net/NetworkInfo.java
+++ b/core/java/android/net/NetworkInfo.java
@@ -128,14 +128,6 @@
private boolean mIsAvailable;
/**
- * @param type network type
- * @deprecated
- * @hide because this constructor was only meant for internal use (and
- * has now been superseded by the package-private constructor below).
- */
- public NetworkInfo(int type) {}
-
- /**
* @hide
*/
public NetworkInfo(int type, int subtype, String typeName, String subtypeName) {
diff --git a/core/java/android/service/notification/NotificationListenerService.java b/core/java/android/service/notification/NotificationListenerService.java
index cb0bcf2..fc12101 100644
--- a/core/java/android/service/notification/NotificationListenerService.java
+++ b/core/java/android/service/notification/NotificationListenerService.java
@@ -101,6 +101,7 @@
* <li>{@link Notification#EXTRA_LARGE_ICON extras[EXTRA_LARGE_ICON]}</li>
* <li>{@link Notification#EXTRA_LARGE_ICON_BIG extras[EXTRA_LARGE_ICON_BIG]}</li>
* <li>{@link Notification#EXTRA_PICTURE extras[EXTRA_PICTURE]}</li>
+ * <li>{@link Notification#EXTRA_BIG_TEXT extras[EXTRA_BIG_TEXT]}</li>
* </ol>
*
* @hide
diff --git a/core/java/android/transition/TransitionUtils.java b/core/java/android/transition/TransitionUtils.java
index b0c9e9a..a84ecd12 100644
--- a/core/java/android/transition/TransitionUtils.java
+++ b/core/java/android/transition/TransitionUtils.java
@@ -40,6 +40,33 @@
}
}
+ public static Transition mergeTransitions(Transition... transitions) {
+ int count = 0;
+ int nonNullIndex = -1;
+ for (int i = 0; i < transitions.length; i++) {
+ if (transitions[i] != null) {
+ count++;
+ nonNullIndex = i;
+ }
+ }
+
+ if (count == 0) {
+ return null;
+ }
+
+ if (count == 1) {
+ return transitions[nonNullIndex];
+ }
+
+ TransitionSet transitionSet = new TransitionSet();
+ for (int i = 0; i < transitions.length; i++) {
+ if (transitions[i] != null) {
+ transitionSet.addTransition(transitions[i]);
+ }
+ }
+ return transitionSet;
+ }
+
public static class MatrixEvaluator implements TypeEvaluator<Matrix> {
float[] mTempStartValues = new float[9];
diff --git a/core/java/android/view/Window.java b/core/java/android/view/Window.java
index 9b6f200..ebc683a 100644
--- a/core/java/android/view/Window.java
+++ b/core/java/android/view/Window.java
@@ -1430,7 +1430,9 @@
* {@link android.transition.Visibility} as entering is governed by changing visibility from
* {@link View#INVISIBLE} to {@link View#VISIBLE}. If <code>transition</code> is null,
* entering Views will remain unaffected.
+ *
* @param transition The Transition to use to move Views into the initial Scene.
+ * @attr ref android.R.styleable#Window_windowEnterTransition
*/
public void setEnterTransition(Transition transition) {}
@@ -1444,8 +1446,10 @@
* {@link View#VISIBLE} to {@link View#INVISIBLE}. If <code>transition</code> is null,
* entering Views will remain unaffected. If nothing is set, the default will be to
* use the same value as set in {@link #setEnterTransition(android.transition.Transition)}.
+ *
* @param transition The Transition to use to move Views out of the Scene when the Window
* is preparing to close.
+ * @attr ref android.R.styleable#Window_windowReturnTransition
*/
public void setReturnTransition(Transition transition) {}
@@ -1456,8 +1460,10 @@
* {@link android.transition.Visibility} as exiting is governed by changing visibility
* from {@link View#VISIBLE} to {@link View#INVISIBLE}. If transition is null, the views will
* remain unaffected. Requires {@link #FEATURE_CONTENT_TRANSITIONS}.
+ *
* @param transition The Transition to use to move Views out of the scene when calling a
* new Activity.
+ * @attr ref android.R.styleable#Window_windowExitTransition
*/
public void setExitTransition(Transition transition) {}
@@ -1470,8 +1476,10 @@
* the views will remain unaffected. If nothing is set, the default will be to use the same
* transition as {@link #setExitTransition(android.transition.Transition)}.
* Requires {@link #FEATURE_CONTENT_TRANSITIONS}.
+ *
* @param transition The Transition to use to move Views into the scene when reentering from a
* previously-started Activity.
+ * @attr ref android.R.styleable#Window_windowReenterTransition
*/
public void setReenterTransition(Transition transition) {}
@@ -1484,6 +1492,7 @@
* entering Views will remain unaffected. Requires {@link #FEATURE_CONTENT_TRANSITIONS}.
*
* @return the Transition to use to move Views into the initial Scene.
+ * @attr ref android.R.styleable#Window_windowEnterTransition
*/
public Transition getEnterTransition() { return null; }
@@ -1495,8 +1504,10 @@
* {@link ViewGroup#isTransitionGroup} return true. Typical Transitions will extend
* {@link android.transition.Visibility} as entering is governed by changing visibility from
* {@link View#VISIBLE} to {@link View#INVISIBLE}.
+ *
* @return The Transition to use to move Views out of the Scene when the Window
* is preparing to close.
+ * @attr ref android.R.styleable#Window_windowReturnTransition
*/
public Transition getReturnTransition() { return null; }
@@ -1507,8 +1518,10 @@
* {@link android.transition.Visibility} as exiting is governed by changing visibility
* from {@link View#VISIBLE} to {@link View#INVISIBLE}. If transition is null, the views will
* remain unaffected. Requires {@link #FEATURE_CONTENT_TRANSITIONS}.
+ *
* @return the Transition to use to move Views out of the scene when calling a
* new Activity.
+ * @attr ref android.R.styleable#Window_windowExitTransition
*/
public Transition getExitTransition() { return null; }
@@ -1519,8 +1532,10 @@
* will extend {@link android.transition.Visibility} as exiting is governed by changing
* visibility from {@link View#VISIBLE} to {@link View#INVISIBLE}.
* Requires {@link #FEATURE_CONTENT_TRANSITIONS}.
+ *
* @return The Transition to use to move Views into the scene when reentering from a
* previously-started Activity.
+ * @attr ref android.R.styleable#Window_windowReenterTransition
*/
public Transition getReenterTransition() { return null; }
@@ -1530,8 +1545,10 @@
* {@link android.transition.ChangeBounds}. A null
* value will cause transferred shared elements to blink to the final position.
* Requires {@link #FEATURE_CONTENT_TRANSITIONS}.
+ *
* @param transition The Transition to use for shared elements transferred into the content
* Scene.
+ * @attr ref android.R.styleable#Window_windowSharedElementEnterTransition
*/
public void setSharedElementEnterTransition(Transition transition) {}
@@ -1543,22 +1560,28 @@
* If no value is set, the default will be to use the same value as
* {@link #setSharedElementEnterTransition(android.transition.Transition)}.
* Requires {@link #FEATURE_CONTENT_TRANSITIONS}.
+ *
* @param transition The Transition to use for shared elements transferred out of the content
* Scene.
+ * @attr ref android.R.styleable#Window_windowSharedElementReturnTransition
*/
public void setSharedElementReturnTransition(Transition transition) {}
/**
* Returns the Transition that will be used for shared elements transferred into the content
* Scene. Requires {@link #FEATURE_CONTENT_TRANSITIONS}.
+ *
* @return Transition to use for sharend elements transferred into the content Scene.
+ * @attr ref android.R.styleable#Window_windowSharedElementEnterTransition
*/
public Transition getSharedElementEnterTransition() { return null; }
/**
* Returns the Transition that will be used for shared elements transferred back to a
* calling Activity. Requires {@link #FEATURE_CONTENT_TRANSITIONS}.
+ *
* @return Transition to use for sharend elements transferred into the content Scene.
+ * @attr ref android.R.styleable#Window_windowSharedElementReturnTransition
*/
public Transition getSharedElementReturnTransition() { return null; }
@@ -1568,8 +1591,10 @@
* must animate during the exit transition, this Transition should be used. Upon completion,
* the shared elements may be transferred to the started Activity.
* Requires {@link #FEATURE_CONTENT_TRANSITIONS}.
+ *
* @param transition The Transition to use for shared elements in the launching Window
* prior to transferring to the launched Activity's Window.
+ * @attr ref android.R.styleable#Window_windowSharedElementExitTransition
*/
public void setSharedElementExitTransition(Transition transition) {}
@@ -1579,8 +1604,10 @@
* is set, this will default to
* {@link #setSharedElementExitTransition(android.transition.Transition)}.
* Requires {@link #FEATURE_CONTENT_TRANSITIONS}.
+ *
* @param transition The Transition to use for shared elements in the launching Window
* after the shared element has returned to the Window.
+ * @attr ref android.R.styleable#Window_windowSharedElementReenterTransition
*/
public void setSharedElementReenterTransition(Transition transition) {}
@@ -1591,6 +1618,7 @@
*
* @return the Transition to use for shared elements in the launching Window prior
* to transferring to the launched Activity's Window.
+ * @attr ref android.R.styleable#Window_windowSharedElementExitTransition
*/
public Transition getSharedElementExitTransition() { return null; }
@@ -1601,6 +1629,7 @@
*
* @return the Transition that will be used for shared elements reentering from a started
* Activity after it has returned the shared element to it start location.
+ * @attr ref android.R.styleable#Window_windowSharedElementReenterTransition
*/
public Transition getSharedElementReenterTransition() { return null; }
@@ -1610,8 +1639,10 @@
* transition of the calling Activity. When true, the transition will start as soon as possible.
* When false, the transition will wait until the remote exiting transition completes before
* starting.
+ *
* @param allow true to start the enter transition when possible or false to
* wait until the exiting transition completes.
+ * @attr ref android.R.styleable#Window_windowAllowEnterTransitionOverlap
*/
public void setAllowEnterTransitionOverlap(boolean allow) {}
@@ -1621,8 +1652,10 @@
* transition of the calling Activity. When true, the transition will start as soon as possible.
* When false, the transition will wait until the remote exiting transition completes before
* starting.
+ *
* @return true when the enter transition should start as soon as possible or false to
* when it should wait until the exiting transition completes.
+ * @attr ref android.R.styleable#Window_windowAllowEnterTransitionOverlap
*/
public boolean getAllowEnterTransitionOverlap() { return true; }
@@ -1632,10 +1665,20 @@
* transition of the called Activity when reentering after if finishes. When true,
* the transition will start as soon as possible. When false, the transition will wait
* until the called Activity's exiting transition completes before starting.
+ *
* @param allow true to start the transition when possible or false to wait until the
* called Activity's exiting transition completes.
+ * @attr ref android.R.styleable#Window_windowAllowReturnTransitionOverlap
*/
- public void setAllowExitTransitionOverlap(boolean allow) {}
+ public void setAllowReturnTransitionOverlap(boolean allow) {}
+
+ /**
+ * TODO: remove this.
+ * @hide
+ */
+ public void setAllowExitTransitionOverlap(boolean allow) {
+ setAllowReturnTransitionOverlap(allow);
+ }
/**
* Returns how the transition set in
@@ -1643,10 +1686,18 @@
* transition of the called Activity when reentering after if finishes. When true,
* the transition will start as soon as possible. When false, the transition will wait
* until the called Activity's exiting transition completes before starting.
+ *
* @return true when the transition should start when possible or false when it should wait
* until the called Activity's exiting transition completes.
+ * @attr ref android.R.styleable#Window_windowAllowReturnTransitionOverlap
*/
- public boolean getAllowExitTransitionOverlap() { return true; }
+ public boolean getAllowReturnTransitionOverlap() { return true; }
+
+ /**
+ * TODO: remove this.
+ * @hide
+ */
+ public boolean getAllowExitTransitionOverlap() { return getAllowReturnTransitionOverlap(); }
/**
* Returns the duration, in milliseconds, of the window background fade
@@ -1654,8 +1705,10 @@
* <p>When executing the enter transition, the background starts transparent
* and fades in. This requires {@link #FEATURE_CONTENT_TRANSITIONS}. The default is
* 300 milliseconds.</p>
+ *
* @return The duration of the window background fade to opaque during enter transition.
* @see #getEnterTransition()
+ * @attr ref android.R.styleable#Window_windowTransitionBackgroundFadeDuration
*/
public long getTransitionBackgroundFadeDuration() { return 0; }
@@ -1665,9 +1718,11 @@
* <p>When executing the enter transition, the background starts transparent
* and fades in. This requires {@link #FEATURE_CONTENT_TRANSITIONS}. The default is
* 300 milliseconds.</p>
+ *
* @param fadeDurationMillis The duration of the window background fade to or from opaque
* during enter transition.
* @see #setEnterTransition(android.transition.Transition)
+ * @attr ref android.R.styleable#Window_windowTransitionBackgroundFadeDuration
*/
public void setTransitionBackgroundFadeDuration(long fadeDurationMillis) { }
@@ -1679,6 +1734,7 @@
* @return <code>true</code> when shared elements should use an Overlay during
* shared element transitions or <code>false</code> when they should animate as
* part of the normal View hierarchy.
+ * @attr ref android.R.styleable#Window_windowSharedElementsUseOverlay
*/
public boolean getSharedElementsUseOverlay() { return true; }
@@ -1689,6 +1745,7 @@
* @param sharedElementsUseOverlay <code>true</code> indicates that shared elements should
* be transitioned with an Overlay or <code>false</code>
* to transition within the normal View hierarchy.
+ * @attr ref android.R.styleable#Window_windowSharedElementsUseOverlay
*/
public void setSharedElementsUseOverlay(boolean sharedElementsUseOverlay) { }
diff --git a/core/java/android/view/inputmethod/BaseInputConnection.java b/core/java/android/view/inputmethod/BaseInputConnection.java
index 4d2f57a..20adfe4 100644
--- a/core/java/android/view/inputmethod/BaseInputConnection.java
+++ b/core/java/android/view/inputmethod/BaseInputConnection.java
@@ -431,7 +431,15 @@
/**
* The default implementation does nothing.
*/
- public boolean requestUpdateCursorAnchorInfo(int cursorUpdateMode) {
+ public boolean requestCursorUpdates(int cursorUpdateMode) {
+ return false;
+ }
+
+ /**
+ * The default implementation does nothing.
+ * @removed
+ */
+ public final boolean requestUpdateCursorAnchorInfo(int cursorUpdateMode) {
return false;
}
diff --git a/core/java/android/view/inputmethod/InputConnection.java b/core/java/android/view/inputmethod/InputConnection.java
index ca094c1..093fb2f 100644
--- a/core/java/android/view/inputmethod/InputConnection.java
+++ b/core/java/android/view/inputmethod/InputConnection.java
@@ -728,31 +728,47 @@
* The editor is requested to call
* {@link InputMethodManager#updateCursorAnchorInfo(android.view.View, CursorAnchorInfo)} at
* once, as soon as possible, regardless of cursor/anchor position changes. This flag can be
- * used together with {@link #REQUEST_UPDATE_CURSOR_ANCHOR_INFO_MONITOR}.
+ * used together with {@link #CURSOR_UPDATE_MONITOR}.
*/
- public static final int REQUEST_UPDATE_CURSOR_ANCHOR_INFO_IMMEDIATE = 1 << 0;
+ public static final int CURSOR_UPDATE_IMMEDIATE = 1 << 0;
/**
* The editor is requested to call
* {@link InputMethodManager#updateCursorAnchorInfo(android.view.View, CursorAnchorInfo)}
* whenever cursor/anchor position is changed. To disable monitoring, call
- * {@link InputConnection#requestUpdateCursorAnchorInfo(int)} again with this flag off.
+ * {@link InputConnection#requestCursorUpdates(int)} again with this flag off.
* <p>
- * This flag can be used together with {@link #REQUEST_UPDATE_CURSOR_ANCHOR_INFO_IMMEDIATE}.
+ * This flag can be used together with {@link #CURSOR_UPDATE_IMMEDIATE}.
* </p>
*/
- public static final int REQUEST_UPDATE_CURSOR_ANCHOR_INFO_MONITOR = 1 << 1;
+ public static final int CURSOR_UPDATE_MONITOR = 1 << 1;
/**
* Called by the input method to ask the editor for calling back
* {@link InputMethodManager#updateCursorAnchorInfo(android.view.View, CursorAnchorInfo)} to
* notify cursor/anchor locations.
*
- * @param cursorUpdateMode {@link #REQUEST_UPDATE_CURSOR_ANCHOR_INFO_IMMEDIATE} and/or
- * {@link #REQUEST_UPDATE_CURSOR_ANCHOR_INFO_MONITOR}
+ * @param cursorUpdateMode {@link #CURSOR_UPDATE_IMMEDIATE} and/or
+ * {@link #CURSOR_UPDATE_MONITOR}. Pass {@code 0} to disable the effect of
+ * {@link #CURSOR_UPDATE_MONITOR}.
* @return {@code true} if the request is scheduled. {@code false} to indicate that when the
* application will not call
* {@link InputMethodManager#updateCursorAnchorInfo(android.view.View, CursorAnchorInfo)}.
*/
+ public boolean requestCursorUpdates(int cursorUpdateMode);
+
+ /**
+ * @removed
+ */
+ public static final int REQUEST_UPDATE_CURSOR_UPDATE_IMMEDIATE = 1 << 0;
+
+ /**
+ * @removed
+ */
+ public static final int REQUEST_UPDATE_CURSOR_ANCHOR_INFO_MONITOR = 1 << 1;
+
+ /**
+ * @removed
+ */
public boolean requestUpdateCursorAnchorInfo(int cursorUpdateMode);
}
diff --git a/core/java/android/view/inputmethod/InputConnectionWrapper.java b/core/java/android/view/inputmethod/InputConnectionWrapper.java
index d95df25..87853deb 100644
--- a/core/java/android/view/inputmethod/InputConnectionWrapper.java
+++ b/core/java/android/view/inputmethod/InputConnectionWrapper.java
@@ -126,7 +126,14 @@
return mTarget.performPrivateCommand(action, data);
}
- public boolean requestUpdateCursorAnchorInfo(int cursorUpdateMode) {
- return mTarget.requestUpdateCursorAnchorInfo(cursorUpdateMode);
+ public boolean requestCursorUpdates(int cursorUpdateMode) {
+ return mTarget.requestCursorUpdates(cursorUpdateMode);
}
- }
+
+ /**
+ * @removed
+ */
+ public final boolean requestUpdateCursorAnchorInfo(int cursorUpdateMode) {
+ return mTarget.requestCursorUpdates(cursorUpdateMode);
+ }
+}
diff --git a/core/java/android/view/inputmethod/InputMethodManager.java b/core/java/android/view/inputmethod/InputMethodManager.java
index 0a472c7..b56378f 100644
--- a/core/java/android/view/inputmethod/InputMethodManager.java
+++ b/core/java/android/view/inputmethod/InputMethodManager.java
@@ -1526,7 +1526,7 @@
* Return true if the current input method wants to watch the location
* of the input editor's cursor in its window.
*
- * @deprecated Use {@link InputConnection#requestUpdateCursorAnchorInfo(int)} instead.
+ * @deprecated Use {@link InputConnection#requestCursorUpdates(int)} instead.
*/
@Deprecated
public boolean isWatchingCursor(View view) {
@@ -1542,9 +1542,9 @@
public boolean isCursorAnchorInfoEnabled() {
synchronized (mH) {
final boolean isImmediate = (mRequestUpdateCursorAnchorInfoMonitorMode &
- InputConnection.REQUEST_UPDATE_CURSOR_ANCHOR_INFO_IMMEDIATE) != 0;
+ InputConnection.CURSOR_UPDATE_IMMEDIATE) != 0;
final boolean isMonitoring = (mRequestUpdateCursorAnchorInfoMonitorMode &
- InputConnection.REQUEST_UPDATE_CURSOR_ANCHOR_INFO_MONITOR) != 0;
+ InputConnection.CURSOR_UPDATE_MONITOR) != 0;
return isImmediate || isMonitoring;
}
}
@@ -1608,7 +1608,7 @@
// If immediate bit is set, we will call updateCursorAnchorInfo() even when the data has
// not been changed from the previous call.
final boolean isImmediate = (mRequestUpdateCursorAnchorInfoMonitorMode &
- InputConnection.REQUEST_UPDATE_CURSOR_ANCHOR_INFO_IMMEDIATE) != 0;
+ InputConnection.CURSOR_UPDATE_IMMEDIATE) != 0;
if (!isImmediate && Objects.equals(mCursorAnchorInfo, cursorAnchorInfo)) {
// TODO: Consider always emitting this message once we have addressed redundant
// calls of this method from android.widget.Editor.
@@ -1624,7 +1624,7 @@
mCursorAnchorInfo = cursorAnchorInfo;
// Clear immediate bit (if any).
mRequestUpdateCursorAnchorInfoMonitorMode &=
- ~InputConnection.REQUEST_UPDATE_CURSOR_ANCHOR_INFO_IMMEDIATE;
+ ~InputConnection.CURSOR_UPDATE_IMMEDIATE;
} catch (RemoteException e) {
Log.w(TAG, "IME died: " + mCurId, e);
}
diff --git a/core/java/android/widget/AbsListView.java b/core/java/android/widget/AbsListView.java
index eb93745..eef8554 100644
--- a/core/java/android/widget/AbsListView.java
+++ b/core/java/android/widget/AbsListView.java
@@ -5717,8 +5717,16 @@
}
@Override
+ public boolean requestCursorUpdates(int cursorUpdateMode) {
+ return getTarget().requestCursorUpdates(cursorUpdateMode);
+ }
+
+ /**
+ * @removed
+ */
+ @Override
public boolean requestUpdateCursorAnchorInfo(int cursorUpdateMode) {
- return getTarget().requestUpdateCursorAnchorInfo(cursorUpdateMode);
+ return getTarget().requestCursorUpdates(cursorUpdateMode);
}
}
diff --git a/core/java/com/android/internal/view/IInputConnectionWrapper.java b/core/java/com/android/internal/view/IInputConnectionWrapper.java
index b1f5d90..e19b2b6 100644
--- a/core/java/com/android/internal/view/IInputConnectionWrapper.java
+++ b/core/java/com/android/internal/view/IInputConnectionWrapper.java
@@ -437,7 +437,7 @@
return;
}
args.callback.setRequestUpdateCursorAnchorInfoResult(
- ic.requestUpdateCursorAnchorInfo(msg.arg1), args.seq);
+ ic.requestCursorUpdates(msg.arg1), args.seq);
} catch (RemoteException e) {
Log.w(TAG, "Got RemoteException calling requestCursorAnchorInfo", e);
}
diff --git a/core/java/com/android/internal/view/InputConnectionWrapper.java b/core/java/com/android/internal/view/InputConnectionWrapper.java
index a8526c8..0c65ad1 100644
--- a/core/java/com/android/internal/view/InputConnectionWrapper.java
+++ b/core/java/com/android/internal/view/InputConnectionWrapper.java
@@ -428,7 +428,7 @@
}
}
- public boolean requestUpdateCursorAnchorInfo(int cursorUpdateMode) {
+ public boolean requestCursorUpdates(int cursorUpdateMode) {
boolean result = false;
try {
InputContextCallback callback = InputContextCallback.getInstance();
@@ -445,4 +445,11 @@
}
return result;
}
+
+ /**
+ * @removed
+ */
+ public boolean requestUpdateCursorAnchorInfo(int cursorUpdateMode) {
+ return requestCursorUpdates(cursorUpdateMode);
+ }
}
diff --git a/core/java/com/android/internal/widget/EditableInputConnection.java b/core/java/com/android/internal/widget/EditableInputConnection.java
index ba236f39..f211ff2 100644
--- a/core/java/com/android/internal/widget/EditableInputConnection.java
+++ b/core/java/com/android/internal/widget/EditableInputConnection.java
@@ -188,13 +188,13 @@
}
@Override
- public boolean requestUpdateCursorAnchorInfo(int cursorUpdateMode) {
+ public boolean requestCursorUpdates(int cursorUpdateMode) {
if (DEBUG) Log.v(TAG, "requestUpdateCursorAnchorInfo " + cursorUpdateMode);
// It is possible that any other bit is used as a valid flag in a future release.
// We should reject the entire request in such a case.
- final int KNOWN_FLAGS_MASK = InputConnection.REQUEST_UPDATE_CURSOR_ANCHOR_INFO_IMMEDIATE |
- InputConnection.REQUEST_UPDATE_CURSOR_ANCHOR_INFO_MONITOR;
+ final int KNOWN_FLAGS_MASK = InputConnection.CURSOR_UPDATE_IMMEDIATE |
+ InputConnection.CURSOR_UPDATE_MONITOR;
final int unknownFlags = cursorUpdateMode & ~KNOWN_FLAGS_MASK;
if (unknownFlags != 0) {
if (DEBUG) {
@@ -212,7 +212,7 @@
return false;
}
mIMM.setUpdateCursorAnchorInfoMode(cursorUpdateMode);
- if ((cursorUpdateMode & InputConnection.REQUEST_UPDATE_CURSOR_ANCHOR_INFO_IMMEDIATE) != 0) {
+ if ((cursorUpdateMode & InputConnection.CURSOR_UPDATE_IMMEDIATE) != 0) {
if (mTextView == null) {
// In this case, FLAG_CURSOR_ANCHOR_INFO_IMMEDIATE is silently ignored.
// TODO: Return some notification code for the input method that indicates
diff --git a/core/res/res/drawable/stat_sys_tether_wifi.xml b/core/res/res/drawable/stat_sys_tether_wifi.xml
index a816db8..4396962 100644
--- a/core/res/res/drawable/stat_sys_tether_wifi.xml
+++ b/core/res/res/drawable/stat_sys_tether_wifi.xml
@@ -14,11 +14,12 @@
limitations under the License.
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
- android:width="26.0dp"
+ android:width="24.0dp"
android:height="24.0dp"
- android:viewportWidth="26.0"
- android:viewportHeight="24.0">
+ android:viewportWidth="48.0"
+ android:viewportHeight="48.0">
+
<path
android:fillColor="#FFFFFFFF"
- android:pathData="M13.000000,22.000000L25.600000,6.500000C25.100000,6.100000 20.299999,2.100000 13.000000,2.100000S0.900000,6.100000 0.400000,6.500000L13.000000,22.000000L13.000000,22.000000L13.000000,22.000000L13.000000,22.000000L13.000000,22.000000z"/>
+ android:pathData="M24.000000,22.000000c-2.200000,0.000000 -4.000000,1.800000 -4.000000,4.000000c0.000000,2.200000 1.800000,4.000000 4.000000,4.000000c2.200000,0.000000 4.000000,-1.800000 4.000000,-4.000000C28.000000,23.799999 26.200001,22.000000 24.000000,22.000000zM36.000000,26.000000c0.000000,-6.600000 -5.400000,-12.000000 -12.000000,-12.000000c-6.600000,0.000000 -12.000000,5.400000 -12.000000,12.000000c0.000000,4.400000 2.400000,8.300000 6.000000,10.400000l2.000000,-3.500000c-2.400000,-1.400000 -4.000000,-3.900000 -4.000000,-6.900000c0.000000,-4.400000 3.600000,-8.000000 8.000000,-8.000000s8.000000,3.600000 8.000000,8.000000c0.000000,3.000000 -1.600000,5.500000 -4.000000,6.900000l2.000000,3.500000C33.599998,34.299999 36.000000,30.400000 36.000000,26.000000zM24.000000,6.000000C13.000000,6.000000 4.000000,15.000000 4.000000,26.000000c0.000000,7.400000 4.000000,13.800000 10.000000,17.299999l2.000000,-3.500000c-4.800000,-2.800000 -8.000000,-7.900000 -8.000000,-13.800000c0.000000,-8.800000 7.200000,-16.000000 16.000000,-16.000000s16.000000,7.200000 16.000000,16.000000c0.000000,5.900000 -3.200000,11.100000 -8.000000,13.800000l2.000000,3.500000c6.000000,-3.500000 10.000000,-9.900000 10.000000,-17.299999C44.000000,15.000000 35.000000,6.000000 24.000000,6.000000z"/>
</vector>
diff --git a/core/res/res/values/attrs.xml b/core/res/res/values/attrs.xml
index ce2bc85..9b1b7ed 100644
--- a/core/res/res/values/attrs.xml
+++ b/core/res/res/values/attrs.xml
@@ -514,8 +514,8 @@
<!-- Flag indicating whether this Window's transition should overlap with
the exiting transition of the called Activity when the called Activity
finishes. Corresponds to
- {@link android.view.Window#setAllowExitTransitionOverlap(boolean)}. -->
- <attr name="windowAllowExitTransitionOverlap" format="boolean"/>
+ {@link android.view.Window#setAllowReturnTransitionOverlap(boolean)}. -->
+ <attr name="windowAllowReturnTransitionOverlap" format="boolean"/>
<!-- Indicates whether or not shared elements should use an overlay
during transitions. The default value is true. -->
@@ -1853,8 +1853,8 @@
<!-- Flag indicating whether this Window's transition should overlap with
the exiting transition of the called Activity when the called Activity
finishes. Corresponds to
- {@link android.view.Window#setAllowExitTransitionOverlap(boolean)}. -->
- <attr name="windowAllowExitTransitionOverlap"/>
+ {@link android.view.Window#setAllowReturnTransitionOverlap(boolean)}. -->
+ <attr name="windowAllowReturnTransitionOverlap"/>
<!-- Indicates whether or not shared elements should use an overlay
during transitions. The default value is true. -->
@@ -6627,6 +6627,53 @@
IDs (through the android:id attribute) instead of tags because
they are faster and allow for compile-time type checking. -->
<attr name="tag" />
+
+ <!-- The Transition that will be used to move Views out of the scene when the
+ fragment is removed, hidden, or detached when not popping the back stack.
+ Corresponds to {@link android.app.Fragment#setExitTransition(
+ android.transition.Transition)} -->
+ <attr name="fragmentExitTransition" format="reference"/>
+
+ <!-- The Transition that will be used to move Views into the initial scene.
+ Corresponds to {@link android.app.Fragment#setEnterTransition(
+ android.transition.Transition)} -->
+ <attr name="fragmentEnterTransition" format="reference"/>
+
+ <!-- The Transition that will be used for shared elements transferred into the content
+ Scene.
+ Corresponds to {@link android.app.Fragment#setSharedElementEnterTransition(
+ android.transition.Transition)} -->
+ <attr name="fragmentSharedElementEnterTransition" format="reference"/>
+
+ <!-- The Transition that will be used to move Views out of the scene when the Fragment is
+ preparing to be removed, hidden, or detached because of popping the back stack.
+ Corresponds to {@link android.app.Fragment#setReturnTransition(
+ android.transition.Transition)} -->
+ <attr name="fragmentReturnTransition" format="reference"/>
+
+ <!-- The Transition that will be used for shared elements transferred back during a
+ pop of the back stack. This Transition acts in the leaving Fragment.
+ Corresponds to {@link android.app.Fragment#setSharedElementReturnTransition(
+ android.transition.Transition)} -->
+ <attr name="fragmentSharedElementReturnTransition" format="reference"/>
+
+ <!-- The Transition that will be used to move Views in to the scene when returning due
+ to popping a back stack.
+ Corresponds to {@link android.app.Fragment#setReenterTransition(
+ android.transition.Transition)} -->
+ <attr name="fragmentReenterTransition" format="reference"/>
+
+ <!-- Sets whether the enter and exit transitions should overlap when transitioning
+ forward.
+ Corresponds to {@link android.app.Fragment#setAllowEnterTransitionOverlap(
+ boolean)} -->
+ <attr name="fragmentAllowEnterTransitionOverlap" format="reference"/>
+
+ <!-- Sets whether the enter and exit transitions should overlap when transitioning
+ because of popping the back stack.
+ Corresponds to {@link android.app.Fragment#setAllowReturnTransitionOverlap(
+ boolean)} -->
+ <attr name="fragmentAllowReturnTransitionOverlap" format="reference"/>
</declare-styleable>
<!-- Use <code>device-admin</code> as the root tag of the XML resource that
diff --git a/core/res/res/values/config.xml b/core/res/res/values/config.xml
index f5f079c..988198a 100644
--- a/core/res/res/values/config.xml
+++ b/core/res/res/values/config.xml
@@ -628,7 +628,7 @@
<integer name="config_notificationsBatteryLedOff">2875</integer>
<!-- Number of notifications to keep in the notification service historical archive -->
- <integer name="config_notificationServiceArchiveSize">250</integer>
+ <integer name="config_notificationServiceArchiveSize">100</integer>
<!-- Allow the menu hard key to be disabled in LockScreen on some devices -->
<bool name="config_disableMenuKeyInLockScreen">false</bool>
diff --git a/core/res/res/values/public.xml b/core/res/res/values/public.xml
index 5e76a87..75c0e2c 100644
--- a/core/res/res/values/public.xml
+++ b/core/res/res/values/public.xml
@@ -2146,7 +2146,7 @@
<public type="attr" name="windowExitTransition" />
<public type="attr" name="windowSharedElementEnterTransition" />
<public type="attr" name="windowSharedElementExitTransition" />
- <public type="attr" name="windowAllowExitTransitionOverlap" />
+ <public type="attr" name="windowAllowReturnTransitionOverlap" />
<public type="attr" name="windowAllowEnterTransitionOverlap" />
<public type="attr" name="sessionService" />
<public type="attr" name="stackViewStyle" />
@@ -2282,6 +2282,14 @@
<public type="attr" name="spotShadowAlpha" />
<public type="attr" name="navigationIcon" />
<public type="attr" name="navigationContentDescription" />
+ <public type="attr" name="fragmentExitTransition" />
+ <public type="attr" name="fragmentEnterTransition" />
+ <public type="attr" name="fragmentSharedElementEnterTransition" />
+ <public type="attr" name="fragmentReturnTransition" />
+ <public type="attr" name="fragmentSharedElementReturnTransition" />
+ <public type="attr" name="fragmentReenterTransition" />
+ <public type="attr" name="fragmentAllowEnterTransitionOverlap" />
+ <public type="attr" name="fragmentAllowReturnTransitionOverlap" />
<public-padding type="dimen" name="l_resource_pad" end="0x01050010" />
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_notify_more.png b/packages/SystemUI/res/drawable-hdpi/stat_notify_more.png
deleted file mode 100644
index 2fa0293..0000000
--- a/packages/SystemUI/res/drawable-hdpi/stat_notify_more.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_device_access_location_found.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_device_access_location_found.png
deleted file mode 100644
index d43d1dc..0000000
--- a/packages/SystemUI/res/drawable-hdpi/stat_sys_device_access_location_found.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_flightmode.png b/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_flightmode.png
deleted file mode 100644
index dcf86c0..0000000
--- a/packages/SystemUI/res/drawable-hdpi/stat_sys_signal_flightmode.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-ldrtl-hdpi/stat_sys_signal_flightmode.png b/packages/SystemUI/res/drawable-ldrtl-hdpi/stat_sys_signal_flightmode.png
deleted file mode 100644
index 5171333..0000000
--- a/packages/SystemUI/res/drawable-ldrtl-hdpi/stat_sys_signal_flightmode.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-ldrtl-mdpi/stat_sys_signal_flightmode.png b/packages/SystemUI/res/drawable-ldrtl-mdpi/stat_sys_signal_flightmode.png
deleted file mode 100644
index 1b45762..0000000
--- a/packages/SystemUI/res/drawable-ldrtl-mdpi/stat_sys_signal_flightmode.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-ldrtl-xhdpi/stat_sys_signal_flightmode.png b/packages/SystemUI/res/drawable-ldrtl-xhdpi/stat_sys_signal_flightmode.png
deleted file mode 100644
index fcbfac1..0000000
--- a/packages/SystemUI/res/drawable-ldrtl-xhdpi/stat_sys_signal_flightmode.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-ldrtl-xxhdpi/stat_sys_signal_flightmode.png b/packages/SystemUI/res/drawable-ldrtl-xxhdpi/stat_sys_signal_flightmode.png
deleted file mode 100644
index 4555731..0000000
--- a/packages/SystemUI/res/drawable-ldrtl-xxhdpi/stat_sys_signal_flightmode.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_notify_more.png b/packages/SystemUI/res/drawable-mdpi/stat_notify_more.png
deleted file mode 100644
index d7a48f2..0000000
--- a/packages/SystemUI/res/drawable-mdpi/stat_notify_more.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_device_access_location_found.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_device_access_location_found.png
deleted file mode 100644
index 61d7511..0000000
--- a/packages/SystemUI/res/drawable-mdpi/stat_sys_device_access_location_found.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_flightmode.png b/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_flightmode.png
deleted file mode 100644
index 14d1060..0000000
--- a/packages/SystemUI/res/drawable-mdpi/stat_sys_signal_flightmode.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/stat_notify_more.png b/packages/SystemUI/res/drawable-xhdpi/stat_notify_more.png
deleted file mode 100644
index 64327ba..0000000
--- a/packages/SystemUI/res/drawable-xhdpi/stat_notify_more.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/stat_sys_device_access_location_found.png b/packages/SystemUI/res/drawable-xhdpi/stat_sys_device_access_location_found.png
deleted file mode 100644
index 192d3f7..0000000
--- a/packages/SystemUI/res/drawable-xhdpi/stat_sys_device_access_location_found.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_flightmode.png b/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_flightmode.png
deleted file mode 100644
index 95c217c..0000000
--- a/packages/SystemUI/res/drawable-xhdpi/stat_sys_signal_flightmode.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xxhdpi/stat_notify_more.png b/packages/SystemUI/res/drawable-xxhdpi/stat_notify_more.png
deleted file mode 100644
index 3c33a56..0000000
--- a/packages/SystemUI/res/drawable-xxhdpi/stat_notify_more.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xxhdpi/stat_sys_device_access_location_found.png b/packages/SystemUI/res/drawable-xxhdpi/stat_sys_device_access_location_found.png
deleted file mode 100644
index 1e5f15f..0000000
--- a/packages/SystemUI/res/drawable-xxhdpi/stat_sys_device_access_location_found.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable-xxhdpi/stat_sys_signal_flightmode.png b/packages/SystemUI/res/drawable-xxhdpi/stat_sys_signal_flightmode.png
deleted file mode 100644
index 155c222..0000000
--- a/packages/SystemUI/res/drawable-xxhdpi/stat_sys_signal_flightmode.png
+++ /dev/null
Binary files differ
diff --git a/packages/SystemUI/res/drawable/stat_sys_no_sim.xml b/packages/SystemUI/res/drawable/ic_qs_no_sim.xml
similarity index 94%
rename from packages/SystemUI/res/drawable/stat_sys_no_sim.xml
rename to packages/SystemUI/res/drawable/ic_qs_no_sim.xml
index 22d1d4b..bd46012 100644
--- a/packages/SystemUI/res/drawable/stat_sys_no_sim.xml
+++ b/packages/SystemUI/res/drawable/ic_qs_no_sim.xml
@@ -14,8 +14,8 @@
limitations under the License.
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
- android:width="18dp"
- android:height="18dp"
+ android:width="32dp"
+ android:height="32dp"
android:viewportWidth="24.0"
android:viewportHeight="24.0">
diff --git a/packages/SystemUI/res/drawable/stat_notify_more.xml b/packages/SystemUI/res/drawable/stat_notify_more.xml
new file mode 100644
index 0000000..50f1286
--- /dev/null
+++ b/packages/SystemUI/res/drawable/stat_notify_more.xml
@@ -0,0 +1,24 @@
+<!--
+ ~ 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
+ -->
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+ android:width="16dp"
+ android:height="16dp"
+ android:viewportWidth="24.0"
+ android:viewportHeight="24.0">
+ <path
+ android:pathData="M22.000000,3.000000L7.000000,3.000000C6.300000,3.000000 5.800000,3.400000 5.400000,3.900000L0.000000,12.000000l5.400000,8.100000c0.400000,0.500000 1.000000,0.900000 1.700000,0.900000L22.000000,21.000000c1.100000,0.000000 2.000000,-0.900000 2.000000,-2.000000L24.000000,5.000000C24.000000,3.900000 23.100000,3.000000 22.000000,3.000000zM9.000000,13.500000c-0.800000,0.000000 -1.500000,-0.700000 -1.500000,-1.500000s0.700000,-1.500000 1.500000,-1.500000c0.800000,0.000000 1.500000,0.700000 1.500000,1.500000S9.800000,13.500000 9.000000,13.500000zM14.000000,13.500000c-0.800000,0.000000 -1.500000,-0.700000 -1.500000,-1.500000s0.700000,-1.500000 1.500000,-1.500000c0.800000,0.000000 1.500000,0.700000 1.500000,1.500000S14.800000,13.500000 14.000000,13.500000zM19.000000,13.500000c-0.800000,0.000000 -1.500000,-0.700000 -1.500000,-1.500000s0.700000,-1.500000 1.500000,-1.500000c0.800000,0.000000 1.500000,0.700000 1.500000,1.500000S19.799999,13.500000 19.000000,13.500000z"
+ android:fillColor="#FFFFFFFF"/>
+</vector>
diff --git a/packages/SystemUI/res/drawable/stat_sys_airplane_mode.xml b/packages/SystemUI/res/drawable/stat_sys_airplane_mode.xml
new file mode 100644
index 0000000..433da5f
--- /dev/null
+++ b/packages/SystemUI/res/drawable/stat_sys_airplane_mode.xml
@@ -0,0 +1,28 @@
+<!--
+ ~ 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
+ -->
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+ android:width="17.25dp"
+ android:height="18dp"
+ android:viewportWidth="46.0"
+ android:viewportHeight="48.0">
+
+ <path
+ android:fillColor="#FFFFFFFF"
+ android:pathData="M20.4,18.0"/>
+ <path
+ android:fillColor="#FFFFFFFF"
+ android:pathData="M42.0,32.0l0.0,-4.0L26.0,18.0L26.0,7.0c0.0,-1.7 -1.3,-3.0 -3.0,-3.0c-1.7,0.0 -3.0,1.3 -3.0,3.0l0.0,11.0L4.0,28.0l0.0,4.0l16.0,-5.0l0.0,11.0l-4.0,3.0l0.0,3.0l7.0,-2.0l7.0,2.0l0.0,-3.0l-4.0,-3.0L26.0,27.0L42.0,32.0z"/>
+</vector>
diff --git a/packages/SystemUI/res/drawable/stat_sys_alarm.xml b/packages/SystemUI/res/drawable/stat_sys_alarm.xml
index 3b2bc31..5754569 100644
--- a/packages/SystemUI/res/drawable/stat_sys_alarm.xml
+++ b/packages/SystemUI/res/drawable/stat_sys_alarm.xml
@@ -13,13 +13,17 @@
~ See the License for the specific language governing permissions and
~ limitations under the License
-->
-<vector xmlns:android="http://schemas.android.com/apk/res/android"
- android:width="18dp"
- android:height="18dp"
- android:viewportWidth="24.0"
- android:viewportHeight="24.0">
+<inset xmlns:android="http://schemas.android.com/apk/res/android"
+ android:insetLeft="2.5dp"
+ android:insetRight="2.5dp">
+ <vector xmlns:android="http://schemas.android.com/apk/res/android"
+ android:width="22dp"
+ android:height="17dp"
+ android:viewportWidth="24.0"
+ android:viewportHeight="24.0">
- <path
- android:fillColor="#ffffffff"
- android:pathData="M22.0,5.7l-4.6,-3.9l-1.3,1.5l4.6,3.9L22.0,5.7zM7.9,3.4L6.6,1.9L2.0,5.7l1.3,1.5L7.9,3.4zM12.5,8.0L11.0,8.0l0.0,6.0l4.7,2.9l0.8,-1.2l-4.0,-2.4L12.5,8.0zM12.0,4.0c-5.0,0.0 -9.0,4.0 -9.0,9.0c0.0,5.0 4.0,9.0 9.0,9.0s9.0,-4.0 9.0,-9.0C21.0,8.0 17.0,4.0 12.0,4.0zM12.0,20.0c-3.9,0.0 -7.0,-3.1 -7.0,-7.0c0.0,-3.9 3.1,-7.0 7.0,-7.0c3.9,0.0 7.0,3.1 7.0,7.0C19.0,16.9 15.9,20.0 12.0,20.0z"/>
-</vector>
+ <path
+ android:fillColor="#ffffffff"
+ android:pathData="M22.0,5.7l-4.6,-3.9l-1.3,1.5l4.6,3.9L22.0,5.7zM7.9,3.4L6.6,1.9L2.0,5.7l1.3,1.5L7.9,3.4zM12.5,8.0L11.0,8.0l0.0,6.0l4.7,2.9l0.8,-1.2l-4.0,-2.4L12.5,8.0zM12.0,4.0c-5.0,0.0 -9.0,4.0 -9.0,9.0c0.0,5.0 4.0,9.0 9.0,9.0s9.0,-4.0 9.0,-9.0C21.0,8.0 17.0,4.0 12.0,4.0zM12.0,20.0c-3.9,0.0 -7.0,-3.1 -7.0,-7.0c0.0,-3.9 3.1,-7.0 7.0,-7.0c3.9,0.0 7.0,3.1 7.0,7.0C19.0,16.9 15.9,20.0 12.0,20.0z"/>
+ </vector>
+</inset>
\ No newline at end of file
diff --git a/packages/SystemUI/res/drawable/stat_sys_cast.xml b/packages/SystemUI/res/drawable/stat_sys_cast.xml
index c9e65e0..df28638 100644
--- a/packages/SystemUI/res/drawable/stat_sys_cast.xml
+++ b/packages/SystemUI/res/drawable/stat_sys_cast.xml
@@ -13,13 +13,16 @@
See the License for the specific language governing permissions and
limitations under the License.
-->
-<vector xmlns:android="http://schemas.android.com/apk/res/android"
- android:width="18dp"
- android:height="18dp"
- android:viewportWidth="48.0"
- android:viewportHeight="48.0">
+<inset xmlns:android="http://schemas.android.com/apk/res/android"
+ android:insetLeft="2.5dp"
+ android:insetRight="2.5dp">
+ <vector android:width="22dp"
+ android:height="17dp"
+ android:viewportWidth="48.0"
+ android:viewportHeight="48.0">
- <path
- android:fillColor="#FFFFFFFF"
- android:pathData="M2.0,36.0l0.0,6.0l6.0,0.0C8.0,38.7 5.3,36.0 2.0,36.0zM2.0,28.0l0.0,4.0c5.5,0.0 10.0,4.5 10.0,10.0l4.0,0.0C16.0,34.3 9.7,28.0 2.0,28.0zM38.0,14.0L10.0,14.0l0.0,3.3c7.9,2.6 14.2,8.8 16.7,16.7L38.0,34.0L38.0,14.0zM2.0,20.0l0.0,4.0c9.9,0.0 18.0,8.1 18.0,18.0l4.0,0.0C24.0,29.8 14.1,20.0 2.0,20.0zM42.0,6.0L6.0,6.0c-2.2,0.0 -4.0,1.8 -4.0,4.0l0.0,6.0l4.0,0.0l0.0,-6.0l36.0,0.0l0.0,28.0L28.0,38.0l0.0,4.0l14.0,0.0c2.2,0.0 4.0,-1.8 4.0,-4.0L46.0,10.0C46.0,7.8 44.2,6.0 42.0,6.0z"/>
-</vector>
+ <path
+ android:fillColor="#FFFFFFFF"
+ android:pathData="M2.0,36.0l0.0,6.0l6.0,0.0C8.0,38.7 5.3,36.0 2.0,36.0zM2.0,28.0l0.0,4.0c5.5,0.0 10.0,4.5 10.0,10.0l4.0,0.0C16.0,34.3 9.7,28.0 2.0,28.0zM38.0,14.0L10.0,14.0l0.0,3.3c7.9,2.6 14.2,8.8 16.7,16.7L38.0,34.0L38.0,14.0zM2.0,20.0l0.0,4.0c9.9,0.0 18.0,8.1 18.0,18.0l4.0,0.0C24.0,29.8 14.1,20.0 2.0,20.0zM42.0,6.0L6.0,6.0c-2.2,0.0 -4.0,1.8 -4.0,4.0l0.0,6.0l4.0,0.0l0.0,-6.0l36.0,0.0l0.0,28.0L28.0,38.0l0.0,4.0l14.0,0.0c2.2,0.0 4.0,-1.8 4.0,-4.0L46.0,10.0C46.0,7.8 44.2,6.0 42.0,6.0z"/>
+ </vector>
+</inset>
diff --git a/packages/SystemUI/res/drawable/stat_sys_data_bluetooth.xml b/packages/SystemUI/res/drawable/stat_sys_data_bluetooth.xml
index f53f0e4..e2d3539 100644
--- a/packages/SystemUI/res/drawable/stat_sys_data_bluetooth.xml
+++ b/packages/SystemUI/res/drawable/stat_sys_data_bluetooth.xml
@@ -14,8 +14,8 @@
limitations under the License.
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
- android:width="18dp"
- android:height="18dp"
+ android:width="17dp"
+ android:height="17dp"
android:viewportWidth="48.0"
android:viewportHeight="48.0">
diff --git a/packages/SystemUI/res/drawable/stat_sys_data_bluetooth_connected.xml b/packages/SystemUI/res/drawable/stat_sys_data_bluetooth_connected.xml
index 2aac4ee..94c40ba 100644
--- a/packages/SystemUI/res/drawable/stat_sys_data_bluetooth_connected.xml
+++ b/packages/SystemUI/res/drawable/stat_sys_data_bluetooth_connected.xml
@@ -14,8 +14,8 @@
limitations under the License.
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
- android:width="18dp"
- android:height="18dp"
+ android:width="17dp"
+ android:height="17dp"
android:viewportWidth="48.0"
android:viewportHeight="48.0">
diff --git a/packages/SystemUI/res/drawable/stat_sys_data_fully_connected_1x.xml b/packages/SystemUI/res/drawable/stat_sys_data_fully_connected_1x.xml
index 26d2632..d7463a4 100644
--- a/packages/SystemUI/res/drawable/stat_sys_data_fully_connected_1x.xml
+++ b/packages/SystemUI/res/drawable/stat_sys_data_fully_connected_1x.xml
@@ -14,8 +14,8 @@
limitations under the License.
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
- android:width="9.0dp"
- android:height="18dp"
+ android:width="8.5dp"
+ android:height="17dp"
android:viewportWidth="12.0"
android:viewportHeight="24.0">
<path
diff --git a/packages/SystemUI/res/drawable/stat_sys_data_fully_connected_3g.xml b/packages/SystemUI/res/drawable/stat_sys_data_fully_connected_3g.xml
index 5aaf93b..6309b6d 100644
--- a/packages/SystemUI/res/drawable/stat_sys_data_fully_connected_3g.xml
+++ b/packages/SystemUI/res/drawable/stat_sys_data_fully_connected_3g.xml
@@ -14,8 +14,8 @@
limitations under the License.
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
- android:width="9.75dp"
- android:height="18dp"
+ android:width="9.208dp"
+ android:height="17dp"
android:viewportWidth="13.0"
android:viewportHeight="24.0">
<path
diff --git a/packages/SystemUI/res/drawable/stat_sys_data_fully_connected_4g.xml b/packages/SystemUI/res/drawable/stat_sys_data_fully_connected_4g.xml
index b7d84f0..4067ae5 100644
--- a/packages/SystemUI/res/drawable/stat_sys_data_fully_connected_4g.xml
+++ b/packages/SystemUI/res/drawable/stat_sys_data_fully_connected_4g.xml
@@ -14,8 +14,8 @@
limitations under the License.
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
- android:width="9.0dp"
- android:height="18dp"
+ android:width="8.5dp"
+ android:height="17dp"
android:viewportWidth="12.0"
android:viewportHeight="24.0">
<path
diff --git a/packages/SystemUI/res/drawable/stat_sys_data_fully_connected_e.xml b/packages/SystemUI/res/drawable/stat_sys_data_fully_connected_e.xml
index 7111457..acaa9b1 100644
--- a/packages/SystemUI/res/drawable/stat_sys_data_fully_connected_e.xml
+++ b/packages/SystemUI/res/drawable/stat_sys_data_fully_connected_e.xml
@@ -14,8 +14,8 @@
limitations under the License.
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
- android:width="3.75dp"
- android:height="18dp"
+ android:width="3.541dp"
+ android:height="17dp"
android:viewportWidth="5.0"
android:viewportHeight="24.0">
<path
diff --git a/packages/SystemUI/res/drawable/stat_sys_data_fully_connected_g.xml b/packages/SystemUI/res/drawable/stat_sys_data_fully_connected_g.xml
index 97962b2..7985237 100644
--- a/packages/SystemUI/res/drawable/stat_sys_data_fully_connected_g.xml
+++ b/packages/SystemUI/res/drawable/stat_sys_data_fully_connected_g.xml
@@ -14,8 +14,8 @@
limitations under the License.
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
- android:width="5.25dp"
- android:height="18dp"
+ android:width="4.958dp"
+ android:height="17dp"
android:viewportWidth="7.0"
android:viewportHeight="24.0">
<path
diff --git a/packages/SystemUI/res/drawable/stat_sys_data_fully_connected_h.xml b/packages/SystemUI/res/drawable/stat_sys_data_fully_connected_h.xml
index 4859c14..fda8761 100644
--- a/packages/SystemUI/res/drawable/stat_sys_data_fully_connected_h.xml
+++ b/packages/SystemUI/res/drawable/stat_sys_data_fully_connected_h.xml
@@ -14,8 +14,8 @@
limitations under the License.
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
- android:width="4.5dp"
- android:height="18dp"
+ android:width="4.25dp"
+ android:height="17dp"
android:viewportWidth="6.0"
android:viewportHeight="24.0">
<path
diff --git a/packages/SystemUI/res/drawable/stat_sys_data_fully_connected_lte.xml b/packages/SystemUI/res/drawable/stat_sys_data_fully_connected_lte.xml
index d6446db..c08ff20 100644
--- a/packages/SystemUI/res/drawable/stat_sys_data_fully_connected_lte.xml
+++ b/packages/SystemUI/res/drawable/stat_sys_data_fully_connected_lte.xml
@@ -14,8 +14,8 @@
limitations under the License.
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
- android:width="9.75dp"
- android:height="18dp"
+ android:width="9.208dp"
+ android:height="17dp"
android:viewportWidth="13.0"
android:viewportHeight="24.0">
<path
diff --git a/packages/SystemUI/res/drawable/stat_sys_data_fully_connected_roam.xml b/packages/SystemUI/res/drawable/stat_sys_data_fully_connected_roam.xml
index 7f7d5fc..363e231 100644
--- a/packages/SystemUI/res/drawable/stat_sys_data_fully_connected_roam.xml
+++ b/packages/SystemUI/res/drawable/stat_sys_data_fully_connected_roam.xml
@@ -14,8 +14,8 @@
limitations under the License.
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
- android:width="4.5dp"
- android:height="18dp"
+ android:width="4.25dp"
+ android:height="17dp"
android:viewportWidth="6.0"
android:viewportHeight="24.0">
<path
diff --git a/packages/SystemUI/res/drawable/stat_sys_location.xml b/packages/SystemUI/res/drawable/stat_sys_location.xml
new file mode 100644
index 0000000..433f73b
--- /dev/null
+++ b/packages/SystemUI/res/drawable/stat_sys_location.xml
@@ -0,0 +1,29 @@
+<!--
+ ~ 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
+ -->
+<inset xmlns:android="http://schemas.android.com/apk/res/android"
+ android:insetLeft="1.5dp"
+ android:insetRight="1.5dp">
+ <vector
+ android:width="20dp"
+ android:height="17dp"
+ android:viewportWidth="48.0"
+ android:viewportHeight="48.0">
+
+ <path
+ android:fillColor="#FFFFFFFF"
+ android:pathData="M24.0,4.0c-7.7,0.0 -14.0,6.3 -14.0,14.0c0.0,10.5 14.0,26.0 14.0,26.0s14.0,-15.5 14.0,-26.0C38.0,10.3 31.7,4.0 24.0,4.0zM24.0,23.0c-2.8,0.0 -5.0,-2.2 -5.0,-5.0s2.2,-5.0 5.0,-5.0c2.8,0.0 5.0,2.2 5.0,5.0S26.8,23.0 24.0,23.0z"/>
+ </vector>
+</inset>
\ No newline at end of file
diff --git a/packages/SystemUI/res/drawable/stat_sys_ringer_vibrate.xml b/packages/SystemUI/res/drawable/stat_sys_ringer_vibrate.xml
index 352d86f..f017d58 100644
--- a/packages/SystemUI/res/drawable/stat_sys_ringer_vibrate.xml
+++ b/packages/SystemUI/res/drawable/stat_sys_ringer_vibrate.xml
@@ -13,13 +13,16 @@
See the License for the specific language governing permissions and
limitations under the License.
-->
-<vector xmlns:android="http://schemas.android.com/apk/res/android"
- android:width="20dp"
- android:height="20dp"
- android:viewportWidth="24.0"
- android:viewportHeight="24.0">
+<inset xmlns:android="http://schemas.android.com/apk/res/android"
+ android:insetLeft="3dp"
+ android:insetRight="3dp">
+ <vector android:width="24dp"
+ android:height="18dp"
+ android:viewportWidth="24.0"
+ android:viewportHeight="24.0">
- <path
- android:fillColor="#FFFFFFFF"
- android:pathData="M0.0,15.0l2.0,0.0L2.0,9.0L0.0,9.0L0.0,15.0zM3.0,17.0l2.0,0.0L5.0,7.0L3.0,7.0L3.0,17.0zM22.0,9.0l0.0,6.0l2.0,0.0L24.0,9.0L22.0,9.0zM19.0,17.0l2.0,0.0L21.0,7.0l-2.0,0.0L19.0,17.0zM16.5,3.0l-9.0,0.0C6.7,3.0 6.0,3.7 6.0,4.5l0.0,15.0C6.0,20.3 6.7,21.0 7.5,21.0l9.0,0.0c0.8,0.0 1.5,-0.7 1.5,-1.5l0.0,-15.0C18.0,3.7 17.3,3.0 16.5,3.0zM16.0,19.0L8.0,19.0L8.0,5.0l8.0,0.0L16.0,19.0z"/>
-</vector>
+ <path
+ android:fillColor="#FFFFFFFF"
+ android:pathData="M0.0,15.0l2.0,0.0L2.0,9.0L0.0,9.0L0.0,15.0zM3.0,17.0l2.0,0.0L5.0,7.0L3.0,7.0L3.0,17.0zM22.0,9.0l0.0,6.0l2.0,0.0L24.0,9.0L22.0,9.0zM19.0,17.0l2.0,0.0L21.0,7.0l-2.0,0.0L19.0,17.0zM16.5,3.0l-9.0,0.0C6.7,3.0 6.0,3.7 6.0,4.5l0.0,15.0C6.0,20.3 6.7,21.0 7.5,21.0l9.0,0.0c0.8,0.0 1.5,-0.7 1.5,-1.5l0.0,-15.0C18.0,3.7 17.3,3.0 16.5,3.0zM16.0,19.0L8.0,19.0L8.0,5.0l8.0,0.0L16.0,19.0z"/>
+ </vector>
+</inset>
\ No newline at end of file
diff --git a/packages/SystemUI/res/drawable/stat_sys_signal_0.xml b/packages/SystemUI/res/drawable/stat_sys_signal_0.xml
index 67d9259..e1e81fd 100644
--- a/packages/SystemUI/res/drawable/stat_sys_signal_0.xml
+++ b/packages/SystemUI/res/drawable/stat_sys_signal_0.xml
@@ -15,8 +15,8 @@
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:autoMirrored="true"
- android:width="18dp"
- android:height="18dp"
+ android:width="17dp"
+ android:height="17dp"
android:viewportWidth="24.0"
android:viewportHeight="24.0">
<path
diff --git a/packages/SystemUI/res/drawable/stat_sys_signal_0_fully.xml b/packages/SystemUI/res/drawable/stat_sys_signal_0_fully.xml
index 3bbb800..c0dfcf4 100644
--- a/packages/SystemUI/res/drawable/stat_sys_signal_0_fully.xml
+++ b/packages/SystemUI/res/drawable/stat_sys_signal_0_fully.xml
@@ -15,8 +15,8 @@
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:autoMirrored="true"
- android:width="18dp"
- android:height="18dp"
+ android:width="17dp"
+ android:height="17dp"
android:viewportWidth="24.0"
android:viewportHeight="24.0">
<path
diff --git a/packages/SystemUI/res/drawable/stat_sys_signal_1.xml b/packages/SystemUI/res/drawable/stat_sys_signal_1.xml
index 55f764a..a53e946 100644
--- a/packages/SystemUI/res/drawable/stat_sys_signal_1.xml
+++ b/packages/SystemUI/res/drawable/stat_sys_signal_1.xml
@@ -15,8 +15,8 @@
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:autoMirrored="true"
- android:width="18dp"
- android:height="18dp"
+ android:width="17dp"
+ android:height="17dp"
android:viewportWidth="24.0"
android:viewportHeight="24.0">
<path
diff --git a/packages/SystemUI/res/drawable/stat_sys_signal_1_fully.xml b/packages/SystemUI/res/drawable/stat_sys_signal_1_fully.xml
index b82e428..6bc55cd 100644
--- a/packages/SystemUI/res/drawable/stat_sys_signal_1_fully.xml
+++ b/packages/SystemUI/res/drawable/stat_sys_signal_1_fully.xml
@@ -15,8 +15,8 @@
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:autoMirrored="true"
- android:width="18dp"
- android:height="18dp"
+ android:width="17dp"
+ android:height="17dp"
android:viewportWidth="24.0"
android:viewportHeight="24.0">
<path
diff --git a/packages/SystemUI/res/drawable/stat_sys_signal_2.xml b/packages/SystemUI/res/drawable/stat_sys_signal_2.xml
index ca0eeb3..537c788 100644
--- a/packages/SystemUI/res/drawable/stat_sys_signal_2.xml
+++ b/packages/SystemUI/res/drawable/stat_sys_signal_2.xml
@@ -15,8 +15,8 @@
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:autoMirrored="true"
- android:width="18dp"
- android:height="18dp"
+ android:width="17dp"
+ android:height="17dp"
android:viewportWidth="24.0"
android:viewportHeight="24.0">
<path
diff --git a/packages/SystemUI/res/drawable/stat_sys_signal_2_fully.xml b/packages/SystemUI/res/drawable/stat_sys_signal_2_fully.xml
index abc8dd1..7d9376e 100644
--- a/packages/SystemUI/res/drawable/stat_sys_signal_2_fully.xml
+++ b/packages/SystemUI/res/drawable/stat_sys_signal_2_fully.xml
@@ -15,8 +15,8 @@
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:autoMirrored="true"
- android:width="18dp"
- android:height="18dp"
+ android:width="17dp"
+ android:height="17dp"
android:viewportWidth="24.0"
android:viewportHeight="24.0">
<path
diff --git a/packages/SystemUI/res/drawable/stat_sys_signal_3.xml b/packages/SystemUI/res/drawable/stat_sys_signal_3.xml
index 2b3e571..09fe33a 100644
--- a/packages/SystemUI/res/drawable/stat_sys_signal_3.xml
+++ b/packages/SystemUI/res/drawable/stat_sys_signal_3.xml
@@ -15,8 +15,8 @@
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:autoMirrored="true"
- android:width="18dp"
- android:height="18dp"
+ android:width="17dp"
+ android:height="17dp"
android:viewportWidth="24.0"
android:viewportHeight="24.0">
<path
diff --git a/packages/SystemUI/res/drawable/stat_sys_signal_3_fully.xml b/packages/SystemUI/res/drawable/stat_sys_signal_3_fully.xml
index d47f167..8ec5500 100644
--- a/packages/SystemUI/res/drawable/stat_sys_signal_3_fully.xml
+++ b/packages/SystemUI/res/drawable/stat_sys_signal_3_fully.xml
@@ -15,8 +15,8 @@
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:autoMirrored="true"
- android:width="18dp"
- android:height="18dp"
+ android:width="17dp"
+ android:height="17dp"
android:viewportWidth="24.0"
android:viewportHeight="24.0">
<path
diff --git a/packages/SystemUI/res/drawable/stat_sys_signal_4.xml b/packages/SystemUI/res/drawable/stat_sys_signal_4.xml
index 7d4dd8a..bb98541 100644
--- a/packages/SystemUI/res/drawable/stat_sys_signal_4.xml
+++ b/packages/SystemUI/res/drawable/stat_sys_signal_4.xml
@@ -15,8 +15,8 @@
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:autoMirrored="true"
- android:width="18dp"
- android:height="18dp"
+ android:width="17dp"
+ android:height="17dp"
android:viewportWidth="24.0"
android:viewportHeight="24.0">
<path
diff --git a/packages/SystemUI/res/drawable/stat_sys_signal_4_fully.xml b/packages/SystemUI/res/drawable/stat_sys_signal_4_fully.xml
index 5b1bac3..a468410 100644
--- a/packages/SystemUI/res/drawable/stat_sys_signal_4_fully.xml
+++ b/packages/SystemUI/res/drawable/stat_sys_signal_4_fully.xml
@@ -15,8 +15,8 @@
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:autoMirrored="true"
- android:width="18dp"
- android:height="18dp"
+ android:width="17dp"
+ android:height="17dp"
android:viewportWidth="24.0"
android:viewportHeight="24.0">
<path
diff --git a/packages/SystemUI/res/drawable/stat_sys_signal_null.xml b/packages/SystemUI/res/drawable/stat_sys_signal_null.xml
index 45d34a2..d25fc1c 100644
--- a/packages/SystemUI/res/drawable/stat_sys_signal_null.xml
+++ b/packages/SystemUI/res/drawable/stat_sys_signal_null.xml
@@ -15,8 +15,8 @@
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:autoMirrored="true"
- android:width="18dp"
- android:height="18dp"
+ android:width="17dp"
+ android:height="17dp"
android:viewportWidth="24.0"
android:viewportHeight="24.0">
<path
diff --git a/packages/SystemUI/res/drawable/stat_sys_wifi_signal_0.xml b/packages/SystemUI/res/drawable/stat_sys_wifi_signal_0.xml
index 4965674..be930e8 100644
--- a/packages/SystemUI/res/drawable/stat_sys_wifi_signal_0.xml
+++ b/packages/SystemUI/res/drawable/stat_sys_wifi_signal_0.xml
@@ -14,8 +14,8 @@
limitations under the License.
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
- android:width="20dp"
- android:height="18dp"
+ android:width="18.41dp"
+ android:height="17dp"
android:viewportWidth="26.0"
android:viewportHeight="24.0">
<path
diff --git a/packages/SystemUI/res/drawable/stat_sys_wifi_signal_0_fully.xml b/packages/SystemUI/res/drawable/stat_sys_wifi_signal_0_fully.xml
index e9cad0e..b2691f6 100644
--- a/packages/SystemUI/res/drawable/stat_sys_wifi_signal_0_fully.xml
+++ b/packages/SystemUI/res/drawable/stat_sys_wifi_signal_0_fully.xml
@@ -14,8 +14,8 @@
limitations under the License.
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
- android:width="20dp"
- android:height="18dp"
+ android:width="18.41dp"
+ android:height="17dp"
android:viewportWidth="26.0"
android:viewportHeight="24.0">
<path
diff --git a/packages/SystemUI/res/drawable/stat_sys_wifi_signal_1.xml b/packages/SystemUI/res/drawable/stat_sys_wifi_signal_1.xml
index 7d588a3..dde781d 100644
--- a/packages/SystemUI/res/drawable/stat_sys_wifi_signal_1.xml
+++ b/packages/SystemUI/res/drawable/stat_sys_wifi_signal_1.xml
@@ -14,8 +14,8 @@
limitations under the License.
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
- android:width="20dp"
- android:height="18dp"
+ android:width="18.41dp"
+ android:height="17dp"
android:viewportWidth="26.0"
android:viewportHeight="24.0">
<path
diff --git a/packages/SystemUI/res/drawable/stat_sys_wifi_signal_1_fully.xml b/packages/SystemUI/res/drawable/stat_sys_wifi_signal_1_fully.xml
index 348f963..65931f4 100644
--- a/packages/SystemUI/res/drawable/stat_sys_wifi_signal_1_fully.xml
+++ b/packages/SystemUI/res/drawable/stat_sys_wifi_signal_1_fully.xml
@@ -14,8 +14,8 @@
limitations under the License.
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
- android:width="20dp"
- android:height="18dp"
+ android:width="18.41dp"
+ android:height="17dp"
android:viewportWidth="26.0"
android:viewportHeight="24.0">
<path
diff --git a/packages/SystemUI/res/drawable/stat_sys_wifi_signal_2.xml b/packages/SystemUI/res/drawable/stat_sys_wifi_signal_2.xml
index 4fbdd69..63d9dca 100644
--- a/packages/SystemUI/res/drawable/stat_sys_wifi_signal_2.xml
+++ b/packages/SystemUI/res/drawable/stat_sys_wifi_signal_2.xml
@@ -14,8 +14,8 @@
limitations under the License.
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
- android:width="20dp"
- android:height="18dp"
+ android:width="18.41dp"
+ android:height="17dp"
android:viewportWidth="26.0"
android:viewportHeight="24.0">
<path
diff --git a/packages/SystemUI/res/drawable/stat_sys_wifi_signal_2_fully.xml b/packages/SystemUI/res/drawable/stat_sys_wifi_signal_2_fully.xml
index 66588f0..7ba4895 100644
--- a/packages/SystemUI/res/drawable/stat_sys_wifi_signal_2_fully.xml
+++ b/packages/SystemUI/res/drawable/stat_sys_wifi_signal_2_fully.xml
@@ -14,8 +14,8 @@
limitations under the License.
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
- android:width="20dp"
- android:height="18dp"
+ android:width="18.41dp"
+ android:height="17dp"
android:viewportWidth="26.0"
android:viewportHeight="24.0">
<path
diff --git a/packages/SystemUI/res/drawable/stat_sys_wifi_signal_3.xml b/packages/SystemUI/res/drawable/stat_sys_wifi_signal_3.xml
index 1f3de74..7d393b4 100644
--- a/packages/SystemUI/res/drawable/stat_sys_wifi_signal_3.xml
+++ b/packages/SystemUI/res/drawable/stat_sys_wifi_signal_3.xml
@@ -14,8 +14,8 @@
limitations under the License.
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
- android:width="20dp"
- android:height="18dp"
+ android:width="18.41dp"
+ android:height="17dp"
android:viewportWidth="26.0"
android:viewportHeight="24.0">
<path
diff --git a/packages/SystemUI/res/drawable/stat_sys_wifi_signal_3_fully.xml b/packages/SystemUI/res/drawable/stat_sys_wifi_signal_3_fully.xml
index aa5d2ed..e2cde53 100644
--- a/packages/SystemUI/res/drawable/stat_sys_wifi_signal_3_fully.xml
+++ b/packages/SystemUI/res/drawable/stat_sys_wifi_signal_3_fully.xml
@@ -14,8 +14,8 @@
limitations under the License.
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
- android:width="20dp"
- android:height="18dp"
+ android:width="18.41dp"
+ android:height="17dp"
android:viewportWidth="26.0"
android:viewportHeight="24.0">
<path
diff --git a/packages/SystemUI/res/drawable/stat_sys_wifi_signal_4.xml b/packages/SystemUI/res/drawable/stat_sys_wifi_signal_4.xml
index ca53b56..ec8137f 100644
--- a/packages/SystemUI/res/drawable/stat_sys_wifi_signal_4.xml
+++ b/packages/SystemUI/res/drawable/stat_sys_wifi_signal_4.xml
@@ -14,8 +14,8 @@
limitations under the License.
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
- android:width="20dp"
- android:height="18dp"
+ android:width="18.41dp"
+ android:height="17dp"
android:viewportWidth="26.0"
android:viewportHeight="24.0">
<path
diff --git a/packages/SystemUI/res/drawable/stat_sys_wifi_signal_4_fully.xml b/packages/SystemUI/res/drawable/stat_sys_wifi_signal_4_fully.xml
index 1c7a539..9d02980 100644
--- a/packages/SystemUI/res/drawable/stat_sys_wifi_signal_4_fully.xml
+++ b/packages/SystemUI/res/drawable/stat_sys_wifi_signal_4_fully.xml
@@ -14,8 +14,8 @@
limitations under the License.
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
- android:width="20dp"
- android:height="18dp"
+ android:width="18.41dp"
+ android:height="17dp"
android:viewportWidth="26.0"
android:viewportHeight="24.0">
<path
diff --git a/packages/SystemUI/res/drawable/stat_sys_wifi_signal_null.xml b/packages/SystemUI/res/drawable/stat_sys_wifi_signal_null.xml
index c68fb49..95c6531 100644
--- a/packages/SystemUI/res/drawable/stat_sys_wifi_signal_null.xml
+++ b/packages/SystemUI/res/drawable/stat_sys_wifi_signal_null.xml
@@ -14,8 +14,8 @@
limitations under the License.
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
- android:width="20dp"
- android:height="18dp"
+ android:width="18.41dp"
+ android:height="17dp"
android:viewportWidth="26.0"
android:viewportHeight="24.0">
<path
diff --git a/packages/SystemUI/res/drawable/stat_sys_zen_important.xml b/packages/SystemUI/res/drawable/stat_sys_zen_important.xml
index 73d7cba..9dabb03 100644
--- a/packages/SystemUI/res/drawable/stat_sys_zen_important.xml
+++ b/packages/SystemUI/res/drawable/stat_sys_zen_important.xml
@@ -13,13 +13,16 @@
See the License for the specific language governing permissions and
limitations under the License.
-->
-<vector xmlns:android="http://schemas.android.com/apk/res/android"
- android:width="20dp"
- android:height="20dp"
- android:viewportWidth="24.0"
- android:viewportHeight="24.0">
+<inset xmlns:android="http://schemas.android.com/apk/res/android"
+ android:insetLeft="2.5dp"
+ android:insetRight="2.5dp">
+ <vector android:width="23dp"
+ android:height="18dp"
+ android:viewportWidth="24.0"
+ android:viewportHeight="24.0">
- <path
- android:fillColor="#FFFFFFFF"
- android:pathData="M12.0,17.273l6.1800003,3.7269993 -1.6350002,-7.0290003 5.455,-4.7269993 -7.191,-0.6170006 -2.809,-6.627 -2.809,6.627 -7.191,0.6170006 5.455,4.7269993 -1.6349998,7.0290003z"/>
-</vector>
+ <path
+ android:fillColor="#FFFFFFFF"
+ android:pathData="M12.0,17.273l6.1800003,3.7269993 -1.6350002,-7.0290003 5.455,-4.7269993 -7.191,-0.6170006 -2.809,-6.627 -2.809,6.627 -7.191,0.6170006 5.455,4.7269993 -1.6349998,7.0290003z"/>
+ </vector>
+</inset>
diff --git a/packages/SystemUI/res/drawable/stat_sys_zen_none.xml b/packages/SystemUI/res/drawable/stat_sys_zen_none.xml
index d8ab078..7573de0 100644
--- a/packages/SystemUI/res/drawable/stat_sys_zen_none.xml
+++ b/packages/SystemUI/res/drawable/stat_sys_zen_none.xml
@@ -13,13 +13,16 @@
See the License for the specific language governing permissions and
limitations under the License.
-->
-<vector xmlns:android="http://schemas.android.com/apk/res/android"
- android:width="19dp"
- android:height="19dp"
- android:viewportWidth="48.0"
- android:viewportHeight="48.0">
+<inset xmlns:android="http://schemas.android.com/apk/res/android"
+ android:insetLeft="2.5dp"
+ android:insetRight="2.5dp">
+ <vector android:width="22dp"
+ android:height="17dp"
+ android:viewportWidth="48.0"
+ android:viewportHeight="48.0">
- <path
- android:fillColor="#FFFFFFFF"
- android:pathData="M24.0,4.0C13.0,4.0 4.0,13.0 4.0,24.0c0.0,11.0 9.0,20.0 20.0,20.0c11.0,0.0 20.0,-9.0 20.0,-20.0C44.0,13.0 35.0,4.0 24.0,4.0zM24.0,40.0c-8.8,0.0 -16.0,-7.2 -16.0,-16.0c0.0,-3.7 1.3,-7.1 3.4,-9.8l22.4,22.4C31.1,38.7 27.7,40.0 24.0,40.0zM36.6,33.8L14.2,11.4C16.9,9.3 20.3,8.0 24.0,8.0c8.8,0.0 16.0,7.2 16.0,16.0C40.0,27.7 38.7,31.1 36.6,33.8z"/>
-</vector>
+ <path
+ android:fillColor="#FFFFFFFF"
+ android:pathData="M24.0,4.0C13.0,4.0 4.0,13.0 4.0,24.0c0.0,11.0 9.0,20.0 20.0,20.0c11.0,0.0 20.0,-9.0 20.0,-20.0C44.0,13.0 35.0,4.0 24.0,4.0zM24.0,40.0c-8.8,0.0 -16.0,-7.2 -16.0,-16.0c0.0,-3.7 1.3,-7.1 3.4,-9.8l22.4,22.4C31.1,38.7 27.7,40.0 24.0,40.0zM36.6,33.8L14.2,11.4C16.9,9.3 20.3,8.0 24.0,8.0c8.8,0.0 16.0,7.2 16.0,16.0C40.0,27.7 38.7,31.1 36.6,33.8z"/>
+ </vector>
+</inset>
diff --git a/packages/SystemUI/res/layout/keyguard_status_bar.xml b/packages/SystemUI/res/layout/keyguard_status_bar.xml
index faa2820..b5f917a 100644
--- a/packages/SystemUI/res/layout/keyguard_status_bar.xml
+++ b/packages/SystemUI/res/layout/keyguard_status_bar.xml
@@ -44,7 +44,7 @@
android:layout_toStartOf="@id/multi_user_switch"
android:layout_alignWithParentIfMissing="true"
android:layout_marginStart="16dp"
- android:paddingEnd="2dp">
+ android:paddingEnd="@dimen/system_icons_keyguard_padding_end">
<FrameLayout android:id="@+id/system_icons_container"
android:layout_width="wrap_content"
android:layout_height="@dimen/status_bar_height"
diff --git a/packages/SystemUI/res/layout/signal_cluster_view.xml b/packages/SystemUI/res/layout/signal_cluster_view.xml
index ae54f8c..347c8a9 100644
--- a/packages/SystemUI/res/layout/signal_cluster_view.xml
+++ b/packages/SystemUI/res/layout/signal_cluster_view.xml
@@ -36,21 +36,10 @@
android:layout_width="wrap_content"
/>
</FrameLayout>
- <View
- android:layout_height="6dp"
- android:layout_width="6dp"
- android:visibility="gone"
- android:id="@+id/spacer"
- />
<FrameLayout
android:layout_height="wrap_content"
android:layout_width="wrap_content"
>
- <View
- android:layout_height="6dp"
- android:layout_width="6dp"
- android:visibility="invisible"
- />
<FrameLayout
android:id="@+id/mobile_combo"
android:layout_width="wrap_content"
@@ -68,6 +57,12 @@
/>
</FrameLayout>
</FrameLayout>
+ <View
+ android:id="@+id/wifi_airplane_spacer"
+ android:layout_width="4dp"
+ android:layout_height="4dp"
+ android:visibility="gone"
+ />
<ImageView
android:id="@+id/airplane"
android:layout_height="wrap_content"
diff --git a/packages/SystemUI/res/layout/status_bar.xml b/packages/SystemUI/res/layout/status_bar.xml
index beb8e00..0d414f9 100644
--- a/packages/SystemUI/res/layout/status_bar.xml
+++ b/packages/SystemUI/res/layout/status_bar.xml
@@ -43,8 +43,8 @@
<LinearLayout android:id="@+id/status_bar_contents"
android:layout_width="match_parent"
android:layout_height="match_parent"
- android:paddingStart="6dip"
- android:paddingEnd="6dip"
+ android:paddingStart="6dp"
+ android:paddingEnd="8dp"
android:orientation="horizontal"
>
@@ -91,7 +91,7 @@
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:singleLine="true"
- android:paddingStart="6dip"
+ android:paddingStart="7dp"
android:gravity="center_vertical|start"
/>
</com.android.systemui.statusbar.AlphaOptimizedLinearLayout>
diff --git a/packages/SystemUI/res/layout/status_bar_expanded_header.xml b/packages/SystemUI/res/layout/status_bar_expanded_header.xml
index 7ad3a89..34e062c 100644
--- a/packages/SystemUI/res/layout/status_bar_expanded_header.xml
+++ b/packages/SystemUI/res/layout/status_bar_expanded_header.xml
@@ -60,7 +60,7 @@
android:layout_alignWithParentIfMissing="true"
android:layout_marginStart="16dp"
android:background="@drawable/ripple_drawable"
- android:paddingEnd="2dp" >
+ android:paddingEnd="4dp" >
<FrameLayout android:id="@+id/system_icons_container"
android:layout_width="wrap_content"
android:layout_height="@dimen/status_bar_height"
diff --git a/packages/SystemUI/res/layout/system_icons.xml b/packages/SystemUI/res/layout/system_icons.xml
index 69f9c142..c4b8794 100644
--- a/packages/SystemUI/res/layout/system_icons.xml
+++ b/packages/SystemUI/res/layout/system_icons.xml
@@ -30,12 +30,11 @@
android:id="@+id/signal_cluster"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:layout_marginStart="2dp"/>
+ android:layout_marginStart="2.5dp"/>
<!-- battery must be padded below to match assets -->
<com.android.systemui.BatteryMeterView android:id="@+id/battery"
- android:layout_height="16dp"
- android:layout_width="10.5dp"
- android:layout_marginBottom="0.33dp"
- android:layout_marginStart="4dip"/>
+ android:layout_height="14.5dp"
+ android:layout_width="9.5dp"
+ android:layout_marginStart="7dp"/>
</LinearLayout>
\ No newline at end of file
diff --git a/packages/SystemUI/res/values-hdpi/dimens.xml b/packages/SystemUI/res/values-hdpi/dimens.xml
new file mode 100644
index 0000000..799619f
--- /dev/null
+++ b/packages/SystemUI/res/values-hdpi/dimens.xml
@@ -0,0 +1,21 @@
+<?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
+ -->
+<resources>
+ <!-- Margin on the right side of the system icon group on Keyguard. -->
+ <fraction name="battery_button_height_fraction">10.5%</fraction>
+</resources>
diff --git a/packages/SystemUI/res/values-mdpi/dimens.xml b/packages/SystemUI/res/values-mdpi/dimens.xml
new file mode 100644
index 0000000..7667f3e
--- /dev/null
+++ b/packages/SystemUI/res/values-mdpi/dimens.xml
@@ -0,0 +1,20 @@
+<?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
+ -->
+<resources>
+ <!-- Margin on the right side of the system icon group on Keyguard. -->
+ <fraction name="battery_button_height_fraction">12%</fraction>
+</resources>
diff --git a/packages/SystemUI/res/values-sw600dp/dimens.xml b/packages/SystemUI/res/values-sw600dp/dimens.xml
index 9901e44..74a98fc 100644
--- a/packages/SystemUI/res/values-sw600dp/dimens.xml
+++ b/packages/SystemUI/res/values-sw600dp/dimens.xml
@@ -81,4 +81,7 @@
<dimen name="edge_tap_area_width">80dp</dimen>
<dimen name="keyguard_indication_margin_bottom">90dp</dimen>
+
+ <!-- Margin on the right side of the system icon group on Keyguard. -->
+ <dimen name="system_icons_keyguard_padding_end">2dp</dimen>
</resources>
diff --git a/packages/SystemUI/res/values-tvdpi/dimens.xml b/packages/SystemUI/res/values-tvdpi/dimens.xml
new file mode 100644
index 0000000..7667f3e
--- /dev/null
+++ b/packages/SystemUI/res/values-tvdpi/dimens.xml
@@ -0,0 +1,20 @@
+<?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
+ -->
+<resources>
+ <!-- Margin on the right side of the system icon group on Keyguard. -->
+ <fraction name="battery_button_height_fraction">12%</fraction>
+</resources>
diff --git a/packages/SystemUI/res/values/dimens.xml b/packages/SystemUI/res/values/dimens.xml
index d3cebd45..122a728 100644
--- a/packages/SystemUI/res/values/dimens.xml
+++ b/packages/SystemUI/res/values/dimens.xml
@@ -73,6 +73,9 @@
<!-- Height of notification icons in the status bar -->
<dimen name="status_bar_icon_size">@*android:dimen/status_bar_icon_size</dimen>
+ <!-- The font size for the clock -->
+ <dimen name="status_bar_clock_size">14sp</dimen>
+
<!-- Height of a small notification in the status bar -->
<dimen name="notification_min_height">64dp</dimen>
@@ -86,10 +89,10 @@
<dimen name="notification_summary_height">44dp</dimen>
<!-- size at which Notification icons will be drawn in the status bar -->
- <dimen name="status_bar_icon_drawing_size">18dip</dimen>
+ <dimen name="status_bar_icon_drawing_size">17dip</dimen>
<!-- opacity at which Notification icons will be drawn in the status bar -->
- <item type="dimen" name="status_bar_icon_drawing_alpha">75%</item>
+ <item type="dimen" name="status_bar_icon_drawing_alpha">90%</item>
<!-- gap on either side of status bar notification icons -->
<dimen name="status_bar_icon_padding">0dp</dimen>
@@ -405,8 +408,8 @@
<!-- The font size of the date in QS -->
<dimen name="qs_date_collapsed_size">14sp</dimen>
- <!-- Battery level padding end when in expanded QS (but not on Keyguard) -->
- <dimen name="battery_level_padding_end">4dp</dimen>
+ <!-- Battery level text padding end when in expanded QS and on Keyguard -->
+ <dimen name="battery_level_padding_end">2dp</dimen>
<!-- The top padding of the clear all button -->
<dimen name="clear_all_padding_top">12dp</dimen>
@@ -419,11 +422,14 @@
<dimen name="keyguard_carrier_text_margin">16dp</dimen>
<!-- Margin on the left side of the battery % in the header. -->
- <dimen name="header_battery_margin_expanded">8dp</dimen>
+ <dimen name="header_battery_margin_expanded">6dp</dimen>
<!-- Margin on the left side of the battery % when on Keyguard. -->
<dimen name="header_battery_margin_keyguard">6dp</dimen>
+ <!-- Margin on the right side of the system icon group on Keyguard. -->
+ <dimen name="system_icons_keyguard_padding_end">4dp</dimen>
+
<!-- Additional translation (downwards) for appearing notifications when going to the full shade
from Keyguard. -->
<dimen name="go_to_full_shade_appearing_translation">200dp</dimen>
@@ -461,4 +467,6 @@
<!-- TrustDrawable: Thickness of the circle -->
<dimen name="trust_circle_thickness">2dp</dimen>
+ <!-- Margin on the right side of the system icon group on Keyguard. -->
+ <fraction name="battery_button_height_fraction">10.5%</fraction>
</resources>
diff --git a/packages/SystemUI/res/values/styles.xml b/packages/SystemUI/res/values/styles.xml
index efd4fb4..cb66e7a 100644
--- a/packages/SystemUI/res/values/styles.xml
+++ b/packages/SystemUI/res/values/styles.xml
@@ -69,8 +69,7 @@
</style>
<style name="TextAppearance.StatusBar.Clock" parent="@*android:style/TextAppearance.StatusBar.Icon">
- <!-- Note: must be dp to fit in status bar -->
- <item name="android:textSize">16dp</item>
+ <item name="android:textSize">@dimen/status_bar_clock_size</item>
<item name="android:fontFamily">sans-serif-medium</item>
<item name="android:textColor">@color/status_bar_clock_color</item>
</style>
diff --git a/packages/SystemUI/src/com/android/systemui/BatteryMeterView.java b/packages/SystemUI/src/com/android/systemui/BatteryMeterView.java
index 5e2f784..d24ec66 100755
--- a/packages/SystemUI/src/com/android/systemui/BatteryMeterView.java
+++ b/packages/SystemUI/src/com/android/systemui/BatteryMeterView.java
@@ -46,12 +46,13 @@
private static final int FULL = 96;
- private static final float SUBPIXEL = 0.4f; // inset rects for softer edges
+ private static final float SUBPIXEL = 0.33f; // inset rects for softer edges
private static final float BOLT_LEVEL_THRESHOLD = 0.3f; // opaque bolt below this fraction
private final int[] mColors;
boolean mShowPercent = true;
+ private float mButtonHeightFraction;
private final Paint mFramePaint, mBatteryPaint, mWarningTextPaint, mTextPaint, mBoltPaint;
private float mTextHeight, mWarningTextHeight;
@@ -205,6 +206,8 @@
mWarningString = context.getString(R.string.battery_meter_very_low_overlay_symbol);
mCriticalLevel = mContext.getResources().getInteger(
com.android.internal.R.integer.config_criticalBatteryWarningLevel);
+ mButtonHeightFraction = context.getResources().getFraction(
+ R.fraction.battery_button_height_fraction, 1, 1);
mFramePaint = new Paint(Paint.ANTI_ALIAS_FLAG);
mFramePaint.setColor(frameColor);
@@ -304,7 +307,7 @@
final int height = mHeight - pt - pb;
final int width = mWidth - pl - pr;
- final int buttonHeight = (int) (height * 0.12f);
+ final int buttonHeight = (int) (height * mButtonHeightFraction);
mFrame.set(0, 0, width, height);
mFrame.offset(pl, pt);
diff --git a/packages/SystemUI/src/com/android/systemui/qs/tiles/CellularTile.java b/packages/SystemUI/src/com/android/systemui/qs/tiles/CellularTile.java
index 98adf81..8743207 100644
--- a/packages/SystemUI/src/com/android/systemui/qs/tiles/CellularTile.java
+++ b/packages/SystemUI/src/com/android/systemui/qs/tiles/CellularTile.java
@@ -91,7 +91,7 @@
if (cb == null) return;
final Resources r = mContext.getResources();
- state.iconId = cb.noSim ? R.drawable.stat_sys_no_sim
+ state.iconId = cb.noSim ? R.drawable.ic_qs_no_sim
: !cb.enabled || cb.airplaneModeEnabled ? R.drawable.ic_qs_signal_disabled
: cb.mobileSignalIconId > 0 ? cb.mobileSignalIconId
: R.drawable.ic_qs_signal_no_signal;
@@ -99,7 +99,7 @@
state.overlayIconId = cb.enabled && (cb.dataTypeIconId > 0) && !cb.wifiConnected
? cb.dataTypeIconId
: 0;
- state.filter = state.iconId != R.drawable.stat_sys_no_sim;
+ state.filter = state.iconId != R.drawable.ic_qs_no_sim;
state.activityIn = cb.enabled && cb.activityIn;
state.activityOut = cb.enabled && cb.activityOut;
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/SignalClusterView.java b/packages/SystemUI/src/com/android/systemui/statusbar/SignalClusterView.java
index 9da209a..5883c26 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/SignalClusterView.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/SignalClusterView.java
@@ -49,7 +49,7 @@
ViewGroup mWifiGroup, mMobileGroup;
ImageView mWifi, mMobile, mMobileType, mAirplane;
- View mSpacer;
+ View mWifiAirplaneSpacer;
public SignalClusterView(Context context) {
this(context, null);
@@ -77,8 +77,8 @@
mMobileGroup = (ViewGroup) findViewById(R.id.mobile_combo);
mMobile = (ImageView) findViewById(R.id.mobile_signal);
mMobileType = (ImageView) findViewById(R.id.mobile_type);
- mSpacer = findViewById(R.id.spacer);
mAirplane = (ImageView) findViewById(R.id.airplane);
+ mWifiAirplaneSpacer = findViewById(R.id.wifi_airplane_spacer);
apply();
}
@@ -90,7 +90,6 @@
mMobileGroup = null;
mMobile = null;
mMobileType = null;
- mSpacer = null;
mAirplane = null;
super.onDetachedFromWindow();
@@ -198,10 +197,10 @@
mAirplane.setVisibility(View.GONE);
}
- if (mMobileVisible && mWifiVisible && mIsAirplaneMode) {
- mSpacer.setVisibility(View.INVISIBLE);
+ if (mIsAirplaneMode && mWifiVisible) {
+ mWifiAirplaneSpacer.setVisibility(View.VISIBLE);
} else {
- mSpacer.setVisibility(View.GONE);
+ mWifiAirplaneSpacer.setVisibility(View.GONE);
}
if (DEBUG) Log.d(TAG,
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java
index ad775cb..00e9790 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java
@@ -112,6 +112,7 @@
import com.android.systemui.BatteryMeterView;
import com.android.systemui.DemoMode;
import com.android.systemui.EventLogTags;
+import com.android.systemui.FontSizeUtils;
import com.android.systemui.R;
import com.android.systemui.doze.DozeService;
import com.android.systemui.keyguard.KeyguardViewMediator;
@@ -1228,11 +1229,12 @@
+ " icon=" + icon);
StatusBarIconView view = new StatusBarIconView(mContext, slot, null);
view.set(icon);
- mStatusIcons.addView(view, viewIndex, new LinearLayout.LayoutParams(mIconSize, mIconSize));
+ mStatusIcons.addView(view, viewIndex, new LinearLayout.LayoutParams(
+ LayoutParams.WRAP_CONTENT, mIconSize));
view = new StatusBarIconView(mContext, slot, null);
view.set(icon);
- mStatusIconsKeyguard.addView(view, viewIndex,
- new LinearLayout.LayoutParams(mIconSize, mIconSize));
+ mStatusIconsKeyguard.addView(view, viewIndex, new LinearLayout.LayoutParams(
+ LayoutParams.WRAP_CONTENT, mIconSize));
}
public void updateIcon(String slot, int index, int viewIndex,
@@ -3057,6 +3059,7 @@
updateDisplaySize(); // populates mDisplayMetrics
updateResources();
+ updateClockSize();
repositionNavigationBar();
updateExpandedViewPos(EXPANDED_LEAVE_ALONE);
updateShowSearchHoldoff();
@@ -3128,6 +3131,13 @@
}
}
+ private void updateClockSize() {
+ if (mStatusBarView == null) return;
+ TextView clock = (TextView) mStatusBarView.findViewById(R.id.clock);
+ if (clock != null) {
+ FontSizeUtils.updateFontSize(clock, R.dimen.status_bar_clock_size);
+ }
+ }
protected void loadDimens() {
final Resources res = mContext.getResources();
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/policy/KeyButtonView.java b/packages/SystemUI/src/com/android/systemui/statusbar/policy/KeyButtonView.java
index 10f457a..d9a3e14 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/policy/KeyButtonView.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/KeyButtonView.java
@@ -46,7 +46,8 @@
private static final String TAG = "StatusBar.KeyButtonView";
private static final boolean DEBUG = false;
- public static final float DEFAULT_QUIESCENT_ALPHA = 0.70f;
+ // TODO: Get rid of this
+ public static final float DEFAULT_QUIESCENT_ALPHA = 1f;
private long mDownTime;
private int mCode;
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/policy/LocationControllerImpl.java b/packages/SystemUI/src/com/android/systemui/statusbar/policy/LocationControllerImpl.java
index d5b2548..61ed095 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/policy/LocationControllerImpl.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/LocationControllerImpl.java
@@ -42,8 +42,7 @@
// The name of the placeholder corresponding to the location request status icon.
// This string corresponds to config_statusBarIcons in core/res/res/values/config.xml.
public static final String LOCATION_STATUS_ICON_PLACEHOLDER = "location";
- public static final int LOCATION_STATUS_ICON_ID
- = R.drawable.stat_sys_device_access_location_found;
+ public static final int LOCATION_STATUS_ICON_ID = R.drawable.stat_sys_location;
private static final int[] mHighPowerRequestAppOpArray
= new int[] {AppOpsManager.OP_MONITOR_HIGH_POWER_LOCATION};
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/policy/NetworkControllerImpl.java b/packages/SystemUI/src/com/android/systemui/statusbar/policy/NetworkControllerImpl.java
index 9b59814..4a6f1a8 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/policy/NetworkControllerImpl.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/NetworkControllerImpl.java
@@ -63,7 +63,7 @@
static final boolean DEBUG = false;
static final boolean CHATTY = false; // additional diagnostics, but not logspew
- private static final int FLIGHT_MODE_ICON = R.drawable.stat_sys_signal_flightmode;
+ private static final int FLIGHT_MODE_ICON = R.drawable.stat_sys_airplane_mode;
private static final int ROAMING_ICON = R.drawable.stat_sys_data_fully_connected_roam;
// telephony
@@ -833,7 +833,7 @@
visible = false;
}
} else {
- iconId = R.drawable.stat_sys_no_sim;
+ iconId = 0;
mNoSim = true;
visible = false; // no SIM? no data
}
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/policy/UserSwitcherController.java b/packages/SystemUI/src/com/android/systemui/statusbar/policy/UserSwitcherController.java
index adb71e7..e4b1945 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/policy/UserSwitcherController.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/UserSwitcherController.java
@@ -188,7 +188,7 @@
}
}
- if (canCreateUser) {
+ if (!mSimpleUserSwitcher && canCreateUser) {
records.add(new UserRecord(null /* info */, null /* picture */,
false /* isGuest */, false /* isCurrent */, true /* isAddUser */,
createIsRestricted));
diff --git a/policy/src/com/android/internal/policy/impl/PhoneWindow.java b/policy/src/com/android/internal/policy/impl/PhoneWindow.java
index 93591a9..81a838a 100644
--- a/policy/src/com/android/internal/policy/impl/PhoneWindow.java
+++ b/policy/src/com/android/internal/policy/impl/PhoneWindow.java
@@ -264,7 +264,7 @@
private Transition mSharedElementReturnTransition = USE_DEFAULT_TRANSITION;
private Transition mSharedElementExitTransition = null;
private Transition mSharedElementReenterTransition = USE_DEFAULT_TRANSITION;
- private Boolean mAllowExitTransitionOverlap;
+ private Boolean mAllowReturnTransitionOverlap;
private Boolean mAllowEnterTransitionOverlap;
private long mBackgroundFadeDurationMillis = -1;
private Boolean mSharedElementsUseOverlay;
@@ -3549,9 +3549,9 @@
mAllowEnterTransitionOverlap = getWindowStyle().getBoolean(
R.styleable.Window_windowAllowEnterTransitionOverlap, true);
}
- if (mAllowExitTransitionOverlap == null) {
- mAllowExitTransitionOverlap = getWindowStyle().getBoolean(
- R.styleable.Window_windowAllowExitTransitionOverlap, true);
+ if (mAllowReturnTransitionOverlap == null) {
+ mAllowReturnTransitionOverlap = getWindowStyle().getBoolean(
+ R.styleable.Window_windowAllowReturnTransitionOverlap, true);
}
if (mBackgroundFadeDurationMillis < 0) {
mBackgroundFadeDurationMillis = getWindowStyle().getInteger(
@@ -4017,13 +4017,13 @@
}
@Override
- public void setAllowExitTransitionOverlap(boolean allowExitTransitionOverlap) {
- mAllowExitTransitionOverlap = allowExitTransitionOverlap;
+ public void setAllowReturnTransitionOverlap(boolean allowExitTransitionOverlap) {
+ mAllowReturnTransitionOverlap = allowExitTransitionOverlap;
}
@Override
- public boolean getAllowExitTransitionOverlap() {
- return (mAllowExitTransitionOverlap == null) ? true : mAllowExitTransitionOverlap;
+ public boolean getAllowReturnTransitionOverlap() {
+ return (mAllowReturnTransitionOverlap == null) ? true : mAllowReturnTransitionOverlap;
}
@Override
diff --git a/services/core/java/com/android/server/ConnectivityService.java b/services/core/java/com/android/server/ConnectivityService.java
index ef0b155..3bab1bf 100644
--- a/services/core/java/com/android/server/ConnectivityService.java
+++ b/services/core/java/com/android/server/ConnectivityService.java
@@ -4816,7 +4816,8 @@
result.setType(networkType);
return result;
} else {
- NetworkInfo result = new NetworkInfo(networkType);
+ NetworkInfo result = new NetworkInfo(
+ networkType, 0, ConnectivityManager.getNetworkTypeName(networkType), "");
result.setDetailedState(NetworkInfo.DetailedState.DISCONNECTED, null, null);
return result;
}
diff --git a/services/core/java/com/android/server/am/ActivityManagerService.java b/services/core/java/com/android/server/am/ActivityManagerService.java
index a3a5709..008ec99 100755
--- a/services/core/java/com/android/server/am/ActivityManagerService.java
+++ b/services/core/java/com/android/server/am/ActivityManagerService.java
@@ -8685,7 +8685,8 @@
@Override
public void startLockTaskModeOnCurrent() throws RemoteException {
- checkCallingPermission(android.Manifest.permission.MANAGE_ACTIVITY_STACKS);
+ enforceCallingPermission(android.Manifest.permission.MANAGE_ACTIVITY_STACKS,
+ "startLockTaskModeOnCurrent");
ActivityRecord r = null;
synchronized (this) {
r = mStackSupervisor.topRunningActivityLocked();
@@ -8727,7 +8728,8 @@
@Override
public void stopLockTaskModeOnCurrent() throws RemoteException {
- checkCallingPermission(android.Manifest.permission.MANAGE_ACTIVITY_STACKS);
+ enforceCallingPermission(android.Manifest.permission.MANAGE_ACTIVITY_STACKS,
+ "stopLockTaskModeOnCurrent");
long ident = Binder.clearCallingIdentity();
try {
stopLockTaskMode();