| | |
| | | package com.hdl.photovoltaic.ui.powerstation; |
| | | |
| | | import android.Manifest; |
| | | import android.content.pm.PackageManager; |
| | | import android.os.Bundle; |
| | | import android.view.View; |
| | |
| | | |
| | | private String key = SortValue.all; |
| | | private String value = SortValue.all; |
| | | |
| | | |
| | | private String installedCapacityMinKey = SortType.installedCapacityMin; |
| | | private int installedCapacityMinValue; |
| | | private String installedCapacityMaxKey = SortType.installedCapacityMax; |
| | | private int installedCapacityMaxValue; |
| | | private String gridTypeKey = SortType.gridType; |
| | | private String gridTypeValue; |
| | | private String powerStationStatusKey = SortType.powerStationStatus; |
| | | private int powerStationStatusValue; |
| | | |
| | | private long pageSize = 20;//页数 |
| | | |
| | |
| | | }); |
| | | } |
| | | |
| | | /** |
| | | * 申请权限 |
| | | */ |
| | | private void requestPermissions(PermissionsResultCallback permissionsResultCallback) { |
| | | |
| | | |
| | | mPermissionsResultCallback = permissionsResultCallback; |
| | | |
| | | String[] s = new String[]{Manifest.permission.ACCESS_FINE_LOCATION, Manifest.permission.CAMERA,}; |
| | | String[] ary = PermissionUtils.checkPermission(_mActivity, s); |
| | | if (ary.length > 0) { |
| | | requestPermissions(ary, PermissionUtils.STATUS_SUCCESS); |
| | | } else { |
| | | if (mPermissionsResultCallback != null) { |
| | | mPermissionsResultCallback.succeed(); |
| | | } |
| | | } |
| | | } |
| | | |
| | | @Override |
| | | public void onRequestPermissionsResult(int requestCode, @NonNull String[] permissions, @NonNull int[] grantResults) { |