ActivityManager manager=(ActivityManager)context.getSystemService(int flags);
可能在非activity中无法获得,所以需要传入参数contenx