mirror of
https://github.com/nextcloud/android.git
synced 2024-12-23 09:10:33 +03:00
package renaming
Signed-off-by: tobiasKaminsky <tobias@kaminsky.me>
This commit is contained in:
parent
6eec0a3a1c
commit
da79ca4afa
7 changed files with 11 additions and 38 deletions
|
@ -15,7 +15,7 @@
|
|||
More information here: https://github.com/abeluck/android-streams-ipc
|
||||
*/
|
||||
|
||||
package de.luhmer.owncloud.accountimporter.aidl;
|
||||
package com.nextcloud.android.sso.aidl;
|
||||
|
||||
// Declare the interface.
|
||||
interface IInputStreamService {
|
|
@ -1,25 +0,0 @@
|
|||
/***
|
||||
Copyright (c) 2008-2011 CommonsWare, LLC
|
||||
Licensed under the Apache License, Version 2.0 (the "License"); you may not
|
||||
use this file except in compliance with the License. You may obtain a copy
|
||||
of the License at http://www.apache.org/licenses/LICENSE-2.0. Unless required
|
||||
by applicable law or agreed to in writing, software distributed under the
|
||||
License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS
|
||||
OF ANY KIND, either express or implied. See the License for the specific
|
||||
language governing permissions and limitations under the License.
|
||||
|
||||
From _The Busy Coder's Guide to Advanced Android Development_
|
||||
http://commonsware.com/AdvAndroid
|
||||
|
||||
|
||||
More information here: https://github.com/abeluck/android-streams-ipc
|
||||
*/
|
||||
|
||||
package de.luhmer.owncloud.accountimporter.helper;
|
||||
|
||||
// Declare the interface.
|
||||
interface IInputStreamService {
|
||||
|
||||
ParcelFileDescriptor performNextcloudRequest(in ParcelFileDescriptor input);
|
||||
|
||||
}
|
|
@ -1,4 +1,4 @@
|
|||
package de.luhmer.owncloud.accountimporter.aidl;
|
||||
package com.nextcloud.android.sso;
|
||||
|
||||
import android.accounts.Account;
|
||||
import android.content.Context;
|
||||
|
@ -7,6 +7,9 @@ import android.os.Binder;
|
|||
import android.os.ParcelFileDescriptor;
|
||||
import android.util.Log;
|
||||
|
||||
import com.nextcloud.android.sso.aidl.IInputStreamService;
|
||||
import com.nextcloud.android.sso.aidl.NextcloudRequest;
|
||||
import com.nextcloud.android.sso.aidl.ParcelFileDescriptorUtil;
|
||||
import com.owncloud.android.authentication.AccountUtils;
|
||||
import com.owncloud.android.db.PreferenceManager;
|
||||
import com.owncloud.android.lib.common.OwnCloudAccount;
|
||||
|
@ -67,7 +70,7 @@ public class InputStreamBinder extends IInputStreamService.Stub {
|
|||
Exception exception = null;
|
||||
InputStream httpStream = new InputStream() {
|
||||
@Override
|
||||
public int read() throws IOException {
|
||||
public int read() {
|
||||
return 0;
|
||||
}
|
||||
};
|
||||
|
@ -84,12 +87,7 @@ public class InputStreamBinder extends IInputStreamService.Stub {
|
|||
// Write exception to the stream followed by the actual network stream
|
||||
InputStream exceptionStream = serializeObjectToInputStream(exception);
|
||||
InputStream resultStream = new java.io.SequenceInputStream(exceptionStream, httpStream);
|
||||
return ParcelFileDescriptorUtil.pipeFrom(resultStream, new IThreadListener() {
|
||||
@Override
|
||||
public void onThreadFinished(Thread thread) {
|
||||
Log.d(TAG, "Done sending result");
|
||||
}
|
||||
});
|
||||
return ParcelFileDescriptorUtil.pipeFrom(resultStream, thread -> Log.d(TAG, "Done sending result"));
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
|
@ -1,4 +1,4 @@
|
|||
package de.luhmer.owncloud.accountimporter.aidl;
|
||||
package com.nextcloud.android.sso.aidl;
|
||||
|
||||
/**
|
||||
* Created by david on 29.06.17.
|
|
@ -1,4 +1,4 @@
|
|||
package de.luhmer.owncloud.accountimporter.aidl;
|
||||
package com.nextcloud.android.sso.aidl;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.HashMap;
|
|
@ -1,4 +1,4 @@
|
|||
package de.luhmer.owncloud.accountimporter.aidl;
|
||||
package com.nextcloud.android.sso.aidl;
|
||||
|
||||
import android.os.ParcelFileDescriptor;
|
||||
import android.util.Log;
|
|
@ -4,7 +4,7 @@ import android.app.Service;
|
|||
import android.content.Intent;
|
||||
import android.os.IBinder;
|
||||
|
||||
import de.luhmer.owncloud.accountimporter.aidl.InputStreamBinder;
|
||||
import com.nextcloud.android.sso.InputStreamBinder;
|
||||
|
||||
public class AccountManagerService extends Service {
|
||||
|
||||
|
|
Loading…
Reference in a new issue