All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.zebrunner.carina.utils.android.Permissions Maven / Gradle / Ivy

/*******************************************************************************
 * Copyright 2020-2022 Zebrunner Inc (https://www.zebrunner.com).
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 *******************************************************************************/
package com.zebrunner.carina.utils.android;

public class Permissions {

    public enum Permission {
        // https://github.com/appium/appium-uiautomator2-driver#mobile-changepermissions
        CAMERA_ACCESS("android.permission.CAMERA"),
        READ_EXTERNAL_STORAGE(
                "android.permission.READ_EXTERNAL_STORAGE"),
        WRITE_EXTERNAL_STORAGE(
                "android.permission.WRITE_EXTERNAL_STORAGE"),
        ACCESS_COARSE_LOCATION(
                "android.permission.ACCESS_COARSE_LOCATION"),
        ACCESS_FINE_LOCATION(
                "android.permission.ACCESS_FINE_LOCATION"),
        ACCESS_LOCATION_EXTRA_COMMANDS(
                "android.permission.ACCESS_LOCATION_EXTRA_COMMANDS");

        private final String name;

        Permission(String permission) {
            this.name = permission;
        }

        public String getPermission() {
            return this.name;
        }
    }

    public enum PermissionType {
        DENIED("denied"),
        GRANTED("granted"),
        REQUESTED("requested");

        private final String status;

        private PermissionType(String status) {
            this.status = status;
        }

        public String getType() {
            return this.status;
        }
    }

    public enum PermissionAction {
        GRANT("grant"),
        REVOKE("revoke");

        private final String action;

        private PermissionAction(String action) {
            this.action = action;
        }

        public String getAction() {
            return this.action;
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy