Loading res/xml/roles.xml +2 −0 Original line number Diff line number Diff line Loading @@ -378,6 +378,7 @@ <!--- @see android.telecom.CallRedirectionService --> <role name="android.app.role.CALL_REDIRECTION" behavior="CallRedirectionRoleBehavior" description="@string/role_call_redirection_description" exclusive="true" label="@string/role_call_redirection_label" Loading @@ -397,6 +398,7 @@ <!--- @see android.telecom.CallScreeningService --> <role name="android.app.role.CALL_SCREENING" behavior="CallScreeningRoleBehavior" description="@string/role_call_screening_description" exclusive="true" label="@string/role_call_screening_label" Loading src/com/android/permissioncontroller/role/model/CallRedirectionRoleBehavior.java 0 → 100644 +36 −0 Original line number Diff line number Diff line /* * Copyright (C) 2019 The Android Open Source Project * * 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.android.permissioncontroller.role.model; import android.content.Context; import androidx.annotation.NonNull; import java.util.List; /** * Class for behavior of the call redirection role. */ public class CallRedirectionRoleBehavior implements RoleBehavior { @NonNull @Override public List<String> getDefaultHolders(@NonNull Role role, @NonNull Context context) { return ExclusiveDefaultHolderMixin.getDefaultHolders(role, "config_defaultCallRedirection", context); } } src/com/android/permissioncontroller/role/model/CallScreeningRoleBehavior.java 0 → 100644 +36 −0 Original line number Diff line number Diff line /* * Copyright (C) 2019 The Android Open Source Project * * 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.android.permissioncontroller.role.model; import android.content.Context; import androidx.annotation.NonNull; import java.util.List; /** * Class for behavior of the call screening role. */ public class CallScreeningRoleBehavior implements RoleBehavior { @NonNull @Override public List<String> getDefaultHolders(@NonNull Role role, @NonNull Context context) { return ExclusiveDefaultHolderMixin.getDefaultHolders(role, "config_defaultCallScreening", context); } } Loading
res/xml/roles.xml +2 −0 Original line number Diff line number Diff line Loading @@ -378,6 +378,7 @@ <!--- @see android.telecom.CallRedirectionService --> <role name="android.app.role.CALL_REDIRECTION" behavior="CallRedirectionRoleBehavior" description="@string/role_call_redirection_description" exclusive="true" label="@string/role_call_redirection_label" Loading @@ -397,6 +398,7 @@ <!--- @see android.telecom.CallScreeningService --> <role name="android.app.role.CALL_SCREENING" behavior="CallScreeningRoleBehavior" description="@string/role_call_screening_description" exclusive="true" label="@string/role_call_screening_label" Loading
src/com/android/permissioncontroller/role/model/CallRedirectionRoleBehavior.java 0 → 100644 +36 −0 Original line number Diff line number Diff line /* * Copyright (C) 2019 The Android Open Source Project * * 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.android.permissioncontroller.role.model; import android.content.Context; import androidx.annotation.NonNull; import java.util.List; /** * Class for behavior of the call redirection role. */ public class CallRedirectionRoleBehavior implements RoleBehavior { @NonNull @Override public List<String> getDefaultHolders(@NonNull Role role, @NonNull Context context) { return ExclusiveDefaultHolderMixin.getDefaultHolders(role, "config_defaultCallRedirection", context); } }
src/com/android/permissioncontroller/role/model/CallScreeningRoleBehavior.java 0 → 100644 +36 −0 Original line number Diff line number Diff line /* * Copyright (C) 2019 The Android Open Source Project * * 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.android.permissioncontroller.role.model; import android.content.Context; import androidx.annotation.NonNull; import java.util.List; /** * Class for behavior of the call screening role. */ public class CallScreeningRoleBehavior implements RoleBehavior { @NonNull @Override public List<String> getDefaultHolders(@NonNull Role role, @NonNull Context context) { return ExclusiveDefaultHolderMixin.getDefaultHolders(role, "config_defaultCallScreening", context); } }