Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit aa45771d authored by Shai Barack's avatar Shai Barack
Browse files

Don't use deprecated TRIM_MEMORY_* level

TRIM_MEMORY_RUNNING_LOW is never sent starting with UDC.

Bug: 329427668
Change-Id: Ia132a1d6a6682c8e13eceb7e78763ed87b272c93
parent 37af1ae9
Loading
Loading
Loading
Loading
+3 −3
Original line number Original line Diff line number Diff line
@@ -16,7 +16,7 @@


package android.app.activity;
package android.app.activity;


import static android.content.ComponentCallbacks2.TRIM_MEMORY_RUNNING_LOW;
import static android.content.ComponentCallbacks2.TRIM_MEMORY_BACKGROUND;
import static android.content.Context.OVERRIDABLE_COMPONENT_CALLBACKS;
import static android.content.Context.OVERRIDABLE_COMPONENT_CALLBACKS;


import static com.google.common.truth.Truth.assertThat;
import static com.google.common.truth.Truth.assertThat;
@@ -67,7 +67,7 @@ public class RegisterComponentCallbacksTest {
        config.windowConfiguration.setWindowingMode(
        config.windowConfiguration.setWindowingMode(
                WindowConfiguration.WINDOWING_MODE_FREEFORM);
                WindowConfiguration.WINDOWING_MODE_FREEFORM);
        config.windowConfiguration.setBounds(new Rect(0, 0, 100, 100));
        config.windowConfiguration.setBounds(new Rect(0, 0, 100, 100));
        final int trimMemoryLevel = TRIM_MEMORY_RUNNING_LOW;
        final int trimMemoryLevel = TRIM_MEMORY_BACKGROUND;


        scenario.onActivity(activity -> {
        scenario.onActivity(activity -> {
            // It should be no-op to unregister a ComponentCallbacks without registration.
            // It should be no-op to unregister a ComponentCallbacks without registration.
@@ -98,7 +98,7 @@ public class RegisterComponentCallbacksTest {
        config.windowConfiguration.setWindowingMode(
        config.windowConfiguration.setWindowingMode(
                WindowConfiguration.WINDOWING_MODE_FREEFORM);
                WindowConfiguration.WINDOWING_MODE_FREEFORM);
        config.windowConfiguration.setBounds(new Rect(0, 0, 100, 100));
        config.windowConfiguration.setBounds(new Rect(0, 0, 100, 100));
        final int trimMemoryLevel = TRIM_MEMORY_RUNNING_LOW;
        final int trimMemoryLevel = TRIM_MEMORY_BACKGROUND;


        scenario.onActivity(activity -> {
        scenario.onActivity(activity -> {
            // It should be no-op to unregister a ComponentCallbacks without registration.
            // It should be no-op to unregister a ComponentCallbacks without registration.