// 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.content.res.Resources; import android.os.Bundle; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.ImageView; import android.widget.TextView; import butterknife.ButterKnife; import com.jmedeisis.draglinearlayout.DragLinearLayout; import com.oliodevices.assist.app.api.models.ServiceItem; import com.oliodevices.assist.app.core.ServicesUtil; // Referenced classes of package com.oliodevices.assist.app.fragments: // BaseFragment, TitleChanger public class NotificationActionsFragment extends BaseFragment implements TitleChanger { static final boolean $assertionsDisabled; private static final String ARG_APP = "app"; private static final String ARG_CATEGORY = "category"; ViewGroup mActionHeadingsView; DragLinearLayout mActionsView; public NotificationActionsFragment() { } private void addActionView(int ai[]) { int j = ai.length; for (int i = 0; i < j; i++) { int k = ai[i]; View view = LayoutInflater.from(getActivity()).inflate(0x7f030058, mActionsView, false); ((TextView)ButterKnife.findById(view, 0x7f0d0076)).setText(k); mActionsView.addView(view); } } private void addHeadingView(int i, int j, int k) { View view = LayoutInflater.from(getActivity()).inflate(0x7f030059, mActionHeadingsView, false); ((ImageView)ButterKnife.findById(view, 0x7f0d0188)).setImageDrawable(getResources().getDrawable(i)); ((TextView)ButterKnife.findById(view, 0x7f0d0076)).setText(j); ((TextView)ButterKnife.findById(view, 0x7f0d0189)).setText(k); mActionHeadingsView.addView(view); } private void initializeView(View view) { com.olio.communication.notifications.NotificationFilters.Category category; Object obj; int i; obj = getArguments(); category = com.olio.communication.notifications.NotificationFilters.Category.valueOf(((Bundle) (obj)).getString("category")); i = ServicesUtil.getBackgroundForCategory(category); if (category != com.olio.communication.notifications.NotificationFilters.Category.NAVIGATION) goto _L2; else goto _L1 _L1: int j; ButterKnife.findById(view, 0x7f0d0139).setVisibility(0); mActionHeadingsView.setVisibility(8); mActionsView.setVisibility(8); j = i; _L4: ((ImageView)ButterKnife.findById(view, 0x7f0d0132)).setImageDrawable(getResources().getDrawable(j)); return; _L2: int ai[]; if (((Bundle) (obj)).containsKey("app")) { obj = (ServiceItem)((Bundle) (obj)).getParcelable("app"); if (!$assertionsDisabled && obj == null) { throw new AssertionError(); } View view1 = ButterKnife.findById(view, 0x7f0d0133); TextView textview = (TextView)ButterKnife.findById(view, 0x7f0d0136); TextView textview1 = (TextView)ButterKnife.findById(view, 0x7f0d0135); ImageView imageview = (ImageView)ButterKnife.findById(view, 0x7f0d0134); i = 0x7f0200aa; j = ServicesUtil.getIconDrawableForCategory(category); view1.setVisibility(0); textview.setVisibility(0); textview.setText(((ServiceItem) (obj)).longText); textview1.setText(((ServiceItem) (obj)).name); imageview.setImageDrawable(getResources().getDrawable(j)); } j = ServicesUtil.getTapStringForCategory(category); int k = ServicesUtil.getSwipeLeftStringForCategory(category); ai = ServicesUtil.getSwipeRightStringsForCategory(category); if (j > 0) { addHeadingView(0x7f02006c, j, 0x7f06017d); } if (k > 0) { addHeadingView(0x7f02006a, k, 0x7f06017a); } if (ai.length != 1) { break; /* Loop/switch isn't completed */ } addHeadingView(0x7f02006b, ai[0], 0x7f06017b); _L6: j = i; if (category == com.olio.communication.notifications.NotificationFilters.Category.MUSIC) { addHeadingView(0x7f02006d, 0x7f0601c5, 0x7f06017c); addHeadingView(0x7f020069, 0x7f0601c4, 0x7f060179); j = i; } if (true) goto _L4; else goto _L3 _L3: if (ai.length <= 0) goto _L6; else goto _L5 _L5: addHeadingView(0x7f02006b, 0x7f060034, 0x7f06017b); addActionView(ai); goto _L6 } public static NotificationActionsFragment newInstance(com.olio.communication.notifications.NotificationFilters.Category category) { NotificationActionsFragment notificationactionsfragment = new NotificationActionsFragment(); Bundle bundle = new Bundle(); bundle.putString("category", category.name()); notificationactionsfragment.setArguments(bundle); return notificationactionsfragment; } public static NotificationActionsFragment newInstance(com.olio.communication.notifications.NotificationFilters.Category category, ServiceItem serviceitem) { NotificationActionsFragment notificationactionsfragment = new NotificationActionsFragment(); Bundle bundle = new Bundle(); bundle.putString("category", category.name()); bundle.putParcelable("app", serviceitem); notificationactionsfragment.setArguments(bundle); return notificationactionsfragment; } public View onCreateView(LayoutInflater layoutinflater, ViewGroup viewgroup, Bundle bundle) { layoutinflater = layoutinflater.inflate(0x7f03003e, viewgroup, false); ButterKnife.inject(this, layoutinflater); initializeView(layoutinflater); return layoutinflater; } public void setActivityTitle(Activity activity) { Object obj = getArguments(); if (((Bundle) (obj)).containsKey("app")) { obj = (ServiceItem)((Bundle) (obj)).getParcelable("app"); if (!$assertionsDisabled && obj == null) { throw new AssertionError(); } obj = ((ServiceItem) (obj)).name; } else { obj = getString(ServicesUtil.getLabelForCategory(com.olio.communication.notifications.NotificationFilters.Category.valueOf(((Bundle) (obj)).getString("category")))); } activity.setTitle(((CharSequence) (obj))); } static { boolean flag; if (!com/oliodevices/assist/app/fragments/NotificationActionsFragment.desiredAssertionStatus()) { flag = true; } else { flag = false; } $assertionsDisabled = flag; } }