diff options
49 files changed, 703 insertions, 508 deletions
diff --git a/cmds/dumpstate/dumpstate.c b/cmds/dumpstate/dumpstate.c index 52b2d919fd57..c2beb746e939 100644 --- a/cmds/dumpstate/dumpstate.c +++ b/cmds/dumpstate/dumpstate.c @@ -197,6 +197,8 @@ static void dumpstate() { dump_file(NULL, "/sys/class/leds/lcd-backlight/registers"); printf("\n"); + run_command("LIST OF OPEN FILES", 10, "su", "root", "lsof", NULL); + #ifdef BOARD_HAS_DUMPSTATE printf("========================================================\n"); printf("== Board\n"); diff --git a/core/java/android/webkit/WebView.java b/core/java/android/webkit/WebView.java index 7620a63ab393..2bb9da157788 100644 --- a/core/java/android/webkit/WebView.java +++ b/core/java/android/webkit/WebView.java @@ -537,7 +537,10 @@ public class WebView extends AbsoluteLayout // This should be ViewConfiguration.getTapTimeout() // But system time out is 100ms, which is too short for the browser. // In the browser, if it switches out of tap too soon, jump tap won't work. - private static final int TAP_TIMEOUT = 200; + // In addition, a double tap on a trackpad will always have a duration of + // 300ms, so this value must be at least that (otherwise we will timeout the + // first tap and convert it to a long press). + private static final int TAP_TIMEOUT = 300; // This should be ViewConfiguration.getLongPressTimeout() // But system time out is 500ms, which is too short for the browser. // With a short timeout, it's difficult to treat trigger a short press. diff --git a/core/java/android/widget/TextView.java b/core/java/android/widget/TextView.java index efcd8ab4dc5c..d78050a97897 100644 --- a/core/java/android/widget/TextView.java +++ b/core/java/android/widget/TextView.java @@ -16,11 +16,6 @@ package android.widget; -import com.android.internal.util.FastMath; -import com.android.internal.widget.EditableInputConnection; - -import org.xmlpull.v1.XmlPullParserException; - import android.R; import android.content.ClipData; import android.content.ClipData.Item; @@ -139,6 +134,11 @@ import android.view.inputmethod.InputConnection; import android.view.inputmethod.InputMethodManager; import android.widget.RemoteViews.RemoteView; +import com.android.internal.util.FastMath; +import com.android.internal.widget.EditableInputConnection; + +import org.xmlpull.v1.XmlPullParserException; + import java.io.IOException; import java.lang.ref.WeakReference; import java.text.BreakIterator; @@ -2493,12 +2493,14 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener * @attr ref android.R.styleable#TextView_scrollHorizontally */ public void setHorizontallyScrolling(boolean whether) { - mHorizontallyScrolling = whether; + if (mHorizontallyScrolling != whether) { + mHorizontallyScrolling = whether; - if (mLayout != null) { - nullLayouts(); - requestLayout(); - invalidate(); + if (mLayout != null) { + nullLayouts(); + requestLayout(); + invalidate(); + } } } @@ -2699,13 +2701,15 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener * @attr ref android.R.styleable#TextView_lineSpacingMultiplier */ public void setLineSpacing(float add, float mult) { - mSpacingMult = mult; - mSpacingAdd = add; + if (mSpacingAdd != add || mSpacingMult != mult) { + mSpacingAdd = add; + mSpacingMult = mult; - if (mLayout != null) { - nullLayouts(); - requestLayout(); - invalidate(); + if (mLayout != null) { + nullLayouts(); + requestLayout(); + invalidate(); + } } } @@ -6276,12 +6280,14 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener * @attr ref android.R.styleable#TextView_includeFontPadding */ public void setIncludeFontPadding(boolean includepad) { - mIncludePad = includepad; + if (mIncludePad != includepad) { + mIncludePad = includepad; - if (mLayout != null) { - nullLayouts(); - requestLayout(); - invalidate(); + if (mLayout != null) { + nullLayouts(); + requestLayout(); + invalidate(); + } } } @@ -6605,7 +6611,6 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener } else { // Dynamic width, so we have no choice but to request a new // view layout with a new text layout. - nullLayouts(); requestLayout(); invalidate(); @@ -7098,12 +7103,15 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener * @attr ref android.R.styleable#TextView_ellipsize */ public void setEllipsize(TextUtils.TruncateAt where) { - mEllipsize = where; + // TruncateAt is an enum. != comparison is ok between these singleton objects. + if (mEllipsize != where) { + mEllipsize = where; - if (mLayout != null) { - nullLayouts(); - requestLayout(); - invalidate(); + if (mLayout != null) { + nullLayouts(); + requestLayout(); + invalidate(); + } } } diff --git a/core/java/com/android/internal/widget/ActionBarView.java b/core/java/com/android/internal/widget/ActionBarView.java index d72a78dba960..a3d0fe4a9c57 100644 --- a/core/java/com/android/internal/widget/ActionBarView.java +++ b/core/java/com/android/internal/widget/ActionBarView.java @@ -462,9 +462,10 @@ public class ActionBarView extends AbsActionBarView { mTitle = title; if (mTitleView != null) { mTitleView.setText(title); - mTitleLayout.setVisibility(mExpandedActionView != null && + final boolean visible = mExpandedActionView == null && (mDisplayOptions & ActionBar.DISPLAY_SHOW_TITLE) != 0 && - (!TextUtils.isEmpty(mTitle) || !TextUtils.isEmpty(mSubtitle)) ? VISIBLE : GONE); + (!TextUtils.isEmpty(mTitle) || !TextUtils.isEmpty(mSubtitle)); + mTitleLayout.setVisibility(visible ? VISIBLE : GONE); } if (mLogoNavItem != null) { mLogoNavItem.setTitle(title); @@ -480,9 +481,10 @@ public class ActionBarView extends AbsActionBarView { if (mSubtitleView != null) { mSubtitleView.setText(subtitle); mSubtitleView.setVisibility(subtitle != null ? VISIBLE : GONE); - mTitleLayout.setVisibility(mExpandedActionView != null && + final boolean visible = mExpandedActionView == null && (mDisplayOptions & ActionBar.DISPLAY_SHOW_TITLE) != 0 && - (!TextUtils.isEmpty(mTitle) || !TextUtils.isEmpty(mSubtitle)) ? VISIBLE : GONE); + (!TextUtils.isEmpty(mTitle) || !TextUtils.isEmpty(mSubtitle)); + mTitleLayout.setVisibility(visible ? VISIBLE : GONE); } } @@ -1349,6 +1351,7 @@ public class ActionBarView extends AbsActionBarView { removeView(mExpandedActionView); removeView(mExpandedHomeLayout); + mExpandedActionView = null; if ((mDisplayOptions & ActionBar.DISPLAY_SHOW_HOME) != 0) { mHomeLayout.setVisibility(VISIBLE); } @@ -1368,7 +1371,6 @@ public class ActionBarView extends AbsActionBarView { if (mCustomNavView != null && (mDisplayOptions & ActionBar.DISPLAY_SHOW_CUSTOM) != 0) { mCustomNavView.setVisibility(VISIBLE); } - mExpandedActionView = null; mExpandedHomeLayout.setIcon(null); mCurrentExpandedItem = null; requestLayout(); diff --git a/core/res/res/anim-sw600dp/activity_close_enter.xml b/core/res/res/anim-sw600dp/activity_close_enter.xml new file mode 100644 index 000000000000..c17786f94704 --- /dev/null +++ b/core/res/res/anim-sw600dp/activity_close_enter.xml @@ -0,0 +1,24 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- +/* +** Copyright 2009, 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. +*/ +--> + +<set xmlns:android="http://schemas.android.com/apk/res/android" android:zAdjustment="normal"> + <alpha android:fromAlpha="1.0" android:toAlpha="1.0" + android:fillEnabled="true" android:fillBefore="true" android:fillAfter="true" + android:duration="@android:integer/config_shortAnimTime"/> +</set>
\ No newline at end of file diff --git a/core/res/res/anim-sw600dp/activity_close_exit.xml b/core/res/res/anim-sw600dp/activity_close_exit.xml new file mode 100644 index 000000000000..ba336402b16d --- /dev/null +++ b/core/res/res/anim-sw600dp/activity_close_exit.xml @@ -0,0 +1,33 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- +/* +** Copyright 2009, 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. +*/ +--> + +<set xmlns:android="http://schemas.android.com/apk/res/android" + android:shareInterpolator="false" + android:zAdjustment="top"> + <alpha android:fromAlpha="1.0" android:toAlpha="0.0" + android:interpolator="@interpolator/accelerate_decelerate" + android:fillEnabled="true" android:fillBefore="true" android:fillAfter="true" + android:duration="@android:integer/config_shortAnimTime"/> + <scale android:fromXScale="1.0" android:toXScale="1.1" + android:fromYScale="1.0" android:toYScale="1.1" + android:pivotX="50%p" android:pivotY="50%p" + android:interpolator="@interpolator/accelerate_decelerate" + android:fillEnabled="true" android:fillBefore="true" android:fillAfter="true" + android:duration="@android:integer/config_shortAnimTime"/> +</set>
\ No newline at end of file diff --git a/core/res/res/anim-sw600dp/activity_open_enter.xml b/core/res/res/anim-sw600dp/activity_open_enter.xml new file mode 100644 index 000000000000..c4b5ed79c3c2 --- /dev/null +++ b/core/res/res/anim-sw600dp/activity_open_enter.xml @@ -0,0 +1,35 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- +/* +** Copyright 2009, 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. +*/ +--> + +<set xmlns:android="http://schemas.android.com/apk/res/android" + android:shareInterpolator="false" + android:zAdjustment="top"> + <alpha android:fromAlpha="0.0" android:toAlpha="1.0" + android:interpolator="@interpolator/accelerate_decelerate" + android:fillEnabled="true" + android:fillBefore="false" android:fillAfter="false" + android:duration="@android:integer/config_shortAnimTime"/> + <scale android:fromXScale="1.1" android:toXScale="1.0" + android:fromYScale="1.1" android:toYScale="1.0" + android:pivotX="50%p" android:pivotY="50%p" + android:interpolator="@interpolator/accelerate_decelerate" + android:fillEnabled="true" + android:fillBefore="false" android:fillAfter="false" + android:duration="@android:integer/config_shortAnimTime"/> +</set>
\ No newline at end of file diff --git a/core/res/res/anim-sw600dp/activity_open_exit.xml b/core/res/res/anim-sw600dp/activity_open_exit.xml new file mode 100644 index 000000000000..b386b8bc19ed --- /dev/null +++ b/core/res/res/anim-sw600dp/activity_open_exit.xml @@ -0,0 +1,24 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- +/* +** Copyright 2009, 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. +*/ +--> + +<set xmlns:android="http://schemas.android.com/apk/res/android" android:zAdjustment="normal"> + <alpha android:fromAlpha="1.0" android:toAlpha="1.0" + android:fillEnabled="true" android:fillBefore="false" android:fillAfter="false" + android:duration="@android:integer/config_shortAnimTime"/> +</set>
\ No newline at end of file diff --git a/core/res/res/anim-sw600dp/wallpaper_close_enter.xml b/core/res/res/anim-sw600dp/wallpaper_close_enter.xml new file mode 100644 index 000000000000..b65ecf489412 --- /dev/null +++ b/core/res/res/anim-sw600dp/wallpaper_close_enter.xml @@ -0,0 +1,38 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- +/* +** Copyright 2009, 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. +*/ +--> + +<set xmlns:android="http://schemas.android.com/apk/res/android" + android:detachWallpaper="true" android:shareInterpolator="false" + android:zAdjustment="top"> + + <alpha android:fromAlpha="0.0" android:toAlpha="1.0" + android:interpolator="@interpolator/decelerate_cubic" + android:fillEnabled="true" + android:fillBefore="false" android:fillAfter="true" + android:duration="@android:integer/config_shortAnimTime"/> + + <scale android:fromXScale="2.0" android:toXScale="1.0" + android:fromYScale="0.1" android:toYScale="1.0" + android:pivotX="50%p" android:pivotY="50%p" + android:interpolator="@interpolator/decelerate_quint" + android:fillEnabled="true" + android:fillBefore="false" android:fillAfter="true" + android:duration="@android:integer/config_shortAnimTime"/> + +</set>
\ No newline at end of file diff --git a/core/res/res/anim-sw600dp/wallpaper_close_exit.xml b/core/res/res/anim-sw600dp/wallpaper_close_exit.xml new file mode 100644 index 000000000000..fabfacc463e0 --- /dev/null +++ b/core/res/res/anim-sw600dp/wallpaper_close_exit.xml @@ -0,0 +1,28 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- +/* +** Copyright 2009, 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. +*/ +--> + +<set xmlns:android="http://schemas.android.com/apk/res/android" + android:detachWallpaper="false" android:shareInterpolator="false" + android:zAdjustment="normal"> + <alpha android:fromAlpha="1.0" android:toAlpha="1.0" + android:interpolator="@interpolator/decelerate_cubic" + android:fillEnabled="true" + android:fillBefore="true" android:fillAfter="true" + android:duration="@android:integer/config_shortAnimTime"/> +</set>
\ No newline at end of file diff --git a/core/res/res/anim-sw600dp/wallpaper_open_enter.xml b/core/res/res/anim-sw600dp/wallpaper_open_enter.xml new file mode 100644 index 000000000000..96bdf42811a4 --- /dev/null +++ b/core/res/res/anim-sw600dp/wallpaper_open_enter.xml @@ -0,0 +1,28 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- +/* +** Copyright 2009, 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. +*/ +--> + +<set xmlns:android="http://schemas.android.com/apk/res/android" + android:detachWallpaper="false" android:shareInterpolator="false" + android:zAdjustment="normal"> + <alpha android:fromAlpha="1.0" android:toAlpha="1.0" + android:interpolator="@interpolator/accelerate_cubic" + android:fillEnabled="true" + android:fillBefore="true" android:fillAfter="true" + android:duration="@android:integer/config_shortAnimTime"/> +</set>
\ No newline at end of file diff --git a/core/res/res/anim-sw600dp/wallpaper_open_exit.xml b/core/res/res/anim-sw600dp/wallpaper_open_exit.xml new file mode 100644 index 000000000000..d7bcc5c62f5f --- /dev/null +++ b/core/res/res/anim-sw600dp/wallpaper_open_exit.xml @@ -0,0 +1,40 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- +/* +** Copyright 2009, 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. +*/ +--> + +<set xmlns:android="http://schemas.android.com/apk/res/android" + android:detachWallpaper="true" android:shareInterpolator="false" + android:zAdjustment="top"> + + + <alpha android:fromAlpha="1.0" android:toAlpha="0.0" + android:interpolator="@interpolator/accelerate_cubic" + android:fillEnabled="true" + android:fillBefore="true" android:fillAfter="false" + android:duration="@android:integer/config_shortAnimTime"/> + + + <scale android:fromXScale="1.0" android:toXScale="2.0" + android:fromYScale="1.0" android:toYScale="0.1" + android:pivotX="50%p" android:pivotY="50%p" + android:interpolator="@interpolator/accelerate_quint" + android:fillEnabled="true" + android:fillBefore="true" android:fillAfter="false" + android:duration="@android:integer/config_shortAnimTime" /> + +</set>
\ No newline at end of file diff --git a/core/res/res/anim/activity_close_enter.xml b/core/res/res/anim/activity_close_enter.xml index 4260c0893eaf..c17786f94704 100644 --- a/core/res/res/anim/activity_close_enter.xml +++ b/core/res/res/anim/activity_close_enter.xml @@ -3,29 +3,22 @@ /* ** Copyright 2009, 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 +** 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 +** 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. +** 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. */ --> -<set xmlns:android="http://schemas.android.com/apk/res/android" - android:zAdjustment="top" - android:shareInterpolator="false"> - <scale android:fromXScale="0.975" android:toXScale="1.0" - android:fromYScale="0.975" android:toYScale="1.0" - android:pivotX="50%p" android:pivotY="50%p" - android:interpolator="@interpolator/decelerate_quint" - android:duration="@android:integer/config_activityDefaultDur" /> - <alpha android:fromAlpha="0.0" android:toAlpha="1.0" - android:interpolator="@interpolator/decelerate_cubic" - android:duration="@android:integer/config_activityDefaultDur"/> +<set xmlns:android="http://schemas.android.com/apk/res/android" android:zAdjustment="normal"> + <alpha android:fromAlpha="1.0" android:toAlpha="1.0" + android:fillEnabled="true" android:fillBefore="true" android:fillAfter="true" + android:duration="@android:integer/config_shortAnimTime"/> </set>
\ No newline at end of file diff --git a/core/res/res/anim/activity_close_exit.xml b/core/res/res/anim/activity_close_exit.xml index 8c97ee8a8cb5..e560a41108d3 100644 --- a/core/res/res/anim/activity_close_exit.xml +++ b/core/res/res/anim/activity_close_exit.xml @@ -3,26 +3,31 @@ /* ** Copyright 2009, 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 +** 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 +** 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. +** 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. */ --> <set xmlns:android="http://schemas.android.com/apk/res/android" - android:zAdjustment="normal" - android:shareInterpolator="false"> - <scale android:fromXScale="1.0" android:toXScale="1.075" - android:fromYScale="1.0" android:toYScale="1.075" + android:shareInterpolator="false" + android:zAdjustment="top"> + <alpha android:fromAlpha="1.0" android:toAlpha="0.0" + android:interpolator="@interpolator/accelerate_decelerate" + android:fillEnabled="true" android:fillBefore="true" android:fillAfter="true" + android:duration="@android:integer/config_shortAnimTime"/> + <scale android:fromXScale="1.0" android:toXScale="1.15" + android:fromYScale="1.0" android:toYScale="1.15" android:pivotX="50%p" android:pivotY="50%p" - android:interpolator="@interpolator/decelerate_quint" - android:duration="@android:integer/config_activityDefaultDur" /> + android:interpolator="@interpolator/accelerate_decelerate" + android:fillEnabled="true" android:fillBefore="true" android:fillAfter="true" + android:duration="@android:integer/config_shortAnimTime"/> </set>
\ No newline at end of file diff --git a/core/res/res/anim/activity_open_enter.xml b/core/res/res/anim/activity_open_enter.xml index 5f6ac68935f7..55fcc0dc7d75 100644 --- a/core/res/res/anim/activity_open_enter.xml +++ b/core/res/res/anim/activity_open_enter.xml @@ -3,26 +3,33 @@ /* ** Copyright 2009, 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 +** 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 +** 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. +** 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. */ --> <set xmlns:android="http://schemas.android.com/apk/res/android" - android:zAdjustment="normal" - android:shareInterpolator="false"> - <scale android:fromXScale="1.125" android:toXScale="1.0" - android:fromYScale="1.125" android:toYScale="1.0" + android:shareInterpolator="false" + android:zAdjustment="top"> + <alpha android:fromAlpha="0.0" android:toAlpha="1.0" + android:interpolator="@interpolator/accelerate_decelerate" + android:fillEnabled="true" + android:fillBefore="false" android:fillAfter="false" + android:duration="@android:integer/config_shortAnimTime"/> + <scale android:fromXScale="1.15" android:toXScale="1.0" + android:fromYScale="1.15" android:toYScale="1.0" android:pivotX="50%p" android:pivotY="50%p" - android:interpolator="@interpolator/decelerate_quint" - android:duration="@android:integer/config_activityDefaultDur" /> + android:interpolator="@interpolator/accelerate_decelerate" + android:fillEnabled="true" + android:fillBefore="false" android:fillAfter="false" + android:duration="@android:integer/config_shortAnimTime"/> </set>
\ No newline at end of file diff --git a/core/res/res/anim/activity_open_exit.xml b/core/res/res/anim/activity_open_exit.xml index 08b22b96a099..b386b8bc19ed 100644 --- a/core/res/res/anim/activity_open_exit.xml +++ b/core/res/res/anim/activity_open_exit.xml @@ -3,29 +3,22 @@ /* ** Copyright 2009, 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 +** 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 +** 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. +** 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. */ --> -<set xmlns:android="http://schemas.android.com/apk/res/android" - android:zAdjustment="top" - android:shareInterpolator="false"> - <scale android:fromXScale="1.0" android:toXScale="0.975" - android:fromYScale="1.0" android:toYScale="0.975" - android:pivotX="50%p" android:pivotY="50%p" - android:interpolator="@interpolator/linear" - android:duration="@android:integer/config_activityDefaultDur" /> - <alpha android:fromAlpha="1.0" android:toAlpha="0.0" - android:interpolator="@interpolator/decelerate_cubic" - android:duration="@android:integer/config_activityDefaultDur"/> +<set xmlns:android="http://schemas.android.com/apk/res/android" android:zAdjustment="normal"> + <alpha android:fromAlpha="1.0" android:toAlpha="1.0" + android:fillEnabled="true" android:fillBefore="false" android:fillAfter="false" + android:duration="@android:integer/config_shortAnimTime"/> </set>
\ No newline at end of file diff --git a/core/res/res/anim/app_starting_exit.xml b/core/res/res/anim/app_starting_exit.xml index 6c255d00d9b2..ee8d80bb0a74 100644 --- a/core/res/res/anim/app_starting_exit.xml +++ b/core/res/res/anim/app_starting_exit.xml @@ -19,6 +19,6 @@ --> <set xmlns:android="http://schemas.android.com/apk/res/android" android:interpolator="@interpolator/decelerate_quad"> - <alpha android:fromAlpha="1.0" android:toAlpha="0.0" android:duration="@android:integer/config_mediumAnimTime" /> + <alpha android:fromAlpha="1.0" android:toAlpha="0.0" android:duration="160" /> </set> diff --git a/core/res/res/anim/lock_screen_behind_enter.xml b/core/res/res/anim/lock_screen_behind_enter.xml index 6c7782e74d24..232096c76a52 100644 --- a/core/res/res/anim/lock_screen_behind_enter.xml +++ b/core/res/res/anim/lock_screen_behind_enter.xml @@ -19,18 +19,10 @@ <set xmlns:android="http://schemas.android.com/apk/res/android" android:detachWallpaper="true" android:shareInterpolator="false"> - <scale - android:fromXScale="0.9" android:toXScale="1.0" - android:fromYScale="0.9" android:toYScale="1.0" - android:pivotX="50%p" android:pivotY="50%p" - android:fillEnabled="true" android:fillBefore="true" - android:interpolator="@interpolator/decelerate_cubic" - android:startOffset="@android:integer/config_mediumAnimTime" - android:duration="@android:integer/config_mediumAnimTime" /> <alpha android:fromAlpha="0" android:toAlpha="1.0" android:fillEnabled="true" android:fillBefore="true" android:interpolator="@interpolator/decelerate_quad" - android:startOffset="@android:integer/config_mediumAnimTime" - android:duration="@android:integer/config_mediumAnimTime"/> + android:startOffset="@android:integer/config_shortAnimTime" + android:duration="300"/> </set>
\ No newline at end of file diff --git a/core/res/res/anim/lock_screen_exit.xml b/core/res/res/anim/lock_screen_exit.xml index d9c3a3379f67..c4b6fcb525fb 100644 --- a/core/res/res/anim/lock_screen_exit.xml +++ b/core/res/res/anim/lock_screen_exit.xml @@ -17,19 +17,18 @@ */ --> + <set xmlns:android="http://schemas.android.com/apk/res/android" - android:zAdjustment="top" - android:shareInterpolator="false"> - <scale - android:fromXScale="1.0" android:toXScale="1.2" - android:fromYScale="1.0" android:toYScale="1.2" - android:pivotX="50%p" android:pivotY="50%p" - android:fillEnabled="true" android:fillAfter="true" - android:interpolator="@interpolator/accelerate_quint" - android:duration="@android:integer/config_mediumAnimTime" /> - <alpha - android:fromAlpha="1.0" android:toAlpha="0" - android:fillEnabled="true" android:fillAfter="true" - android:interpolator="@interpolator/accelerate_quad" - android:duration="@android:integer/config_mediumAnimTime"/> + android:shareInterpolator="false" + android:zAdjustment="top"> + <alpha android:fromAlpha="1.0" android:toAlpha="0.0" + android:interpolator="@interpolator/accelerate_decelerate" + android:fillEnabled="true" android:fillBefore="true" android:fillAfter="true" + android:duration="@android:integer/config_shortAnimTime"/> + <scale android:fromXScale="1.0" android:toXScale="1.15" + android:fromYScale="1.0" android:toYScale="1.15" + android:pivotX="50%p" android:pivotY="50%p" + android:interpolator="@interpolator/accelerate_decelerate" + android:fillEnabled="true" android:fillBefore="true" android:fillAfter="true" + android:duration="@android:integer/config_shortAnimTime"/> </set>
\ No newline at end of file diff --git a/core/res/res/anim/task_close_enter.xml b/core/res/res/anim/task_close_enter.xml index 66d982f033d3..2cc3943834ab 100644 --- a/core/res/res/anim/task_close_enter.xml +++ b/core/res/res/anim/task_close_enter.xml @@ -3,17 +3,17 @@ /* ** Copyright 2009, 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 +** 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 +** 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. +** 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. */ --> @@ -24,11 +24,11 @@ android:pivotX="50%p" android:pivotY="50%p" android:fillEnabled="true" android:fillBefore="true" android:interpolator="@interpolator/decelerate_quint" - android:startOffset="160" - android:duration="300" /> + android:startOffset="150" + android:duration="250" /> <alpha android:fromAlpha="0" android:toAlpha="1.0" android:fillEnabled="true" android:fillBefore="true" android:interpolator="@interpolator/decelerate_quint" - android:startOffset="160" - android:duration="300"/> + android:startOffset="150" + android:duration="250"/> </set> diff --git a/core/res/res/anim/task_close_exit.xml b/core/res/res/anim/task_close_exit.xml index 312946b38f1d..fded0beeb626 100644 --- a/core/res/res/anim/task_close_exit.xml +++ b/core/res/res/anim/task_close_exit.xml @@ -3,17 +3,17 @@ /* ** Copyright 2009, 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 +** 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 +** 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. +** 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. */ --> @@ -24,9 +24,9 @@ android:pivotX="50%p" android:pivotY="50%p" android:fillEnabled="true" android:fillAfter="true" android:interpolator="@interpolator/accelerate_cubic" - android:duration="160" /> + android:duration="150" /> <alpha android:fromAlpha="1.0" android:toAlpha="0" android:fillEnabled="true" android:fillAfter="true" android:interpolator="@interpolator/decelerate_cubic" - android:duration="160"/> + android:duration="150"/> </set>
\ No newline at end of file diff --git a/core/res/res/anim/task_open_enter.xml b/core/res/res/anim/task_open_enter.xml index 3dda79765aa2..c8ffaaf76f5b 100644 --- a/core/res/res/anim/task_open_enter.xml +++ b/core/res/res/anim/task_open_enter.xml @@ -3,17 +3,17 @@ /* ** Copyright 2009, 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 +** 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 +** 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. +** 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. */ --> @@ -24,11 +24,11 @@ android:pivotX="50%p" android:pivotY="50%p" android:fillEnabled="true" android:fillBefore="true" android:interpolator="@interpolator/decelerate_quint" - android:startOffset="160" - android:duration="300" /> + android:startOffset="150" + android:duration="250" /> <alpha android:fromAlpha="0" android:toAlpha="1.0" android:fillEnabled="true" android:fillBefore="true" android:interpolator="@interpolator/decelerate_quint" - android:startOffset="160" - android:duration="300"/> + android:startOffset="150" + android:duration="250"/> </set>
\ No newline at end of file diff --git a/core/res/res/anim/task_open_exit.xml b/core/res/res/anim/task_open_exit.xml index e377c2a3874c..06f3fc4481d6 100644 --- a/core/res/res/anim/task_open_exit.xml +++ b/core/res/res/anim/task_open_exit.xml @@ -3,17 +3,17 @@ /* ** Copyright 2009, 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 +** 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 +** 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. +** 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. */ --> @@ -24,9 +24,9 @@ android:pivotX="50%p" android:pivotY="50%p" android:fillEnabled="true" android:fillAfter="true" android:interpolator="@interpolator/accelerate_cubic" - android:duration="160" /> + android:duration="150" /> <alpha android:fromAlpha="1.0" android:toAlpha="0" android:fillEnabled="true" android:fillAfter="true" android:interpolator="@interpolator/decelerate_cubic" - android:duration="160"/> + android:duration="150"/> </set>
\ No newline at end of file diff --git a/core/res/res/anim/wallpaper_close_enter.xml b/core/res/res/anim/wallpaper_close_enter.xml index e05345dc16cb..1cbe3ec063dd 100644 --- a/core/res/res/anim/wallpaper_close_enter.xml +++ b/core/res/res/anim/wallpaper_close_enter.xml @@ -3,32 +3,50 @@ /* ** Copyright 2009, 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 +** 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 +** 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 +** 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. */ --> <set xmlns:android="http://schemas.android.com/apk/res/android" - android:detachWallpaper="true" android:shareInterpolator="false"> - <scale android:fromXScale="1.0" android:toXScale="1.0" - android:fromYScale=".9" android:toYScale="1.0" - android:pivotX="50%p" android:pivotY="50%p" - android:fillEnabled="true" android:fillBefore="true" - android:interpolator="@interpolator/decelerate_quint" - android:startOffset="200" - android:duration="300" /> - <alpha android:fromAlpha="0" android:toAlpha="1.0" - android:fillEnabled="true" android:fillBefore="true" - android:interpolator="@interpolator/decelerate_quint" - android:startOffset="200" - android:duration="300"/> -</set> + android:detachWallpaper="true" android:shareInterpolator="false" + android:zAdjustment="top"> + + <alpha android:fromAlpha="0.0" android:toAlpha="0.5" + android:interpolator="@interpolator/accelerate_cubic" + android:fillEnabled="true" + android:fillBefore="true" android:fillAfter="false" + android:duration="140"/> + <alpha android:fromAlpha="0.5" android:toAlpha="1.0" + android:interpolator="@interpolator/decelerate_cubic" + android:fillEnabled="true" + android:fillBefore="false" android:fillAfter="true" + android:startOffset="140" + android:duration="140"/> + + <scale android:fromXScale="2.0" android:toXScale="1.5" + android:fromYScale="0.01" android:toYScale="0.495" + android:pivotX="50%p" android:pivotY="50%p" + android:interpolator="@interpolator/accelerate_quint" + android:fillEnabled="true" + android:fillBefore="true" android:fillAfter="false" + android:duration="140"/> + <scale android:fromXScale="1.5" android:toXScale="1.0" + android:fromYScale="0.495" android:toYScale="1.0" + android:pivotX="50%p" android:pivotY="50%p" + android:interpolator="@interpolator/decelerate_quint" + android:fillEnabled="true" + android:fillBefore="false" android:fillAfter="true" + android:startOffset="140" + android:duration="140"/> + +</set>
\ No newline at end of file diff --git a/core/res/res/anim/wallpaper_close_exit.xml b/core/res/res/anim/wallpaper_close_exit.xml index df7acc9e0a5a..ebeae6efc50b 100644 --- a/core/res/res/anim/wallpaper_close_exit.xml +++ b/core/res/res/anim/wallpaper_close_exit.xml @@ -3,30 +3,26 @@ /* ** Copyright 2009, 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 +** 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 +** 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 +** 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. */ --> <set xmlns:android="http://schemas.android.com/apk/res/android" - android:detachWallpaper="true" android:shareInterpolator="false"> - <scale android:fromXScale="1.0" android:toXScale="0.9" - android:fromYScale="1.0" android:toYScale="0.9" - android:pivotX="50%p" android:pivotY="50%p" - android:fillEnabled="true" android:fillAfter="true" - android:interpolator="@interpolator/decelerate_quint" - android:duration="300" /> - <alpha android:fromAlpha="1.0" android:toAlpha="0" - android:fillEnabled="true" android:fillAfter="true" + android:detachWallpaper="false" android:shareInterpolator="false" + android:zAdjustment="normal"> + <alpha android:fromAlpha="1.0" android:toAlpha="1.0" android:interpolator="@interpolator/decelerate_cubic" - android:duration="150"/> + android:fillEnabled="true" + android:fillBefore="true" android:fillAfter="true" + android:duration="280"/> </set> diff --git a/core/res/res/anim/wallpaper_enter.xml b/core/res/res/anim/wallpaper_enter.xml index b28dbd456529..2993a2d9a0ed 100644 --- a/core/res/res/anim/wallpaper_enter.xml +++ b/core/res/res/anim/wallpaper_enter.xml @@ -25,4 +25,4 @@ android:duration="@android:integer/config_longAnimTime" /> <alpha android:fromAlpha="0.0" android:toAlpha="1.0" android:duration="@android:integer/config_longAnimTime" /> -</set> +</set>
\ No newline at end of file diff --git a/core/res/res/anim/wallpaper_exit.xml b/core/res/res/anim/wallpaper_exit.xml index 87ed20bc2787..5d5b38aef63b 100644 --- a/core/res/res/anim/wallpaper_exit.xml +++ b/core/res/res/anim/wallpaper_exit.xml @@ -25,4 +25,4 @@ android:duration="@android:integer/config_longAnimTime" /> <alpha android:fromAlpha="1.0" android:toAlpha="0.0" android:duration="@android:integer/config_longAnimTime"/> -</set> +</set>
\ No newline at end of file diff --git a/core/res/res/anim/wallpaper_intra_close_enter.xml b/core/res/res/anim/wallpaper_intra_close_enter.xml index a499a0972c84..caeb8205532b 100644 --- a/core/res/res/anim/wallpaper_intra_close_enter.xml +++ b/core/res/res/anim/wallpaper_intra_close_enter.xml @@ -3,32 +3,26 @@ /* ** Copyright 2009, 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 +** 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 +** 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 +** 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. */ --> <set xmlns:android="http://schemas.android.com/apk/res/android" - android:detachWallpaper="true" android:shareInterpolator="false"> - <scale android:fromXScale=".95" android:toXScale="1.0" - android:fromYScale=".95" android:toYScale="1.0" - android:pivotX="50%p" android:pivotY="50%p" - android:fillEnabled="true" android:fillBefore="true" - android:interpolator="@interpolator/decelerate_quint" - android:startOffset="160" - android:duration="300" /> - <alpha android:fromAlpha="0" android:toAlpha="1.0" - android:fillEnabled="true" android:fillBefore="true" - android:interpolator="@interpolator/decelerate_cubic" - android:startOffset="160" - android:duration="300"/> -</set>
\ No newline at end of file + android:detachWallpaper="true" android:shareInterpolator="false" + android:zAdjustment="normal"> + <alpha android:fromAlpha="0.0" android:toAlpha="1.0" + android:interpolator="@interpolator/accelerate_cubic" + android:fillEnabled="true" + android:fillBefore="true" android:fillAfter="true" + android:duration="280"/> +</set> diff --git a/core/res/res/anim/wallpaper_intra_close_exit.xml b/core/res/res/anim/wallpaper_intra_close_exit.xml index 12a8df52985b..c61587e2f5f7 100644 --- a/core/res/res/anim/wallpaper_intra_close_exit.xml +++ b/core/res/res/anim/wallpaper_intra_close_exit.xml @@ -3,30 +3,28 @@ /* ** Copyright 2009, 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 +** 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 +** 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 +** 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. */ --> <set xmlns:android="http://schemas.android.com/apk/res/android" - android:detachWallpaper="true" android:shareInterpolator="false"> - <scale android:fromXScale="1.0" android:toXScale="1.0" - android:fromYScale="1.0" android:toYScale="0.0" - android:pivotX="50%p" android:pivotY="50%p" - android:fillEnabled="true" android:fillAfter="true" - android:interpolator="@interpolator/linear" - android:duration="300" /> - <alpha android:fromAlpha="1.0" android:toAlpha="0" - android:fillEnabled="true" android:fillAfter="true" - android:interpolator="@interpolator/decelerate_cubic" - android:duration="120"/> -</set>
\ No newline at end of file + android:detachWallpaper="true" android:shareInterpolator="false" + android:zAdjustment="top"> + + <alpha android:fromAlpha="1.0" android:toAlpha="0.0" + android:interpolator="@interpolator/accelerate_cubic" + android:fillEnabled="true" + android:fillBefore="true" android:fillAfter="true" + android:duration="280"/> + +</set> diff --git a/core/res/res/anim/wallpaper_intra_open_enter.xml b/core/res/res/anim/wallpaper_intra_open_enter.xml index a499a0972c84..939e240f12db 100644 --- a/core/res/res/anim/wallpaper_intra_open_enter.xml +++ b/core/res/res/anim/wallpaper_intra_open_enter.xml @@ -3,32 +3,28 @@ /* ** Copyright 2009, 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 +** 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 +** 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 +** 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. */ --> <set xmlns:android="http://schemas.android.com/apk/res/android" - android:detachWallpaper="true" android:shareInterpolator="false"> - <scale android:fromXScale=".95" android:toXScale="1.0" - android:fromYScale=".95" android:toYScale="1.0" - android:pivotX="50%p" android:pivotY="50%p" - android:fillEnabled="true" android:fillBefore="true" - android:interpolator="@interpolator/decelerate_quint" - android:startOffset="160" - android:duration="300" /> - <alpha android:fromAlpha="0" android:toAlpha="1.0" - android:fillEnabled="true" android:fillBefore="true" - android:interpolator="@interpolator/decelerate_cubic" - android:startOffset="160" - android:duration="300"/> + android:detachWallpaper="true" android:shareInterpolator="false" + android:zAdjustment="top"> + + <alpha android:fromAlpha="0.0" android:toAlpha="1.0" + android:interpolator="@interpolator/decelerate_cubic" + android:fillEnabled="true" + android:fillBefore="true" android:fillAfter="true" + android:duration="280"/> + </set>
\ No newline at end of file diff --git a/core/res/res/anim/wallpaper_intra_open_exit.xml b/core/res/res/anim/wallpaper_intra_open_exit.xml index 12a8df52985b..6edd83a4cacb 100644 --- a/core/res/res/anim/wallpaper_intra_open_exit.xml +++ b/core/res/res/anim/wallpaper_intra_open_exit.xml @@ -3,30 +3,27 @@ /* ** Copyright 2009, 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 +** 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 +** 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 +** 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. */ --> <set xmlns:android="http://schemas.android.com/apk/res/android" - android:detachWallpaper="true" android:shareInterpolator="false"> - <scale android:fromXScale="1.0" android:toXScale="1.0" - android:fromYScale="1.0" android:toYScale="0.0" - android:pivotX="50%p" android:pivotY="50%p" - android:fillEnabled="true" android:fillAfter="true" - android:interpolator="@interpolator/linear" - android:duration="300" /> - <alpha android:fromAlpha="1.0" android:toAlpha="0" - android:fillEnabled="true" android:fillAfter="true" + android:detachWallpaper="true" android:shareInterpolator="false" + android:zAdjustment="normal"> + + <alpha android:fromAlpha="1.0" android:toAlpha="0.0" android:interpolator="@interpolator/decelerate_cubic" - android:duration="120"/> -</set>
\ No newline at end of file + android:fillEnabled="true" + android:fillBefore="true" android:fillAfter="true" + android:duration="280"/> +</set> diff --git a/core/res/res/anim/wallpaper_open_enter.xml b/core/res/res/anim/wallpaper_open_enter.xml index ff310a16b845..411ecd6798fa 100644 --- a/core/res/res/anim/wallpaper_open_enter.xml +++ b/core/res/res/anim/wallpaper_open_enter.xml @@ -3,30 +3,26 @@ /* ** Copyright 2009, 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 +** 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 +** 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 +** 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. */ --> <set xmlns:android="http://schemas.android.com/apk/res/android" - android:detachWallpaper="true" android:shareInterpolator="false"> - <scale android:fromXScale="0.95" android:toXScale="1.0" - android:fromYScale="0.95" android:toYScale="1.0" - android:pivotX="50%p" android:pivotY="50%p" - android:interpolator="@interpolator/decelerate_quint" - android:startOffset="200" - android:duration="300" /> - <alpha android:fromAlpha="0" android:toAlpha="1.0" - android:interpolator="@interpolator/decelerate_cubic" - android:startOffset="200" - android:duration="300"/> + android:detachWallpaper="false" android:shareInterpolator="false" + android:zAdjustment="normal"> + <alpha android:fromAlpha="1.0" android:toAlpha="1.0" + android:interpolator="@interpolator/accelerate_cubic" + android:fillEnabled="true" + android:fillBefore="true" android:fillAfter="true" + android:duration="280"/> </set> diff --git a/core/res/res/anim/wallpaper_open_exit.xml b/core/res/res/anim/wallpaper_open_exit.xml index 0aeb55062cc3..f9e0996ed46b 100644 --- a/core/res/res/anim/wallpaper_open_exit.xml +++ b/core/res/res/anim/wallpaper_open_exit.xml @@ -3,16 +3,16 @@ /* ** Copyright 2009, 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 +** 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 +** 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 +** 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. */ --> @@ -20,12 +20,33 @@ <set xmlns:android="http://schemas.android.com/apk/res/android" android:detachWallpaper="true" android:shareInterpolator="false" android:zAdjustment="top"> - <scale android:fromXScale="1.0" android:toXScale="1.0" - android:fromYScale="1.0" android:toYScale="0.0" - android:pivotX="50%p" android:pivotY="50%p" - android:interpolator="@interpolator/linear" - android:duration="300" /> - <alpha android:fromAlpha="1.0" android:toAlpha="0" - android:interpolator="@interpolator/decelerate_cubic" - android:duration="160"/> -</set> + + + <alpha android:fromAlpha="1.0" android:toAlpha="0.5" + android:interpolator="@interpolator/accelerate_cubic" + android:fillEnabled="true" + android:fillBefore="true" android:fillAfter="false" + android:duration="140"/> + <alpha android:fromAlpha="0.5" android:toAlpha="0.0" + android:interpolator="@interpolator/decelerate_cubic" + android:fillEnabled="true" + android:fillBefore="false" android:fillAfter="true" + android:startOffset="140" android:duration="140"/> + + + <scale android:fromXScale="1.0" android:toXScale="1.5" + android:fromYScale="1.0" android:toYScale="0.495" + android:pivotX="50%p" android:pivotY="50%p" + android:interpolator="@interpolator/accelerate_quint" + android:fillEnabled="true" + android:fillBefore="true" android:fillAfter="false" + android:duration="140" /> + <scale android:fromXScale="1.5" android:toXScale="2.0" + android:fromYScale="0.495" android:toYScale="0.0" + android:pivotX="50%p" android:pivotY="50%p" + android:interpolator="@interpolator/decelerate_quint" + android:fillEnabled="true" + android:fillBefore="false" android:fillAfter="true" + android:startOffset="140" android:duration="140" /> + +</set>
\ No newline at end of file diff --git a/docs/html/images/screens_support/compat-stretch-thumb.png b/docs/html/images/screens_support/compat-stretch-thumb.png Binary files differnew file mode 100644 index 000000000000..da2c07cd7f76 --- /dev/null +++ b/docs/html/images/screens_support/compat-stretch-thumb.png diff --git a/docs/html/images/screens_support/compat-stretch.png b/docs/html/images/screens_support/compat-stretch.png Binary files differnew file mode 100644 index 000000000000..69d81a66c6b9 --- /dev/null +++ b/docs/html/images/screens_support/compat-stretch.png diff --git a/docs/html/images/screens_support/compat-toggle.png b/docs/html/images/screens_support/compat-toggle.png Binary files differnew file mode 100644 index 000000000000..14dc59df9f09 --- /dev/null +++ b/docs/html/images/screens_support/compat-toggle.png diff --git a/docs/html/images/screens_support/compat-zoom-thumb.png b/docs/html/images/screens_support/compat-zoom-thumb.png Binary files differnew file mode 100644 index 000000000000..244800b6b6de --- /dev/null +++ b/docs/html/images/screens_support/compat-zoom-thumb.png diff --git a/docs/html/images/screens_support/compat-zoom.png b/docs/html/images/screens_support/compat-zoom.png Binary files differnew file mode 100644 index 000000000000..5f4682063a9e --- /dev/null +++ b/docs/html/images/screens_support/compat-zoom.png diff --git a/include/utils/RefBase.h b/include/utils/RefBase.h index ca170827f1b2..c7a9b7895970 100644 --- a/include/utils/RefBase.h +++ b/include/utils/RefBase.h @@ -80,9 +80,12 @@ public: void incWeak(const void* id); void decWeak(const void* id); + // acquires a strong reference if there is already one. bool attemptIncStrong(const void* id); - //! This is only safe if you have set OBJECT_LIFETIME_FOREVER. + // acquires a weak reference if there is already one. + // This is not always safe. see ProcessState.cpp and BpBinder.cpp + // for proper use. bool attemptIncWeak(const void* id); //! DEBUGGING ONLY: Get current weak ref count. @@ -116,28 +119,15 @@ public: typedef RefBase basetype; - // used to override the RefBase destruction. - class Destroyer { - friend class RefBase; - friend class weakref_type; - public: - virtual ~Destroyer(); - private: - virtual void destroy(RefBase const* base) = 0; - }; - - // Make sure to never acquire a strong reference from this function. The - // same restrictions than for destructors apply. - void setDestroyer(Destroyer* destroyer); - protected: RefBase(); virtual ~RefBase(); //! Flags for extendObjectLifetime() enum { + OBJECT_LIFETIME_STRONG = 0x0000, OBJECT_LIFETIME_WEAK = 0x0001, - OBJECT_LIFETIME_FOREVER = 0x0003 + OBJECT_LIFETIME_MASK = 0x0001 }; void extendObjectLifetime(int32_t mode); @@ -163,7 +153,7 @@ private: RefBase(const RefBase& o); RefBase& operator=(const RefBase& o); - + weakref_impl* const mRefs; }; diff --git a/libs/utils/RefBase.cpp b/libs/utils/RefBase.cpp index 8db2009587f7..37d061cb3cbb 100644 --- a/libs/utils/RefBase.cpp +++ b/libs/utils/RefBase.cpp @@ -49,11 +49,6 @@ namespace android { // --------------------------------------------------------------------------- -RefBase::Destroyer::~Destroyer() { -} - -// --------------------------------------------------------------------------- - class RefBase::weakref_impl : public RefBase::weakref_type { public: @@ -61,7 +56,6 @@ public: volatile int32_t mWeak; RefBase* const mBase; volatile int32_t mFlags; - Destroyer* mDestroyer; #if !DEBUG_REFS @@ -70,7 +64,6 @@ public: , mWeak(0) , mBase(base) , mFlags(0) - , mDestroyer(0) { } @@ -113,7 +106,7 @@ public: LOGD("\t%c ID %p (ref %d):", inc, refs->id, refs->ref); #if DEBUG_REFS_CALLSTACK_ENABLED refs->stack.dump(); -#endif; +#endif refs = refs->next; } } @@ -131,7 +124,7 @@ public: LOGD("\t%c ID %p (ref %d):", inc, refs->id, refs->ref); #if DEBUG_REFS_CALLSTACK_ENABLED refs->stack.dump(); -#endif; +#endif refs = refs->next; } } @@ -193,7 +186,7 @@ public: String8 text; { - Mutex::Autolock _l(const_cast<weakref_impl*>(this)->mMutex); + Mutex::Autolock _l(mMutex); char buf[128]; sprintf(buf, "Strong references on RefBase %p (weakref_type %p):\n", mBase, this); text.append(buf); @@ -318,7 +311,7 @@ private: } } - Mutex mMutex; + mutable Mutex mMutex; ref_entry* mStrongRefs; ref_entry* mWeakRefs; @@ -348,7 +341,7 @@ void RefBase::incStrong(const void* id) const } android_atomic_add(-INITIAL_STRONG_VALUE, &refs->mStrong); - const_cast<RefBase*>(this)->onFirstRef(); + refs->mBase->onFirstRef(); } void RefBase::decStrong(const void* id) const @@ -361,13 +354,9 @@ void RefBase::decStrong(const void* id) const #endif LOG_ASSERT(c >= 1, "decStrong() called on %p too many times", refs); if (c == 1) { - const_cast<RefBase*>(this)->onLastStrongRef(id); - if ((refs->mFlags&OBJECT_LIFETIME_WEAK) != OBJECT_LIFETIME_WEAK) { - if (refs->mDestroyer) { - refs->mDestroyer->destroy(this); - } else { - delete this; - } + refs->mBase->onLastStrongRef(id); + if ((refs->mFlags&OBJECT_LIFETIME_MASK) == OBJECT_LIFETIME_STRONG) { + delete this; } } refs->decWeak(id); @@ -391,7 +380,7 @@ void RefBase::forceIncStrong(const void* id) const android_atomic_add(-INITIAL_STRONG_VALUE, &refs->mStrong); // fall through... case 0: - const_cast<RefBase*>(this)->onFirstRef(); + refs->mBase->onFirstRef(); } } @@ -400,10 +389,6 @@ int32_t RefBase::getStrongCount() const return mRefs->mStrong; } -void RefBase::setDestroyer(RefBase::Destroyer* destroyer) { - mRefs->mDestroyer = destroyer; -} - RefBase* RefBase::weakref_type::refBase() const { return static_cast<const weakref_impl*>(this)->mBase; @@ -417,6 +402,7 @@ void RefBase::weakref_type::incWeak(const void* id) LOG_ASSERT(c >= 0, "incWeak called on %p after last weak ref", this); } + void RefBase::weakref_type::decWeak(const void* id) { weakref_impl* const impl = static_cast<weakref_impl*>(this); @@ -424,30 +410,27 @@ void RefBase::weakref_type::decWeak(const void* id) const int32_t c = android_atomic_dec(&impl->mWeak); LOG_ASSERT(c >= 1, "decWeak called on %p too many times", this); if (c != 1) return; - - if ((impl->mFlags&OBJECT_LIFETIME_WEAK) != OBJECT_LIFETIME_WEAK) { + + if ((impl->mFlags&OBJECT_LIFETIME_WEAK) == OBJECT_LIFETIME_STRONG) { + // This is the regular lifetime case. The object is destroyed + // when the last strong reference goes away. Since weakref_impl + // outlive the object, it is not destroyed in the dtor, and + // we'll have to do it here. if (impl->mStrong == INITIAL_STRONG_VALUE) { - if (impl->mBase) { - if (impl->mDestroyer) { - impl->mDestroyer->destroy(impl->mBase); - } else { - delete impl->mBase; - } - } + // Special case: we never had a strong reference, so we need to + // destroy the object now. + delete impl->mBase; } else { // LOGV("Freeing refs %p of old RefBase %p\n", this, impl->mBase); delete impl; } } else { + // less common case: lifetime is OBJECT_LIFETIME_{WEAK|FOREVER} impl->mBase->onLastWeakRef(id); - if ((impl->mFlags&OBJECT_LIFETIME_FOREVER) != OBJECT_LIFETIME_FOREVER) { - if (impl->mBase) { - if (impl->mDestroyer) { - impl->mDestroyer->destroy(impl->mBase); - } else { - delete impl->mBase; - } - } + if ((impl->mFlags&OBJECT_LIFETIME_MASK) == OBJECT_LIFETIME_WEAK) { + // this is the OBJECT_LIFETIME_WEAK case. The last weak-reference + // is gone, we can destroy the object. + delete impl->mBase; } } } @@ -569,11 +552,23 @@ RefBase::RefBase() RefBase::~RefBase() { - if ((mRefs->mFlags & OBJECT_LIFETIME_WEAK) == OBJECT_LIFETIME_WEAK) { - if (mRefs->mWeak == 0) { - delete mRefs; + if (mRefs->mStrong == INITIAL_STRONG_VALUE) { + // we never acquired a strong (and/or weak) reference on this object. + delete mRefs; + } else { + // life-time of this object is extended to WEAK or FOREVER, in + // which case weakref_impl doesn't out-live the object and we + // can free it now. + if ((mRefs->mFlags & OBJECT_LIFETIME_MASK) != OBJECT_LIFETIME_STRONG) { + // It's possible that the weak count is not 0 if the object + // re-acquired a weak reference in its destructor + if (mRefs->mWeak == 0) { + delete mRefs; + } } } + // for debugging purposes, clear this. + const_cast<weakref_impl*&>(mRefs) = NULL; } void RefBase::extendObjectLifetime(int32_t mode) diff --git a/media/java/android/media/AudioManager.java b/media/java/android/media/AudioManager.java index e613523a9b6e..da7a050d1275 100644 --- a/media/java/android/media/AudioManager.java +++ b/media/java/android/media/AudioManager.java @@ -1777,27 +1777,6 @@ public class AudioManager { /** * @hide - * Returns the current remote control client flags describing what information has changed. - * The flags are reset everytime this method is called with a valid rcClientId. - * @param rcClientId the counter value that matches the extra - * {@link AudioManager#EXTRA_REMOTE_CONTROL_CLIENT} in the - * {@link AudioManager#REMOTE_CONTROL_CLIENT_CHANGED} event - * @return the "information changed" flags from the current IRemoteControlClient from - * which information to display on the remote control can be retrieved, - * or 0 if rcClientId doesn't match the current generation counter. - */ - public int getRemoteControlClientInformationChangedFlags(int rcClientId) { - IAudioService service = getService(); - try { - return service.getRemoteControlClientInformationChangedFlags(rcClientId); - } catch (RemoteException e) { - Log.e(TAG, "Dead object in getRemoteControlClientInformationChangedFlags "+e); - return 0; - } - } - - /** - * @hide * Definitions of constants to be used in {@link android.media.IRemoteControlClient}. */ public final class RemoteControlParameters { @@ -1848,6 +1827,15 @@ public class AudioManager { /** * @hide + * The flags describing what information has changed in the current remote control client. + * + * @see #REMOTE_CONTROL_CLIENT_CHANGED_ACTION + */ + public static final String EXTRA_REMOTE_CONTROL_CLIENT_INFO_CHANGED = + "android.media.EXTRA_REMOTE_CONTROL_CLIENT_INFO_CHANGED"; + + /** + * @hide * Notifies the users of the associated remote control client that the information to display * has changed. @param eventReceiver identifier of a {@link android.content.BroadcastReceiver} diff --git a/media/java/android/media/AudioService.java b/media/java/android/media/AudioService.java index b1b11a2ae9f2..8ebb07c5f070 100644 --- a/media/java/android/media/AudioService.java +++ b/media/java/android/media/AudioService.java @@ -2157,6 +2157,7 @@ public class AudioService extends IAudioService.Stub { break; case MSG_RCDISPLAY_CLEAR: + // TODO remove log before release Log.i(TAG, "Clear remote control display"); Intent clearIntent = new Intent(AudioManager.REMOTE_CONTROL_CLIENT_CHANGED); // no extra means no IRemoteControlClient, which is a request to clear @@ -2166,17 +2167,22 @@ public class AudioService extends IAudioService.Stub { case MSG_RCDISPLAY_UPDATE: synchronized(mCurrentRcLock) { - if (mCurrentRcClient == null) { + if ((mCurrentRcClient == null) || + (!mCurrentRcClient.equals((IRemoteControlClient)msg.obj))) { // the remote control display owner has changed between the // the message to update the display was sent, and the time it // gets to be processed (now) } else { mCurrentRcClientGen++; + // TODO remove log before release Log.i(TAG, "Display/update remote control "); Intent rcClientIntent = new Intent( AudioManager.REMOTE_CONTROL_CLIENT_CHANGED); rcClientIntent.putExtra(AudioManager.EXTRA_REMOTE_CONTROL_CLIENT, mCurrentRcClientGen); + rcClientIntent.putExtra( + AudioManager.EXTRA_REMOTE_CONTROL_CLIENT_INFO_CHANGED, + msg.arg1); rcClientIntent.setFlags(Intent.FLAG_RECEIVER_REGISTERED_ONLY); mContext.sendBroadcast(rcClientIntent); } @@ -2630,7 +2636,7 @@ public class AudioService extends IAudioService.Stub { notifyTopOfAudioFocusStack(); // there's a new top of the stack, let the remote control know synchronized(mRCStack) { - checkUpdateRemoteControlDisplay(); + checkUpdateRemoteControlDisplay(RC_INFO_ALL); } } } else { @@ -2672,7 +2678,7 @@ public class AudioService extends IAudioService.Stub { notifyTopOfAudioFocusStack(); // there's a new top of the stack, let the remote control know synchronized(mRCStack) { - checkUpdateRemoteControlDisplay(); + checkUpdateRemoteControlDisplay(RC_INFO_ALL); } } } @@ -2764,7 +2770,7 @@ public class AudioService extends IAudioService.Stub { // there's a new top of the stack, let the remote control know synchronized(mRCStack) { - checkUpdateRemoteControlDisplay(); + checkUpdateRemoteControlDisplay(RC_INFO_ALL); } }//synchronized(mAudioFocusLock) @@ -2868,12 +2874,6 @@ public class AudioService extends IAudioService.Stub { AudioManager.RemoteControlParameters.FLAG_INFORMATION_CHANGED_PLAYSTATE; /** - * The flags indicating what type of information changed since the last time it was queried. - * Access protected by mCurrentRcLock. - */ - private int mCurrentRcClientInfoFlags = RC_INFO_ALL; - - /** * A monotonically increasing generation counter for mCurrentRcClient. * Only accessed with a lock on mCurrentRcLock. * No value wrap-around issues as we only act on equal values. @@ -2900,27 +2900,6 @@ public class AudioService extends IAudioService.Stub { } /** - * Returns the current flags of information that changed on the current remote control client. - * Requesting this information clears it. - * @param rcClientId the counter value that matches the extra - * {@link AudioManager#EXTRA_REMOTE_CONTROL_CLIENT} in the - * {@link AudioManager#REMOTE_CONTROL_CLIENT_CHANGED} event - * @return the flags indicating which type of information changed since the client notified - * that its information had changed. - */ - public int getRemoteControlClientInformationChangedFlags(int rcClientId) { - synchronized(mCurrentRcLock) { - if (rcClientId == mCurrentRcClientGen) { - int flags = mCurrentRcClientInfoFlags; - mCurrentRcClientInfoFlags = RC_INFO_NONE; - return flags; - } else { - return RC_INFO_NONE; - } - } - } - - /** * Inner class to monitor remote control client deaths, and remove the client for the * remote control stack if necessary. */ @@ -3113,7 +3092,6 @@ public class AudioService extends IAudioService.Stub { private void clearRemoteControlDisplay() { synchronized(mCurrentRcLock) { mCurrentRcClient = null; - mCurrentRcClientInfoFlags = RC_INFO_NONE; } mAudioHandler.sendMessage( mAudioHandler.obtainMessage(MSG_RCDISPLAY_CLEAR) ); } @@ -3123,8 +3101,9 @@ public class AudioService extends IAudioService.Stub { * Called synchronized on mRCStack * mRCStack.empty() is false */ - private void updateRemoteControlDisplay() { + private void updateRemoteControlDisplay(int infoChangedFlags) { RemoteControlStackEntry rcse = mRCStack.peek(); + int infoFlagsAboutToBeUsed = infoChangedFlags; // this is where we enforce opt-in for information display on the remote controls // with the new AudioManager.registerRemoteControlClient() API if (rcse.mRcClient == null) { @@ -3135,19 +3114,23 @@ public class AudioService extends IAudioService.Stub { synchronized(mCurrentRcLock) { if (!rcse.mRcClient.equals(mCurrentRcClient)) { // new RC client, assume every type of information shall be queried - mCurrentRcClientInfoFlags = RC_INFO_ALL; + infoFlagsAboutToBeUsed = RC_INFO_ALL; } mCurrentRcClient = rcse.mRcClient; } - mAudioHandler.sendMessage( mAudioHandler.obtainMessage(MSG_RCDISPLAY_UPDATE, 0, 0, rcse) ); + mAudioHandler.sendMessage( mAudioHandler.obtainMessage(MSG_RCDISPLAY_UPDATE, + infoFlagsAboutToBeUsed /* arg1 */, 0, rcse.mRcClient /* obj */) ); } /** * Helper function: * Called synchronized on mFocusLock, then mRCStack * Check whether the remote control display should be updated, triggers the update if required + * @param infoChangedFlags the flags corresponding to the remote control client information + * that has changed, if applicable (checking for the update conditions might trigger a + * clear, rather than an update event). */ - private void checkUpdateRemoteControlDisplay() { + private void checkUpdateRemoteControlDisplay(int infoChangedFlags) { // determine whether the remote control display should be refreshed // if either stack is empty, there is a mismatch, so clear the RC display if (mRCStack.isEmpty() || mFocusStack.isEmpty()) { @@ -3169,7 +3152,7 @@ public class AudioService extends IAudioService.Stub { return; } // refresh conditions were verified: update the remote controls - updateRemoteControlDisplay(); + updateRemoteControlDisplay(infoChangedFlags); } /** see AudioManager.registerMediaButtonEventReceiver(ComponentName eventReceiver) */ @@ -3179,7 +3162,8 @@ public class AudioService extends IAudioService.Stub { synchronized(mAudioFocusLock) { synchronized(mRCStack) { pushMediaButtonReceiver(eventReceiver); - checkUpdateRemoteControlDisplay(); + // new RC client, assume every type of information shall be queried + checkUpdateRemoteControlDisplay(RC_INFO_ALL); } } } @@ -3193,7 +3177,8 @@ public class AudioService extends IAudioService.Stub { boolean topOfStackWillChange = isCurrentRcController(eventReceiver); removeMediaButtonReceiver(eventReceiver); if (topOfStackWillChange) { - checkUpdateRemoteControlDisplay(); + // current RC client will change, assume every type of info needs to be queried + checkUpdateRemoteControlDisplay(RC_INFO_ALL); } } } @@ -3239,7 +3224,7 @@ public class AudioService extends IAudioService.Stub { // if the eventReceiver is at the top of the stack // then check for potential refresh of the remote controls if (isCurrentRcController(eventReceiver)) { - checkUpdateRemoteControlDisplay(); + checkUpdateRemoteControlDisplay(RC_INFO_ALL); } } } @@ -3251,13 +3236,7 @@ public class AudioService extends IAudioService.Stub { synchronized(mRCStack) { // only refresh if the eventReceiver is at the top of the stack if (isCurrentRcController(eventReceiver)) { - // there is a refresh request for the current event receiver: it might not be - // displayed on the remote control display, but we can cache what new - // information has changed. - synchronized(mCurrentRcLock) { - mCurrentRcClientInfoFlags |= infoFlag; - } - checkUpdateRemoteControlDisplay(); + checkUpdateRemoteControlDisplay(infoFlag); } } } diff --git a/media/java/android/media/IAudioService.aidl b/media/java/android/media/IAudioService.aidl index 1061f13072ab..c259aa34706b 100644 --- a/media/java/android/media/IAudioService.aidl +++ b/media/java/android/media/IAudioService.aidl @@ -95,8 +95,6 @@ interface IAudioService { IRemoteControlClient getRemoteControlClient(in int rcClientId); - int getRemoteControlClientInformationChangedFlags(in int rcClientId); - void notifyRemoteControlInformationChanged(in ComponentName eventReceiver, int infoFlag); void startBluetoothSco(IBinder cb); diff --git a/packages/SystemUI/src/com/android/systemui/recent/RecentsPanelView.java b/packages/SystemUI/src/com/android/systemui/recent/RecentsPanelView.java index d74b548564fc..28a5cc8dd7fc 100644 --- a/packages/SystemUI/src/com/android/systemui/recent/RecentsPanelView.java +++ b/packages/SystemUI/src/com/android/systemui/recent/RecentsPanelView.java @@ -359,7 +359,9 @@ public class RecentsPanelView extends RelativeLayout } private void createCustomAnimations(LayoutTransition transitioner) { - transitioner.setDuration(LayoutTransition.DISAPPEARING, 250); + transitioner.setDuration(200); + transitioner.setStartDelay(LayoutTransition.CHANGE_DISAPPEARING, 0); + transitioner.setAnimator(LayoutTransition.DISAPPEARING, null); } @Override diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/tablet/TabletStatusBar.java b/packages/SystemUI/src/com/android/systemui/statusbar/tablet/TabletStatusBar.java index 81b572117ed6..e78711309bb3 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/tablet/TabletStatusBar.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/tablet/TabletStatusBar.java @@ -304,8 +304,8 @@ public class TabletStatusBar extends StatusBar implements mStatusBarView.setIgnoreChildren(2, mRecentButton, mRecentsPanel); lp = new WindowManager.LayoutParams( - ViewGroup.LayoutParams.WRAP_CONTENT, - ViewGroup.LayoutParams.WRAP_CONTENT, + ViewGroup.LayoutParams.MATCH_PARENT, + ViewGroup.LayoutParams.MATCH_PARENT, WindowManager.LayoutParams.TYPE_STATUS_BAR_PANEL, WindowManager.LayoutParams.FLAG_LAYOUT_IN_SCREEN | WindowManager.LayoutParams.FLAG_ALT_FOCUSABLE_IM diff --git a/services/surfaceflinger/Layer.cpp b/services/surfaceflinger/Layer.cpp index 505c843a64e3..55b354d6c7f0 100644 --- a/services/surfaceflinger/Layer.cpp +++ b/services/surfaceflinger/Layer.cpp @@ -65,14 +65,9 @@ Layer::Layer(SurfaceFlinger* flinger, glGenTextures(1, &mTextureName); } -void Layer::destroy(RefBase const* base) { - mFlinger->destroyLayer(static_cast<LayerBase const*>(base)); -} - void Layer::onFirstRef() { LayerBaseClient::onFirstRef(); - setDestroyer(this); struct FrameQueuedListener : public SurfaceTexture::FrameAvailableListener { FrameQueuedListener(Layer* layer) : mLayer(layer) { } @@ -93,7 +88,16 @@ void Layer::onFirstRef() Layer::~Layer() { - glDeleteTextures(1, &mTextureName); + class MessageDestroyGLState : public MessageBase { + GLuint texture; + public: + MessageDestroyGLState(GLuint texture) : texture(texture) { } + virtual bool handler() { + glDeleteTextures(1, &texture); + return true; + } + }; + mFlinger->postMessageAsync( new MessageDestroyGLState(mTextureName) ); } void Layer::onFrameQueued() { diff --git a/services/surfaceflinger/Layer.h b/services/surfaceflinger/Layer.h index ddfc66683476..d3ddab4f22a0 100644 --- a/services/surfaceflinger/Layer.h +++ b/services/surfaceflinger/Layer.h @@ -45,7 +45,7 @@ class GLExtensions; // --------------------------------------------------------------------------- -class Layer : public LayerBaseClient, private RefBase::Destroyer +class Layer : public LayerBaseClient { public: Layer(SurfaceFlinger* flinger, DisplayID display, @@ -78,7 +78,6 @@ public: inline const sp<FreezeLock>& getFreezeLock() const { return mFreezeLock; } protected: - virtual void destroy(RefBase const* base); virtual void onFirstRef(); virtual void dump(String8& result, char* scratch, size_t size) const; diff --git a/services/surfaceflinger/SurfaceFlinger.cpp b/services/surfaceflinger/SurfaceFlinger.cpp index 4a2770191013..082effe699f7 100644 --- a/services/surfaceflinger/SurfaceFlinger.cpp +++ b/services/surfaceflinger/SurfaceFlinger.cpp @@ -402,9 +402,6 @@ bool SurfaceFlinger::threadLoop() { waitForEvent(); - // call Layer's destructor - handleDestroyLayers(); - // check for transactions if (UNLIKELY(mConsoleSignals)) { handleConsoleEvents(); @@ -597,31 +594,6 @@ void SurfaceFlinger::handleTransactionLocked(uint32_t transactionFlags) commitTransaction(); } -void SurfaceFlinger::destroyLayer(LayerBase const* layer) -{ - Mutex::Autolock _l(mDestroyedLayerLock); - mDestroyedLayers.add(layer); - signalEvent(); -} - -void SurfaceFlinger::handleDestroyLayers() -{ - Vector<LayerBase const *> destroyedLayers; - - { // scope for the lock - Mutex::Autolock _l(mDestroyedLayerLock); - destroyedLayers = mDestroyedLayers; - mDestroyedLayers.clear(); - } - - // call destructors without a lock held - const size_t count = destroyedLayers.size(); - for (size_t i=0 ; i<count ; i++) { - //LOGD("destroying %s", destroyedLayers[i]->getName().string()); - delete destroyedLayers[i]; - } -} - sp<FreezeLock> SurfaceFlinger::getFreezeLock() const { return new FreezeLock(const_cast<SurfaceFlinger *>(this)); diff --git a/services/surfaceflinger/SurfaceFlinger.h b/services/surfaceflinger/SurfaceFlinger.h index 15661f0129f4..6f93f5ba0ae5 100644 --- a/services/surfaceflinger/SurfaceFlinger.h +++ b/services/surfaceflinger/SurfaceFlinger.h @@ -189,7 +189,6 @@ public: status_t addLayer(const sp<LayerBase>& layer); status_t invalidateLayerVisibility(const sp<LayerBase>& layer); void invalidateHwcGeometry(); - void destroyLayer(LayerBase const* layer); sp<Layer> getLayer(const sp<ISurface>& sur) const; @@ -266,7 +265,6 @@ private: void handleConsoleEvents(); void handleTransaction(uint32_t transactionFlags); void handleTransactionLocked(uint32_t transactionFlags); - void handleDestroyLayers(); void computeVisibleRegions( const LayerVector& currentLayers, |