Loading packages/SystemUI/res/drawable/recents_low_ram_stack_button_background.xml 0 → 100644 +22 −0 Original line number Diff line number Diff line <!-- ~ Copyright (C) 2017 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. --> <shape xmlns:android="http://schemas.android.com/apk/res/android" > <corners android:radius="@dimen/borderless_button_radius" /> <solid android:color="#CC000000" /> </shape> packages/SystemUI/res/layout/recents_low_ram_stack_action_button.xml 0 → 100644 +34 −0 Original line number Diff line number Diff line <?xml version="1.0" encoding="utf-8"?> <!-- ~ Copyright (C) 2017 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. --> <TextView xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/button" android:layout_width="wrap_content" android:layout_height="wrap_content" android:paddingStart="26dp" android:paddingEnd="26dp" android:paddingTop="17dp" android:paddingBottom="17dp" android:text="@string/recents_stack_action_button_label" android:textSize="14sp" android:textColor="#FFFFFF" android:textAllCaps="true" android:fontFamily="sans-serif-medium" android:background="@drawable/recents_low_ram_stack_button_background" android:visibility="invisible" android:forceHasOverlappingRendering="false" style="?attr/clearAllStyle" /> packages/SystemUI/src/com/android/systemui/recents/Recents.java +1 −1 Original line number Diff line number Diff line Loading @@ -205,8 +205,8 @@ public class Recents extends SystemUI public void start() { sDebugFlags = new RecentsDebugFlags(mContext); sSystemServicesProxy = SystemServicesProxy.getInstance(mContext); sTaskLoader = new RecentsTaskLoader(mContext); sConfiguration = new RecentsConfiguration(mContext); sTaskLoader = new RecentsTaskLoader(mContext); mHandler = new Handler(); mImpl = new RecentsImpl(mContext); Loading packages/SystemUI/src/com/android/systemui/recents/RecentsConfiguration.java +11 −0 Original line number Diff line number Diff line Loading @@ -16,12 +16,14 @@ package com.android.systemui.recents; import android.app.ActivityManager; import android.content.Context; import android.content.res.Configuration; import android.content.res.Resources; import android.graphics.Rect; import android.os.SystemProperties; import com.android.systemui.R; import com.android.systemui.recents.misc.SystemServicesProxy; import com.android.systemui.recents.model.TaskStack; Loading Loading @@ -84,6 +86,13 @@ public class RecentsConfiguration { // Recents will layout task views in a grid mode when there's enough space in the screen. public boolean isGridEnabled; // Support for Android Recents for low ram devices. If this field is set to true, then Recents // will use the alternative layout. public boolean isLowRamDevice; // Enable drag and drop split from Recents. Disabled for low ram devices. public boolean dragToSplitEnabled; private final Context mAppContext; public RecentsConfiguration(Context context) { Loading @@ -95,6 +104,8 @@ public class RecentsConfiguration { fakeShadows = res.getBoolean(R.bool.config_recents_fake_shadows); svelteLevel = res.getInteger(R.integer.recents_svelte_level); isGridEnabled = SystemProperties.getBoolean("ro.recents.grid", false); isLowRamDevice = ActivityManager.isLowRamDeviceStatic(); dragToSplitEnabled = !isLowRamDevice; float screenDensity = context.getResources().getDisplayMetrics().density; smallestWidth = ssp.getDeviceSmallestWidth(); Loading packages/SystemUI/src/com/android/systemui/recents/RecentsDebugFlags.java +2 −0 Original line number Diff line number Diff line Loading @@ -41,6 +41,8 @@ public class RecentsDebugFlags implements TunerService.Tunable { private static final boolean EnableFastToggleTimeout = false; // Overrides the Tuner flags and enables the paging via the Recents button private static final boolean EnablePaging = false; // Disables enter and exit transitions for other tasks for low ram devices public static final boolean DisableRecentsLowRamEnterExitAnimation = false; // Enables us to create mock recents tasks public static final boolean EnableMockTasks = false; Loading Loading
packages/SystemUI/res/drawable/recents_low_ram_stack_button_background.xml 0 → 100644 +22 −0 Original line number Diff line number Diff line <!-- ~ Copyright (C) 2017 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. --> <shape xmlns:android="http://schemas.android.com/apk/res/android" > <corners android:radius="@dimen/borderless_button_radius" /> <solid android:color="#CC000000" /> </shape>
packages/SystemUI/res/layout/recents_low_ram_stack_action_button.xml 0 → 100644 +34 −0 Original line number Diff line number Diff line <?xml version="1.0" encoding="utf-8"?> <!-- ~ Copyright (C) 2017 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. --> <TextView xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/button" android:layout_width="wrap_content" android:layout_height="wrap_content" android:paddingStart="26dp" android:paddingEnd="26dp" android:paddingTop="17dp" android:paddingBottom="17dp" android:text="@string/recents_stack_action_button_label" android:textSize="14sp" android:textColor="#FFFFFF" android:textAllCaps="true" android:fontFamily="sans-serif-medium" android:background="@drawable/recents_low_ram_stack_button_background" android:visibility="invisible" android:forceHasOverlappingRendering="false" style="?attr/clearAllStyle" />
packages/SystemUI/src/com/android/systemui/recents/Recents.java +1 −1 Original line number Diff line number Diff line Loading @@ -205,8 +205,8 @@ public class Recents extends SystemUI public void start() { sDebugFlags = new RecentsDebugFlags(mContext); sSystemServicesProxy = SystemServicesProxy.getInstance(mContext); sTaskLoader = new RecentsTaskLoader(mContext); sConfiguration = new RecentsConfiguration(mContext); sTaskLoader = new RecentsTaskLoader(mContext); mHandler = new Handler(); mImpl = new RecentsImpl(mContext); Loading
packages/SystemUI/src/com/android/systemui/recents/RecentsConfiguration.java +11 −0 Original line number Diff line number Diff line Loading @@ -16,12 +16,14 @@ package com.android.systemui.recents; import android.app.ActivityManager; import android.content.Context; import android.content.res.Configuration; import android.content.res.Resources; import android.graphics.Rect; import android.os.SystemProperties; import com.android.systemui.R; import com.android.systemui.recents.misc.SystemServicesProxy; import com.android.systemui.recents.model.TaskStack; Loading Loading @@ -84,6 +86,13 @@ public class RecentsConfiguration { // Recents will layout task views in a grid mode when there's enough space in the screen. public boolean isGridEnabled; // Support for Android Recents for low ram devices. If this field is set to true, then Recents // will use the alternative layout. public boolean isLowRamDevice; // Enable drag and drop split from Recents. Disabled for low ram devices. public boolean dragToSplitEnabled; private final Context mAppContext; public RecentsConfiguration(Context context) { Loading @@ -95,6 +104,8 @@ public class RecentsConfiguration { fakeShadows = res.getBoolean(R.bool.config_recents_fake_shadows); svelteLevel = res.getInteger(R.integer.recents_svelte_level); isGridEnabled = SystemProperties.getBoolean("ro.recents.grid", false); isLowRamDevice = ActivityManager.isLowRamDeviceStatic(); dragToSplitEnabled = !isLowRamDevice; float screenDensity = context.getResources().getDisplayMetrics().density; smallestWidth = ssp.getDeviceSmallestWidth(); Loading
packages/SystemUI/src/com/android/systemui/recents/RecentsDebugFlags.java +2 −0 Original line number Diff line number Diff line Loading @@ -41,6 +41,8 @@ public class RecentsDebugFlags implements TunerService.Tunable { private static final boolean EnableFastToggleTimeout = false; // Overrides the Tuner flags and enables the paging via the Recents button private static final boolean EnablePaging = false; // Disables enter and exit transitions for other tasks for low ram devices public static final boolean DisableRecentsLowRamEnterExitAnimation = false; // Enables us to create mock recents tasks public static final boolean EnableMockTasks = false; Loading