Skip to content

Commit

Permalink
部分类重命名
Browse files Browse the repository at this point in the history
  • Loading branch information
cuizhen committed Mar 20, 2019
1 parent abd956f commit 0d9bfe9
Show file tree
Hide file tree
Showing 10 changed files with 29 additions and 29 deletions.
20 changes: 10 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ private void requestRuntime() {
// processor有两个方法,必须调用其一,否则申请流程将终止。
}
})
.start(new RequestListener() {
.request(new RequestListener() {
@Override
public void onSuccess() {
// TODO 授权成功
Expand Down Expand Up @@ -116,7 +116,7 @@ AnyPermission.with(this).install(apkFile)
// processor有两个方法,必须调用其一,否则申请流程将终止。
}
})
.start(new RequestListener() {
.request(new RequestListener() {
@Override
public void onSuccess() {
// TODO 授权成功
Expand All @@ -140,7 +140,7 @@ AnyPermission.with(this).overlay()
// processor有两个方法,必须调用其一,否则申请流程将终止。
}
})
.start(new RequestListener() {
.request(new RequestListener() {
@Override
public void onSuccess() {
// TODO 授权成功
Expand All @@ -164,7 +164,7 @@ AnyPermission.with(this).notificationShow()
// processor有两个方法,必须调用其一,否则申请流程将终止。
}
})
.start(new RequestListener() {
.request(new RequestListener() {
@Override
public void onSuccess() {
// TODO 授权成功
Expand All @@ -188,7 +188,7 @@ AnyPermission.with(this).notificationAccess()
// processor有两个方法,必须调用其一,否则申请流程将终止。
}
})
.start(new RequestListener() {
.request(new RequestListener() {
@Override
public void onSuccess() {
// TODO 授权成功
Expand Down Expand Up @@ -306,7 +306,7 @@ public RuntimeRequester onGoSetting(RequestInterceptor<String> onGoSetting)
/**
* 开始申请
**/
public RuntimeRequester start(@NonNull RequestListener listener)
public RuntimeRequester request(@NonNull RequestListener listener)

/**
* 从设置页返回的时候,需要在再Activity的onActivityResult()中调用
Expand All @@ -327,7 +327,7 @@ public InstallRequester onWithoutPermission(RequestInterceptor<File> onWithoutPe
/**
* 开始申请
**/
public Void start(final RequestListener listener)
public void request(final RequestListener listener)
```

## OverlayRequester
Expand All @@ -343,7 +343,7 @@ public OverlayRequester onWithoutPermission(RequestInterceptor<Void> onWithoutPe
/**
* 开始申请
**/
public Void start(final RequestListener listener)
public void request(final RequestListener listener)
```

## NotificationShowRequester
Expand All @@ -359,7 +359,7 @@ public NotificationShowRequester onWithoutPermission(RequestInterceptor<Void> on
/**
* 开始申请
**/
public Void start(final RequestListener listener)
public void request(final RequestListener listener)
```

## NotificationAccessRequester
Expand All @@ -375,7 +375,7 @@ public NotificationAccessRequester onWithoutPermission(RequestInterceptor<Void>
/**
* 开始申请
**/
public Void start(final RequestListener listener)
public void request(final RequestListener listener)
```


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public InstallRequester onWithoutPermission(RequestInterceptor<File> onWithoutPe
}

@Override
public Void start(final RequestListener listener) {
public Void request(final RequestListener listener) {
mOption.install()
.file(mApkFile)
.rationale(new Rationale<File>() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public NotificationAccessRequester onWithoutPermission(RequestInterceptor<Void>
}

@Override
public Void start(final RequestListener listener) {
public Void request(final RequestListener listener) {
mOption.notification().listener()
.rationale(new Rationale<Void>() {
@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public NotificationShowRequester onWithoutPermission(RequestInterceptor<Void> on
}

@Override
public Void start(final RequestListener listener) {
public Void request(final RequestListener listener) {
mOption.notification().permission()
.rationale(new Rationale<Void>() {
@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public OverlayRequester onWithoutPermission(RequestInterceptor<Void> onWithoutPe
}

@Override
public Void start(final RequestListener listener) {
public Void request(final RequestListener listener) {
mOption.overlay()
.rationale(new Rationale<Void>() {
@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@
* @date 2019/3/16
*/
interface Requester<R> {
R start(RequestListener listener);
R request(RequestListener listener);
}
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ public RuntimeRequester onGoSetting(RequestInterceptor<String> onGoSetting) {
}

@Override
public RuntimeRequester start(@NonNull RequestListener listener) {
public RuntimeRequester request(@NonNull RequestListener listener) {
mListener = listener;
findUnGrantedPermissions();
if (mUnGrantedPermissions.peek() == null) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public SettingRequester onWithoutPermission(RequestInterceptor<Void> onWithoutPe
}

@Override
public Void start(final RequestListener listener) {
public Void request(final RequestListener listener) {
mOption.setting()
.write()
.rationale(new Rationale<Void>() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down Expand Up @@ -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();
Expand Down Expand Up @@ -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();
Expand Down Expand Up @@ -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();
Expand Down Expand Up @@ -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();
Expand Down Expand Up @@ -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();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down Expand Up @@ -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();
Expand Down Expand Up @@ -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();
Expand Down Expand Up @@ -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();
Expand Down Expand Up @@ -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();
Expand Down Expand Up @@ -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();
Expand Down

0 comments on commit 0d9bfe9

Please sign in to comment.