Loading packages/SystemUI/res/values/dimens.xml +2 −0 Original line number Diff line number Diff line Loading @@ -63,6 +63,8 @@ <!-- thickness (height) of the navigation bar on phones that require it --> <dimen name="navigation_bar_size">@*android:dimen/navigation_bar_height</dimen> <!-- Minimum swipe distance to catch the swipe gestures to invoke assist or switch tasks. --> <dimen name="navigation_bar_min_swipe_distance">48dp</dimen> <!-- thickness (height) of the dead zone at the top of the navigation bar, reducing false presses on navbar buttons; approx 2mm --> Loading packages/SystemUI/src/com/android/systemui/statusbar/DelegateViewHelper.java +4 −3 Original line number Diff line number Diff line Loading @@ -17,10 +17,11 @@ package com.android.systemui.statusbar; import android.app.StatusBarManager; import android.content.res.Resources; import android.graphics.RectF; import android.view.MotionEvent; import android.view.View; import android.view.ViewConfiguration; import com.android.systemui.R; public class DelegateViewHelper { private View mDelegateView; Loading Loading @@ -106,8 +107,8 @@ public class DelegateViewHelper { public void setSourceView(View view) { mSourceView = view; if (mSourceView != null) { mTriggerThreshhold = ViewConfiguration.get(mSourceView.getContext()).getScaledPagingTouchSlop(); Resources r = mSourceView.getContext().getResources(); mTriggerThreshhold = r.getDimensionPixelSize(R.dimen.navigation_bar_min_swipe_distance); } } Loading packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationBarViewTaskSwitchHelper.java +4 −1 Original line number Diff line number Diff line Loading @@ -17,9 +17,11 @@ package com.android.systemui.statusbar.phone; import android.content.Context; import android.content.res.Resources; import android.view.GestureDetector; import android.view.MotionEvent; import android.view.ViewConfiguration; import com.android.systemui.R; import com.android.systemui.statusbar.BaseStatusBar; public class NavigationBarViewTaskSwitchHelper extends GestureDetector.SimpleOnGestureListener { Loading @@ -36,7 +38,8 @@ public class NavigationBarViewTaskSwitchHelper extends GestureDetector.SimpleOnG public NavigationBarViewTaskSwitchHelper(Context context) { ViewConfiguration configuration = ViewConfiguration.get(context); mScrollTouchSlop = 4 * configuration.getScaledTouchSlop(); Resources r = context.getResources(); mScrollTouchSlop = r.getDimensionPixelSize(R.dimen.navigation_bar_min_swipe_distance); mMinFlingVelocity = configuration.getScaledMinimumFlingVelocity(); mTaskSwitcherDetector = new GestureDetector(context, this); } Loading services/core/java/com/android/server/NativeDaemonConnector.java +0 −3 Original line number Diff line number Diff line Loading @@ -176,7 +176,6 @@ final class NativeDaemonConnector implements Runnable, Handler.Callback, Watchdo if (buffer[i] == 0) { final String rawEvent = new String( buffer, start, i - start, StandardCharsets.UTF_8); log("RCV <- {" + rawEvent + "}"); boolean releaseWl = false; try { Loading @@ -197,7 +196,6 @@ final class NativeDaemonConnector implements Runnable, Handler.Callback, Watchdo mResponseQueue.add(event.getCmdNumber(), event); } } catch (IllegalArgumentException e) { log("Problem parsing message: " + rawEvent + " - " + e); } finally { if (releaseWl) { mWakeLock.acquire(); Loading @@ -209,7 +207,6 @@ final class NativeDaemonConnector implements Runnable, Handler.Callback, Watchdo } if (start == 0) { final String rawEvent = new String(buffer, start, count, StandardCharsets.UTF_8); log("RCV incomplete <- {" + rawEvent + "}"); } // We should end at the amount we read. If not, compact then Loading services/core/java/com/android/server/am/ProcessList.java +6 −12 Original line number Diff line number Diff line Loading @@ -177,7 +177,7 @@ final class ProcessList { // 1280x800 or larger screen with around 1GB RAM. Values are in KB. private final int[] mOomMinFreeHigh = new int[] { 73728, 92160, 110592, 129024, 147456, 184320 129024, 225000, 325000 }; // The actual OOM killer memory levels we are using. private final int[] mOomMinFree = new int[mOomAdj.length]; Loading Loading @@ -235,22 +235,16 @@ final class ProcessList { Slog.i("XXXXXX", "minfree_adj=" + minfree_adj + " minfree_abs=" + minfree_abs); } // We've now baked in the increase to the basic oom values above, since // they seem to be useful more generally for devices that are tight on // memory than just for 64 bit. This should probably have some more // tuning done, so not deleting it quite yet... final boolean is64bit = false; //Build.SUPPORTED_64_BIT_ABIS.length > 0; if (Build.SUPPORTED_64_BIT_ABIS.length > 0) { // Increase the high min-free levels for cached processes for 64-bit mOomMinFreeHigh[4] = 225000; mOomMinFreeHigh[5] = 325000; } for (int i=0; i<mOomAdj.length; i++) { int low = mOomMinFreeLow[i]; int high = mOomMinFreeHigh[i]; mOomMinFree[i] = (int)(low + ((high-low)*scale)); if (is64bit) { // On 64 bit devices, we consume more baseline RAM, because 64 bit is cool! // To avoid being all pagey and stuff, scale up the memory levels to // give us some breathing room. mOomMinFree[i] = (3*mOomMinFree[i])/2; } } if (minfree_abs >= 0) { Loading Loading
packages/SystemUI/res/values/dimens.xml +2 −0 Original line number Diff line number Diff line Loading @@ -63,6 +63,8 @@ <!-- thickness (height) of the navigation bar on phones that require it --> <dimen name="navigation_bar_size">@*android:dimen/navigation_bar_height</dimen> <!-- Minimum swipe distance to catch the swipe gestures to invoke assist or switch tasks. --> <dimen name="navigation_bar_min_swipe_distance">48dp</dimen> <!-- thickness (height) of the dead zone at the top of the navigation bar, reducing false presses on navbar buttons; approx 2mm --> Loading
packages/SystemUI/src/com/android/systemui/statusbar/DelegateViewHelper.java +4 −3 Original line number Diff line number Diff line Loading @@ -17,10 +17,11 @@ package com.android.systemui.statusbar; import android.app.StatusBarManager; import android.content.res.Resources; import android.graphics.RectF; import android.view.MotionEvent; import android.view.View; import android.view.ViewConfiguration; import com.android.systemui.R; public class DelegateViewHelper { private View mDelegateView; Loading Loading @@ -106,8 +107,8 @@ public class DelegateViewHelper { public void setSourceView(View view) { mSourceView = view; if (mSourceView != null) { mTriggerThreshhold = ViewConfiguration.get(mSourceView.getContext()).getScaledPagingTouchSlop(); Resources r = mSourceView.getContext().getResources(); mTriggerThreshhold = r.getDimensionPixelSize(R.dimen.navigation_bar_min_swipe_distance); } } Loading
packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationBarViewTaskSwitchHelper.java +4 −1 Original line number Diff line number Diff line Loading @@ -17,9 +17,11 @@ package com.android.systemui.statusbar.phone; import android.content.Context; import android.content.res.Resources; import android.view.GestureDetector; import android.view.MotionEvent; import android.view.ViewConfiguration; import com.android.systemui.R; import com.android.systemui.statusbar.BaseStatusBar; public class NavigationBarViewTaskSwitchHelper extends GestureDetector.SimpleOnGestureListener { Loading @@ -36,7 +38,8 @@ public class NavigationBarViewTaskSwitchHelper extends GestureDetector.SimpleOnG public NavigationBarViewTaskSwitchHelper(Context context) { ViewConfiguration configuration = ViewConfiguration.get(context); mScrollTouchSlop = 4 * configuration.getScaledTouchSlop(); Resources r = context.getResources(); mScrollTouchSlop = r.getDimensionPixelSize(R.dimen.navigation_bar_min_swipe_distance); mMinFlingVelocity = configuration.getScaledMinimumFlingVelocity(); mTaskSwitcherDetector = new GestureDetector(context, this); } Loading
services/core/java/com/android/server/NativeDaemonConnector.java +0 −3 Original line number Diff line number Diff line Loading @@ -176,7 +176,6 @@ final class NativeDaemonConnector implements Runnable, Handler.Callback, Watchdo if (buffer[i] == 0) { final String rawEvent = new String( buffer, start, i - start, StandardCharsets.UTF_8); log("RCV <- {" + rawEvent + "}"); boolean releaseWl = false; try { Loading @@ -197,7 +196,6 @@ final class NativeDaemonConnector implements Runnable, Handler.Callback, Watchdo mResponseQueue.add(event.getCmdNumber(), event); } } catch (IllegalArgumentException e) { log("Problem parsing message: " + rawEvent + " - " + e); } finally { if (releaseWl) { mWakeLock.acquire(); Loading @@ -209,7 +207,6 @@ final class NativeDaemonConnector implements Runnable, Handler.Callback, Watchdo } if (start == 0) { final String rawEvent = new String(buffer, start, count, StandardCharsets.UTF_8); log("RCV incomplete <- {" + rawEvent + "}"); } // We should end at the amount we read. If not, compact then Loading
services/core/java/com/android/server/am/ProcessList.java +6 −12 Original line number Diff line number Diff line Loading @@ -177,7 +177,7 @@ final class ProcessList { // 1280x800 or larger screen with around 1GB RAM. Values are in KB. private final int[] mOomMinFreeHigh = new int[] { 73728, 92160, 110592, 129024, 147456, 184320 129024, 225000, 325000 }; // The actual OOM killer memory levels we are using. private final int[] mOomMinFree = new int[mOomAdj.length]; Loading Loading @@ -235,22 +235,16 @@ final class ProcessList { Slog.i("XXXXXX", "minfree_adj=" + minfree_adj + " minfree_abs=" + minfree_abs); } // We've now baked in the increase to the basic oom values above, since // they seem to be useful more generally for devices that are tight on // memory than just for 64 bit. This should probably have some more // tuning done, so not deleting it quite yet... final boolean is64bit = false; //Build.SUPPORTED_64_BIT_ABIS.length > 0; if (Build.SUPPORTED_64_BIT_ABIS.length > 0) { // Increase the high min-free levels for cached processes for 64-bit mOomMinFreeHigh[4] = 225000; mOomMinFreeHigh[5] = 325000; } for (int i=0; i<mOomAdj.length; i++) { int low = mOomMinFreeLow[i]; int high = mOomMinFreeHigh[i]; mOomMinFree[i] = (int)(low + ((high-low)*scale)); if (is64bit) { // On 64 bit devices, we consume more baseline RAM, because 64 bit is cool! // To avoid being all pagey and stuff, scale up the memory levels to // give us some breathing room. mOomMinFree[i] = (3*mOomMinFree[i])/2; } } if (minfree_abs >= 0) { Loading