hi,Ijust test the result of dex2jar,then I use the calculator source,
the origin codes are:
packages/apps/Calculator/src/com/android/calculator2/Calculator.java:
public void onCreate(Bundle state) {
super.onCreate(state);
setContentView(R.layout.main);
mPersist = new Persist(this);
mHistory = mPersist.history;
mDisplay = (CalculatorDisplay) findViewById(R.id.display);
mLogic = new Logic(this, mHistory, mDisplay, (Button) findViewById(R.id.equal));
HistoryAdapter historyAdapter = new HistoryAdapter(this, mHistory, mLogic);
mHistory.setObserver(historyAdapter);
if(state == null)
{
mLogic.onClear();
}
mPanelSwitcher = (PanelSwitcher) findViewById(R.id.panelswitch);
mPanelSwitcher.setCurrentIndex(state==null ? 0 : state.getInt(STATE_CURRENT_VIEW, 0));
mListener.setHandler(mLogic, mPanelSwitcher);
mDisplay.setOnKeyListener(mListener);
...
}
but when I use dex2jar and JD-GUI to see the output as follow:
public void onCreate(Bundle paramBundle)
{
super.onCreate(paramBundle);
setContentView(2130903041);
this.mPersist = new Persist(this);
this.mHistory = this.mPersist.history;
this.mDisplay = ((CalculatorDisplay)findViewById(2131165186));
this.mLogic = new Logic(this, this.mHistory, this.mDisplay, (Button)findViewById(2131165206));
HistoryAdapter localHistoryAdapter = new HistoryAdapter(this, this.mHistory, this.mLogic);
this.mHistory.setObserver(localHistoryAdapter);
if (paramBundle == null)
this.mLogic.onClear();
this.mPanelSwitcher = ((PanelSwitcher)findViewById(2131165188));
PanelSwitcher localPanelSwitcher = this.mPanelSwitcher;
if (paramBundle == null);
for (int i = 0; ; i = paramBundle.getInt("state-current-view", 0))
{
localPanelSwitcher.setCurrentIndex(i);
this.mListener.setHandler(this.mLogic, this.mPanelSwitcher);
this.mDisplay.setOnKeyListener(this.mListener);
View localView = findViewById(2131165187);
if (localView != null)
localView.setOnLongClickListener(this.mListener);
return;
}
}
from the statement "mPanelSwitcher.setCurrentIndex"
they are rather different!
why? Is this the error of dex2jar or the JD-GUI?
Original issue reported on code.google.com by wylhistory on 3 Sep 2013 at 8:36
Original issue reported on code.google.com by
wylhistory
on 3 Sep 2013 at 8:36