         }
     }
 
-    private func reportLockAction(_ shouldLock: Bool) {
+    private func reportLockStateChange() {
         var request = URLRequest(url: LockViewController.REPORT_URL)
         request.httpMethod = "POST"
-        request.httpBody = try! JSONSerialization.data(withJSONObject: ["type": "manualLock", "locked": shouldLock])
+        request.httpBody = try! JSONSerialization.data(withJSONObject: ["type": "lockStateChange", "locked": self.isLocked])
         request.addValue("application/json", forHTTPHeaderField: "Content-Type")
         let task = URLSession.shared.dataTask(with: request) { data, response, error in
             guard let data = data, error == nil else {

        self.isUpdatingLockState = false
        self.updateLockButtonImages()

        print("INFO: Lock state updated: \(self.isLocked ? "LOCKED" : "UNLOCKED").")
    }


        self.isUpdatingLockState = true
        print("INFO: Updating the lock state: \(shouldLock ? "LOCKED" : "UNLOCKED").")

        if let state = self.targetLockState {
            state.writeValue(shouldLock ? 1 : 0) { error in
                if error != nil {
