<NME> PermissionRequestContext.java
<BEF> package cgeo.geocaching.permission;

import cgeo.geocaching.R;

public enum PermissionRequestContext {

    MainActivityOnCreate(1111, R.string.location_permission_request_explanation),
    MainActivityOnResume(1112, R.string.location_permission_request_explanation),
    MainActivityStorage(1113, R.string.storage_permission_request_explanation),
    TrackableActivity(2221, R.string.location_permission_request_explanation),
    CacheDetailActivity(2222, R.string.location_permission_request_explanation),
    CacheListActivity(2223, R.string.location_permission_request_explanation),
    CacheListActivity(2223, R.string.location_permission_request_explanation),
    CGeoMap(2224, R.string.location_permission_request_explanation),
    NewMap(2225, R.string.location_permission_request_explanation),
    EditWaypointActivity(2226, R.string.location_permission_request_explanation),
    CompassActivity(2227, R.string.location_permission_request_explanation),
    AbstractDialogFragment(2228, R.string.location_permission_request_explanation),
    NavigateAnyPointActivity(2229, R.string.location_permission_request_explanation),
    LogCacheActivity(2230, R.string.location_permission_request_explanation),
    InstallWizardActivity(3001, R.string.location_permission_request_explanation);

    private final int requestCode;
    private final int askAgainResource;

    PermissionRequestContext(final int requestCode, final int askAgainResource) {
        this.requestCode = requestCode;
        this.askAgainResource = askAgainResource;
    }

    public int getRequestCode() {
        return requestCode;
    }

    public int getAskAgainResource() {
        return askAgainResource;
    }

    public static PermissionRequestContext fromRequestCode(final int requestCode) {
        for (final PermissionRequestContext perm : PermissionRequestContext.values()) {
            if (perm.requestCode == requestCode) {
                return perm;
            }
        }

        throw new IndexOutOfBoundsException("Unknown request code " + requestCode);
    }
}

<MSG> Reactivate the contacts plugin (fix #7193) (#7943)

* Reactivate the contacts plugin (fix #7193)

It was stated in https://github.com/cgeo/cgeo/issues/7582#issuecomment-487609065:
	As long as we support Api versions without permission requests, we IMO cannot integrate it
	into the main app based on the same arguments we had for the separation initially.
My internal test showed that this is correct.

fixes #7193 (Raise Target SDK to 26 for contacts plugin (or reintegrate into main app))
fixes #7582 (Remove contacts plugin from useful apps list)
 -> not remove, but reactivate

- build.gradle based on PR #7236
- adapt PermissionHandler and PermissionRequestContext from main for the contacts need
- inplement contacts permission handling in ContactsActivity
- minor code optimizations (Checkstyle suggestions) in selectContact and getContacts

tested on Android 4.3, 7.0 and 9

* Add button to go directly to the android app info for c:geo - contacts.

* raise version

<DFF> @@ -7,6 +7,8 @@ public enum PermissionRequestContext {
     MainActivityOnCreate(1111, R.string.location_permission_request_explanation),
     MainActivityOnResume(1112, R.string.location_permission_request_explanation),
     MainActivityStorage(1113, R.string.storage_permission_request_explanation),
+    // placeholder, see contacts addon
+    // ContactsActivity(1114, R.string.contacts_permission_request_explanation, R.string.contacts_permission_request_denied);
     TrackableActivity(2221, R.string.location_permission_request_explanation),
     CacheDetailActivity(2222, R.string.location_permission_request_explanation),
     CacheListActivity(2223, R.string.location_permission_request_explanation),

Reactivate the contacts plugin (fix #7193) (#7943)