Compare commits
14 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
475f85d0d3 | ||
|
6c50d0f05d | ||
|
aad298ae31 | ||
|
4fab4d4a6c | ||
|
47db10e055 | ||
|
c0ae2c9c08 | ||
|
f4db8e6160 | ||
|
d20cf1696b | ||
|
ca0ca6f7b7 | ||
|
29ff203f24 | ||
|
47c9729e04 | ||
|
b2819557bc | ||
|
b8daca41b0 | ||
|
45ca9aae89 |
@@ -1,8 +1,8 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="org.kde.kdeconnect_tp"
|
||||
android:versionCode="906"
|
||||
android:versionName="0.9.1">
|
||||
android:versionCode="909"
|
||||
android:versionName="0.9e">
|
||||
|
||||
<uses-sdk android:minSdkVersion="9"
|
||||
android:targetSdkVersion="22" />
|
||||
@@ -135,7 +135,6 @@
|
||||
android:configChanges="orientation|keyboardHidden|screenSize"
|
||||
android:label="@string/remote_control"
|
||||
android:parentActivityName="org.kde.kdeconnect.UserInterface.MaterialActivity"
|
||||
android:screenOrientation="fullSensor"
|
||||
android:windowSoftInputMode="stateHidden|adjustResize" >
|
||||
<meta-data
|
||||
android:name="android.support.PARENT_ACTIVITY"
|
||||
|
31
icon.svg
@@ -14,7 +14,7 @@
|
||||
height="274.43201"
|
||||
id="svg2"
|
||||
version="1.1"
|
||||
inkscape:version="0.91 r13725"
|
||||
inkscape:version="0.91 r"
|
||||
sodipodi:docname="icon.svg"
|
||||
inkscape:export-filename="/home/vaka/kdeconnect/kdeconnect-android/res/drawable-mdpi/icon.png"
|
||||
inkscape:export-xdpi="15.741604"
|
||||
@@ -736,23 +736,24 @@
|
||||
borderopacity="1"
|
||||
inkscape:pageopacity="0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:zoom="0.49497475"
|
||||
inkscape:cx="-397.02564"
|
||||
inkscape:cy="247.25211"
|
||||
inkscape:zoom="2"
|
||||
inkscape:cx="118.88075"
|
||||
inkscape:cy="143.06055"
|
||||
inkscape:document-units="px"
|
||||
inkscape:current-layer="layer1"
|
||||
showgrid="true"
|
||||
showguides="true"
|
||||
inkscape:guide-bbox="true"
|
||||
inkscape:window-width="1920"
|
||||
inkscape:window-height="1025"
|
||||
inkscape:window-x="0"
|
||||
inkscape:window-height="1017"
|
||||
inkscape:window-x="-4"
|
||||
inkscape:window-y="0"
|
||||
inkscape:window-maximized="1"
|
||||
fit-margin-top="0"
|
||||
fit-margin-left="0"
|
||||
fit-margin-right="0"
|
||||
fit-margin-bottom="0">
|
||||
fit-margin-bottom="0"
|
||||
showborder="true">
|
||||
<inkscape:grid
|
||||
type="xygrid"
|
||||
id="grid2985"
|
||||
@@ -814,7 +815,7 @@
|
||||
id="layer1"
|
||||
transform="translate(8.7869998,-787.86042)">
|
||||
<path
|
||||
style="fill:#f2f2f2;fill-opacity:1;stroke:none"
|
||||
style="fill:#f5f5f5;fill-opacity:1;stroke:none"
|
||||
d="m 64.090487,801.86214 128.677053,0 c 5.09194,0 9.19121,3.92526 9.19121,8.80103 l 0,44.00509 -11.02945,0 0,-40.48469 -125.000587,0 0,214.74493 125.000587,0 0,-174.26024 11.02945,0 0,184.82144 c 0,4.8757 -4.09927,8.801 -9.19121,8.801 l -128.677053,0 c -5.091955,0 -9.191239,-3.9253 -9.191239,-8.801 l 0,-228.82653 c 0,-4.87577 4.099284,-8.80103 9.191239,-8.80103 z"
|
||||
id="rect3099-1"
|
||||
inkscape:connector-curvature="0"
|
||||
@@ -861,5 +862,19 @@
|
||||
id="rect3907-9-4"
|
||||
inkscape:connector-curvature="0"
|
||||
sodipodi:nodetypes="cccccc" />
|
||||
<path
|
||||
style="opacity:0.4;fill:#ffffff;fill-opacity:1;stroke:none"
|
||||
d="m 72.876953,14.001953 c -5.091955,0 -9.191406,3.925011 -9.191406,8.800781 l 0,2 c 0,-4.87577 4.099451,-8.800781 9.191406,-8.800781 l 128.677737,0 c 5.09194,0 9.1914,3.925011 9.1914,8.800781 l 0,-2 c 0,-4.87577 -4.09946,-8.800781 -9.1914,-8.800781 z"
|
||||
transform="translate(-8.7869998,787.86042)"
|
||||
id="path4295"
|
||||
inkscape:connector-curvature="0"
|
||||
sodipodi:nodetypes="sscsscsss" />
|
||||
<path
|
||||
style="fill:#000000;fill-opacity:1;stroke:none;opacity:0.1"
|
||||
d="m 63.685547,249.62891 0,2 c 0,4.8757 4.099451,8.80078 9.191406,8.80078 l 128.677737,0 c 5.09194,0 9.1914,-3.92508 9.1914,-8.80078 l 0,-2 c 0,4.8757 -4.09946,8.80078 -9.1914,8.80078 l -128.677737,0 c -5.091955,0 -9.191406,-3.92508 -9.191406,-8.80078 z"
|
||||
id="path4300"
|
||||
inkscape:connector-curvature="0"
|
||||
sodipodi:nodetypes="csssscssc"
|
||||
transform="translate(-8.7869998,787.86042)" />
|
||||
</g>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 27 KiB After Width: | Height: | Size: 28 KiB |
Before Width: | Height: | Size: 2.1 KiB After Width: | Height: | Size: 2.1 KiB |
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 1.4 KiB |
Before Width: | Height: | Size: 2.8 KiB After Width: | Height: | Size: 2.8 KiB |
Before Width: | Height: | Size: 4.1 KiB After Width: | Height: | Size: 4.2 KiB |
@@ -2,7 +2,6 @@
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="160dp"
|
||||
android:padding="16dp"
|
||||
android:background="@drawable/drawer_header"
|
||||
android:orientation="vertical"
|
||||
android:gravity="bottom">
|
||||
@@ -14,8 +13,13 @@
|
||||
android:text="KDE Connect"
|
||||
android:textColor="#FFF"
|
||||
android:textStyle="bold"
|
||||
android:paddingBottom="4dp"
|
||||
android:layout_above="@+id/device_name"
|
||||
android:id="@+id/kdeconnect_label"
|
||||
android:paddingLeft="16dp"
|
||||
android:paddingStart="16dp"
|
||||
android:paddingTop="8dp"
|
||||
android:paddingRight="48dp"
|
||||
android:paddingEnd="48dp"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
@@ -23,12 +27,17 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:text="My device"
|
||||
android:id="@+id/device_name"
|
||||
android:layout_marginBottom="8dp"
|
||||
android:layout_marginBottom="0dp"
|
||||
android:textColor="#fff"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:layout_alignParentLeft="true"
|
||||
android:layout_alignParentStart="true"
|
||||
/>
|
||||
android:paddingBottom="16dp"
|
||||
android:paddingTop="4dp"
|
||||
android:paddingRight="48dp"
|
||||
android:paddingEnd="48dp"
|
||||
android:paddingStart="16dp"
|
||||
android:paddingLeft="16dp" />
|
||||
|
||||
<!--
|
||||
<ImageView
|
||||
|
@@ -53,6 +53,7 @@ import java.util.HashSet;
|
||||
import java.util.Set;
|
||||
import java.util.Timer;
|
||||
import java.util.TimerTask;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
import java.util.concurrent.CopyOnWriteArrayList;
|
||||
|
||||
public class Device implements BaseLink.PackageReceiver {
|
||||
@@ -72,8 +73,8 @@ public class Device implements BaseLink.PackageReceiver {
|
||||
|
||||
private final CopyOnWriteArrayList<BaseLink> links = new CopyOnWriteArrayList<>();
|
||||
|
||||
private final HashMap<String, Plugin> plugins = new HashMap<>();
|
||||
private final HashMap<String, Plugin> failedPlugins = new HashMap<>();
|
||||
private final ConcurrentHashMap<String, Plugin> plugins = new ConcurrentHashMap<>();
|
||||
private final ConcurrentHashMap<String, Plugin> failedPlugins = new ConcurrentHashMap<>();
|
||||
|
||||
private final SharedPreferences settings;
|
||||
|
||||
@@ -480,16 +481,12 @@ public class Device implements BaseLink.PackageReceiver {
|
||||
|
||||
if (pairStatus == PairStatus.Requested) { //We started pairing
|
||||
|
||||
Log.i("KDE/Pairing","Pair answer");
|
||||
|
||||
hidePairingNotification();
|
||||
|
||||
pairingDone();
|
||||
|
||||
} else {
|
||||
|
||||
Log.i("KDE/Pairing","Pair request");
|
||||
|
||||
Intent intent = new Intent(context, MaterialActivity.class);
|
||||
intent.putExtra("deviceId", deviceId);
|
||||
PendingIntent pendingIntent = PendingIntent.getActivity(context, 0, intent, PendingIntent.FLAG_ONE_SHOT);
|
||||
@@ -791,11 +788,11 @@ public class Device implements BaseLink.PackageReceiver {
|
||||
}
|
||||
}
|
||||
|
||||
public HashMap<String,Plugin> getLoadedPlugins() {
|
||||
public ConcurrentHashMap<String,Plugin> getLoadedPlugins() {
|
||||
return plugins;
|
||||
}
|
||||
|
||||
public HashMap<String,Plugin> getFailedPlugins() {
|
||||
public ConcurrentHashMap<String,Plugin> getFailedPlugins() {
|
||||
return failedPlugins;
|
||||
}
|
||||
|
||||
|
@@ -37,7 +37,7 @@ public class DeviceHelper {
|
||||
|
||||
//from https://github.com/meetup/android-device-names
|
||||
//Converted to java using:
|
||||
//cat android_models.properties | awk -F'=' '{sub(/ *$/, "", $1)} sub(/^ */, "", $2) { if ($2 != "") print "humanReadableNames.put(\""$1"\",\"" $2 "\");"}'
|
||||
//cat android_models.properties | awk -F'=' '{sub(/ *$/, "", $1)} sub(/^ */, "", $2) { if ($2 != "") print "humanReadableNames.put(\""$1"\",\"" $2 "\");"}' | sed -e 's/\\ /_/g'
|
||||
private final static HashMap<String,String> humanReadableNames = new HashMap<>();
|
||||
static {
|
||||
humanReadableNames.put("5860E","Coolpad Quattro 4G");
|
||||
@@ -55,6 +55,7 @@ public class DeviceHelper {
|
||||
humanReadableNames.put("ALCATEL_ONE_TOUCH_7041X","Alcatel One Touch Pop C7");
|
||||
humanReadableNames.put("ASUS_T00J","Asus ZenFone 5");
|
||||
humanReadableNames.put("ASUS_Transformer_Pad_TF300T","Asus Transformer Pad");
|
||||
humanReadableNames.put("ASUS_Transformer_Pad_TF700T","Asus Transformer Pad");
|
||||
humanReadableNames.put("Aquaris_E4.5","bq Aquaris E4.5");
|
||||
humanReadableNames.put("C1905","Sony Xperia M");
|
||||
humanReadableNames.put("C2105","Sony Xperia L");
|
||||
@@ -168,6 +169,7 @@ public class DeviceHelper {
|
||||
humanReadableNames.put("HTC_PH39100","HTC Vivid 4G");
|
||||
humanReadableNames.put("HTC_PN071","HTC One");
|
||||
humanReadableNames.put("HTC_Sensation_Z710e","HTC Sensation");
|
||||
humanReadableNames.put("HTC_Sensation_4G","HTC Sensation");
|
||||
humanReadableNames.put("HTC_VLE_U","HTC One S");
|
||||
humanReadableNames.put("HUAWEI_G510-0251","Huawei Ascend G510");
|
||||
humanReadableNames.put("HUAWEI_P6-U06","Huawei Ascend P6");
|
||||
@@ -236,9 +238,13 @@ public class DeviceHelper {
|
||||
humanReadableNames.put("MOTWX435KT","Motorola Triumph");
|
||||
humanReadableNames.put("N3","Star NO.1 N3");
|
||||
humanReadableNames.put("N860","ZTE Warp N860");
|
||||
humanReadableNames.put("NEXUS 4","Nexus 4");
|
||||
humanReadableNames.put("NEXUS 5","Nexus 5");
|
||||
humanReadableNames.put("NEXUS 6","Nexus 6");
|
||||
humanReadableNames.put("NEXUS_4","Nexus 4");
|
||||
humanReadableNames.put("NEXUS_5","Nexus 5");
|
||||
humanReadableNames.put("NEXUS_5X","Nexus 5X");
|
||||
humanReadableNames.put("LG-D820","Nexus 5");
|
||||
humanReadableNames.put("LG-D821","Nexus 5");
|
||||
humanReadableNames.put("NEXUS_6","Nexus 6");
|
||||
humanReadableNames.put("NEXUS_6P","Nexus 6P");
|
||||
humanReadableNames.put("Nexus_10","Google Nexus 10");
|
||||
humanReadableNames.put("Nexus_4","Google Nexus 4");
|
||||
humanReadableNames.put("Nexus_7","Asus Nexus 7");
|
||||
@@ -400,8 +406,8 @@ public class DeviceHelper {
|
||||
humanReadableNames.put("ST21i","Sony Xperia Tipo");
|
||||
humanReadableNames.put("ST25i","Sony Xperia U");
|
||||
humanReadableNames.put("ST26i","Sony Xperia J");
|
||||
humanReadableNames.put("Transformer_Prime_TF201","Asus Eee Pad Transformer Prime");
|
||||
humanReadableNames.put("Transformer_TF101","Asus Eee Pad Transformer");
|
||||
humanReadableNames.put("Transformer_Prime_TF201","Asus Transformer Prime");
|
||||
humanReadableNames.put("Transformer_TF101","Asus Transformer");
|
||||
humanReadableNames.put("VM670","LG Optimus V");
|
||||
humanReadableNames.put("VS840_4G","LG Lucid 4G");
|
||||
humanReadableNames.put("VS870_4G","LG Lucid 2");
|
||||
|
@@ -159,10 +159,13 @@ public class KeyListenerView extends View {
|
||||
char keyCharacter = event.getDisplayLabel();
|
||||
np.set("key", new String(new char[]{keyCharacter}).toLowerCase());
|
||||
} else {
|
||||
return false; //normal keys will be handled by KeyInputConnection
|
||||
//A normal key, but still not handled by the KeyInputConnection (happens with numbers)
|
||||
np.set("key", new String(new char[]{(char)event.getUnicodeChar()}));
|
||||
}
|
||||
|
||||
sendKeyPressPackage(np);
|
||||
return true;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
@@ -345,17 +345,18 @@ public class MousePadActivity extends ActionBarActivity implements GestureDetect
|
||||
}
|
||||
});
|
||||
}
|
||||
private void sendSingleHold() {
|
||||
BackgroundService.RunCommand(this, new BackgroundService.InstanceCallback() {
|
||||
@Override
|
||||
public void onServiceStart(BackgroundService service) {
|
||||
Device device = service.getDevice(deviceId);
|
||||
MousePadPlugin mousePadPlugin = device.getPlugin(MousePadPlugin.class);
|
||||
if (mousePadPlugin == null) return;
|
||||
mousePadPlugin.sendSingleHold();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private void sendSingleHold() {
|
||||
BackgroundService.RunCommand(this, new BackgroundService.InstanceCallback() {
|
||||
@Override
|
||||
public void onServiceStart(BackgroundService service) {
|
||||
Device device = service.getDevice(deviceId);
|
||||
MousePadPlugin mousePadPlugin = device.getPlugin(MousePadPlugin.class);
|
||||
if (mousePadPlugin == null) return;
|
||||
mousePadPlugin.sendSingleHold();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private void showKeyboard() {
|
||||
InputMethodManager imm = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE);
|
||||
|
@@ -91,7 +91,7 @@ public class MprisActivity extends ActionBarActivity {
|
||||
String song = mpris.getCurrentSong();
|
||||
((TextView) findViewById(R.id.now_playing_textview)).setText(song);
|
||||
|
||||
if (mpris.getLength() > -1 && mpris.getPosition() > -1 && !"Spotify".equals(mpris.getPlayer())) {
|
||||
if (mpris.getLength() > -1 && mpris.getPosition() > -1 && !"spotify".equals(mpris.getPlayer().toLowerCase())) {
|
||||
((TextView) findViewById(R.id.time_textview)).setText(milisToProgress(mpris.getLength()));
|
||||
|
||||
SeekBar positionSeek = (SeekBar)findViewById(R.id.positionSeek);
|
||||
@@ -154,7 +154,7 @@ public class MprisActivity extends ActionBarActivity {
|
||||
mpris.setPlayer(player);
|
||||
//Spotify doesn't support changing the volume yet...
|
||||
//Also doesn't support seeking and telling actual position...
|
||||
if (player.equals("Spotify")) {
|
||||
if (player.toLowerCase().equals("spotify")) {
|
||||
findViewById(R.id.volume_layout).setVisibility(View.INVISIBLE);
|
||||
findViewById(R.id.rew_button).setVisibility(View.GONE);
|
||||
findViewById(R.id.ff_button).setVisibility(View.GONE);
|
||||
|
@@ -300,7 +300,6 @@ public class DeviceFragment extends Fragment {
|
||||
@Override
|
||||
public void run() {
|
||||
|
||||
Log.e("DEVICE",device.getName() + device.isPairRequestedByOtherEnd() + device.isPairRequested());
|
||||
if (device.isPairRequestedByOtherEnd()) {
|
||||
((TextView) rootView.findViewById(R.id.pair_message)).setText(R.string.pair_requested);
|
||||
rootView.findViewById(R.id.pair_progress).setVisibility(View.GONE);
|
||||
|
@@ -66,12 +66,14 @@ public class MaterialActivity extends AppCompatActivity {
|
||||
TextView nameView = (TextView) mDrawerLayout.findViewById(R.id.device_name);
|
||||
nameView.setText(deviceName);
|
||||
|
||||
nameView.setOnClickListener(new View.OnClickListener() {
|
||||
View.OnClickListener renameListener = new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
renameDevice();
|
||||
}
|
||||
});
|
||||
};
|
||||
mDrawerLayout.findViewById(R.id.kdeconnect_label).setOnClickListener(renameListener);
|
||||
mDrawerLayout.findViewById(R.id.device_name).setOnClickListener(renameListener);
|
||||
|
||||
mNavigationView.setNavigationItemSelectedListener(new NavigationView.OnNavigationItemSelectedListener() {
|
||||
@Override
|
||||
@@ -248,11 +250,17 @@ public class MaterialActivity extends AppCompatActivity {
|
||||
}
|
||||
}
|
||||
|
||||
void renameDevice() {
|
||||
public void renameDevice() {
|
||||
final TextView nameView = (TextView) mDrawerLayout.findViewById(R.id.device_name);
|
||||
final EditText deviceNameEdit = new EditText(MaterialActivity.this);
|
||||
String deviceName = DeviceHelper.getDeviceName(MaterialActivity.this);
|
||||
deviceNameEdit.setText(deviceName);
|
||||
deviceNameEdit.setPadding(
|
||||
((int) (18 * getResources().getDisplayMetrics().density)),
|
||||
((int) (16 * getResources().getDisplayMetrics().density)),
|
||||
((int) (18 * getResources().getDisplayMetrics().density)),
|
||||
((int) (12 * getResources().getDisplayMetrics().density))
|
||||
);
|
||||
new AlertDialog.Builder(MaterialActivity.this)
|
||||
.setView(deviceNameEdit)
|
||||
.setPositiveButton(R.string.device_rename_confirm, new DialogInterface.OnClickListener() {
|
||||
|
BIN
store/icon.png
Normal file
After Width: | Height: | Size: 16 KiB |