Code example for ContextWrapper

0
	public Boolean needsContext() {
		return true;	} 
 
	@Override 
	public Void setContext(Context newcontext) {
		context = new ContextWrapper(newcontext);
		return null; 
	} 
 
	@Override 
	public Void run(final Handler handler) {
		final TelephonyManager TelManager = (TelephonyManager) context.getSystemService(Context.TELEPHONY_SERVICE);
		final PhoneStateListener mSignalListener = new PhoneStateListener(){ 
 
			@Override 
			public void onSignalStrengthsChanged(SignalStrength signalStrength) 
			{  
				if (signalStrength.isGsm()) 
					ASU = signalStrength.getGsmSignalStrength(); 
				else{  
					int strength = -1;