diff options
Diffstat (limited to 'src/org/cyanogenmod/wallpapers/photophase/RequestPermissionsActivity.java')
-rw-r--r-- | src/org/cyanogenmod/wallpapers/photophase/RequestPermissionsActivity.java | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/org/cyanogenmod/wallpapers/photophase/RequestPermissionsActivity.java b/src/org/cyanogenmod/wallpapers/photophase/RequestPermissionsActivity.java index 5999d10..e600cc2 100644 --- a/src/org/cyanogenmod/wallpapers/photophase/RequestPermissionsActivity.java +++ b/src/org/cyanogenmod/wallpapers/photophase/RequestPermissionsActivity.java @@ -5,10 +5,13 @@ import android.annotation.NonNull; import android.annotation.Nullable; import android.app.Activity; import android.content.Context; +import android.content.Intent; import android.content.pm.PackageManager; import android.os.Bundle; import android.widget.Toast; +import org.cyanogenmod.wallpapers.photophase.preferences.PreferencesProvider; + public class RequestPermissionsActivity extends Activity { public static final int REQUEST_STORAGE_PERMISSION = 1; @@ -34,6 +37,14 @@ public class RequestPermissionsActivity extends Activity { // If request is cancelled, the result arrays are empty. if (grantResults.length > 0 && grantResults[0] == PackageManager.PERMISSION_GRANTED) { + + Intent intent = new Intent(PreferencesProvider.ACTION_SETTINGS_CHANGED); + intent.putExtra(PreferencesProvider.EXTRA_FLAG_REDRAW, Boolean.TRUE); + intent.putExtra(PreferencesProvider.EXTRA_FLAG_RECREATE_WORLD, Boolean.TRUE); + intent.putExtra(PreferencesProvider.EXTRA_FLAG_MEDIA_RELOAD, Boolean.TRUE); + intent.putExtra(PreferencesProvider.EXTRA_ACTION_MEDIA_USER_RELOAD_REQUEST, + Boolean.FALSE); + sendBroadcast(intent); setResult(Activity.RESULT_OK); } else { Toast.makeText(this, R.string.runtime_permission_warning, Toast.LENGTH_SHORT) |