diff --git a/client/client/src/main/java/org/wso2/iot/agent/activities/AlreadyRegisteredActivity.java b/client/client/src/main/java/org/wso2/iot/agent/activities/AlreadyRegisteredActivity.java index eedfa80a..b4e0dc50 100644 --- a/client/client/src/main/java/org/wso2/iot/agent/activities/AlreadyRegisteredActivity.java +++ b/client/client/src/main/java/org/wso2/iot/agent/activities/AlreadyRegisteredActivity.java @@ -531,8 +531,6 @@ private void initiateUnregistration() { loadInitialActivity(); } - - /** * Display unregistration confirmation dialog. */ @@ -568,7 +566,7 @@ private void loadDeviceInfoActivity() { * Load initial activity. */ private void loadInitialActivity() { - Preference.putString(context, Constants.PreferenceFlag.IP, null); + Preference.clearPreferences(this); Intent intent = new Intent( AlreadyRegisteredActivity.this, SplashActivity.class); intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP); startActivity(intent);