| | |
| | | import android.content.Intent; |
| | | import android.net.Uri; |
| | | import android.provider.Settings; |
| | | import android.text.TextUtils; |
| | | |
| | | import com.hdl.photovoltaic.R; |
| | | import com.hdl.photovoltaic.widget.ConfirmationCancelDialog; |
| | |
| | | * |
| | | * @param context 上下文 |
| | | */ |
| | | public void showSettingPermissionDialog(Context context) { |
| | | |
| | | public void showSettingPermissionDialog(Context context, String tip_ext) { |
| | | if (context == null) { |
| | | return; |
| | | } |
| | | HdlThreadLogic.runMainThread(new Runnable() { |
| | | @Override |
| | | public void run() { |
| | | |
| | | |
| | | ConfirmationCancelDialog dialog = new ConfirmationCancelDialog(context); |
| | | dialog.isHideTitle(true); |
| | | dialog.setTitle(context.getString(R.string.loading_title_tip)); |
| | | dialog.setContent("请前往设置权限."); |
| | | dialog.setContent(tip_ext); |
| | | dialog.setConfirmation(context.getString(R.string.me_set)); |
| | | dialog.show(); |
| | | dialog.setYesOnclickListener(new ConfirmationCancelDialog.onYesOnclickListener() { |
| | |
| | | |
| | | } |
| | | |
| | | /** |
| | | * 跳转到权限详情页设置权限(有的手机厂家只能跳转到设置界面) |
| | | * |
| | | * @param context 上下文 |
| | | */ |
| | | public void showSettingPermissionDialog(Context context) { |
| | | showSettingPermissionDialog(context, context.getString(R.string.please_go_set_permissions)); |
| | | } |
| | | |
| | | } |