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

Commit f85635e8 authored by Remi NGUYEN VAN's avatar Remi NGUYEN VAN Committed by android-build-merger
Browse files

Merge "Merge "Call clearCallingIdentity before notifyDnsResponse" am:...

Merge "Merge "Call clearCallingIdentity before notifyDnsResponse" am: e40bc740 am: 2d7dbf8e" into qt-dev-plus-aosp
am: 55f9b6ea

Change-Id: I2b1dfae776ecd4f5d68c1a8c5a63b3fa12230729
parents a523e5e8 55f9b6ea
Loading
Loading
Loading
Loading
+6 −5
Original line number Diff line number Diff line
@@ -1761,16 +1761,17 @@ public class ConnectivityService extends IConnectivityManager.Stub
            // the caller thread of registerNetworkAgent. Thus, it's not allowed to register netd
            // event callback for certain nai. e.g. cellular. Register here to pass to
            // NetworkMonitor instead.
            // TODO: Move the Dns Event to NetworkMonitor. Use Binder.clearCallingIdentity() in
            // registerNetworkAgent to have NetworkMonitor created with system process as design
            // expectation. Also, NetdEventListenerService only allow one callback from each
            // caller type. Need to re-factor NetdEventListenerService to allow multiple
            // NetworkMonitor registrants.
            // TODO: Move the Dns Event to NetworkMonitor. NetdEventListenerService only allow one
            // callback from each caller type. Need to re-factor NetdEventListenerService to allow
            // multiple NetworkMonitor registrants.
            if (nai != null && nai.satisfies(mDefaultRequest)) {
                final long token = Binder.clearCallingIdentity();
                try {
                    nai.networkMonitor().notifyDnsResponse(returnCode);
                } catch (RemoteException e) {
                    e.rethrowFromSystemServer();
                } finally {
                    Binder.restoreCallingIdentity(token);
                }
            }
        }