Back to project page unbounce-android.
The source code is released under:
MIT License
If you think the Android project unbounce-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.ryansteckler.nlpunbounce.models; /* w w w. jav a 2s. c om*/ import android.content.Context; import com.ryansteckler.nlpunbounce.helpers.UidNameResolver; import java.io.Serializable; /** * Created by rsteckler on 10/19/14. */ public class ServiceStats extends BaseStats implements Serializable { public ServiceStats(String serviceName, int uId) { setType("service"); setName(serviceName); setUid(uId); setType("service"); } private ServiceStats() { setType("service"); } @Override public String getDerivedPackageName(Context ctx) { if (null == getDerivedPackageName()) { UidNameResolver resolver = UidNameResolver.getInstance(ctx); String packName = resolver.getLabelForServices(this.getUid(), this.getName()); if (null != packName) { setDerivedPackageName(packName); } else { setDerivedPackageName("Unknown"); } } return getDerivedPackageName(); } }