|
@@ -7,8 +7,10 @@ import android.graphics.Bitmap;
|
|
|
import android.graphics.BitmapFactory;
|
|
import android.graphics.BitmapFactory;
|
|
|
import android.net.Uri;
|
|
import android.net.Uri;
|
|
|
import android.os.Bundle;
|
|
import android.os.Bundle;
|
|
|
|
|
+import android.provider.Settings;
|
|
|
import android.support.annotation.NonNull;
|
|
import android.support.annotation.NonNull;
|
|
|
import android.support.annotation.Nullable;
|
|
import android.support.annotation.Nullable;
|
|
|
|
|
+import android.support.v4.app.ActivityCompat;
|
|
|
import android.support.v4.content.ContextCompat;
|
|
import android.support.v4.content.ContextCompat;
|
|
|
import android.support.v7.widget.LinearLayoutManager;
|
|
import android.support.v7.widget.LinearLayoutManager;
|
|
|
import android.support.v7.widget.RecyclerView;
|
|
import android.support.v7.widget.RecyclerView;
|
|
@@ -111,6 +113,13 @@ public class EventParticipationFragment extends FragmentBase<EventParticipationP
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ @Override
|
|
|
|
|
+ public void goSettingPermission() {
|
|
|
|
|
+ Intent intent = new Intent(Settings.ACTION_APPLICATION_DETAILS_SETTINGS)
|
|
|
|
|
+ .setData(Uri.parse("package:" + getContext().getPackageName()));
|
|
|
|
|
+ startActivity(intent);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
@Override
|
|
@Override
|
|
|
public void onRequestPermissionsResult(int requestCode, @NonNull String[] permissions, @NonNull int[] grantResults) {
|
|
public void onRequestPermissionsResult(int requestCode, @NonNull String[] permissions, @NonNull int[] grantResults) {
|
|
|
switch (requestCode) {
|
|
switch (requestCode) {
|
|
@@ -119,7 +128,10 @@ public class EventParticipationFragment extends FragmentBase<EventParticipationP
|
|
|
getAlbumImage();
|
|
getAlbumImage();
|
|
|
}
|
|
}
|
|
|
else {
|
|
else {
|
|
|
- Log.e("APP# EventParticipationFragment | onRequestPermissionsResult", "|" + "거부 눌렀음");
|
|
|
|
|
|
|
+ if (false == ActivityCompat.shouldShowRequestPermissionRationale(getActivity(), Manifest.permission.READ_EXTERNAL_STORAGE)) {
|
|
|
|
|
+ // TODO: 추후 기획 반영 임시로 다시보지 않음 클릭 후 커스텀 알럿 띄움
|
|
|
|
|
+ presenter.onEvent(new Event.Builder(Event.DIALOG).build());
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
break;
|
|
break;
|
|
|
default:
|
|
default:
|
|
@@ -140,7 +152,6 @@ public class EventParticipationFragment extends FragmentBase<EventParticipationP
|
|
|
@Override
|
|
@Override
|
|
|
public void onActivityResult(int requestCode, int resultCode, Intent data) {
|
|
public void onActivityResult(int requestCode, int resultCode, Intent data) {
|
|
|
if (requestCode == GET_ALBUM_PHOTO) {
|
|
if (requestCode == GET_ALBUM_PHOTO) {
|
|
|
- Log.e("APP# EventParticipationFragment | onActivityResult", "|" + "--");
|
|
|
|
|
try {
|
|
try {
|
|
|
Uri uri = data.getData();
|
|
Uri uri = data.getData();
|
|
|
Log.e("APP# EventParticipationFragment | onActivityResult", "|" + uri);
|
|
Log.e("APP# EventParticipationFragment | onActivityResult", "|" + uri);
|