mirror of
git://f0xx.org/android_cast
synced 2026-07-29 08:57:44 +03:00
be sync
This commit is contained in:
@@ -134,6 +134,7 @@ public final class RemoteAccessService extends Service {
|
||||
hb.put("device_id", DeviceInfo.getDeviceUuid(this));
|
||||
hb.put("random", loadOrCreateSessionRandom());
|
||||
hb.put("app_version", com.foxx.androidcast.BuildConfig.VERSION_NAME);
|
||||
hb.put("device", buildDeviceMeta(this));
|
||||
hb.put("tunnel_mode", mode.toApiValue());
|
||||
JSONArray caps = new JSONArray();
|
||||
if (mode == RemoteAccessMode.WIREGUARD) {
|
||||
@@ -353,6 +354,24 @@ public final class RemoteAccessService extends Service {
|
||||
nm.createNotificationChannel(ch);
|
||||
}
|
||||
|
||||
private static JSONObject buildDeviceMeta(Context context) throws Exception {
|
||||
JSONObject device = new JSONObject();
|
||||
device.put("name", AppPreferences.getUsername(context));
|
||||
device.put("manufacturer", Build.MANUFACTURER);
|
||||
device.put("brand", Build.BRAND);
|
||||
device.put("model", Build.MODEL);
|
||||
device.put("device", Build.DEVICE);
|
||||
device.put("product", Build.PRODUCT);
|
||||
device.put("sdk_int", Build.VERSION.SDK_INT);
|
||||
device.put("release", Build.VERSION.RELEASE);
|
||||
JSONArray abis = new JSONArray();
|
||||
for (String abi : Build.SUPPORTED_ABIS) {
|
||||
abis.put(abi);
|
||||
}
|
||||
device.put("abis", abis);
|
||||
return device;
|
||||
}
|
||||
|
||||
@Override
|
||||
public IBinder onBind(Intent intent) {
|
||||
return null;
|
||||
|
||||
Reference in New Issue
Block a user