@@ -231,69 +231,6 @@ inline fun requestPermission(
231231    }
232232}
233233
234- /* *
235-  * 请求权限 
236-  * @param context:Context 
237-  * @param groups:请求的权限组,可多个 
238-  * @param grantedAllAction:是否当全部请求权限都是被允许状态才回调granted 
239-  * @param granted:权限允许回调 
240-  * @param deniedAlert:权限被拒绝后是否弹框提示 
241-  * @param denied:权限拒绝回调 
242-  */  
243- inline  fun  requestPermission (
244-     context :  Context ,
245-     vararg  groups :  Array <String >,
246-     grantedAllAction :  Boolean ,
247-     crossinline granted :  ((t: List <String >) ->  Unit ),
248-     deniedAlert :  Boolean ,
249-     crossinline denied :  ((t: List <String >) ->  Unit )
250- ) =  requestPermission(
251-     context,
252-     * (arrayListOf<String >().apply  { groups.forEach { this @apply.addAll(it) } }.toTypedArray()),
253-     grantedAllAction =  grantedAllAction,
254-     granted =  granted,
255-     deniedAlert =  deniedAlert,
256-     denied =  denied
257- )
258- 
259- /* *
260-  * 请求权限 
261-  * @param context:Context 
262-  * @param groups:请求的权限组,可多个 
263-  * @param grantedAllAction:是否当全部请求权限都是被允许状态才回调granted 
264-  * @param granted:权限允许回调 
265-  * @param deniedAlert:权限被拒绝后是否弹框提示 
266-  */  
267- inline  fun  requestPermission (
268-     context :  Context ,
269-     vararg  groups :  Array <String >,
270-     grantedAllAction :  Boolean ,
271-     crossinline granted :  ((t: List <String >) ->  Unit ),
272-     deniedAlert :  Boolean 
273- ) =  requestPermission(
274-     context,
275-     * (arrayListOf<String >().apply  { groups.forEach { this @apply.addAll(it) } }.toTypedArray()),
276-     grantedAllAction =  grantedAllAction,
277-     granted =  granted,
278-     deniedAlert =  deniedAlert
279- )
280- 
281- /* *
282-  * 请求权限 
283-  * @param context:Context 
284-  * @param groups:请求的权限组,可多个 
285-  * @param deniedAlert:权限被拒绝后是否弹框提示 
286-  */  
287- inline  fun  requestPermission (
288-     context :  Context ,
289-     vararg  groups :  Array <String >,
290-     deniedAlert :  Boolean 
291- ) =  requestPermission(
292-     context,
293-     * (arrayListOf<String >().apply  { groups.forEach { this @apply.addAll(it) } }.toTypedArray()),
294-     deniedAlert =  deniedAlert
295- )
296- 
297234// 启动&首页时需要请求的权限
298235inline  fun  requestForStartup (context :  Context , crossinline action :  ((t: List <String >) ->  Unit )) = 
299236    requestPermission(
@@ -315,8 +252,9 @@ inline fun requestCameraAndStorage(
315252    crossinline granted :  ((t: List <String >) ->  Unit )
316253) =  requestPermission(
317254    context,
318-     Permission .Group .CAMERA ,
319-     Permission .Group .STORAGE ,
255+     Permission .CAMERA ,
256+     Permission .WRITE_EXTERNAL_STORAGE ,
257+     Permission .READ_EXTERNAL_STORAGE ,
320258    grantedAllAction =  true ,
321259    granted =  granted,
322260    deniedAlert =  true 
@@ -326,7 +264,8 @@ inline fun requestCameraAndStorage(
326264inline  fun  requestStorage (context :  Context , crossinline granted :  ((t: List <String >) ->  Unit )) = 
327265    requestPermission(
328266        context,
329-         Permission .Group .STORAGE ,
267+         Permission .WRITE_EXTERNAL_STORAGE ,
268+         Permission .READ_EXTERNAL_STORAGE ,
330269        grantedAllAction =  true ,
331270        granted =  granted,
332271        deniedAlert =  true 
0 commit comments