blob: d11093fba1b6654a999e6728941be69b7d94b0ff (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
package com.android.softap.receivers;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.os.UserHandle;
import com.android.softap.SoftApManageService;
public class BootCompletedReceiver extends BroadcastReceiver {
@Override
public void onReceive(Context context, Intent intent) {
if (Intent.ACTION_BOOT_COMPLETED.equals(intent.getAction())) {
Intent serviceIntent = new Intent(context, SoftApManageService.class);
context.startServiceAsUser(serviceIntent, UserHandle.CURRENT_OR_SELF);
}
}
}
|