Back to project page growthpush-android.
The source code is released under:
Apache License
If you think the Android project growthpush-android listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package com.growthpush.utils; /*from w w w. ja va 2s . c om*/ import android.app.ActivityManager; import android.app.Service; import android.content.Context; import android.os.PowerManager; public class SystemUtils { public static PowerManager getPowerManager(Context context) { try { return (PowerManager) context.getSystemService(Context.POWER_SERVICE); } catch (SecurityException e) { } catch (ClassCastException e) { } return null; } public static ActivityManager getActivityManager(Context context) { try { return (ActivityManager) context.getSystemService(Service.ACTIVITY_SERVICE); } catch (SecurityException e) { } catch (ClassCastException e) { } return null; } }