!65 重命名Pref文件名和uitest标识符

Merge pull request !65 from Mupceet/rename
This commit is contained in:
openharmony_ci 2022-03-12 06:24:00 +00:00 committed by Gitee
commit 4e6150457b
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
8 changed files with 21 additions and 17 deletions

View File

@ -25,12 +25,12 @@ bool CaptionProperty::CheckProperty(const std::string& property)
return result;
}
std::string CaptionProperty::GetBackgroundColor() const
std::string CaptionProperty::GetBackgroundColor() const
{
return backgroundColor_;
}
void CaptionProperty::SetBackgroundColor(std::string color)
void CaptionProperty::SetBackgroundColor(std::string color)
{
backgroundColor_ = color;
}
@ -45,12 +45,12 @@ void CaptionProperty::SetFontScale(int scale)
fontScale_ = scale;
}
std::string CaptionProperty::GetFontColor() const
std::string CaptionProperty::GetFontColor() const
{
return fontColor_;
}
void CaptionProperty::SetFontColor(std::string color)
void CaptionProperty::SetFontColor(std::string color)
{
fontColor_ = color;
}
@ -65,12 +65,12 @@ void CaptionProperty::SetFontEdgeType(std::string type)
fontEdgeType_ = type;
}
std::string CaptionProperty::GetWindowColor() const
std::string CaptionProperty::GetWindowColor() const
{
return windowColor_;
}
void CaptionProperty::SetWindowColor(std::string color)
void CaptionProperty::SetWindowColor(std::string color)
{
windowColor_ = color;
}

View File

@ -59,7 +59,7 @@ HWTEST_F(AccessibilityOperatorUnitTest, AccessibilityOperator_001, TestSize.Leve
{
GTEST_LOG_(INFO) << "GetChannel_001 start";
sptr<IAccessibleAbilityChannel> service = new MockAccessibleAbilityChannel();
AccessibilityOperator instance = AccessibilityOperator::GetInstance();
AccessibilityOperator &instance = AccessibilityOperator::GetInstance();
GTEST_LOG_(INFO) << "AddChannel 1";
instance.AddChannel(1, service);

View File

@ -53,7 +53,7 @@ public:
void SetFontColor(std::string color);
std::string GetFontColor() const;
void SetFontEdgeType(std::string type);
void SetFontEdgeType(std::string type);
std::string GetFontEdgeType() const;
void SetWindowColor(std::string color);

View File

@ -21,7 +21,7 @@
namespace OHOS {
namespace Accessibility {
const static std::string PREF_TEST_PATH =
const static std::string PREF_PATH =
"/data/service/el1/public/barrierfree/accessibility_ability_manager_service/";
AccessibilityAccountData::AccessibilityAccountData(int accountId)
@ -819,7 +819,7 @@ void AccessibilityAccountData::StringToVector(std::string &stringIn, std::vector
void AccessibilityAccountData::init()
{
int errCode = 0;
pref_ = NativePreferences::PreferencesHelper::GetPreferences(PREF_TEST_PATH + "test.xml", errCode);
pref_ = NativePreferences::PreferencesHelper::GetPreferences(PREF_PATH + "100.xml", errCode);
if (errCode) {
HILOG_ERROR("GetPreferences failed! errCode(%{public}d).", errCode);
return;

View File

@ -542,9 +542,9 @@ void AccessibleAbilityConnection::AccessibleAbilityConnectionDeathRecipient::OnR
recipientAccountData_->RemoveConnectedAbility(connection);
recipientAccountData_->RemoveEnabledAbility(recipientElementName_);
std::string uiTestUri = "/com.example.uitest/uitestability";
std::string uiTestUri = "/ohos.uitest/uitestability";
if (recipientElementName_.GetURI() == uiTestUri) {
recipientAccountData_->RemoveInstalledAbility("com.example.uitest");
recipientAccountData_->RemoveInstalledAbility("ohos.uitest");
}
DelayedSingleton<AccessibleAbilityManagerService>::GetInstance()->UpdateAbilities();

View File

@ -39,7 +39,7 @@ const string AAMS_SERVICE_NAME = "AccessibleAbilityManagerService";
const string TASK_PUBLIC_NOTICE_EVENT = "PublicNoticeEvent";
const string TASK_SEND_PUBLIC_NOTICE_EVENT = "SendPublicNoticeEvent";
const string UI_TEST_BUNDLE_NAME = "com.example.uitest";
const string UI_TEST_BUNDLE_NAME = "ohos.uitest";
const string UI_TEST_ABILITY_NAME = "uitestability";
const bool REGISTER_RESULT =
@ -268,6 +268,10 @@ void AccessibleAbilityManagerService::RegisterElementOperator(
}
sptr<AccessibilityWindowConnection> connection = new AccessibilityWindowConnection(windowId, operation, accountId);
if (!connection) {
HILOG_ERROR("New AccessibilityWindowConnection failed!!");
return;
}
accountData->AddAccessibilityWindowConnection(windowId, connection);
if (!interactionOperationDeathRecipient_) {

View File

@ -65,12 +65,12 @@ void CaptionProperty::SetFontEdgeType(std::string type)
fontEdgeType_ = type;
}
std::string CaptionProperty::GetWindowColor() const
std::string CaptionProperty::GetWindowColor() const
{
return windowColor_;
}
void CaptionProperty::SetWindowColor(std::string color)
void CaptionProperty::SetWindowColor(std::string color)
{
windowColor_ = color;
}

View File

@ -65,12 +65,12 @@ void CaptionProperty::SetFontEdgeType(std::string type)
fontEdgeType_ = type;
}
std::string CaptionProperty::GetWindowColor() const
std::string CaptionProperty::GetWindowColor() const
{
return windowColor_;
}
void CaptionProperty::SetWindowColor(std::string color)
void CaptionProperty::SetWindowColor(std::string color)
{
windowColor_ = color;
}