use of com.android.preload.DumpData in project android_frameworks_base by crdroidandroid.
the class ShowDataAction method actionPerformed.
@Override
public void actionPerformed(ActionEvent e) {
// TODO(agampe): Auto-generated method stub
int selRow = Main.getUI().getSelectedDataTableRow();
if (selRow != -1) {
DumpData data = dataTableModel.getData().get(selRow);
Map<String, Set<String>> inv = data.invertData();
StringBuilder builder = new StringBuilder();
// First bootclasspath.
add(builder, "Boot classpath:", inv.get(null));
// Now everything else.
for (String k : inv.keySet()) {
if (k != null) {
builder.append("==================\n\n");
add(builder, k, inv.get(k));
}
}
JFrame newFrame = new JFrame(data.getPackageName() + " " + data.getDate());
newFrame.setDefaultCloseOperation(JFrame.HIDE_ON_CLOSE);
newFrame.getContentPane().add(new JScrollPane(new JTextArea(builder.toString())), BorderLayout.CENTER);
newFrame.setSize(800, 600);
newFrame.setLocationRelativeTo(null);
newFrame.setVisible(true);
}
}
use of com.android.preload.DumpData in project platform_frameworks_base by android.
the class ComputeThresholdAction method run.
@Override
public void run() {
Main.getUI().showWaitDialog();
Map<String, Set<String>> uses = new HashMap<String, Set<String>>();
for (DumpData d : dataTableModel.getData()) {
Main.getUI().updateWaitDialog("Merging " + d.getPackageName());
updateClassUse(d.getPackageName(), uses, getBootClassPathClasses(d.getDumpData()));
}
Main.getUI().updateWaitDialog("Computing thresholded set");
Set<String> result = fromThreshold(uses, blacklist, threshold);
Main.getUI().hideWaitDialog();
boolean ret = Main.getUI().showConfirmDialog("Computed a set with " + result.size() + " classes, would you like to save to disk?", "Save?");
if (ret) {
File f = Main.getUI().showSaveDialog();
if (f != null) {
saveSet(result, f);
}
}
}
use of com.android.preload.DumpData in project platform_frameworks_base by android.
the class ScanPackageAction method work.
private void work(Client c) {
String pkg = c.getClientData().getClientDescription();
Main.getUI().showWaitDialog();
Main.getUI().updateWaitDialog("Retrieving heap data for " + pkg);
try {
Map<String, String> data = Main.findAndGetClassData(device, pkg);
DumpData dumpData = new DumpData(pkg, data, new Date());
dataTableModel.addData(dumpData);
} catch (Exception e) {
e.printStackTrace();
}
}
use of com.android.preload.DumpData in project platform_frameworks_base by android.
the class ShowDataAction method actionPerformed.
@Override
public void actionPerformed(ActionEvent e) {
// TODO(agampe): Auto-generated method stub
int selRow = Main.getUI().getSelectedDataTableRow();
if (selRow != -1) {
DumpData data = dataTableModel.getData().get(selRow);
Map<String, Set<String>> inv = data.invertData();
StringBuilder builder = new StringBuilder();
// First bootclasspath.
add(builder, "Boot classpath:", inv.get(null));
// Now everything else.
for (String k : inv.keySet()) {
if (k != null) {
builder.append("==================\n\n");
add(builder, k, inv.get(k));
}
}
JFrame newFrame = new JFrame(data.getPackageName() + " " + data.getDate());
newFrame.setDefaultCloseOperation(JFrame.HIDE_ON_CLOSE);
newFrame.getContentPane().add(new JScrollPane(new JTextArea(builder.toString())), BorderLayout.CENTER);
newFrame.setSize(800, 600);
newFrame.setLocationRelativeTo(null);
newFrame.setVisible(true);
}
}
use of com.android.preload.DumpData in project android_frameworks_base by AOSPA.
the class ShowDataAction method actionPerformed.
@Override
public void actionPerformed(ActionEvent e) {
// TODO(agampe): Auto-generated method stub
int selRow = Main.getUI().getSelectedDataTableRow();
if (selRow != -1) {
DumpData data = dataTableModel.getData().get(selRow);
Map<String, Set<String>> inv = data.invertData();
StringBuilder builder = new StringBuilder();
// First bootclasspath.
add(builder, "Boot classpath:", inv.get(null));
// Now everything else.
for (String k : inv.keySet()) {
if (k != null) {
builder.append("==================\n\n");
add(builder, k, inv.get(k));
}
}
JFrame newFrame = new JFrame(data.getPackageName() + " " + data.getDate());
newFrame.setDefaultCloseOperation(JFrame.HIDE_ON_CLOSE);
newFrame.getContentPane().add(new JScrollPane(new JTextArea(builder.toString())), BorderLayout.CENTER);
newFrame.setSize(800, 600);
newFrame.setLocationRelativeTo(null);
newFrame.setVisible(true);
}
}
Aggregations