// Decompiled by Jad v1.5.8e. Copyright 2001 Pavel Kouznetsov. // Jad home page: http://www.geocities.com/kpdus/jad.html // Decompiler options: braces fieldsfirst space lnc package com.oliodevices.assist.app.fragments; import android.app.Activity; import android.os.Bundle; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import butterknife.ButterKnife; import com.oliodevices.assist.app.api.UserManager; import com.oliodevices.assist.app.core.Utils; // Referenced classes of package com.oliodevices.assist.app.fragments: // BaseFragment, TitleChanger public class UnpairFragment extends BaseFragment implements TitleChanger { private static final String STATE_IS_WATCH_RESET = "is_watch_reset"; private ConfigWatchFragment.ConfigWatchCallbacks mCallbacks; private boolean mIsWatchReset; View mOnYourPhoneView; View mOnYourWatchView; public UnpairFragment() { } private void refreshView() { boolean flag = false; View view = mOnYourWatchView; int i; if (mIsWatchReset) { i = 8; } else { i = 0; } view.setVisibility(i); view = mOnYourPhoneView; if (mIsWatchReset) { i = ((flag) ? 1 : 0); } else { i = 8; } view.setVisibility(i); } public void onActivityCreated(Bundle bundle) { super.onActivityCreated(bundle); mIsWatchReset = false; if (bundle != null) { mIsWatchReset = bundle.getBoolean("is_watch_reset"); } refreshView(); } public void onAttach(Activity activity) { super.onAttach(activity); if (activity instanceof ConfigWatchFragment.ConfigWatchCallbacks) { mCallbacks = (ConfigWatchFragment.ConfigWatchCallbacks)activity; return; } else { throw new ClassCastException(String.format("%s must implement UnpairWatchCallbacks", new Object[] { activity.getClass() })); } } public View onCreateView(LayoutInflater layoutinflater, ViewGroup viewgroup, Bundle bundle) { layoutinflater = layoutinflater.inflate(0x7f03004e, viewgroup, false); ButterKnife.inject(this, layoutinflater); return layoutinflater; } public void onDone() { mIsWatchReset = true; refreshView(); } public void onSaveInstanceState(Bundle bundle) { super.onSaveInstanceState(bundle); bundle.putBoolean("is_watch_reset", mIsWatchReset); } public void onUnpairPhone() { String s = UserManager.getInstance().getUnitId(); Utils.unpairDevice(getActivity(), mCallbacks, s); } public void setActivityTitle(Activity activity) { activity.setTitle(0x7f060107); } }