Skip to content
This repository was archived by the owner on Oct 3, 2024. It is now read-only.

Commit 38b6aa8

Browse files
Fix whitespace errors and typo
1 parent 82545e4 commit 38b6aa8

File tree

5 files changed

+17
-20
lines changed

5 files changed

+17
-20
lines changed

Diff for: CONTRIBUTING.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
Not Found
1+
Not Found

Diff for: README.md

+13-15
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ EasyPermissions is installed by adding the following dependency to your `build.g
99

1010
```java
1111
dependencies {
12-
compile 'pub.devrel:easypermissions:0.2.0'
12+
compile 'pub.devrel:easypermissions:0.2.0'
1313
}
1414
```
1515

@@ -21,7 +21,6 @@ To begin using EasyPermissions, have your `Activity` (or `Fragment`) override th
2121

2222
```java
2323
public class MainActivity extends AppCompatActivity {
24-
2524
@Override
2625
protected void onCreate(Bundle savedInstanceState) {
2726
super.onCreate(savedInstanceState);
@@ -35,7 +34,6 @@ public class MainActivity extends AppCompatActivity {
3534
// Forward results to EasyPermissions
3635
EasyPermissions.onRequestPermissionsResult(requestCode, permissions, grantResults, this);
3736
}
38-
3937
}
4038
```
4139

@@ -58,21 +56,21 @@ The example below shows how to request permissions for a method that requires bo
5856
This can also be achieved by adding logic on the `onPermissionsGranted` callback.
5957

6058
```java
61-
@AfterPermissionGranted(RC_CAMERA_AND_WIFI)
62-
private void methodRequiresTwoPermission() {
63-
String[] perms = {Manifest.permission.CAMERA, Manifest.permission.CHANGE_WIFI_STATE};
64-
if (EasyPermissions.hasPermissions(this, perms)) {
65-
// Already have permission, do the thing
66-
// ...
67-
} else {
68-
// Do not have permissions, request them now
69-
EasyPermissions.requestPermissions(this, getString(R.string.camera_and_wifi_rationale),
70-
RC_CAMERA_AND_WIFI, perms);
71-
}
59+
@AfterPermissionGranted(RC_CAMERA_AND_WIFI)
60+
private void methodRequiresTwoPermission() {
61+
String[] perms = {Manifest.permission.CAMERA, Manifest.permission.CHANGE_WIFI_STATE};
62+
if (EasyPermissions.hasPermissions(this, perms)) {
63+
// Already have permission, do the thing
64+
// ...
65+
} else {
66+
// Do not have permissions, request them now
67+
EasyPermissions.requestPermissions(this, getString(R.string.camera_and_wifi_rationale),
68+
RC_CAMERA_AND_WIFI, perms);
7269
}
70+
}
7371
```
7472

75-
Optionally, for a finer control, you can have your `Activity` / `Framgment` implement
73+
Optionally, for a finer control, you can have your `Activity` / `Fragment` implement
7674
the `PermissionCallbacks` interface.
7775

7876
```java

Diff for: app/proguard-rules.pro

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Add project specific ProGuard rules here.
22
# By default, the flags in this file are appended to flags specified
3-
# in /usr/local/google/home/samstern/android-sdk-linux/tools/proguard/proguard-android.txt
3+
# in ${sdk.dir}/tools/proguard/proguard-android.txt
44
# You can edit the include path and order by changing the proguardFiles
55
# directive in build.gradle.
66
#

Diff for: app/src/main/AndroidManifest.xml

+1-2
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
88
<uses-permission android:name="android.permission.READ_CONTACTS" />
9-
9+
1010
<uses-permission android:name="android.permission.READ_SMS" />
1111

1212
<application
@@ -23,5 +23,4 @@
2323
</intent-filter>
2424
</activity>
2525
</application>
26-
2726
</manifest>

Diff for: easypermissions/proguard-rules.pro

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Add project specific ProGuard rules here.
22
# By default, the flags in this file are appended to flags specified
3-
# in /usr/local/google/home/samstern/android-sdk-linux/tools/proguard/proguard-android.txt
3+
# in ${sdk.dir}/tools/proguard/proguard-android.txt
44
# You can edit the include path and order by changing the proguardFiles
55
# directive in build.gradle.
66
#

0 commit comments

Comments
 (0)