创建 HandleNoticeUtils.java
parent
1ecf3998ad
commit
5fd4acf9fb
|
|
@ -0,0 +1,27 @@
|
|||
package com.nbee.echolink.utils;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.SharedPreferences;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class HandleNoticeUtils {
|
||||
private SharedPreferencesManager spManager;
|
||||
private Context context;
|
||||
|
||||
public HandleNoticeUtils(Context context) {
|
||||
this.context = context;
|
||||
}
|
||||
|
||||
public String messageHandle(String packageName){
|
||||
String appName = null;
|
||||
spManager = new SharedPreferencesManager(context);
|
||||
String value = spManager.getString(packageName,"defaultValue");
|
||||
if (value.equals("defaultValue")){
|
||||
return appName;
|
||||
}
|
||||
appName = value;
|
||||
return appName;
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue