Loading api/current.xml +24 −0 Original line number Diff line number Diff line Loading @@ -50211,6 +50211,17 @@ visibility="public" > </method> <method name="getFadeOffset" return="long" abstract="false" native="false" synchronized="false" static="false" final="false" deprecated="not deprecated" visibility="public" > </method> <method name="getGesture" return="android.gesture.Gesture" abstract="false" Loading Loading @@ -50441,6 +50452,19 @@ <parameter name="fadeEnabled" type="boolean"> </parameter> </method> <method name="setFadeOffset" return="void" abstract="false" native="false" synchronized="false" static="false" final="false" deprecated="not deprecated" visibility="public" > <parameter name="fadeOffset" type="long"> </parameter> </method> <method name="setGesture" return="void" abstract="false" core/java/android/gesture/GestureOverlayView.java +8 −0 Original line number Diff line number Diff line Loading @@ -274,6 +274,14 @@ public class GestureOverlayView extends FrameLayout { return mCurrentGesture; } public long getFadeOffset() { return mFadeOffset; } public void setFadeOffset(long fadeOffset) { mFadeOffset = fadeOffset; } public void setGesture(Gesture gesture) { if (mCurrentGesture != null) { clear(false); Loading core/java/android/gesture/InstanceLearner.java +20 −18 Original line number Diff line number Diff line Loading @@ -26,6 +26,20 @@ import java.util.TreeMap; */ class InstanceLearner extends Learner { private static final Comparator<Prediction> sComparator = new Comparator<Prediction>() { public int compare(Prediction object1, Prediction object2) { double score1 = object1.score; double score2 = object2.score; if (score1 > score2) { return -1; } else if (score1 < score2) { return 1; } else { return 0; } } }; @Override ArrayList<Prediction> classify(int sequenceType, float[] vector) { ArrayList<Prediction> predictions = new ArrayList<Prediction>(); Loading Loading @@ -55,31 +69,19 @@ class InstanceLearner extends Learner { } } double sum = 0; // double sum = 0; for (String name : label2score.keySet()) { double score = label2score.get(name); sum += score; // sum += score; predictions.add(new Prediction(name, score)); } // normalize for (Prediction prediction : predictions) { prediction.score /= sum; } // for (Prediction prediction : predictions) { // prediction.score /= sum; // } Collections.sort(predictions, new Comparator<Prediction>() { public int compare(Prediction object1, Prediction object2) { double score1 = object1.score; double score2 = object2.score; if (score1 > score2) { return -1; } else if (score1 < score2) { return 1; } else { return 0; } } }); Collections.sort(predictions, sComparator); return predictions; } Loading core/java/android/widget/ViewSwitcher.java +0 −2 Original line number Diff line number Diff line Loading @@ -16,8 +16,6 @@ package android.widget; import java.util.Map; import android.content.Context; import android.util.AttributeSet; import android.view.View; Loading core/res/res/anim/slide_in_up.xml 0 → 100644 +23 −0 Original line number Diff line number Diff line <?xml version="1.0" encoding="utf-8"?> <!-- Copyright (C) 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. --> <translate xmlns:android="http://schemas.android.com/apk/res/android" android:fromYDelta="100%p" android:toYDelta="0" android:duration="@android:integer/config_longAnimTime" /> Loading
api/current.xml +24 −0 Original line number Diff line number Diff line Loading @@ -50211,6 +50211,17 @@ visibility="public" > </method> <method name="getFadeOffset" return="long" abstract="false" native="false" synchronized="false" static="false" final="false" deprecated="not deprecated" visibility="public" > </method> <method name="getGesture" return="android.gesture.Gesture" abstract="false" Loading Loading @@ -50441,6 +50452,19 @@ <parameter name="fadeEnabled" type="boolean"> </parameter> </method> <method name="setFadeOffset" return="void" abstract="false" native="false" synchronized="false" static="false" final="false" deprecated="not deprecated" visibility="public" > <parameter name="fadeOffset" type="long"> </parameter> </method> <method name="setGesture" return="void" abstract="false"
core/java/android/gesture/GestureOverlayView.java +8 −0 Original line number Diff line number Diff line Loading @@ -274,6 +274,14 @@ public class GestureOverlayView extends FrameLayout { return mCurrentGesture; } public long getFadeOffset() { return mFadeOffset; } public void setFadeOffset(long fadeOffset) { mFadeOffset = fadeOffset; } public void setGesture(Gesture gesture) { if (mCurrentGesture != null) { clear(false); Loading
core/java/android/gesture/InstanceLearner.java +20 −18 Original line number Diff line number Diff line Loading @@ -26,6 +26,20 @@ import java.util.TreeMap; */ class InstanceLearner extends Learner { private static final Comparator<Prediction> sComparator = new Comparator<Prediction>() { public int compare(Prediction object1, Prediction object2) { double score1 = object1.score; double score2 = object2.score; if (score1 > score2) { return -1; } else if (score1 < score2) { return 1; } else { return 0; } } }; @Override ArrayList<Prediction> classify(int sequenceType, float[] vector) { ArrayList<Prediction> predictions = new ArrayList<Prediction>(); Loading Loading @@ -55,31 +69,19 @@ class InstanceLearner extends Learner { } } double sum = 0; // double sum = 0; for (String name : label2score.keySet()) { double score = label2score.get(name); sum += score; // sum += score; predictions.add(new Prediction(name, score)); } // normalize for (Prediction prediction : predictions) { prediction.score /= sum; } // for (Prediction prediction : predictions) { // prediction.score /= sum; // } Collections.sort(predictions, new Comparator<Prediction>() { public int compare(Prediction object1, Prediction object2) { double score1 = object1.score; double score2 = object2.score; if (score1 > score2) { return -1; } else if (score1 < score2) { return 1; } else { return 0; } } }); Collections.sort(predictions, sComparator); return predictions; } Loading
core/java/android/widget/ViewSwitcher.java +0 −2 Original line number Diff line number Diff line Loading @@ -16,8 +16,6 @@ package android.widget; import java.util.Map; import android.content.Context; import android.util.AttributeSet; import android.view.View; Loading
core/res/res/anim/slide_in_up.xml 0 → 100644 +23 −0 Original line number Diff line number Diff line <?xml version="1.0" encoding="utf-8"?> <!-- Copyright (C) 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. --> <translate xmlns:android="http://schemas.android.com/apk/res/android" android:fromYDelta="100%p" android:toYDelta="0" android:duration="@android:integer/config_longAnimTime" />