Loading api/current.xml +11 −0 Original line number Diff line number Diff line Loading @@ -50858,6 +50858,17 @@ visibility="public" > </method> <method name="hasChanged" return="boolean" abstract="false" native="false" synchronized="false" static="false" final="false" deprecated="not deprecated" visibility="public" > </method> <method name="load" return="void" abstract="false" core/java/android/gesture/GestureLibraries.java +7 −3 Original line number Diff line number Diff line Loading @@ -61,17 +61,21 @@ public final class GestureLibraries { } public boolean save() { if (!mStore.hasChanged()) return true; final File file = mPath; if (!file.canWrite()) return false; if (!file.getParentFile().exists()) { if (!file.getParentFile().mkdirs()) { final File parentFile = file.getParentFile(); if (!parentFile.exists()) { if (!parentFile.mkdirs()) { return false; } } boolean result = false; try { //noinspection ResultOfMethodCallIgnored file.createNewFile(); mStore.save(new FileOutputStream(file), true); result = true; } catch (FileNotFoundException e) { Loading core/java/android/gesture/GestureOverlayView.java +15 −8 Original line number Diff line number Diff line Loading @@ -287,8 +287,10 @@ public class GestureOverlayView extends FrameLayout { path.computeBounds(bounds, true); mPath.rewind(); mPath.addPath(path, (getWidth() - bounds.width()) / 2.0f, (getHeight() - bounds.height()) / 2.0f); mPath.addPath(path, -bounds.left + (getWidth() - bounds.width()) / 2.0f, -bounds.top + (getHeight() - bounds.height()) / 2.0f); mResetGesture = true; invalidate(); } Loading Loading @@ -367,10 +369,10 @@ public class GestureOverlayView extends FrameLayout { } public void clear(boolean animated) { clear(animated, false); clear(animated, false, true); } private void clear(boolean animated, boolean fireActionPerformed) { private void clear(boolean animated, boolean fireActionPerformed, boolean immediate) { setPaintAlpha(255); removeCallbacks(mFadingOut); mResetGesture = false; Loading @@ -389,15 +391,19 @@ public class GestureOverlayView extends FrameLayout { mIsFadingOut = false; mFadingHasStarted = false; if (fireActionPerformed) { postDelayed(mFadingOut, mFadeOffset); } else if (mHandleGestureActions) { if (immediate) { mCurrentGesture = null; mPath.rewind(); invalidate(); } else if (fireActionPerformed) { postDelayed(mFadingOut, mFadeOffset); } else if (mGestureStrokeType == GESTURE_STROKE_TYPE_MULTIPLE) { mFadingOut.resetMultipleStrokes = true; postDelayed(mFadingOut, mFadeOffset); } else { mCurrentGesture = null; mPath.rewind(); invalidate(); } } } Loading Loading @@ -647,7 +653,8 @@ public class GestureOverlayView extends FrameLayout { listeners.get(i).onGestureEnded(this, event); } clear(mHandleGestureActions && mFadeEnabled, mHandleGestureActions && mIsGesturing); clear(mHandleGestureActions && mFadeEnabled, mHandleGestureActions && mIsGesturing, false); } else { cancelGesture(event); Loading core/java/android/gesture/GestureStore.java +4 −4 Original line number Diff line number Diff line Loading @@ -206,6 +206,10 @@ public class GestureStore { } } public boolean hasChanged() { return mChanged; } /** * Save the gesture library */ Loading @@ -214,10 +218,6 @@ public class GestureStore { } public void save(OutputStream stream, boolean closeStream) throws IOException { if (!mChanged) { return; } DataOutputStream out = null; try { Loading Loading
api/current.xml +11 −0 Original line number Diff line number Diff line Loading @@ -50858,6 +50858,17 @@ visibility="public" > </method> <method name="hasChanged" return="boolean" abstract="false" native="false" synchronized="false" static="false" final="false" deprecated="not deprecated" visibility="public" > </method> <method name="load" return="void" abstract="false"
core/java/android/gesture/GestureLibraries.java +7 −3 Original line number Diff line number Diff line Loading @@ -61,17 +61,21 @@ public final class GestureLibraries { } public boolean save() { if (!mStore.hasChanged()) return true; final File file = mPath; if (!file.canWrite()) return false; if (!file.getParentFile().exists()) { if (!file.getParentFile().mkdirs()) { final File parentFile = file.getParentFile(); if (!parentFile.exists()) { if (!parentFile.mkdirs()) { return false; } } boolean result = false; try { //noinspection ResultOfMethodCallIgnored file.createNewFile(); mStore.save(new FileOutputStream(file), true); result = true; } catch (FileNotFoundException e) { Loading
core/java/android/gesture/GestureOverlayView.java +15 −8 Original line number Diff line number Diff line Loading @@ -287,8 +287,10 @@ public class GestureOverlayView extends FrameLayout { path.computeBounds(bounds, true); mPath.rewind(); mPath.addPath(path, (getWidth() - bounds.width()) / 2.0f, (getHeight() - bounds.height()) / 2.0f); mPath.addPath(path, -bounds.left + (getWidth() - bounds.width()) / 2.0f, -bounds.top + (getHeight() - bounds.height()) / 2.0f); mResetGesture = true; invalidate(); } Loading Loading @@ -367,10 +369,10 @@ public class GestureOverlayView extends FrameLayout { } public void clear(boolean animated) { clear(animated, false); clear(animated, false, true); } private void clear(boolean animated, boolean fireActionPerformed) { private void clear(boolean animated, boolean fireActionPerformed, boolean immediate) { setPaintAlpha(255); removeCallbacks(mFadingOut); mResetGesture = false; Loading @@ -389,15 +391,19 @@ public class GestureOverlayView extends FrameLayout { mIsFadingOut = false; mFadingHasStarted = false; if (fireActionPerformed) { postDelayed(mFadingOut, mFadeOffset); } else if (mHandleGestureActions) { if (immediate) { mCurrentGesture = null; mPath.rewind(); invalidate(); } else if (fireActionPerformed) { postDelayed(mFadingOut, mFadeOffset); } else if (mGestureStrokeType == GESTURE_STROKE_TYPE_MULTIPLE) { mFadingOut.resetMultipleStrokes = true; postDelayed(mFadingOut, mFadeOffset); } else { mCurrentGesture = null; mPath.rewind(); invalidate(); } } } Loading Loading @@ -647,7 +653,8 @@ public class GestureOverlayView extends FrameLayout { listeners.get(i).onGestureEnded(this, event); } clear(mHandleGestureActions && mFadeEnabled, mHandleGestureActions && mIsGesturing); clear(mHandleGestureActions && mFadeEnabled, mHandleGestureActions && mIsGesturing, false); } else { cancelGesture(event); Loading
core/java/android/gesture/GestureStore.java +4 −4 Original line number Diff line number Diff line Loading @@ -206,6 +206,10 @@ public class GestureStore { } } public boolean hasChanged() { return mChanged; } /** * Save the gesture library */ Loading @@ -214,10 +218,6 @@ public class GestureStore { } public void save(OutputStream stream, boolean closeStream) throws IOException { if (!mChanged) { return; } DataOutputStream out = null; try { Loading