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

Commit d3ec5fc5 authored by Ng Zhi An's avatar Ng Zhi An
Browse files

Disable direct share on low ram devices

Bug: 79691134
Test: flash device, open any app and try sharing
Change-Id: I78158ac60215b73092f7da6db83b20bdf1aa06c9
parent 82db2614
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -21,6 +21,7 @@ import android.animation.AnimatorListenerAdapter;
import android.animation.ObjectAnimator;
import android.annotation.NonNull;
import android.app.Activity;
import android.app.ActivityManager;
import android.app.usage.UsageStatsManager;
import android.content.ComponentName;
import android.content.Context;
@@ -1022,6 +1023,11 @@ public class ChooserActivity extends ResolverActivity {

        @Override
        public void onListRebuilt() {
            // don't support direct share on low ram devices
            if (ActivityManager.isLowRamDeviceStatic()) {
                return;
            }

            if (mServiceTargets != null) {
                pruneServiceTargets();
            }