Home
last modified time | relevance | path

Searched refs:ok (Results 1 – 25 of 483) sorted by relevance

12345678910>>...20

/packages/providers/ContactsProvider/src/com/android/providers/contacts/util/
DContactsPermissions.java39 boolean ok = false; in hasCallerOrSelfPermission()
42 ok = true; // Called by self; always allow. in hasCallerOrSelfPermission()
44 ok = context.checkCallingOrSelfPermission(permission) in hasCallerOrSelfPermission()
52 + " ok=" + ok); in hasCallerOrSelfPermission()
54 return ok; in hasCallerOrSelfPermission()
58 final boolean ok = hasCallerOrSelfPermission(context, permission); in enforceCallingOrSelfPermission()
59 if (!ok) { in enforceCallingOrSelfPermission()
66 boolean ok = false; in hasPackagePermission()
68 ok = true; // Called by self; always allow. in hasPackagePermission()
70 ok = context.getPackageManager().checkPermission(permission, pkg) in hasPackagePermission()
[all …]
/packages/services/Car/cpp/libsysfsmonitor/tests/
DSysfsMonitorTest.cpp40 ASSERT_TRUE(ret.ok()) << "First initialization should be successful: " << ret.error().message(); in TEST_F()
41 ASSERT_FALSE(mSysfsMonitor->init([](const std::vector<int32_t>&) {}).ok()) in TEST_F()
47 ASSERT_TRUE(ret.ok()) << "First initialization should be successful: " << ret.error().message(); in TEST_F()
49 ASSERT_TRUE(ret.ok()) << "Releasing the initialized instance should be successful: " in TEST_F()
51 ASSERT_FALSE(mSysfsMonitor->release().ok()) << "Released instance cannot be released"; in TEST_F()
55 ASSERT_FALSE(mSysfsMonitor->release().ok()) << "Uninitailized instance cannot be released"; in TEST_F()
63 ASSERT_FALSE(mSysfsMonitor->unregisterFd(fd).ok()) in TEST_F()
73 ASSERT_TRUE(ret.ok()) << "Registering a file descriptor first time should be successful: " in TEST_F()
75 ASSERT_FALSE(mSysfsMonitor->registerFd(fd).ok()) in TEST_F()
85 ASSERT_TRUE(ret.ok()) << "Registering a file descriptor first time should be successful: " in TEST_F()
[all …]
/packages/modules/Virtualization/tests/testapk/src/native/
Dtestbinary.cpp66 if (result.ok()) { in report_test()
83 if (!connect_fd.ok()) { in run_echo_reverse_server()
88 if (!input_fd.ok()) { in run_echo_reverse_server()
120 if (!server_fd.ok()) { in start_echo_reverse_server()
139 if (!result.ok()) { in start_echo_reverse_server()
164 return ScopedAStatus::ok(); in start_test_service()
172 return ScopedAStatus::ok(); in start_test_service()
183 return ScopedAStatus::ok(); in start_test_service()
191 return ScopedAStatus::ok(); in start_test_service()
198 return ScopedAStatus::ok(); in start_test_service()
[all …]
/packages/modules/Connectivity/netd/
DBpfHandler.cpp56 if (!cgroupProg.ok()) { in attachProgramToCgroup()
62 return netdutils::status::ok; in attachProgramToCgroup()
67 if (!prog.ok()) { in checkProgramAccessible()
70 return netdutils::status::ok; in checkProgramAccessible()
95 if (!cg_fd.ok()) { in initPrograms()
179 return netdutils::status::ok; in initPrograms()
244 return netdutils::status::ok; in init()
252 unique_fd fd0(bpf::mapRetrieveExclusiveRW(m1)); if (!fd0.ok()) abort(); // grabs exclusive lock in mapLockTest()
254 unique_fd fd1(bpf::mapRetrieveExclusiveRW(m2)); if (!fd1.ok()) abort(); // no conflict with fd0 in mapLockTest()
255 unique_fd fd2(bpf::mapRetrieveExclusiveRW(m2)); if ( fd2.ok()) abort(); // busy due to fd1 in mapLockTest()
[all …]
/packages/modules/Connectivity/staticlibs/native/bpf_headers/include/bpf/
DBpfMap.h63 if (!mMapFd.ok()) abort(); in abortOnMismatch()
107 if (!mMapFd.ok()) { in init()
164 if (mMapFd.ok()) abortOnMismatch(/* writable */ false); // false isn't ideal in reset()
178 bool isValid() const { return mMapFd.ok(); } in isValid()
182 if (key.ok()) return false; in isEmpty()
196 while (curKey.ok()) { in iterate()
199 if (!status.ok()) return status; in iterate()
211 while (curKey.ok()) { in iterateWithValue()
214 if (!curValue.ok()) return curValue.error(); in iterateWithValue()
216 if (!status.ok()) return status; in iterateWithValue()
[all …]
/packages/services/Car/cpp/watchdog/server/src/
DServiceManager.cpp50 if (auto result = startWatchdogProcessService(mainLooper); !result.ok()) { in startServices()
54 if (auto result = mWatchdogServiceHelper->init(mWatchdogProcessService); !result.ok()) { in startServices()
58 if (auto result = startPressureMonitor(); !result.ok()) { in startServices()
62 if (auto result = startWatchdogPerfService(mWatchdogServiceHelper); !result.ok()) { in startServices()
66 !result.ok()) { in startServices()
74 if (auto result = mWatchdogBinderMediator->init(); !result.ok()) { in startServices()
108 if (auto result = mWatchdogProcessService->start(); !result.ok()) { in startWatchdogProcessService()
117 if (auto result = mPressureMonitor->init(); !result.ok()) { in startPressureMonitor()
120 if (auto result = mPressureMonitor->start(); !result.ok()) { in startPressureMonitor()
131 !result.ok()) { in startWatchdogPerfService()
[all …]
DWatchdogInternalHandler.cpp89 return ScopedAStatus::ok(); in checkSystemUser()
105 !result.ok()) { in dump()
133 if (auto result = mIoOveruseMonitor->resetIoOveruseStats(packageNames); !result.ok()) { in dump()
154 if (auto result = mWatchdogPerfService->onDump(fd); !result.ok()) { in dumpServices()
158 if (auto result = mIoOveruseMonitor->onDump(fd); !result.ok()) { in dumpServices()
167 if (auto result = mWatchdogPerfService->onDumpProto(proto); !result.ok()) { in dumpProto()
199 !result.ok()) { in checkAndRegisterIoOveruseMonitor()
303 return ScopedAStatus::ok(); in notifySystemStateChange()
313 if (const auto result = mWatchdogPerfService->onBootFinished(); !result.ok()) { in notifySystemStateChange()
317 return ScopedAStatus::ok(); in notifySystemStateChange()
[all …]
DOveruseConfigurationXmlHelper.cpp114 if (const auto result = readExactlyOneElement(kTagComponentType, rootElement); result.ok()) { in readComponentType()
270 result.ok()) { in readComponentLevelThresholds()
278 if (const auto result = readPerStateBytes(componentLevelThresholdElement); result.ok()) { in readComponentLevelThresholds()
300 if (const auto result = readPerStateBytes(childElement); result.ok()) { in readPerStateThresholds()
318 if (const auto result = readPerStateThresholds(childElement); result.ok()) { in readPackageSpecificThresholds()
335 if (const auto result = readPerStateThresholds(childElement); result.ok()) { in readAppCategorySpecificThresholds()
392 if (!result.ok()) { in readSystemWideThresholds()
406 result.ok()) { in readIoOveruseConfiguration()
414 result.ok()) { in readIoOveruseConfiguration()
419 if (const auto result = readPackageSpecificThresholds(childElement); result.ok()) { in readIoOveruseConfiguration()
[all …]
/packages/modules/Connectivity/tests/native/utilities/
Dfirewall.cpp47 if (!oldConfiguration.ok()) { in toggleStandbyMatch()
54 if (!res.ok()) return Errorf("Failed to toggle STANDBY_MATCH: {}", res.error().message()); in toggleStandbyMatch()
71 if (oldMatch.ok()) { in addRule()
77 if (!res.ok()) return Errorf("Failed to update rule: {}", res.error().message()); in addRule()
84 if (!res.ok()) return Errorf("Failed to add rule: {}", res.error().message()); in addRule()
92 if (!oldMatch.ok()) return Errorf("uid: %u does not exist in map", uid); in removeRule()
100 if (!res.ok()) return Errorf("Failed to remove rule: {}", res.error().message()); in removeRule()
103 if (!res.ok()) return Errorf("Failed to update rule: {}", res.error().message()); in removeRule()
115 if (!res.ok()) return res; in addUidInterfaceRules()
123 if (!res.ok()) return res; in removeUidInterfaceRules()
[all …]
/packages/services/Car/cpp/evs/manager/aidl/tests/unit/src/
DMockEvsHal.cpp356 return ndk::ScopedAStatus::ok(); in addMockCameraDevice()
366 return ndk::ScopedAStatus::ok(); in addMockCameraDevice()
384 return ndk::ScopedAStatus::ok(); in addMockCameraDevice()
399 return ndk::ScopedAStatus::ok(); in addMockCameraDevice()
415 return ndk::ScopedAStatus::ok(); in addMockCameraDevice()
433 return ndk::ScopedAStatus::ok(); in addMockCameraDevice()
442 return ndk::ScopedAStatus::ok(); in addMockCameraDevice()
457 return ndk::ScopedAStatus::ok(); in addMockCameraDevice()
486 return ndk::ScopedAStatus::ok(); in addMockCameraDevice()
489 ON_CALL(*mockCamera, pauseVideoStream).WillByDefault([]() { return ndk::ScopedAStatus::ok(); }); in addMockCameraDevice()
[all …]
/packages/services/Car/cpp/powerpolicy/server/tests/
DPolicyManagerTest.cpp376 ASSERT_FALSE(policyManager.getPowerPolicy(kNonExistingPowerPolicyId).ok()); in checkPolicies()
380 ASSERT_TRUE(policyMeta.ok()); in checkPolicies()
384 ASSERT_TRUE(policyMeta.ok()); in checkPolicies()
388 ASSERT_TRUE(policyMeta.ok()); in checkPolicies()
392 ASSERT_TRUE(policyMeta.ok()); in checkPolicies()
397 ASSERT_FALSE(policyManager.getPowerPolicy(kNonExistingPowerPolicyId).ok()); in checkPoliciesWithCustomComponents()
401 ASSERT_TRUE(policyMeta.ok()); in checkPoliciesWithCustomComponents()
406 ASSERT_TRUE(policyMeta.ok()); in checkPoliciesWithCustomComponents()
411 ASSERT_TRUE(policyMeta.ok()); in checkPoliciesWithCustomComponents()
416 ASSERT_TRUE(policyMeta.ok()); in checkPoliciesWithCustomComponents()
[all …]
/packages/services/Car/cpp/powerpolicy/server/src/
DCarPowerPolicyServer.cpp124 return ScopedAStatus::ok(); in checkSystemPermission()
149 if (!ret.ok()) { in onPropertyEvent()
157 if (!ret.ok()) { in onPropertyEvent()
209 return ScopedAStatus::ok(); in notifyCarServiceReady()
219 return ScopedAStatus::ok(); in notifyPowerPolicyChange()
230 return ScopedAStatus::ok(); in notifyPowerPolicyDefinition()
275 return ScopedAStatus::ok(); in setPowerPolicyGroup()
277 if (const auto& ret = mService->setPowerPolicyGroupInternal(policyGroupId); !ret.ok()) { in setPowerPolicyGroup()
281 return ScopedAStatus::ok(); in setPowerPolicyGroup()
327 return ScopedAStatus::ok(); in runWithService()
[all …]
/packages/modules/Bluetooth/system/gd/rust/linux/mgmt/src/
Dconfig_util.rs61 get_log_level_internal(read_config().ok()?) in get_log_level()
66 .ok()? in get_log_level_internal()
70 .ok() in get_log_level_internal()
75 read_config().ok().and_then(|config| is_hci_n_enabled_internal(config, hci)).unwrap_or(true) in is_hci_n_enabled()
80 .ok()? in is_hci_n_enabled_internal()
102 match read_config().ok().and_then(|config| modify_hci_n_enabled_internal(config, hci, enabled)) in modify_hci_n_enabled()
115 let mut o = serde_json::from_str::<Value>(config.as_str()).ok()?; in modify_hci_n_enabled_internal()
119 serde_json::ser::to_string_pretty(&o).ok() in modify_hci_n_enabled_internal()
125 serde_json::ser::to_string_pretty(&o).ok() in modify_hci_n_enabled_internal()
132 .ok() in get_default_adapter()
[all …]
/packages/providers/ContactsKeysProvider/src/com/android/providers/contactkeys/util/
DE2eeContactKeysPermissions.java34 boolean ok; in hasCallerOrSelfPermission()
37 ok = true; // Called by self; always allow. in hasCallerOrSelfPermission()
39 ok = context.checkCallingOrSelfPermission(permission) in hasCallerOrSelfPermission()
47 + " ok=" + ok); in hasCallerOrSelfPermission()
49 return ok; in hasCallerOrSelfPermission()
53 final boolean ok = hasCallerOrSelfPermission(context, permission); in enforceCallingOrSelfPermission()
54 if (!ok) { in enforceCallingOrSelfPermission()
/packages/services/Car/cpp/evs/manager/aidl/wrappers/src/
DAidlEnumerator.cpp89 return ScopedAStatus::ok(); in isHardware()
103 return ScopedAStatus::ok(); in getStreamList()
119 return ScopedAStatus::ok(); in getStreamList()
142 return ScopedAStatus::ok(); in getStreamList()
150 return ScopedAStatus::ok(); in closeCamera()
175 return ScopedAStatus::ok(); in openDisplay()
182 return ScopedAStatus::ok(); in closeDisplay()
190 return ScopedAStatus::ok(); in closeDisplay()
206 return ScopedAStatus::ok(); in getDisplayState()
260 return ScopedAStatus::ok(); in getCameraList()
[all …]
/packages/services/Car/cpp/watchdog/server/tests/
DThreadPriorityControllerTest.cpp76 ASSERT_TRUE(result.ok()) << result.error().message(); in TEST_F()
89 ASSERT_TRUE(result.ok()) << result.error().message(); in TEST_F()
95 EXPECT_FALSE(result.ok()); in TEST_F()
102 EXPECT_FALSE(result.ok()); in TEST_F()
109 EXPECT_FALSE(result.ok()); in TEST_F()
116 EXPECT_FALSE(result.ok()); in TEST_F()
123 EXPECT_FALSE(result.ok()); in TEST_F()
137 EXPECT_FALSE(result.ok()); in TEST_F()
154 ASSERT_TRUE(result.ok()) << result.error().message(); in TEST_F()
163 EXPECT_FALSE(result.ok()); in TEST_F()
[all …]
DPressureMonitorTest.cpp180 mPressureMonitor->registerPressureChangeCallback(mMockPressureChangeCallback).ok()) in SetUp()
365 ASSERT_TRUE(result.ok()) << "Initialize pressure monitor. Result: " << result.error(); in TEST_F()
395 ASSERT_FALSE(result.ok()) << "Initialization should fail on error"; in TEST_F()
411 ASSERT_FALSE(mPressureMonitor->start().ok()) in TEST_F()
424 ASSERT_FALSE(result.ok()) << "Initialization should fail on error"; in TEST_F()
438 ASSERT_FALSE(mPressureMonitor->start().ok()) in TEST_F()
447 ASSERT_TRUE(result.ok()) << "Initialize pressure monitor. Result: " << result.error(); in TEST_F()
450 ASSERT_TRUE(result.ok()) << "Failed to start pressure monitor thread. Result: " in TEST_F()
456 ASSERT_FALSE(result.ok()) << "Shouldn't start pressure monitor more than once. Result: " in TEST_F()
462 ASSERT_TRUE(result.ok()) << "Initialize pressure monitor. Result: " << result.error(); in TEST_F()
[all …]
/packages/modules/Connectivity/staticlibs/netd/libnetdutils/
DSyscallsTest.cpp63 EXPECT_CALL(mSyscalls, close(kFd)).WillOnce(Return(status::ok)); in TEST_F()
65 EXPECT_EQ(status::ok, result.status()); in TEST_F()
79 return status::ok; in TEST_F()
100 .WillOnce(Return(status::ok)); in TEST_F()
101 EXPECT_EQ(status::ok, sys.setsockopt(kFd, kLevel, kOptname, expected)); in TEST_F()
120 .WillOnce(Return(status::ok)); in TEST_F()
121 EXPECT_EQ(status::ok, sys.getsockopt(kFd, kLevel, kOptname, &expected, &optLen)); in TEST_F()
137 .WillOnce(Return(status::ok)); in TEST_F()
138 EXPECT_EQ(status::ok, sys.bind(kFd, expected)); in TEST_F()
154 .WillOnce(Return(status::ok)); in TEST_F()
[all …]
/packages/modules/Bluetooth/system/bta/le_audio/
Dle_audio_set_configuration_provider_json.cc398 bool ok = flatbuffers::LoadFile(schema_file, true, in LoadConfigurationsFromFiles() local
400 if (!ok) return ok; in LoadConfigurationsFromFiles()
403 ok = configurations_parser_.Deserialize( in LoadConfigurationsFromFiles()
406 if (!ok) return ok; in LoadConfigurationsFromFiles()
410 ok = flatbuffers::LoadFile(content_file, false, in LoadConfigurationsFromFiles()
412 if (!ok) return ok; in LoadConfigurationsFromFiles()
415 ok = configurations_parser_.Parse(configurations_json_content.c_str()); in LoadConfigurationsFromFiles()
416 if (!ok) return ok; in LoadConfigurationsFromFiles()
479 bool ok = flatbuffers::LoadFile(schema_file, true, in LoadScenariosFromFiles() local
481 if (!ok) return ok; in LoadScenariosFromFiles()
[all …]
/packages/modules/DnsResolver/tests/dns_metrics_listener/
Dbase_metrics_listener.cpp28 return ::ndk::ScopedAStatus::ok(); in onDnsEvent()
35 return ::ndk::ScopedAStatus::ok(); in onPrivateDnsValidationEvent()
43 return ::ndk::ScopedAStatus::ok(); in onConnectEvent()
57 return ::ndk::ScopedAStatus::ok(); in onWakeupEvent()
65 return ::ndk::ScopedAStatus::ok(); in onTcpSocketStatsEvent()
72 return ::ndk::ScopedAStatus::ok(); in onNat64PrefixEvent()
/packages/modules/StatsD/statsd/src/
DStatsService.cpp85 return Status::ok(); in checkUid()
108 return Status::ok(); in checkSid()
112 return Status::ok(); in checkSid()
996 return Status::ok(); in informAllUidData()
1009 return Status::ok(); in informOnePackage()
1019 return Status::ok(); in informOnePackageRemoved()
1025 return Status::ok(); in informAnomalyAlarmFired()
1042 return Status::ok(); in informAlarmForSubscriberTriggeringFired()
1052 return Status::ok(); in informPollAlarmFired()
1060 return Status::ok(); in systemRunning()
[all …]
/packages/modules/Permission/SafetyCenter/ResourcesLib/tests/java/com/android/safetycenter/resources/
DSafetyCenterResourcesApkTest.kt169 val ok = resourcesApk.getString(android.R.string.ok) in getString_validString_returnsString() constant
171 assertThat(ok).isEqualTo("OK") in getString_validString_returnsString()
180 resourcesApk.getString(android.R.string.ok) in getString_nullContext_throwsRegardlessOfFallback()
188 val ok = resourcesApk.getString(android.R.string.ok, "") in getStringWithFormatArgs_validString_returnsString() constant
190 assertThat(ok).isEqualTo("OK") in getStringWithFormatArgs_validString_returnsString()
199 resourcesApk.getString(android.R.string.ok, "") in getStringWithFormatArgs_nullContext_throwsRegardlessOfFallback()
273 val ok = resourcesApk.getOptionalString(android.R.string.ok) in getOptionalString_validString_returnsString() constant
275 assertThat(ok).isEqualTo("OK") in getOptionalString_validString_returnsString()
293 resourcesApk.getOptionalString(android.R.string.ok) in getOptionalString_nullContext_throwsRegardlessOfFallback()
/packages/modules/Virtualization/compos/compos_key_helper/
Dcompos_key_test.cpp36 ASSERT_TRUE(key_pair.ok()) << key_pair.error(); in SetUp()
43 ASSERT_TRUE(other_key_pair.ok()) << other_key_pair.error(); in TEST_F()
51 ASSERT_TRUE(other_key_pair.ok()) << other_key_pair.error(); in TEST_F()
59 ASSERT_TRUE(signature.ok()) << signature.error(); in TEST_F()
67 ASSERT_TRUE(signature.ok()) << signature.error(); in TEST_F()
77 ASSERT_TRUE(signature.ok()) << signature.error(); in TEST_F()
90 ASSERT_TRUE(other_key_pair.ok()) << other_key_pair.error(); in TEST_F()
/packages/modules/Connectivity/service-t/native/libs/libnetworkstats/
DBpfNetworkStats.cpp55 if (v.ok()) return v; in ifindex2name()
75 if (!statsEntry.ok()) { in bpfGetUidStatsInternal()
98 if (!ifname.ok()) { in bpfGetIfaceStatsInternal()
104 if (!statsEntry.ok()) { in bpfGetIfaceStatsInternal()
112 return res.ok() ? 0 : -res.error().code(); in bpfGetIfaceStatsInternal()
122 if (!statsEntry.ok()) { in bpfGetIfIndexStatsInternal()
157 if (!ifname.ok()) { in parseBpfNetworkStatsDetailInternal()
162 if (!statsEntry.ok()) { in parseBpfNetworkStatsDetailInternal()
175 if (!res.ok()) { in parseBpfNetworkStatsDetailInternal()
199 if (!configuration.ok()) { in parseBpfNetworkStatsDetail()
[all …]
/packages/services/Car/service/jni/evs/
DNoOpEvsDisplay.h32 return ndk::ScopedAStatus::ok(); in getDisplayInfo()
35 return ndk::ScopedAStatus::ok(); in getDisplayState()
38 return ndk::ScopedAStatus::ok(); in getTargetBuffer()
41 return ndk::ScopedAStatus::ok(); in returnTargetBufferForDisplay()
44 return ndk::ScopedAStatus::ok(); in setDisplayState()

12345678910>>...20