Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8385847
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T17:46:16+00:00 2026-06-09T17:46:16+00:00

I am trying to trace the wifi settings code. My intention is to know

  • 0

I am trying to trace the wifi settings code. My intention is to know the flow from application to kernel layer after toggling the WIFI button OFF to ON.

While we go to Settings page in Android, toggle the WLAN(WIFI) button, then
your wifi should be enabled.

  1. I found that this page corresponds to WifiSettings.java. In this file, while you toggle the button from OFF to ON:

    private void updateWifiState(int state) {
    
    getActivity().invalidateOptionsMenu();
       switch (state) {
            case WifiManager.WIFI_STATE_ENABLING:
            addMessagePreference(R.string.wifi_starting);
            break;
    }
    
    mLastInfo = null;
    mLastState = null;
    mScanner.pause();          
    }  
    

    This function will be called.

  2. I then go to check WifiManager.java. I found:

    /**  
     * Wi-Fi is currently being enabled. The state will change to  
       {@link#WIFI_STATE_ENABLED}  
     if it finishes successfully.  
     *  
     * @see #WIFI_STATE_CHANGED_ACTION  
     * @see #getWifiState()  
     */  
    
    public static final int WIFI_STATE_ENABLING = 2;
    

However, after this, I did not really understand how to dig deeper in tracing the flow.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T17:46:17+00:00Added an answer on June 9, 2026 at 5:46 pm

    You should look at WifiEnabler.java, since the code you mentioned just shows some string.
    In WifiEnabler::onCheckChanged(), you can see that mWifiManager.setWifiEnabled() is called.

    After that, you may look at WifiManager.java and other related files in that directory. There is a state machine and you should trace the state transitions.

    Generally, Android is using wpa_supplicant, which is nearly the same as Linux. The configuration file is at /data/misc/wifi/wpa_supplicant.conf, and is generated by Android. After you toggle the wifi switch, Android starts wpa_supplicant and communicates with it. The wpa_supplicant is in charge of scanning and connecting to wifi station.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to write an TUI bandwidth trace application which on query can
I'm trying to use the following code to get all trace data for the
I am trying to trace the name of the button that started the eventListener
i'm trying to trace the x and y coordinates from within a sprite. i've
My team trying to trace a strange bug in a Rails (ver 2.3.8) application.
I'm trying to trace through the Python source code where a certain function is
I'm trying to output to Trace.axd from an ASP.NET MVC app. I have traces
I am trying to trace all of the zombies in my application and get
I am trying to trace an assembly code in Win64 platform: When instruction execute
I'm trying to get RSSI or signal strength from WiFi packets. I want also

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.