1 /* 2 * Copyright (C) 2022 The Android Open Source Project 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 #pragma once 17 18 #include <libradiocompat/RadioNetwork.h> 19 20 namespace cf::ril { 21 22 class RefRadioNetwork : public android::hardware::radio::compat::RadioNetwork { 23 ::aidl::android::hardware::radio::network::UsageSetting mUsageSetting = 24 ::aidl::android::hardware::radio::network::UsageSetting::VOICE_CENTRIC; 25 // As per the specs, the default is true. 26 bool mIsCellularIdentifierTransparencyEnabled = true; 27 bool mIsCipheringTransparencyEnabled = true; 28 29 public: 30 using android::hardware::radio::compat::RadioNetwork::RadioNetwork; 31 32 ::ndk::ScopedAStatus setUsageSetting( 33 int32_t serial, 34 ::aidl::android::hardware::radio::network::UsageSetting usageSetting) override; 35 ::ndk::ScopedAStatus getUsageSetting(int32_t serial) override; 36 37 ::ndk::ScopedAStatus setEmergencyMode( 38 int32_t serial, 39 ::aidl::android::hardware::radio::network::EmergencyMode emergencyMode) override; 40 41 ::ndk::ScopedAStatus triggerEmergencyNetworkScan( 42 int32_t serial, 43 const ::aidl::android::hardware::radio::network::EmergencyNetworkScanTrigger& request) 44 override; 45 46 ::ndk::ScopedAStatus exitEmergencyMode(int32_t serial) override; 47 48 ::ndk::ScopedAStatus cancelEmergencyNetworkScan(int32_t serial, bool resetScan) override; 49 50 ::ndk::ScopedAStatus isN1ModeEnabled(int32_t serial) override; 51 52 ::ndk::ScopedAStatus setN1ModeEnabled(int32_t serial, bool enable) override; 53 54 ::ndk::ScopedAStatus setNullCipherAndIntegrityEnabled(int32_t serial, bool enabled) override; 55 56 ::ndk::ScopedAStatus isNullCipherAndIntegrityEnabled(int32_t serial) override; 57 58 ::ndk::ScopedAStatus setCellularIdentifierTransparencyEnabled(int32_t serial, bool enabled) override; 59 60 ::ndk::ScopedAStatus isCellularIdentifierTransparencyEnabled(int32_t serial) override; 61 62 ::ndk::ScopedAStatus setSecurityAlgorithmsUpdatedEnabled(int32_t serial, bool enabled) override; 63 64 ::ndk::ScopedAStatus isSecurityAlgorithmsUpdatedEnabled(int32_t serial) override; 65 }; 66 67 } // namespace cf::ril 68