All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.eg.agent.android.instrumentation.API.BitmapFactoryInstrumentation Maven / Gradle / Ivy

There is a newer version: 2.1.3
Show newest version
package com.eg.agent.android.instrumentation.API;

import android.content.res.Resources;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.graphics.Rect;
import android.util.Log;
import android.util.TypedValue;

import com.eg.agent.android.trace.TraceMachine;

import java.io.FileDescriptor;
import java.io.InputStream;

public class BitmapFactoryInstrumentation {

	  private static final String categoryParams = "BitmapFactory" ;
	  private static final String APItype= "BitmapFactory";
	  public static Bitmap decodeFile(String pathName, BitmapFactory.Options opts)
	  {
		 
		  Log.e("Class", opts.getClass().toString());
	    TraceMachine.enterMethod("BitmapFactory#decodeFile", categoryParams,APItype);
	    Bitmap bitmap = BitmapFactory.decodeFile(pathName, opts);
	    TraceMachine.exitMethod();
	    
	    return bitmap;
	  }
	  public static Bitmap decodeFile(String pathName)
	  {
	    TraceMachine.enterMethod("BitmapFactory#decodeFile", categoryParams,APItype);
	    Bitmap bitmap = BitmapFactory.decodeFile(pathName);
	    TraceMachine.exitMethod();
	    
	    return bitmap;
	  }	  
	
	  public static Bitmap decodeResourceStream(Resources res, TypedValue value, InputStream is, Rect pad, BitmapFactory.Options opts)
	  {
	    TraceMachine.enterMethod("BitmapFactory#decodeResourceStream", categoryParams,APItype);
	    Bitmap bitmap = BitmapFactory.decodeResourceStream(res, value, is, pad, opts);
	    TraceMachine.exitMethod();
	    
	    return bitmap;
	  }
	  
	  public static Bitmap decodeResource(Resources res, int id, BitmapFactory.Options opts)
	  {
	    TraceMachine.enterMethod("BitmapFactory#decodeResource", categoryParams,APItype);
	    Bitmap bitmap = BitmapFactory.decodeResource(res, id, opts);
	    TraceMachine.exitMethod();
	    
	    return bitmap;
	  }
	  
	  public static Bitmap decodeResource(Resources res, int id)
	  {
	    TraceMachine.enterMethod("BitmapFactory#decodeResource", categoryParams,APItype);
	    Bitmap bitmap = BitmapFactory.decodeResource(res, id);
	    TraceMachine.exitMethod();
	    
	    return bitmap;
	  }
	  
	  public static Bitmap decodeByteArray(byte[] data, int offset, int length, BitmapFactory.Options opts)
	  {
	    TraceMachine.enterMethod("BitmapFactory#decodeByteArray", categoryParams,APItype);
	    Bitmap bitmap = BitmapFactory.decodeByteArray(data, offset, length, opts);
	    TraceMachine.exitMethod();
	    
	    return bitmap;
	  }
	  
	  public static Bitmap decodeByteArray(byte[] data, int offset, int length)
	  {
	    TraceMachine.enterMethod("BitmapFactory#decodeByteArray", categoryParams,APItype);
	    Bitmap bitmap = BitmapFactory.decodeByteArray(data, offset, length);
	    TraceMachine.exitMethod();
	    
	    return bitmap;
	  }
	  
	  public static Bitmap decodeStream(InputStream is, Rect outPadding, BitmapFactory.Options opts)
	  {
	    TraceMachine.enterMethod("BitmapFactory#decodeStream", categoryParams,APItype);
	    Bitmap bitmap = BitmapFactory.decodeStream(is, outPadding, opts);
	    TraceMachine.exitMethod();
	    
	    return bitmap;
	  }
	  
	  public static Bitmap decodeStream(InputStream is)
	  {
	    TraceMachine.enterMethod("BitmapFactory#decodeStream", categoryParams,APItype);
	    Bitmap bitmap = BitmapFactory.decodeStream(is);
	    TraceMachine.exitMethod();
	    
	    return bitmap;
	  }
	  
	  public static Bitmap decodeFileDescriptor(FileDescriptor fd, Rect outPadding, BitmapFactory.Options opts)
	  {
	    TraceMachine.enterMethod("BitmapFactory#decodeFileDescriptor", categoryParams,APItype);
	    Bitmap bitmap = BitmapFactory.decodeFileDescriptor(fd, outPadding, opts);
	    TraceMachine.exitMethod();
	    
	    return bitmap;
	  }
	  
	  public static Bitmap decodeFileDescriptor(FileDescriptor fd)
	  {
	    TraceMachine.enterMethod("BitmapFactory#decodeFileDescriptor", categoryParams,APItype);
	    Bitmap bitmap = BitmapFactory.decodeFileDescriptor(fd);
	    TraceMachine.exitMethod();
	    
	    return bitmap;
	  }
	}





© 2015 - 2024 Weber Informatics LLC | Privacy Policy