summaryrefslogtreecommitdiffstats
path: root/core/java/android
diff options
context:
space:
mode:
authorSteve Kondik <steve@cyngn.com>2015-10-31 03:22:07 -0700
committerSteve Kondik <steve@cyngn.com>2015-11-01 05:06:15 -0800
commit2e724e9fe80ccf4ba8f2a98963279e4182485a60 (patch)
tree494e10e4a9f072f7142a237321f93b672893c9b7 /core/java/android
parent6146b476afdb9588cd6442fec5d090d99fbbbbb6 (diff)
downloadframeworks_base-2e724e9fe80ccf4ba8f2a98963279e4182485a60.zip
frameworks_base-2e724e9fe80ccf4ba8f2a98963279e4182485a60.tar.gz
frameworks_base-2e724e9fe80ccf4ba8f2a98963279e4182485a60.tar.bz2
Remove Qualcomm BoostFramework
* This is gonna get really sketchy with the proprietary bits, and we have our own solution. Revert all associated patches. Revert "BoostFramework: Adding config for disable packing params & scroll fix" This reverts commit a313bfae1213dcf8e0845e90f260aada5026685e. Revert "Perf: Adding hooks for IO prefetcher into framework" This reverts commit 96e75fcafbeb77427ff4407e80a5d05bf92ec732. Revert "frameworks/base: Add support for low resolution rendering" This reverts commit d5282e055963a44df64265e4a592750e31bd9901. Revert "frameworks/base: support for loading wfd whitelist dynamic libraries" This reverts commit 79a889bcf6e4c96db48bfb755b7c7e100f4800b1. Revert "ActivityTrigger: New class to invoke when activity starts/resumes" This reverts commit 20d6e3c9b06d790e5ede4b1aa585d43a7d72b560. Revert "BoostFramework to enchance performance during critical scenarios" This reverts commit 0c3a49a56f827e16d038542b0a81c0e257787995. Change-Id: Ibc81f3150f4bea572f869be688ebfade11b27307
Diffstat (limited to 'core/java/android')
-rw-r--r--core/java/android/app/Activity.java34
-rw-r--r--core/java/android/content/pm/ApplicationInfo.java12
-rw-r--r--core/java/android/util/BoostFramework.java184
-rw-r--r--core/java/android/util/ResolutionOverride.java140
-rw-r--r--core/java/android/view/SurfaceView.java19
-rw-r--r--core/java/android/widget/OverScroller.java43
-rw-r--r--core/java/android/widget/Scroller.java36
7 files changed, 1 insertions, 467 deletions
diff --git a/core/java/android/app/Activity.java b/core/java/android/app/Activity.java
index 627c854..2cb3f39 100644
--- a/core/java/android/app/Activity.java
+++ b/core/java/android/app/Activity.java
@@ -111,7 +111,6 @@ import java.lang.annotation.RetentionPolicy;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
-import android.util.BoostFramework;
/**
* An activity is a single, focused thing that the user can do. Almost all
@@ -673,10 +672,6 @@ public class Activity extends ContextThemeWrapper
Window.Callback, KeyEvent.Callback,
OnCreateContextMenuListener, ComponentCallbacks2,
Window.OnWindowDismissedCallback {
- private static BoostFramework mPerf = null;
- private static int mDragBoostPossible = -1;
- private static int mPerfLockDuration = -1;
- private static int mAsParamVal[];
private static final String TAG = "Activity";
private static final boolean DEBUG_LIFECYCLE = false;
@@ -2764,35 +2759,6 @@ public class Activity extends ContextThemeWrapper
* @return boolean Return true if this event was consumed.
*/
public boolean dispatchTouchEvent(MotionEvent ev) {
- if(mDragBoostPossible == -1) {
- mDragBoostPossible = 0;
- String currentActivity = getPackageName();
- String[] activityList = getResources().getStringArray(
- com.android.internal.R.array.boost_activityList);
- if(activityList != null){
- for (String match : activityList) {
- if (currentActivity.indexOf(match) != -1){
- mDragBoostPossible = 1;
- break;
- }
- }
- }
- }
- if (mDragBoostPossible == 1) {
- if (mPerf == null){
- mPerf = new BoostFramework();
- }
- if(mPerfLockDuration == -1){
- mPerfLockDuration = getResources().getInteger(
- com.android.internal.R.integer.ascrollboost_timeout);
- mAsParamVal = getResources().getIntArray(
- com.android.internal.R.array.ascrollboost_param_value);
- }
- mPerf.perfLockAcquireTouch(ev,
- getResources().getDisplayMetrics(),
- mPerfLockDuration, mAsParamVal);
- }
-
if (ev.getAction() == MotionEvent.ACTION_DOWN) {
onUserInteraction();
}
diff --git a/core/java/android/content/pm/ApplicationInfo.java b/core/java/android/content/pm/ApplicationInfo.java
index 23e8b80..1933fc9 100644
--- a/core/java/android/content/pm/ApplicationInfo.java
+++ b/core/java/android/content/pm/ApplicationInfo.java
@@ -466,13 +466,6 @@ public class ApplicationInfo extends PackageItemInfo implements Parcelable {
public int privateFlags;
/**
- * Boolean indicating whether the resolution of the SurfaceView associated
- * with this appplication can be overriden.
- * {@hide}
- */
- public int overrideRes = 0;
-
- /**
* The required smallest screen width the application can run on. If 0,
* nothing has been specified. Comes from
* {@link android.R.styleable#AndroidManifestSupportsScreens_requiresSmallestWidthDp
@@ -775,7 +768,6 @@ public class ApplicationInfo extends PackageItemInfo implements Parcelable {
theme = orig.theme;
flags = orig.flags;
privateFlags = orig.privateFlags;
- overrideRes = orig.overrideRes;
requiresSmallestWidthDp = orig.requiresSmallestWidthDp;
compatibleWidthLimitDp = orig.compatibleWidthLimitDp;
largestWidthLimitDp = orig.largestWidthLimitDp;
@@ -831,7 +823,6 @@ public class ApplicationInfo extends PackageItemInfo implements Parcelable {
dest.writeInt(theme);
dest.writeInt(flags);
dest.writeInt(privateFlags);
- dest.writeInt(overrideRes);
dest.writeInt(requiresSmallestWidthDp);
dest.writeInt(compatibleWidthLimitDp);
dest.writeInt(largestWidthLimitDp);
@@ -886,7 +877,6 @@ public class ApplicationInfo extends PackageItemInfo implements Parcelable {
theme = source.readInt();
flags = source.readInt();
privateFlags = source.readInt();
- overrideRes = source.readInt();
requiresSmallestWidthDp = source.readInt();
compatibleWidthLimitDp = source.readInt();
largestWidthLimitDp = source.readInt();
@@ -1027,7 +1017,6 @@ public class ApplicationInfo extends PackageItemInfo implements Parcelable {
/** {@hide} */ public void setResourcePath(String resourcePath) { scanPublicSourceDir = resourcePath; }
/** {@hide} */ public void setBaseResourcePath(String baseResourcePath) { publicSourceDir = baseResourcePath; }
/** {@hide} */ public void setSplitResourcePaths(String[] splitResourcePaths) { splitPublicSourceDirs = splitResourcePaths; }
- /** {@hide} */ public void setOverrideRes(int overrideResolution) { overrideRes = overrideResolution; }
/** {@hide} */ public String getCodePath() { return scanSourceDir; }
/** {@hide} */ public String getBaseCodePath() { return sourceDir; }
@@ -1035,5 +1024,4 @@ public class ApplicationInfo extends PackageItemInfo implements Parcelable {
/** {@hide} */ public String getResourcePath() { return scanPublicSourceDir; }
/** {@hide} */ public String getBaseResourcePath() { return publicSourceDir; }
/** {@hide} */ public String[] getSplitResourcePaths() { return splitSourceDirs; }
- /** {@hide} */ public int canOverrideRes() { return overrideRes; }
}
diff --git a/core/java/android/util/BoostFramework.java b/core/java/android/util/BoostFramework.java
deleted file mode 100644
index e71f04e..0000000
--- a/core/java/android/util/BoostFramework.java
+++ /dev/null
@@ -1,184 +0,0 @@
-/*
- * Copyright (c) 2015, The Linux Foundation. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above
- * copyright notice, this list of conditions and the following
- * disclaimer in the documentation and/or other materials provided
- * with the distribution.
- * * Neither the name of The Linux Foundation nor the names of its
- * contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
- * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
- * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
- * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-package android.util;
-
-import android.util.Log;
-import dalvik.system.PathClassLoader;
-import java.lang.reflect.Constructor;
-import java.lang.reflect.Method;
-import java.lang.System;
-import android.view.MotionEvent;
-import android.util.DisplayMetrics;
-
-/** @hide */
-public class BoostFramework {
-
- private static final String TAG = "BoostFramework";
- private static final String PERFORMANCE_JAR = "/system/framework/QPerformance.jar";
- private static final String PERFORMANCE_CLASS = "com.qualcomm.qti.Performance";
-
-/** @hide */
- private static boolean mIsLoaded = false;
- private static Method mAcquireFunc = null;
- private static Method mReleaseFunc = null;
- private static Method mAcquireTouchFunc = null;
- private static Method mIOPStart = null;
- private static Method mIOPStop = null;
- private static Constructor<Class> mConstructor = null;
-
-/** @hide */
- private Object mPerf = null;
-
-/** @hide */
- public BoostFramework() {
-
- if (mIsLoaded == false) {
- try {
- Class perfClass;
- PathClassLoader perfClassLoader;
-
- perfClassLoader = new PathClassLoader(PERFORMANCE_JAR,
- ClassLoader.getSystemClassLoader());
- perfClass = perfClassLoader.loadClass(PERFORMANCE_CLASS);
- mConstructor = perfClass.getConstructor();
-
- Class[] argClasses = new Class[] {int.class, int[].class};
- mAcquireFunc = perfClass.getDeclaredMethod("perfLockAcquire", argClasses);
- Log.v(TAG,"mAcquireFunc method = " + mAcquireFunc);
-
- argClasses = new Class[] {};
- mReleaseFunc = perfClass.getDeclaredMethod("perfLockRelease", argClasses);
- Log.v(TAG,"mReleaseFunc method = " + mReleaseFunc);
-
- argClasses = new Class[] {MotionEvent.class, DisplayMetrics.class, int.class, int[].class};
- mAcquireTouchFunc = perfClass.getDeclaredMethod("perfLockAcquireTouch", argClasses);
- Log.v(TAG,"mAcquireTouchFunc method = " + mAcquireTouchFunc);
-
- argClasses = new Class[] {int.class, String.class};
- mIOPStart = perfClass.getDeclaredMethod("perfIOPrefetchStart", argClasses);
- Log.v(TAG,"mIOPStart method = " + mIOPStart);
-
- argClasses = new Class[] {};
- mIOPStop = perfClass.getDeclaredMethod("perfIOPrefetchStop", argClasses);
- Log.v(TAG,"mIOPStop method = " + mIOPStop);
-
- mIsLoaded = true;
- }
- catch(Exception e) {
- Log.e(TAG,"BoostFramework() : Exception_1 = " + e);
- }
- }
-
- try {
- if (mConstructor != null) {
- mPerf = mConstructor.newInstance();
- }
- }
- catch(Exception e) {
- Log.e(TAG,"BoostFramework() : Exception_2 = " + e);
- }
-
- Log.v(TAG,"BoostFramework() : mPerf = " + mPerf);
- }
-
-/** @hide */
-/* private static void loadNative() {
- if(!isLoaded){
- //System.loadLibrary("perf_jni");
- System.loadLibrary("qti_performance");
- isLoaded=true;
- }
- return;
- }
-*/
-
-/** @hide */
- public int perfLockAcquire(int duration, int... list) {
- int ret = -1;
- try {
- Object retVal = mAcquireFunc.invoke(mPerf, duration, list);
- ret = (int)retVal;
- } catch(Exception e) {
- Log.e(TAG,"Exception " + e);
- }
- return ret;
- }
-
-/** @hide */
- public int perfLockRelease() {
- int ret = -1;
- try {
- Object retVal = mReleaseFunc.invoke(mPerf);
- ret = (int)retVal;
- } catch(Exception e) {
- Log.e(TAG,"Exception " + e);
- }
- return ret;
- }
-/** @hide */
- public int perfLockAcquireTouch(MotionEvent ev, DisplayMetrics metrics,
- int duration, int... list) {
- int ret = -1;
- try {
- Object retVal = mAcquireTouchFunc.invoke(mPerf, ev, metrics, duration, list);
- ret = (int)retVal;
- } catch(Exception e) {
- Log.e(TAG,"Exception " + e);
- }
- return ret;
- }
-
-/** @hide */
- public int perfIOPrefetchStart(int pid, String pkg_name)
- {
- int ret = -1;
- try {
- Object retVal = mIOPStart.invoke(mPerf,pid,pkg_name);
- ret = (int)retVal;
- } catch(Exception e) {
- Log.e(TAG,"Exception " + e);
- }
- return ret;
- }
-
-/** @hide */
- public int perfIOPrefetchStop()
- {
- int ret = -1;
- try {
- Object retVal = mIOPStop.invoke(mPerf);
- ret = (int)retVal;
- } catch(Exception e) {
- Log.e(TAG,"Exception " + e);
- }
- return ret;
- }
-
-};
diff --git a/core/java/android/util/ResolutionOverride.java b/core/java/android/util/ResolutionOverride.java
deleted file mode 100644
index d9fc1be..0000000
--- a/core/java/android/util/ResolutionOverride.java
+++ /dev/null
@@ -1,140 +0,0 @@
-/* Copyright (c) 2015, The Linux Foundation. All rights reserved.
-*
-* Redistribution and use in source and binary forms, with or without
-* modification, are permitted provided that the following conditions are
-* met:
-* * Redistributions of source code must retain the above copyright
-* notice, this list of conditions and the following disclaimer.
-* * Redistributions in binary form must reproduce the above
-* copyright notice, this list of conditions and the following
-* disclaimer in the documentation and/or other materials provided
-* with the distribution.
-* * Neither the name of The Linux Foundation nor the names of its
-* contributors may be used to endorse or promote products derived
-* from this software without specific prior written permission.
-*
-* THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
-* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
-* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
-* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
-* BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
-* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
-* OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
-* IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-*
-*/
-
-package android.util;
-
-import android.content.ComponentName;
-import android.content.pm.ActivityInfo;
-import android.content.pm.PackageManager;
-import android.content.res.Configuration;
-import android.graphics.Matrix;
-import android.os.SystemProperties;
-import android.util.Log;
-import android.view.MotionEvent;
-import android.view.SurfaceView;
-import android.view.View;
-
-/** @hide */
-public class ResolutionOverride {
- /** @hide */
- static private final boolean DEBUG = false;
- static private final String TAG = "ResolutionOverride";
- private static final String RES_OVERRIDE = "persist.debug.app_res_override";
- private boolean mIsEnabled = false;
- private int mOverrideXres = 0;
- private int mOverrideYres = 0;
-
- /** @hide */
- public ResolutionOverride(SurfaceView view) {
- boolean enable = (view.getContext().getApplicationInfo().canOverrideRes() == 1);
- int orientation = view.getResources().getConfiguration().orientation;
-
- if(enable && (orientation == Configuration.ORIENTATION_PORTRAIT ||
- orientation == Configuration.ORIENTATION_LANDSCAPE)) {
- String resStr = SystemProperties.get(RES_OVERRIDE, null);
-
- if (resStr != null && resStr.length() > 0) {
- resStr = resStr.toLowerCase();
- final int pos = resStr.indexOf('x');
- if (pos > 0 && resStr.lastIndexOf('x') == pos) {
- try {
- mOverrideXres = Integer.parseInt(resStr.substring(0, pos));
- mOverrideYres = Integer.parseInt(resStr.substring(pos + 1));
- } catch (NumberFormatException ex) {
- Log.e(TAG, "Error in extracting the overriding xres and yres");
- }
- }
- }
-
- if(orientation == Configuration.ORIENTATION_LANDSCAPE) {
- int tmp = mOverrideXres;
- mOverrideXres = mOverrideYres;
- mOverrideYres = tmp;
- }
-
- if(mOverrideXres > 0 && mOverrideYres > 0) {
- mIsEnabled = true;
- if (DEBUG) Log.i(TAG, "Orientation: " + orientation +
- " Overriding resolution to" + " xres: " + mOverrideXres
- + " yres: " + mOverrideYres);
- }
- }
- }
-
- /** @hide */
- public void setFixedSize(SurfaceView view) {
- if(!mIsEnabled) {
- return;
- }
-
- view.getHolder().setFixedSize(mOverrideXres, mOverrideYres);
- }
-
- /** @hide */
- public void handleTouch(SurfaceView view, MotionEvent ev) {
- if(!mIsEnabled) {
- return;
- }
-
- Matrix matrix = new Matrix();
- //mOverride{Xres, Yres} are already swapped if orientation is landscape
- float xscale = (mOverrideXres * 1.0f) / view.getWidth();
- float yscale = (mOverrideYres * 1.0f) / view.getHeight();
-
- if (DEBUG) Log.i(TAG, "Before overriding the touch event x/y : " + ev);
- matrix.postScale(xscale, yscale);
- ev.transform(matrix);
- if (DEBUG) Log.i(TAG, "After overriding the touch event x/y : " + ev);
- }
-
- /** @hide */
- public void handleResize(final SurfaceView surfaceView) {
- if(!mIsEnabled) {
- return;
- }
-
- /* Change the visibility to GONE and back to VISIBLE and post it
- * on the main thread for the touch events to be effective on the
- * changed SurfaceView with the new dimensions
- */
- surfaceView.post(new Runnable() {
- @Override
- public void run() {
- surfaceView.setVisibility(View.GONE);
- }
- });
-
- surfaceView.postDelayed(new Runnable() {
- @Override
- public void run() {
- surfaceView.setVisibility(View.VISIBLE);
- }
- }, 100);
- }
-};
diff --git a/core/java/android/view/SurfaceView.java b/core/java/android/view/SurfaceView.java
index 7d49fd3..7d48a9a 100644
--- a/core/java/android/view/SurfaceView.java
+++ b/core/java/android/view/SurfaceView.java
@@ -33,7 +33,6 @@ import android.os.SystemClock;
import android.os.ParcelFileDescriptor;
import android.util.AttributeSet;
import android.util.Log;
-import android.util.ResolutionOverride;
import java.lang.ref.WeakReference;
import java.util.ArrayList;
@@ -168,7 +167,6 @@ public class SurfaceView extends View {
boolean mUpdateWindowNeeded;
boolean mReportDrawNeeded;
private Translator mTranslator;
- ResolutionOverride mResolutionOverride = null;
private final ViewTreeObserver.OnPreDrawListener mDrawListener =
new ViewTreeObserver.OnPreDrawListener() {
@@ -204,8 +202,6 @@ public class SurfaceView extends View {
private void init() {
setWillNotDraw(true);
- mResolutionOverride = new ResolutionOverride(this);
- mResolutionOverride.setFixedSize(this);
}
/**
@@ -298,16 +294,6 @@ public class SurfaceView extends View {
setMeasuredDimension(width, height);
}
- /**
- * Transforms the touch events to the new resolution coordinate system
- * if the resolution has changed
- */
- @Override
- public boolean dispatchTouchEvent(MotionEvent ev) {
- mResolutionOverride.handleTouch(this, ev);
- return super.dispatchTouchEvent(ev);
- }
-
/** @hide */
@Override
protected boolean setFrame(int left, int top, int right, int bottom) {
@@ -672,14 +658,11 @@ public class SurfaceView extends View {
public void resized(Rect frame, Rect overscanInsets, Rect contentInsets,
Rect visibleInsets, Rect stableInsets, Rect outsets, boolean reportDraw,
Configuration newConfig) {
- final SurfaceView surfaceView = mSurfaceView.get();
+ SurfaceView surfaceView = mSurfaceView.get();
if (surfaceView != null) {
if (DEBUG) Log.v(
"SurfaceView", surfaceView + " got resized: w=" + frame.width()
+ " h=" + frame.height() + ", cur w=" + mCurWidth + " h=" + mCurHeight);
-
- surfaceView.mResolutionOverride.handleResize(surfaceView);
-
surfaceView.mSurfaceLock.lock();
try {
if (reportDraw) {
diff --git a/core/java/android/widget/OverScroller.java b/core/java/android/widget/OverScroller.java
index 778b2dd..50569d7 100644
--- a/core/java/android/widget/OverScroller.java
+++ b/core/java/android/widget/OverScroller.java
@@ -22,7 +22,6 @@ import android.util.Log;
import android.view.ViewConfiguration;
import android.view.animation.AnimationUtils;
import android.view.animation.Interpolator;
-import android.util.BoostFramework;
/**
* This class encapsulates scrolling with the ability to overshoot the bounds
@@ -600,18 +599,6 @@ public class OverScroller {
private static final int CUBIC = 1;
private static final int BALLISTIC = 2;
- /*
- * Perf boost related variables
- * Enabled/Disabled using config_enableCpuBoostForOverScrollerFling
- * true value turns it on, by default will be turned off
- */
- private BoostFramework mPerf = null;
- private boolean mIsPerfLockAcquired = false;
- private boolean mIsPerfBoostEnabled = false;
- private int fBoostTimeOut = 0;
- private int flingBoostTimeOut = 0;
- private int fBoostParamVal[];
-
static {
float x_min = 0.0f;
float y_min = 0.0f;
@@ -656,19 +643,6 @@ public class OverScroller {
* 39.37f // inch/meter
* ppi
* 0.84f; // look and feel tuning
-
- mIsPerfBoostEnabled = context.getResources().getBoolean(
- com.android.internal.R.bool.config_enableCpuBoostForOverScrollerFling);
- if (mIsPerfBoostEnabled) {
- fBoostTimeOut = context.getResources().getInteger(
- com.android.internal.R.integer.flingboost_timeout_param);
- fBoostParamVal = context.getResources().getIntArray(
- com.android.internal.R.array.flingboost_param_value);
- }
-
- if (mPerf == null && mIsPerfBoostEnabled) {
- mPerf = new BoostFramework();
- }
}
void updateScroll(float q) {
@@ -716,11 +690,6 @@ public class OverScroller {
}
void finish() {
- if (mIsPerfLockAcquired && mPerf != null) {
- mPerf.perfLockRelease();
- mIsPerfLockAcquired = false;
- }
-
mCurrentPosition = mFinal;
// Not reset since WebView relies on this value for fast fling.
// TODO: restore when WebView uses the fast fling implemented in this class.
@@ -791,18 +760,6 @@ public class OverScroller {
if (velocity != 0) {
mDuration = mSplineDuration = getSplineFlingDuration(velocity);
totalDistance = getSplineFlingDistance(velocity);
-
- if (mPerf != null) {
- mIsPerfLockAcquired = true;
- if (0 == fBoostTimeOut) {
- //config value is not defined
- flingBoostTimeOut = mDuration;
- } else {
- //config value is present
- flingBoostTimeOut = fBoostTimeOut;
- }
- mPerf.perfLockAcquire(flingBoostTimeOut, fBoostParamVal);
- }
}
mSplineDistance = (int) (totalDistance * Math.signum(velocity));
diff --git a/core/java/android/widget/Scroller.java b/core/java/android/widget/Scroller.java
index d0ba9e6..357c9c3 100644
--- a/core/java/android/widget/Scroller.java
+++ b/core/java/android/widget/Scroller.java
@@ -22,7 +22,6 @@ import android.os.Build;
import android.view.ViewConfiguration;
import android.view.animation.AnimationUtils;
import android.view.animation.Interpolator;
-import android.util.BoostFramework;
/**
@@ -109,17 +108,6 @@ public class Scroller {
private float mDeceleration;
private final float mPpi;
- /*
- * Perf boost related variables
- * Enabled/Disabled using config_enableCpuBoostForScroller
- * true value turns it on, by default will be turned off
- */
- private BoostFramework mPerf = null;
- boolean bIsPerfBoostEnabled = false;
- private int sBoostTimeOut = 0;
- private int scrollBoostTimeOut = 0;
- private int sBoostParamVal[];
-
// A context-specific coefficient adjusted to physical values.
private float mPhysicalCoeff;
@@ -179,7 +167,6 @@ public class Scroller {
* not to support progressive "flywheel" behavior in flinging.
*/
public Scroller(Context context, Interpolator interpolator, boolean flywheel) {
- boolean bIsPerfBoostEnabled = false;
mFinished = true;
if (interpolator == null) {
mInterpolator = new ViscousFluidInterpolator();
@@ -191,18 +178,6 @@ public class Scroller {
mFlywheel = flywheel;
mPhysicalCoeff = computeDeceleration(0.84f); // look and feel tuning
- bIsPerfBoostEnabled = context.getResources().getBoolean(
- com.android.internal.R.bool.config_enableCpuBoostForScroller);
- if (bIsPerfBoostEnabled) {
- sBoostTimeOut = context.getResources().getInteger(
- com.android.internal.R.integer.scrollboost_timeout_param);
- sBoostParamVal = context.getResources().getIntArray(
- com.android.internal.R.array.scrollboost_param_value);
- }
- if (mPerf == null && bIsPerfBoostEnabled) {
- mPerf = new BoostFramework();
- }
-
}
/**
@@ -420,17 +395,6 @@ public class Scroller {
mDeltaX = dx;
mDeltaY = dy;
mDurationReciprocal = 1.0f / (float) mDuration;
-
- if ((mPerf != null) && (duration != 0)) {
- if (0 == sBoostTimeOut) {
- //config value is not defined
- scrollBoostTimeOut = mDuration;
- } else {
- //config value is present
- scrollBoostTimeOut = sBoostTimeOut;
- }
- mPerf.perfLockAcquire(scrollBoostTimeOut, sBoostParamVal);
- }
}
/**