blob: f5c2ca54ab67a3e126b45d16860dfed03f8256ca (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
package com.android.proxyhandler;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.net.Proxy;
import android.os.Bundle;
public class ProxyServiceReceiver extends BroadcastReceiver {
@Override
public void onReceive(Context context, Intent intent) {
Intent service = new Intent(context, ProxyService.class);
Bundle bundle = intent.getExtras();
if (bundle != null) {
service.putExtra(Proxy.EXTRA_PROXY_INFO,
bundle.getParcelable(Proxy.EXTRA_PROXY_INFO));
}
context.startService(service);
}
}
|