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

Commit c1a2650b authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

Merge "Change the flag to enable edit monitor to ENABLE_ANDROID_EDIT_MONITOR" into main

parents 9f24cf9f d1c4a8b2
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):