该楼层疑似违规已被系统折叠 隐藏此楼查看此楼
@Override
public void onReceive(final Context context, Intent intent) {
// TODO Auto-generated method stub
AlertDialog.Builder dialogBuider = new AlertDialog.Builder(context);
dialogBuider.setTitle("Warning!");
dialogBuider.setMessage("You are force to be offline. Please try to login again.");
dialogBuider.setCancelable(false);
dialogBuider.setPositiveButton("ok", new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
// TODO Auto-generated method stub
ActivityCollector.finishAll();
Log.d("", "" + ActivityCollector.activities.size());
Intent intent = new Intent(context, LoginActivity.class);
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
context.startActivity(intent);
}
});
AlertDialog alertDialog = dialogBuider.create();
alertDialog.getWindow().setType(WindowManager.LayoutParams.TYPE_SYSTEM_ALERT);
alertDialog.show();
}