/packages/services/Car/tests/BugReportApp/tests/src/com/android/car/bugreport/ |
D | BugStorageUtilsTest.java | 18 import static com.android.car.bugreport.MetaBugReport.TYPE_AUDIO_FIRST; 19 import static com.android.car.bugreport.MetaBugReport.TYPE_AUDIO_LATER; 57 private static final String TIMESTAMP_TODAY = MetaBugReport.toBugReportTimestamp(new Date()); 78 MetaBugReport bug = createBugReport(TIMESTAMP_TODAY, in test_createBugReport_createsAndReturnsMetaBugReport() 86 MetaBugReport bug = createBugReport(TIMESTAMP_TODAY, in test_expireBugReport_marksBugReportDeletedAndDeletesZip() 100 MetaBugReport updatedBug = BugStorageUtils.findBugReport(mContext, bug.getId()).get(); in test_expireBugReport_marksBugReportDeletedAndDeletesZip() 109 final MetaBugReport finalBug = bug; in test_expireBugReport_marksBugReportDeletedAndDeletesZip() 118 MetaBugReport bug = createBugReport(TIMESTAMP_TODAY, in test_completeDeleteBugReport_removesBugReportRecordFromDb() 133 final MetaBugReport finalBug = bug; in test_completeDeleteBugReport_removesBugReportRecordFromDb() 142 MetaBugReport bugUserPending = createBugReport(TIMESTAMP_TODAY, in test_getUnexpiredBugReportsWithZipFile_withNonZeroTtlPoints() [all …]
|
D | TtlPointsDecrementalTest.java | 48 private static final String TIMESTAMP_TODAY = MetaBugReport.toBugReportTimestamp(new Date()); 69 MetaBugReport bugUserPending_ttl_points0 = createBugReport(TIMESTAMP_TODAY, in test_decrementsTtlPointsForPendingBugReports() 71 MetaBugReport bugUserPending_ttl_points1 = createBugReport(TIMESTAMP_TODAY, in test_decrementsTtlPointsForPendingBugReports() 73 MetaBugReport bugUserPending_ttl_points2 = createBugReport(TIMESTAMP_TODAY, in test_decrementsTtlPointsForPendingBugReports() 75 MetaBugReport bugUploadPending = createBugReport(TIMESTAMP_TODAY, in test_decrementsTtlPointsForPendingBugReports() 77 MetaBugReport bugUploadFailed = createBugReport(TIMESTAMP_TODAY, in test_decrementsTtlPointsForPendingBugReports() 79 MetaBugReport bugUploadWritePending = createBugReport(TIMESTAMP_TODAY, in test_decrementsTtlPointsForPendingBugReports() 81 MetaBugReport bugUploadedBefore = createBugReport(TIMESTAMP_TODAY, in test_decrementsTtlPointsForPendingBugReports() 101 private MetaBugReport find(MetaBugReport bug) { in find() 105 private MetaBugReport createBugReport(String timestamp, Status status, int ttlPoints) { in createBugReport() [all …]
|
/packages/services/Car/tests/BugReportApp/src/com/android/car/bugreport/ |
D | BugStorageUtils.java | 99 static MetaBugReport createBugReport( in createBugReport() 104 @MetaBugReport.BugReportType int type) { in createBugReport() 120 @NonNull Context context, @NonNull MetaBugReport metaBugReport) in openBugReportFileToWrite() 129 @NonNull Context context, @NonNull MetaBugReport metaBugReport) in openAudioMessageFileToWrite() 142 static InputStream openFileToRead(Context context, MetaBugReport bug) in openFileToRead() 150 static InputStream openBugReportFileToRead(Context context, MetaBugReport bug) in openBugReportFileToRead() 158 static InputStream openAudioFileToRead(Context context, MetaBugReport bug) in openAudioFileToRead() 202 public static List<MetaBugReport> getUploadPendingBugReports(@NonNull Context context) { in getUploadPendingBugReports() 214 public static List<MetaBugReport> getAllBugReportsDescending(@NonNull Context context) { in getAllBugReportsDescending() 227 static List<MetaBugReport> getUnexpiredBugReportsWithZipFile( in getUnexpiredBugReportsWithZipFile() [all …]
|
D | BugInfoAdapter.java | 54 void onItemClicked(int buttonType, MetaBugReport metaBugReport, BugInfoViewHolder holder); in onItemClicked() 94 private List<MetaBugReport> mDataset; 116 MetaBugReport bugReport = mDataset.get(position); in onBindViewHolder() 127 private boolean pendingUserAction(MetaBugReport bugReport) { in pendingUserAction() 134 private boolean pendingAudioRecording(MetaBugReport bugReport) { in pendingAudioRecording() 138 private void showOrHideMessageView(MetaBugReport bugReport, BugInfoViewHolder holder) { in showOrHideMessageView() 147 private void showOrHideExpirationNotice(MetaBugReport bugReport, BugInfoViewHolder holder) { in showOrHideExpirationNotice() 156 private void showOrHideUploadButton(MetaBugReport bugReport, BugInfoViewHolder holder) { in showOrHideUploadButton() 171 private void showOrHideMoveButton(MetaBugReport bugReport, BugInfoViewHolder holder) { in showOrHideMoveButton() 184 private void showOrHideAddAudioButton(MetaBugReport bugReport, BugInfoViewHolder holder) { in showOrHideAddAudioButton() [all …]
|
D | MetaBugReport.java | 34 abstract class MetaBugReport implements Parcelable { class 155 public static final Parcelable.Creator<MetaBugReport> CREATOR = 156 new Parcelable.Creator<MetaBugReport>() { 157 public MetaBugReport createFromParcel(Parcel in) { 169 return MetaBugReport.builder() 184 public MetaBugReport[] newArray(int size) { 185 return new MetaBugReport[size]; 225 public abstract MetaBugReport build(); in build()
|
D | BugReportInfoActivity.java | 75 private MetaBugReport mLastSelectedBugReport; 140 int buttonType, MetaBugReport bugReport, BugInfoAdapter.BugInfoViewHolder holder) { in onBugReportItemClicked() 173 MetaBugReport updatedBugReport = BugStorageUtils.setBugReportStatus(this, in onActivityResult() 214 private static final class AsyncMoveFilesTask extends AsyncTask<Void, Void, MetaBugReport> { 216 private final MetaBugReport mBugReport; 225 MetaBugReport bugReport, BugInfoAdapter.BugInfoViewHolder holder, in AsyncMoveFilesTask() 237 protected MetaBugReport doInBackground(Void... params) { in doInBackground() 249 private MetaBugReport copyFilesToUsb() throws IOException { in copyFilesToUsb() 327 protected void onPostExecute(MetaBugReport updatedBugReport) { in onPostExecute() 336 AsyncTask<Void, Void, List<MetaBugReport>> { [all …]
|
D | BugStorageProvider.java | 167 + COLUMN_TYPE + " INTEGER DEFAULT " + MetaBugReport.TYPE_AUDIO_FIRST + "," 187 + COLUMN_TYPE + " INTEGER DEFAULT " + MetaBugReport.TYPE_AUDIO_FIRST); in onUpgrade() 423 Function<MetaBugReport, String> fileNameExtractor; in openFile() 426 fileNameExtractor = MetaBugReport::getBugReportFileName; in openFile() 429 fileNameExtractor = MetaBugReport::getAudioFileName; in openFile() 439 MetaBugReport bugReport = getBugReportFromUri(uri); in openFile() 447 private MetaBugReport getBugReportFromUri(@NonNull Uri uri) { in getBugReportFromUri() 467 private boolean deleteFilesFor(MetaBugReport bugReport) { in deleteFilesFor()
|
D | BugReportActivity.java | 136 private MetaBugReport mMetaBugReport; 396 MetaBugReport existingBugReport = BugStorageUtils.findBugReport(this, in addAudioToExistingBugReport() 405 MetaBugReport newBugReport = createBugReport(this, MetaBugReport.TYPE_AUDIO_FIRST); in createNewBugReportWithAudioMessage() 426 boolean isNewBugReport, MetaBugReport bugReport, File tempAudioFile) { in startAudioMessageRecording() 694 static MetaBugReport createBugReport(Context context, int type) { 695 String timestamp = MetaBugReport.toBugReportTimestamp(new Date()); 757 private MetaBugReport mBugReport; 760 Context context, Config config, MetaBugReport bugReport, File tempAudioFile, 801 String audioTimestamp = MetaBugReport.toBugReportTimestamp(new Date());
|
D | SimpleUploaderAsyncTask.java | 89 Storage storage, MetaBugReport bugReport, String uploadName, InputStream data) in uploadSimple() 128 private void upload(MetaBugReport bugReport) throws IOException { in upload() 180 private File zipBugReportFiles(MetaBugReport bugReport) throws IOException { in zipBugReportFiles() 202 List<MetaBugReport> bugReports = BugStorageUtils.getUploadPendingBugReports(mContext); in doInBackground() 205 for (MetaBugReport bugReport : bugReports) { in doInBackground()
|
D | FileUtils.java | 76 static String getZipFileName(MetaBugReport bug) { in getZipFileName() 90 static String getAudioFileName(String timestamp, MetaBugReport bug, String extension) { in getAudioFileName() 96 public static String extractLookupCode(MetaBugReport bug) { in extractLookupCode()
|
D | ExpireOldBugReportsJob.java | 72 List<MetaBugReport> bugReportsWithZeroTtlPoints = in run() 75 for (MetaBugReport bug : bugReportsWithZeroTtlPoints) { in run()
|
D | TtlPointsDecremental.java | 52 List<MetaBugReport> unexpiredBugReports = in run() 56 for (MetaBugReport bugReport : unexpiredBugReports) { in run()
|
D | BugReportService.java | 156 private MetaBugReport mMetaBugReport; 265 BugReportActivity.createBugReport(this, MetaBugReport.TYPE_AUDIO_LATER); in onStartCommand() 517 static void showBugReportFinishedNotification(Context context, MetaBugReport bug) { in showBugReportFinishedNotification() 593 if (mMetaBugReport.getType() == MetaBugReport.TYPE_AUDIO_LATER) { in zipDirectoryAndUpdateStatus()
|
/packages/services/Car/tests/BugReportApp/ |
D | README.md | 12 5. Otherwise it creates MetaBugReport record in a local db and starts recording audio message. 18 and when finished it updates MetaBugReport using BugStorageProvider. 59 - generates `MetaBugReport.TYPE_AUDIO_FIRST` bug report, shows audio message dialog before 62 - generates `MetaBugReport.TYPE_AUDIO_LATER` bug report, shows audio dialog after collecting
|