We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Consider the following code:
package edu.wm.cs.semeru.exampleapp; import android.content.Context; import android.os.Bundle; import android.support.v7.app.AppCompatActivity; import android.telephony.PhoneStateListener; import android.telephony.TelephonyManager; public class MainActivity extends AppCompatActivity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); TelephonyManager manager = (TelephonyManager) getSystemService(Context.TELEPHONY_SERVICE); manager.listen(new PhoneStateListener() { @Override public void onDataConnectionStateChanged(int state) { } }, PhoneStateListener.LISTEN_NONE); } }
The current output is
package edu.wm.cs.semeru.exampleapp; import android.content.Context; import android.os.Bundle; import android.support.v7.app.AppCompatActivity; import android.telephony.PhoneStateListener; import android.telephony.TelephonyManager; public class MainActivity extends AppCompatActivity { String dataLeAk2 = "2"; String dataLeAk0 = "0"; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); android.util.Log.d("leak-0-0", dataLeAk0); android.util.Log.d("leak-2-0", dataLeAk2); dataLeAk0 = java.util.Calendar.getInstance().getTimeZone().getDisplayName(); setContentView(R.layout.activity_main); TelephonyManager manager = (TelephonyManager) getSystemService(Context.TELEPHONY_SERVICE); manager.listen(new PhoneStateListener() { String dataLeAk1 = "1"; @Override public void onDataConnectionStateChanged(int state) { dataLeAk2 = java.util.Calendar.getInstance().getTimeZone().getDisplayName(); dataLeAk1 = java.util.Calendar.getInstance().getTimeZone().getDisplayName(); } }, PhoneStateListener.LISTEN_NONE); } }
There is no sink for dataLeAk1. Should have one inside the onDataConnetionStateChanged() method.
dataLeAk1
onDataConnetionStateChanged()
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Consider the following code:
The current output is
There is no sink for
dataLeAk1
. Should have one inside theonDataConnetionStateChanged()
method.The text was updated successfully, but these errors were encountered: