Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d1c4a8b2 authored by Zhuoyao Zhang's avatar Zhuoyao Zhang
Browse files

Change the flag to enable edit monitor to ENABLE_ANDROID_EDIT_MONITOR

To prevent conflicts.

Test: atest edit_monitor_integartion_test
      atest daemon_manager_test
Bug: 365617369
Change-Id: I6c09c23c2d659d6dc37bc33e00cebf665a7fde0d
parent da5bff1c
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -83,7 +83,7 @@ class DaemonManager:
    if not utils.is_feature_enabled(
        "edit_monitor",
        self.user_name,
        "ENABLE_EDIT_MONITOR",
        "ENABLE_ANDROID_EDIT_MONITOR",
        10,
    ):
      logging.warning("Edit monitor is disabled, exiting...")
+3 −2
Original line number Diff line number Diff line
@@ -81,7 +81,8 @@ class DaemonManagerTest(unittest.TestCase):
    # Sets the tempdir under the working dir so any temp files created during
    # tests will be cleaned.
    tempfile.tempdir = self.working_dir.name
    self.patch = mock.patch.dict(os.environ, {'ENABLE_EDIT_MONITOR': 'true'})
    self.patch = mock.patch.dict(
        os.environ, {'ENABLE_ANDROID_EDIT_MONITOR': 'true'})
    self.patch.start()

  def tearDown(self):
@@ -136,7 +137,7 @@ class DaemonManagerTest(unittest.TestCase):
    # Verify no daemon process is started.
    self.assertIsNone(dm.daemon_process)

  @mock.patch.dict(os.environ, {'ENABLE_EDIT_MONITOR': 'false'}, clear=True)
  @mock.patch.dict(os.environ, {'ENABLE_ANDROID_EDIT_MONITOR': 'false'}, clear=True)
  def test_start_return_directly_if_disabled(self):
    dm = daemon_manager.DaemonManager(TEST_BINARY_FILE)
    dm.start()
+2 −1
Original line number Diff line number Diff line
@@ -48,7 +48,8 @@ class EditMonitorIntegrationTest(unittest.TestCase):
    )
    self.root_monitoring_path.mkdir()
    self.edit_monitor_binary_path = self._import_executable("edit_monitor")
    self.patch = mock.patch.dict(os.environ, {'ENABLE_EDIT_MONITOR': 'true'})
    self.patch = mock.patch.dict(
        os.environ, {'ENABLE_ANDROID_EDIT_MONITOR': 'true'})
    self.patch.start()

  def tearDown(self):