what-the-bank/sources/io/flutter/embedding/engine/systemchannels/SystemChannel.java

25 lines
846 B
Java
Raw Normal View History

2024-07-27 18:17:47 +07:00
package io.flutter.embedding.engine.systemchannels;
import io.flutter.Log;
import io.flutter.embedding.engine.dart.DartExecutor;
import io.flutter.plugin.common.BasicMessageChannel;
import io.flutter.plugin.common.JSONMessageCodec;
import java.util.HashMap;
/* loaded from: classes.dex */
public class SystemChannel {
private static final String TAG = "SystemChannel";
public final BasicMessageChannel<Object> channel;
public SystemChannel(DartExecutor dartExecutor) {
this.channel = new BasicMessageChannel<>(dartExecutor, "flutter/system", JSONMessageCodec.INSTANCE);
}
public void sendMemoryPressureWarning() {
Log.v(TAG, "Sending memory pressure warning to Flutter.");
HashMap hashMap = new HashMap(1);
hashMap.put("type", "memoryPressure");
this.channel.send(hashMap);
}
}