Android Open Source - growthpush-android System Utils






From Project

Back to project page growthpush-android.

License

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.

Java Source Code

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;

  }

}




Java Source Code List

com.growthpush.BroadcastReceiver.java
com.growthpush.GrowthPushException.java
com.growthpush.GrowthPush.java
com.growthpush.Logger.java
com.growthpush.Preference.java
com.growthpush.Thread.java
com.growthpush.bridge.ExternalFrameworkBridge.java
com.growthpush.bridge.ExternalFrameworkBroadcastReceiver.java
com.growthpush.growthpushsample.MainActivity.java
com.growthpush.handler.BaseReceiveHandler.java
com.growthpush.handler.DefaultReceiveHandler.java
com.growthpush.handler.OnlyAlertReceiveHandler.java
com.growthpush.handler.OnlyNotificationReceiveHandler.java
com.growthpush.handler.ReceiveHandler.java
com.growthpush.model.ClientStatus.java
com.growthpush.model.Client.java
com.growthpush.model.Environment.java
com.growthpush.model.Error.java
com.growthpush.model.Event.java
com.growthpush.model.Model.java
com.growthpush.model.Tag.java
com.growthpush.utils.DeviceUtils.java
com.growthpush.utils.IOUtils.java
com.growthpush.utils.PermissionUtils.java
com.growthpush.utils.SystemUtils.java
com.growthpush.view.AlertActivity.java
com.growthpush.view.AlertFragment.java
com.growthpush.view.DialogCallback.java