Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

the diff between the source and the dex2jar output #190

Open
GoogleCodeExporter opened this issue Mar 15, 2015 · 2 comments
Open

the diff between the source and the dex2jar output #190

GoogleCodeExporter opened this issue Mar 15, 2015 · 2 comments

Comments

@GoogleCodeExporter
Copy link

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

@GoogleCodeExporter
Copy link
Author

[deleted comment]

@GoogleCodeExporter
Copy link
Author

OH!
it is ok!
thanks !

Original comment by wylhistory on 3 Sep 2013 at 11:39

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant