android: readParcelable compatibility.
All checks were successful
Build Tilde Friends / Build-All (push) Successful in 16m37s
All checks were successful
Build Tilde Friends / Build-All (push) Successful in 16m37s
This commit is contained in:
parent
bce263a928
commit
fabdfb76b9
@ -1,8 +1,8 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
package="com.unprompted.tildefriends"
|
package="com.unprompted.tildefriends"
|
||||||
android:versionCode="27"
|
android:versionCode="28"
|
||||||
android:versionName="0.0.23">
|
android:versionName="0.0.24-wip">
|
||||||
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
|
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
|
||||||
<uses-permission android:name="android.permission.INTERNET"/>
|
<uses-permission android:name="android.permission.INTERNET"/>
|
||||||
<application
|
<application
|
||||||
|
@ -41,7 +41,7 @@ public class TildeFriendsSandboxService extends Service {
|
|||||||
@Override
|
@Override
|
||||||
protected boolean onTransact(int code, Parcel data, Parcel reply, int flags) {
|
protected boolean onTransact(int code, Parcel data, Parcel reply, int flags) {
|
||||||
if (code == START_CALL) {
|
if (code == START_CALL) {
|
||||||
ParcelFileDescriptor pfd = data.readParcelable(ParcelFileDescriptor.class.getClassLoader(), ParcelFileDescriptor.class);
|
ParcelFileDescriptor pfd = read_pfd(data);
|
||||||
if (pfd != null) {
|
if (pfd != null) {
|
||||||
Log.w("tildefriends", "fd is " + pfd.getFd());
|
Log.w("tildefriends", "fd is " + pfd.getFd());
|
||||||
start_thread(pfd.detachFd());
|
start_thread(pfd.detachFd());
|
||||||
@ -56,4 +56,9 @@ public class TildeFriendsSandboxService extends Service {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@SuppressWarnings("deprecation")
|
||||||
|
static private ParcelFileDescriptor read_pfd(Parcel data) {
|
||||||
|
return data.readParcelable(ParcelFileDescriptor.class.getClassLoader());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user