Changes in cordova plugin is not applied to built APK

I need customization in one of the cordova plugin i am using in ionic 2.
I have added some code in .java file of plugin But those changes are not applied to the built APK though file is saved.
Is there any other proper way of doing that?

Original plugin had this method.

public void echo(String image, Boolean base64, Context context)
{
	try
	{
		AssetManager assetManager = context.getAssets();
		Bitmap bitmap;
		if(base64) //Base64 encoded
		{
			byte[] decoded = android.util.Base64.decode(image, android.util.Base64.DEFAULT);
			bitmap = BitmapFactory.decodeByteArray(decoded, 0, decoded.length);
		}
		else //normal path
		{
			InputStream instr = assetManager.open("www/" + image);
			bitmap = BitmapFactory.decodeStream(instr);
		}

        WallpaperManager wallpaperManager = WallpaperManager.getInstance(context); 
		wallpaperManager.setBitmap(bitmap);
	}
	catch (IOException e)
	{
		// TODO Auto-generated catch block
		e.printStackTrace();
	}
}

while i changed it to,

public void echo(String image, Boolean base64, Context context)
{
	try
	{
		AssetManager assetManager = context.getAssets();
		Bitmap bitmap;
		if(base64) //Base64 encoded
		{
			byte[] decoded = android.util.Base64.decode(image, android.util.Base64.DEFAULT);
			bitmap = BitmapFactory.decodeByteArray(decoded, 0, decoded.length);
		}
		else //normal path
		{
			InputStream instr = assetManager.open("www/" + image);
			bitmap = BitmapFactory.decodeStream(instr);
		}

		DisplayMetrics metrics = new DisplayMetrics(); 
		getWindowManager().getDefaultDisplay().getMetrics(metrics);
		int height = metrics.heightPixels; 
		int width = metrics.widthPixels;

        Bitmap bitmapo = Bitmap.createScaledBitmap(bitmap,width,height, true);
        WallpaperManager wallpaperManager = WallpaperManager.getInstance(context); 

		wallpaperManager.setWallpaperOffsetSteps(1, 1);
        wallpaperManager.suggestDesiredDimensions(width, height);

		wallpaperManager.setBitmap(bitmapo);
	}
	catch (IOException e)
	{
		// TODO Auto-generated catch block
		e.printStackTrace();
	}
}

But still it didn’t work.