package com.peniscorp.bobsgamecontrols;

import static de.robv.android.xposed.XposedHelpers.findAndHookMethod;
import android.os.Bundle;
import android.os.Message;
import android.util.Log;
import de.robv.android.xposed.IXposedHookLoadPackage;
import de.robv.android.xposed.XC_MethodHook;
import de.robv.android.xposed.XposedBridge;
import de.robv.android.xposed.callbacks.XC_LoadPackage.LoadPackageParam;

public class BobsGameControls implements IXposedHookLoadPackage {

	public void handleLoadPackage(final LoadPackageParam lpparam) throws Throwable {
        try {
        	if ( !lpparam.packageName.equals( "com.bobsgame.bg" ) ) return;

        	findAndHookMethod( "com.badlogic.gdx.controllers.android.AndroidController", lpparam.classLoader, "getName", new XC_MethodHook() {
                @Override
                protected void afterHookedMethod( MethodHookParam param ) throws Throwable
                {
                	param.setResult( "OUYA Game Controller" );
                }
        	});
	    } catch (Throwable e) {
	    	XposedBridge.log(e);
	    }		
	}
}
@@ -462,19 +462,18 @@
 dPackage
- %7B
 %0A
+%7B
 %0A%09public
@@ -544,17 +544,18 @@
 hrowable
- 
+%0A%09
 %7B%0A      
@@ -560,12 +560,22 @@
     
+%09
 try
- 
+%0A        %09
 %7B%0A  
@@ -581,16 +581,17 @@
        %09
+%09
 if ( !lp
@@ -656,16 +656,17 @@
        %09
+%09
 findAndH
@@ -786,16 +786,27 @@
 dHook() 
+%0A        %09%09
 %7B%0A      
@@ -815,16 +815,18 @@
         
+%09%09
 @Overrid
@@ -843,16 +843,18 @@
         
+%09%09
 protecte
@@ -936,16 +936,18 @@
         
+%09%09
 %7B%0A      
@@ -957,16 +957,18 @@
        %09
+%09%09
 param.se
@@ -1018,16 +1018,18 @@
         
+%09%09
 %7D%0A      
@@ -1035,17 +1035,19 @@
    %09
+%09
 %7D
+ 
 );%0A%09    
 %7D ca
@@ -1046,17 +1046,25 @@
     
-%7D 
+%09%7D%0A%09    %09
 catch (
+ 
 Thro
@@ -1074,12 +1074,20 @@
 le e
-)
  
+)%0A%09    %09
 %7B%0A
+%09
 %09   
@@ -1109,17 +1109,19 @@
 log(
-e
+ e 
 );%0A%09    
 %7D%09%09%0A
@@ -1120,12 +1120,13 @@
     
+%09
 %7D%09%09%0A%09%7D%0A%7D
@@ -1125,8 +1125,9 @@
 %7D%09%09%0A%09%7D%0A%7D
+%0A

Fix code style