DeteMin
2020-03-31 77c62e023d2dc31200fc696158df84b3aee90ee7
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
package com.basic.security.receiver;
 
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.text.TextUtils;
 
import com.basic.security.utils.Constants;
 
public class WebRtcBroadCastReceiver extends BroadcastReceiver {
    public static boolean webRtcServerStarted = false;
    public static boolean webRtcClientConnected = false;
 
    @Override
    public void onReceive(Context context, Intent intent) {
        String type = intent.getStringExtra("type");
        if (!TextUtils.isEmpty(type)) {
            if (Constants.webRtcServerStarted.equals(type)) {
                webRtcServerStarted = true;
            }
            if (Constants.webRtcClientConnected.equals(type)) {
                webRtcClientConnected = true;
            }
        }
//        System.out.println("WebRtcBroadCastReceiver.onReceive " + intent + " type= " + type);
//        String intent.getStringExtra("");
    }
}