private void m13521b(bz bzVar) { m13546b(); m13538n(); m13558i(); for (int i = 0; i < bzVar.getPartialItems().size(); i++) { this.f9630n.put( Long.valueOf(((ba) bzVar.getPartialItems().get(i)).getListing_id()), Integer.valueOf(((ba) bzVar.getPartialItems().get(i)).getQuantity())); this.f9631o.put( Long.valueOf(((ba) bzVar.getPartialItems().get(i)).getListing_id()), Integer.valueOf(i)); } View inflate = ((LayoutInflater) getSystemService("layout_inflater")) .inflate(R.layout.view_partial_stock_dialog, null, false); ((TextView) inflate.findViewById(R.id.partial_stock_header)).setText(bzVar.getHeader()); ((TextView) inflate.findViewById(R.id.partial_stock_message)).setText(bzVar.getMessage()); this.f9641y = (ListView) inflate.findViewById(R.id.partial_stock_item_list); this.f9641y.setAdapter(new C0828c(this, this, bzVar.getPartialItems())); Builder builder = new Builder(this); builder.setView(inflate); this.f9642z = builder.create(); inflate .findViewById(R.id.button_partialstock_confirm) .setOnClickListener(new C08237(this, bzVar)); inflate.findViewById(R.id.button_partialstock_cancel).setOnClickListener(new C08248(this)); this.f9642z.setCancelable(false); this.f9642z.show(); }
public void onFailure(Throwable th) { OLog.m13310a("Failed to place food order", th); VolleyError volleyError = (VolleyError) th; this.f9590a.m13555f(); Object obj = "Network Error"; if (!(volleyError == null || volleyError.f464a == null)) { byte[] bArr = volleyError.f464a.f498b; if (bArr != null) { String str = "Other"; String str2 = new String(bArr); try { bt btVar = (bt) new Gson().m12343a(str2, bt.class); bz bzVar = (bz) new Gson().m12343a(str2, bz.class); if (volleyError.f464a.f497a != HttpStatus.SC_UNPROCESSABLE_ENTITY || bzVar.getPartialItems() == null || bzVar.getPartialItems().isEmpty()) { HashMap hashMap = new HashMap(); if (Utils.m14924g(this.f9590a.f9624h.m13209c().getCity())) { hashMap.put("Booking city", this.f9590a.f9624h.m13209c().getCity()); } else { hashMap.put("Booking city", "NA"); } Sherlock.m13338a( "Ins OFD order placed", "Failure", volleyError, btVar.getText(), true, hashMap); this.f9590a.m13518a(btVar.getHeader(), btVar.getText()); } else { this.f9590a.m13521b(bzVar); } obj = str; } catch (Exception e) { String str3 = str; } } } if (this.f9590a.f9624h.m13209c() != null && this.f9590a.f9624h.m13209c().getCity() != null) { Map hashMap2 = new HashMap(); hashMap2.put("City name", this.f9590a.f9624h.m13209c().getCity()); hashMap2.put(Constants.BUNDLE_TYPE, obj); Localytics.tagEvent("OlaFood error message", hashMap2); } }
public void m13545a(bz bzVar) { m13556g(); String str = Trace.NULL; Set<Long> keySet = this.f9630n.keySet(); ArrayList arrayList = new ArrayList(); for (Long l : keySet) { ba baVar = (ba) bzVar.getPartialItems().get(((Integer) this.f9631o.get(l)).intValue()); arrayList.add( new ba( baVar.getListing_id(), baVar.getMerchant_id(), baVar.getMerchant_name(), baVar.getTitle(), baVar.getDescription(), ((Integer) this.f9630n.get(l)).intValue(), baVar.getPrice(), baVar.getAttributes())); } int i = 0; for (Integer intValue : this.f9630n.values()) { i = intValue.intValue() + i; } m13519a(str, arrayList, i); }