Remove keyboardRootName2 hack. 12/171112/6
authorPawel Kurowski <p.kurowski2@samsung.com>
Mon, 26 Feb 2018 16:08:41 +0000 (17:08 +0100)
committerLukasz Oleksak <l.oleksak@samsung.com>
Wed, 7 Mar 2018 09:33:42 +0000 (09:33 +0000)
Application with empty name may be incorrectly recognized as keyboard,
what will lead to looping the search for the scanning context.

Change-Id: Icba02f8e5f3aee0d320120d4f6eac251414de9fc

src/NavigationInterface.cpp

index 0d40b84..9f007e4 100644 (file)
@@ -806,18 +806,19 @@ private:
                        }
                        AtspiAccessiblePtr root, keyboardRoot;
                        UIElement::ApplicationCategory application = UIElement::ApplicationCategory::OTHER;
-                       static const std::string keyboardRootName1 = "ise-default";
-                       // TODO: remove keyboardRootName2, once app name patch will be merged and on image
-                       static const std::string keyboardRootName2 = "";
+                       static const std::string keyboardRootName = "ise-default";
                        static const std::string homescreenRootName = "homescreen-efl";
                        for (auto pid : wins.all.pids) {
                                DEBUG("checking pid %d", pid);
                                auto ptr = wins.all.pidToAtspi[pid];
                                auto name = wins.all.names[ptr];
-                               if (pid == wins.all.ourPid && !wins.all.weHaveChildren) continue;
-                               if (name == keyboardRootName1 || name == keyboardRootName2) {
+                               if (pid == wins.all.ourPid && !wins.all.weHaveChildren)
+                                       continue;
+                               if (name == keyboardRootName) {
                                        keyboardRoot = std::move(ptr);
-                               } else if (!root) {
+                                       continue;
+                               }
+                               if (!root) {
                                        root = std::move(ptr);
                                        if (name == homescreenRootName)
                                                application = UIElement::ApplicationCategory::HOMESCREEN;