|
@@ -152,14 +152,19 @@ public class IService extends android.app.Service {
|
|
|
@SuppressLint("ApplySharedPref")
|
|
|
void Init() throws RemoteException {
|
|
|
SharedPreferences vPreferences = ctx.getSharedPreferences(dataPath, MODE);
|
|
|
- boolean value = vPreferences.getBoolean("factory_init", true);
|
|
|
- String deviceName = AHDeviceHelper.getDeviceName();
|
|
|
- Log.d(TAG, "factory_init: " + value + ", deviceName: " + deviceName);
|
|
|
- if (!deviceName.isEmpty() && !value) {
|
|
|
+ final boolean factoryInit = vPreferences.getBoolean("factory_init", true);
|
|
|
+ final String deviceName = AHDeviceHelper.getDeviceName();
|
|
|
+ Log.d(TAG, "factory_init: " + factoryInit + ", deviceName: " + deviceName);
|
|
|
+
|
|
|
+ if (deviceName.isEmpty()) {
|
|
|
+ setDeviceName();
|
|
|
+ }
|
|
|
+
|
|
|
+ if (!factoryInit) {
|
|
|
+ Log.d(TAG, "already initialized");
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
- setDeviceName();
|
|
|
//setLauncher();
|
|
|
|
|
|
Log.d(TAG, "restore default logo");
|