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

Commit 758bdf4a authored by Wenchao Tong's avatar Wenchao Tong Committed by Chelsea Derrick
Browse files

Add a new SystemApi, getPrivilegedConfiguredNetworks(). Part 1 [DO NOT MERGE]

This is very similar to the existing
WifiManger.getConfiguredNetworks(), but it returns real preSharedKey.
This API is only used by system application.

Bug: 15703353
Change-Id: If3eaca3286e77b780272f42a28772d1d8d39db65
(cherry picked from commit 775bf6ae5d052948bcb60eaf89defa9105d7077c)
parent 6d246a9d
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -41,6 +41,8 @@ interface IWifiManager

    List<WifiConfiguration> getConfiguredNetworks();

    List<WifiConfiguration> getPrivilegedConfiguredNetworks();

    int addOrUpdateNetwork(in WifiConfiguration config);

    boolean removeNetwork(int netId);
+10 −0
Original line number Diff line number Diff line
@@ -629,6 +629,16 @@ public class WifiManager {
        }
    }

    /** @hide */
    @SystemApi
    public List<WifiConfiguration> getPrivilegedConfiguredNetworks() {
        try {
            return mService.getPrivilegedConfiguredNetworks();
        } catch (RemoteException e) {
            return null;
        }
    }

    /**
     * Add a new network description to the set of configured networks.
     * The {@code networkId} field of the supplied configuration object