Skip to content

Commit 858d2b9

Browse files
committed
fix(share): prevent error (transactiontoolarge) on share inventory
1 parent 88d558e commit 858d2b9

File tree

3 files changed

+14
-4
lines changed

3 files changed

+14
-4
lines changed
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
about.version=1.0.0-rc.2
22
about.build=39237
3-
about.date=Mon Jan 06 13:19:58 2020
4-
about.commit=8eb74a6
5-
about.commitFull=8eb74a6077721c7efee245eaa974ba5f1671190b
3+
about.date=lun. janv. 06 14:24:18 2020
4+
about.commit=
5+
about.commitFull=
66
about.github=https://github.com/glpi-project/android-inventory-agent

app/src/main/java/org/glpi/inventory/agent/core/report/ReportModel.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,8 @@ public void generateReport(final Activity activity) {
7373
inventoryTask.getJSON(new InventoryTask.OnTaskCompleted() {
7474
@Override
7575
public void onTaskSuccess(String s) {
76-
presenter.sendInventory(s, Utils.loadJsonHeader(s));
7776
inventoryTask.getXMLSyn();
77+
presenter.sendInventory(s, Utils.loadJsonHeader(s));
7878
}
7979

8080
@Override

app/src/main/java/org/glpi/inventory/agent/ui/ActivityInventoryReport.java

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@
4040
import android.content.pm.PackageManager;
4141
import android.os.Bundle;
4242

43+
import androidx.annotation.NonNull;
4344
import androidx.appcompat.app.AppCompatActivity;
4445
import androidx.appcompat.widget.Toolbar;
4546
import androidx.core.app.ActivityCompat;
@@ -51,6 +52,7 @@
5152
import com.google.android.material.floatingactionbutton.FloatingActionButton;
5253
import com.google.android.material.tabs.TabLayout;
5354

55+
import org.flyve.inventory.InventoryLog;
5456
import org.glpi.inventory.agent.R;
5557
import org.glpi.inventory.agent.adapter.ViewPagerAdapter;
5658
import org.glpi.inventory.agent.core.report.Report;
@@ -112,6 +114,7 @@ public void onClick(View v) {
112114
}
113115
});
114116

117+
progressBar.setVisibility(View.VISIBLE);
115118
presenter.generateReport(ActivityInventoryReport.this);
116119
}
117120

@@ -160,4 +163,11 @@ public void onRequestPermissionsResult(int requestCode, String permissions[], in
160163
}
161164
}
162165
}
166+
167+
@Override
168+
protected void onSaveInstanceState(@NonNull Bundle outState) {
169+
super.onSaveInstanceState(outState);
170+
//FIX: TransactionTooLargeException when sharing Uri via intent
171+
outState.clear();
172+
}
163173
}

0 commit comments

Comments
 (0)