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

Commit ab6c75c1 authored by Chad Brubaker's avatar Chad Brubaker Committed by Android (Google) Code Review
Browse files

Merge "Write ADB keys to adb_keys as well for backwards compat"

parents f313f3fa c5da14c2
Loading
Loading
Loading
Loading
+6 −14
Original line number Diff line number Diff line
@@ -328,6 +328,9 @@ public class AdbDebuggingManager {
                            mConnectedKey = key;
                            mAdbKeyStore.setLastConnectionTime(key, System.currentTimeMillis());
                            scheduleJobToUpdateAdbKeyStore();
                            // write this key to adb_keys as well so that subsequent connections can
                            // go through the expected SIGNATURE interaction.
                            writeKey(key);
                        }
                        logAdbConnectionChanged(key, AdbProtoEnums.USER_ALLOWED, alwaysAllow);
                    }
@@ -360,20 +363,9 @@ public class AdbDebuggingManager {
                        }
                        break;
                    }
                    // Check if the key should be allowed without user interaction.
                    if (mAdbKeyStore.isKeyAuthorized(key)) {
                        if (mThread != null) {
                            mThread.sendResponse("OK");
                            mAdbKeyStore.setLastConnectionTime(key, System.currentTimeMillis());
                            logAdbConnectionChanged(key, AdbProtoEnums.AUTOMATICALLY_ALLOWED, true);
                            mConnectedKey = key;
                            scheduleJobToUpdateAdbKeyStore();
                        }
                    } else {
                    logAdbConnectionChanged(key, AdbProtoEnums.AWAITING_USER_APPROVAL, false);
                    mFingerprints = fingerprints;
                    startConfirmation(key, mFingerprints);
                    }
                    break;
                }