I am getting a strange problem which I am not able to understand as the app does not give any crash log or any other message which I can follow to search the problem.
I launching a service from my activity and in this service I am trying to find out the number of process which are in error state but when my code reaches to the line
ActivityManager am = (ActivityManager) getSystemService(Context.ACTIVITY_SERVICE);
then the app stops working. When I debugged my app then I found that after hitting the above line the debugger navigates to the file ActivityThread.java in cleanUpPendingRemoveWindows() with a message "Source code does not match the byte code". I am not able to understand why this is happening?
My code is:
import android.app.ActivityManager;
import android.app.Service;
import android.app.usage.UsageStats;
import android.app.usage.UsageStatsManager;
im