Skip to content

Commit

Permalink
Test
Browse files Browse the repository at this point in the history
  • Loading branch information
Catfriend1 committed Jan 26, 2019
1 parent 4f6c888 commit 3550095
Showing 1 changed file with 13 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -253,13 +253,17 @@ public void onCreate(Bundle savedInstanceState) {
mFolderNeedsToUpdate = false;
}

//Log.d(TAG, "minDiskFree: unit= " + mFolder.minDiskFree.unit);
//Log.d(TAG, "minDiskFree: value= " + mFolder.minDiskFree.value);

// If the extra is set, we should automatically share the current folder with the given device.
if (getIntent().hasExtra(EXTRA_DEVICE_ID)) {
Device device = new Device();
device.deviceID = getIntent().getStringExtra(EXTRA_DEVICE_ID);
mFolder.addDevice(device);
mFolderNeedsToUpdate = true;
}
Log.v(TAG, "onCreate");
}

if (mIsCreateMode) {
Expand Down Expand Up @@ -420,10 +424,19 @@ protected void onSaveInstanceState(Bundle outState) {
*/
@Override
public void onServiceConnected(ComponentName componentName, IBinder iBinder) {
Log.v(TAG, "onServiceConnected");
super.onServiceConnected(componentName, iBinder);
SyncthingServiceBinder syncthingServiceBinder = (SyncthingServiceBinder) iBinder;
SyncthingService syncthingService = (SyncthingService) syncthingServiceBinder.getService();
syncthingService.getNotificationHandler().cancelConsentNotification(getIntent().getIntExtra(EXTRA_NOTIFICATION_ID, 0));

RestApi restApi = syncthingService.getApi();
List<Folder> folders = restApi.getFolders();
for (Folder currentFolder : folders) {
Log.d(TAG, "folderLabel " + currentFolder.label);
Log.d(TAG, "minDiskFree: unit= " + currentFolder.minDiskFree.unit);
Log.d(TAG, "minDiskFree: value= " + currentFolder.minDiskFree.value);
}
}

private void onReceiveFolderIgnoreList(FolderIgnoreList folderIgnoreList) {
Expand Down

0 comments on commit 3550095

Please sign in to comment.