Skip to content
This repository has been archived by the owner on Jan 11, 2021. It is now read-only.

Runtime Permissions #42

Merged
merged 13 commits into from
Sep 17, 2016
Merged

Runtime Permissions #42

merged 13 commits into from
Sep 17, 2016

Conversation

alexstyl
Copy link
Owner

@alexstyl alexstyl commented Sep 17, 2016

Description

This PR introduces Runtime permissions introduced in Android 6.0. When running in devices prior to 6.0 the app should behave the same as before.
On Android 6.0 the following permissions are requested:

  • READ_CONTACTS Contact permission when accessing the Upcoming Events, Search and Date Details screen. The user is granted access if they grant the required permission. If no, the app closes.
  • READ_EXTERNAL_STORAGE When the user tries to select a Ringtone on the Daily Reminder screen, they are prompted to grant the said permission.

NOTE: For some reason the onActivityResult of the DailyReminderActivity does not get called. That might be caused because of the custom version of PreferenceFragment we are using.

Test(s) added

Yup. Around ContactPermissionRequest. Because of that this PR also introduces the

testOptions {
        unitTests.returnDefaultValues = true
    }

option in order to be able to test the Navigator class. At the initialisation of the class a Uri field was getting instantiated making the tests crash

Screenshots
Upcoming Ringtone
permission_upcoming permission_ringtone

@alexstyl alexstyl changed the base branch from master to develop September 17, 2016 19:24
@alexstyl alexstyl merged commit 536e382 into develop Sep 17, 2016
@alexstyl alexstyl deleted the permission/feature branch September 17, 2016 20:03
@alexstyl alexstyl added this to the Exposed Search milestone Sep 18, 2016
@alexstyl alexstyl mentioned this pull request Sep 18, 2016
alexstyl added a commit that referenced this pull request Jul 4, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant