From 0d9bfe98e287e5c8cc14513d97ee53669d3ebf73 Mon Sep 17 00:00:00 2001 From: cuizhen Date: Wed, 20 Mar 2019 15:01:08 +0800 Subject: [PATCH] =?UTF-8?q?=E9=83=A8=E5=88=86=E7=B1=BB=E9=87=8D=E5=91=BD?= =?UTF-8?q?=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 20 +++++++++---------- .../anypermission/InstallRequester.java | 2 +- .../NotificationAccessRequester.java | 2 +- .../NotificationShowRequester.java | 2 +- .../anypermission/OverlayRequester.java | 2 +- .../per/goweii/anypermission/Requester.java | 2 +- .../anypermission/RuntimeRequester.java | 2 +- .../anypermission/SettingRequester.java | 2 +- .../android/anypermission/TestActivity.java | 12 +++++------ .../android/anypermission/TestFragment.java | 12 +++++------ 10 files changed, 29 insertions(+), 29 deletions(-) diff --git a/README.md b/README.md index ca42de8..bb32a15 100755 --- a/README.md +++ b/README.md @@ -83,7 +83,7 @@ private void requestRuntime() { // processor有两个方法,必须调用其一,否则申请流程将终止。 } }) - .start(new RequestListener() { + .request(new RequestListener() { @Override public void onSuccess() { // TODO 授权成功 @@ -116,7 +116,7 @@ AnyPermission.with(this).install(apkFile) // processor有两个方法,必须调用其一,否则申请流程将终止。 } }) - .start(new RequestListener() { + .request(new RequestListener() { @Override public void onSuccess() { // TODO 授权成功 @@ -140,7 +140,7 @@ AnyPermission.with(this).overlay() // processor有两个方法,必须调用其一,否则申请流程将终止。 } }) - .start(new RequestListener() { + .request(new RequestListener() { @Override public void onSuccess() { // TODO 授权成功 @@ -164,7 +164,7 @@ AnyPermission.with(this).notificationShow() // processor有两个方法,必须调用其一,否则申请流程将终止。 } }) - .start(new RequestListener() { + .request(new RequestListener() { @Override public void onSuccess() { // TODO 授权成功 @@ -188,7 +188,7 @@ AnyPermission.with(this).notificationAccess() // processor有两个方法,必须调用其一,否则申请流程将终止。 } }) - .start(new RequestListener() { + .request(new RequestListener() { @Override public void onSuccess() { // TODO 授权成功 @@ -306,7 +306,7 @@ public RuntimeRequester onGoSetting(RequestInterceptor onGoSetting) /** * 开始申请 **/ -public RuntimeRequester start(@NonNull RequestListener listener) +public RuntimeRequester request(@NonNull RequestListener listener) /** * 从设置页返回的时候,需要在再Activity的onActivityResult()中调用 @@ -327,7 +327,7 @@ public InstallRequester onWithoutPermission(RequestInterceptor onWithoutPe /** * 开始申请 **/ -public Void start(final RequestListener listener) +public void request(final RequestListener listener) ``` ## OverlayRequester @@ -343,7 +343,7 @@ public OverlayRequester onWithoutPermission(RequestInterceptor onWithoutPe /** * 开始申请 **/ -public Void start(final RequestListener listener) +public void request(final RequestListener listener) ``` ## NotificationShowRequester @@ -359,7 +359,7 @@ public NotificationShowRequester onWithoutPermission(RequestInterceptor on /** * 开始申请 **/ -public Void start(final RequestListener listener) +public void request(final RequestListener listener) ``` ## NotificationAccessRequester @@ -375,7 +375,7 @@ public NotificationAccessRequester onWithoutPermission(RequestInterceptor /** * 开始申请 **/ -public Void start(final RequestListener listener) +public void request(final RequestListener listener) ``` diff --git a/anypermission/src/main/java/per/goweii/anypermission/InstallRequester.java b/anypermission/src/main/java/per/goweii/anypermission/InstallRequester.java index 6a05715..5b84e90 100644 --- a/anypermission/src/main/java/per/goweii/anypermission/InstallRequester.java +++ b/anypermission/src/main/java/per/goweii/anypermission/InstallRequester.java @@ -33,7 +33,7 @@ public InstallRequester onWithoutPermission(RequestInterceptor onWithoutPe } @Override - public Void start(final RequestListener listener) { + public Void request(final RequestListener listener) { mOption.install() .file(mApkFile) .rationale(new Rationale() { diff --git a/anypermission/src/main/java/per/goweii/anypermission/NotificationAccessRequester.java b/anypermission/src/main/java/per/goweii/anypermission/NotificationAccessRequester.java index 6621fc8..5a06c2a 100644 --- a/anypermission/src/main/java/per/goweii/anypermission/NotificationAccessRequester.java +++ b/anypermission/src/main/java/per/goweii/anypermission/NotificationAccessRequester.java @@ -29,7 +29,7 @@ public NotificationAccessRequester onWithoutPermission(RequestInterceptor } @Override - public Void start(final RequestListener listener) { + public Void request(final RequestListener listener) { mOption.notification().listener() .rationale(new Rationale() { @Override diff --git a/anypermission/src/main/java/per/goweii/anypermission/NotificationShowRequester.java b/anypermission/src/main/java/per/goweii/anypermission/NotificationShowRequester.java index ff12610..ccc421b 100644 --- a/anypermission/src/main/java/per/goweii/anypermission/NotificationShowRequester.java +++ b/anypermission/src/main/java/per/goweii/anypermission/NotificationShowRequester.java @@ -29,7 +29,7 @@ public NotificationShowRequester onWithoutPermission(RequestInterceptor on } @Override - public Void start(final RequestListener listener) { + public Void request(final RequestListener listener) { mOption.notification().permission() .rationale(new Rationale() { @Override diff --git a/anypermission/src/main/java/per/goweii/anypermission/OverlayRequester.java b/anypermission/src/main/java/per/goweii/anypermission/OverlayRequester.java index 84e7c53..dd91e85 100644 --- a/anypermission/src/main/java/per/goweii/anypermission/OverlayRequester.java +++ b/anypermission/src/main/java/per/goweii/anypermission/OverlayRequester.java @@ -29,7 +29,7 @@ public OverlayRequester onWithoutPermission(RequestInterceptor onWithoutPe } @Override - public Void start(final RequestListener listener) { + public Void request(final RequestListener listener) { mOption.overlay() .rationale(new Rationale() { @Override diff --git a/anypermission/src/main/java/per/goweii/anypermission/Requester.java b/anypermission/src/main/java/per/goweii/anypermission/Requester.java index 4907d3f..befa4af 100644 --- a/anypermission/src/main/java/per/goweii/anypermission/Requester.java +++ b/anypermission/src/main/java/per/goweii/anypermission/Requester.java @@ -7,5 +7,5 @@ * @date 2019/3/16 */ interface Requester { - R start(RequestListener listener); + R request(RequestListener listener); } diff --git a/anypermission/src/main/java/per/goweii/anypermission/RuntimeRequester.java b/anypermission/src/main/java/per/goweii/anypermission/RuntimeRequester.java index a3a20d7..3160205 100644 --- a/anypermission/src/main/java/per/goweii/anypermission/RuntimeRequester.java +++ b/anypermission/src/main/java/per/goweii/anypermission/RuntimeRequester.java @@ -59,7 +59,7 @@ public RuntimeRequester onGoSetting(RequestInterceptor onGoSetting) { } @Override - public RuntimeRequester start(@NonNull RequestListener listener) { + public RuntimeRequester request(@NonNull RequestListener listener) { mListener = listener; findUnGrantedPermissions(); if (mUnGrantedPermissions.peek() == null) { diff --git a/anypermission/src/main/java/per/goweii/anypermission/SettingRequester.java b/anypermission/src/main/java/per/goweii/anypermission/SettingRequester.java index bc0d746..8ce854c 100644 --- a/anypermission/src/main/java/per/goweii/anypermission/SettingRequester.java +++ b/anypermission/src/main/java/per/goweii/anypermission/SettingRequester.java @@ -29,7 +29,7 @@ public SettingRequester onWithoutPermission(RequestInterceptor onWithoutPe } @Override - public Void start(final RequestListener listener) { + public Void request(final RequestListener listener) { mOption.setting() .write() .rationale(new Rationale() { diff --git a/app/src/main/java/per/goweii/android/anypermission/TestActivity.java b/app/src/main/java/per/goweii/android/anypermission/TestActivity.java index 5550792..60718cd 100644 --- a/app/src/main/java/per/goweii/android/anypermission/TestActivity.java +++ b/app/src/main/java/per/goweii/android/anypermission/TestActivity.java @@ -184,7 +184,7 @@ public void onClick(AnyLayer anyLayer, View v) { .show(); } }) - .start(new RequestListener() { + .request(new RequestListener() { @Override public void onSuccess() { Toast.makeText(TestActivity.this, "成功", Toast.LENGTH_SHORT).show(); @@ -234,7 +234,7 @@ public void onClick(AnyLayer anyLayer, View v) { .show(); } }) - .start(new RequestListener() { + .request(new RequestListener() { @Override public void onSuccess() { Toast.makeText(TestActivity.this, "成功", Toast.LENGTH_SHORT).show(); @@ -284,7 +284,7 @@ public void onClick(AnyLayer anyLayer, View v) { .show(); } }) - .start(new RequestListener() { + .request(new RequestListener() { @Override public void onSuccess() { Toast.makeText(TestActivity.this, "成功", Toast.LENGTH_SHORT).show(); @@ -334,7 +334,7 @@ public void onClick(AnyLayer anyLayer, View v) { .show(); } }) - .start(new RequestListener() { + .request(new RequestListener() { @Override public void onSuccess() { Toast.makeText(TestActivity.this, "成功", Toast.LENGTH_SHORT).show(); @@ -384,7 +384,7 @@ public void onClick(AnyLayer anyLayer, View v) { .show(); } }) - .start(new RequestListener() { + .request(new RequestListener() { @Override public void onSuccess() { Toast.makeText(TestActivity.this, "成功", Toast.LENGTH_SHORT).show(); @@ -434,7 +434,7 @@ public void onClick(AnyLayer anyLayer, View v) { .show(); } }) - .start(new RequestListener() { + .request(new RequestListener() { @Override public void onSuccess() { Toast.makeText(TestActivity.this, "成功", Toast.LENGTH_SHORT).show(); diff --git a/app/src/main/java/per/goweii/android/anypermission/TestFragment.java b/app/src/main/java/per/goweii/android/anypermission/TestFragment.java index 2f32218..53aface 100644 --- a/app/src/main/java/per/goweii/android/anypermission/TestFragment.java +++ b/app/src/main/java/per/goweii/android/anypermission/TestFragment.java @@ -191,7 +191,7 @@ public void onClick(AnyLayer anyLayer, View v) { .show(); } }) - .start(new RequestListener() { + .request(new RequestListener() { @Override public void onSuccess() { Toast.makeText(TestFragment.this.getContext(), "成功", Toast.LENGTH_SHORT).show(); @@ -241,7 +241,7 @@ public void onClick(AnyLayer anyLayer, View v) { .show(); } }) - .start(new RequestListener() { + .request(new RequestListener() { @Override public void onSuccess() { Toast.makeText(TestFragment.this.getContext(), "成功", Toast.LENGTH_SHORT).show(); @@ -291,7 +291,7 @@ public void onClick(AnyLayer anyLayer, View v) { .show(); } }) - .start(new RequestListener() { + .request(new RequestListener() { @Override public void onSuccess() { Toast.makeText(TestFragment.this.getContext(), "成功", Toast.LENGTH_SHORT).show(); @@ -341,7 +341,7 @@ public void onClick(AnyLayer anyLayer, View v) { .show(); } }) - .start(new RequestListener() { + .request(new RequestListener() { @Override public void onSuccess() { Toast.makeText(TestFragment.this.getContext(), "成功", Toast.LENGTH_SHORT).show(); @@ -391,7 +391,7 @@ public void onClick(AnyLayer anyLayer, View v) { .show(); } }) - .start(new RequestListener() { + .request(new RequestListener() { @Override public void onSuccess() { Toast.makeText(TestFragment.this.getContext(), "成功", Toast.LENGTH_SHORT).show(); @@ -441,7 +441,7 @@ public void onClick(AnyLayer anyLayer, View v) { .show(); } }) - .start(new RequestListener() { + .request(new RequestListener() { @Override public void onSuccess() { Toast.makeText(TestFragment.this.getContext(), "成功", Toast.LENGTH_SHORT).show();