Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
shell
platform
android
io
flutter
embedding
engine
systemchannels
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
5
package
io.flutter.embedding.engine.systemchannels;
6
7
import
androidx.annotation.NonNull;
8
import
io.flutter.Log;
9
import
io.flutter.embedding.engine.dart.DartExecutor;
10
import
io.flutter.plugin.common.BasicMessageChannel;
11
import
io.flutter.plugin.common.JSONMessageCodec;
12
import
java.util.HashMap;
13
import
java.util.Map;
14
15
/** TODO(mattcarroll): fill in javadoc for SystemChannel. */
16
public
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
26
public
void
sendMemoryPressureWarning
() {
27
Log
.
v
(
TAG
,
"Sending memory pressure warning to Flutter."
);
28
Map<String, Object>
message
=
new
HashMap<>(1);
29
message
.put(
"type"
,
"memoryPressure"
);
30
channel
.send(
message
);
31
}
32
}
io.flutter.Log
Definition
Log.java:14
io.flutter.Log.v
static void v(@NonNull String tag, @NonNull String message)
Definition
Log.java:40
io.flutter.embedding.engine.systemchannels.SystemChannel
Definition
SystemChannel.java:16
io.flutter.embedding.engine.systemchannels.SystemChannel.sendMemoryPressureWarning
void sendMemoryPressureWarning()
Definition
SystemChannel.java:26
io.flutter.embedding.engine.systemchannels.SystemChannel.SystemChannel
SystemChannel(@NonNull DartExecutor dartExecutor)
Definition
SystemChannel.java:21
io.flutter.embedding.engine.systemchannels.SystemChannel.channel
final BasicMessageChannel< Object > channel
Definition
SystemChannel.java:19
message
Win32Message message
Definition
keyboard_unittests.cc:139
TAG
#define TAG()
Definition
regexp_assembler_ir.cc:29
Generated on Fri Apr 26 2024 06:14:20 for Flutter Engine by
1.9.8