Flutter Engine
The Flutter Engine
SystemChannel.java
Go to the documentation of this file.
1// Copyright 2013 The Flutter Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5package io.flutter.embedding.engine.systemchannels;
6
7import androidx.annotation.NonNull;
8import io.flutter.Log;
9import io.flutter.embedding.engine.dart.DartExecutor;
10import io.flutter.plugin.common.BasicMessageChannel;
11import io.flutter.plugin.common.JSONMessageCodec;
12import java.util.HashMap;
13import java.util.Map;
14
15/** TODO(mattcarroll): fill in javadoc for SystemChannel. */
16public class SystemChannel {
17 private static final String TAG = "SystemChannel";
18
19 @NonNull public final BasicMessageChannel<Object> channel;
20
21 public SystemChannel(@NonNull DartExecutor dartExecutor) {
22 this.channel =
23 new BasicMessageChannel<>(dartExecutor, "flutter/system", JSONMessageCodec.INSTANCE);
24 }
25
27 Log.v(TAG, "Sending memory pressure warning to Flutter.");
28 Map<String, Object> message = new HashMap<>(1);
29 message.put("type", "memoryPressure");
31 }
32}
static void v(@NonNull String tag, @NonNull String message)
Definition: Log.java:40
SystemChannel(@NonNull DartExecutor dartExecutor)
static final JSONMessageCodec INSTANCE
Win32Message message
#define TAG()