mirror of
https://github.com/KDE/kdeconnect-android
synced 2025-08-30 13:47:41 +00:00
Remove commented code for real
This commit is contained in:
@@ -154,19 +154,4 @@
|
|||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
<!--
|
|
||||||
<ImageButton
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:id="@+id/pause_button"
|
|
||||||
android:src="@android:drawable/ic_media_pause"
|
|
||||||
android:layout_gravity="center"/>
|
|
||||||
|
|
||||||
<ImageButton
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:id="@+id/pause_button"
|
|
||||||
android:src="@android:drawable/ic_media_stop"
|
|
||||||
android:layout_gravity="center"/>
|
|
||||||
-->
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
@@ -33,20 +33,4 @@
|
|||||||
android:text="My device"
|
android:text="My device"
|
||||||
android:textColor="#fff" />
|
android:textColor="#fff" />
|
||||||
|
|
||||||
<!--
|
|
||||||
<ImageView
|
|
||||||
android:src="@drawable/ic_action_image_edit"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_alignParentBottom="true"
|
|
||||||
android:layout_alignParentRight="true"
|
|
||||||
android:layout_alignParentEnd="true"
|
|
||||||
android:clickable="true"
|
|
||||||
android:background="@drawable/abc_list_selector_holo_dark"
|
|
||||||
android:layout_gravity="center_vertical"
|
|
||||||
android:contentDescription="@string/rename_device"
|
|
||||||
android:id="@+id/rename"
|
|
||||||
/>
|
|
||||||
-->
|
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
@@ -80,7 +80,7 @@ public class TelepathyPlugin extends Plugin {
|
|||||||
|
|
||||||
ArrayList<String> parts = smsManager.divideMessage(sms);
|
ArrayList<String> parts = smsManager.divideMessage(sms);
|
||||||
|
|
||||||
// If this message turns out to fit in a single SMS, sendMultpartTextMessage
|
// If this message turns out to fit in a single SMS, sendMultipartTextMessage
|
||||||
// properly handles that case
|
// properly handles that case
|
||||||
smsManager.sendMultipartTextMessage(phoneNo, null, parts, null, null);
|
smsManager.sendMultipartTextMessage(phoneNo, null, parts, null, null);
|
||||||
} else if (permissionCheck == PackageManager.PERMISSION_DENIED) {
|
} else if (permissionCheck == PackageManager.PERMISSION_DENIED) {
|
||||||
@@ -94,96 +94,6 @@ public class TelepathyPlugin extends Plugin {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
if (np.getBoolean("requestContacts")) {
|
|
||||||
|
|
||||||
ArrayList<String> vCards = new ArrayList<String>();
|
|
||||||
|
|
||||||
Cursor cursor = context.getContentResolver().query(
|
|
||||||
Contacts.CONTENT_URI,
|
|
||||||
null,
|
|
||||||
Contacts.HAS_PHONE_NUMBER + " > 0 ",
|
|
||||||
null,
|
|
||||||
null
|
|
||||||
);
|
|
||||||
|
|
||||||
if (cursor != null && cursor.moveToFirst()) {
|
|
||||||
try {
|
|
||||||
do {
|
|
||||||
String lookupKey = cursor.getString(cursor.getColumnIndex(Contacts.LOOKUP_KEY));
|
|
||||||
Uri uri = Uri.withAppendedPath(Contacts.CONTENT_VCARD_URI, lookupKey);
|
|
||||||
AssetFileDescriptor fd = null;
|
|
||||||
try {
|
|
||||||
fd = context.getContentResolver()
|
|
||||||
.openAssetFileDescriptor(uri, "r");
|
|
||||||
FileInputStream fis = fd.createInputStream();
|
|
||||||
byte[] b = new byte[(int) fd.getDeclaredLength()];
|
|
||||||
fis.read(b);
|
|
||||||
String vCard = new String(b);
|
|
||||||
vCards.add(vCard);
|
|
||||||
} catch (FileNotFoundException e) {
|
|
||||||
e.printStackTrace();
|
|
||||||
Log.e("RequestContacts", e.getMessage());
|
|
||||||
} catch (Exception e) {
|
|
||||||
e.printStackTrace();
|
|
||||||
Log.e("RequestContacts", e.getMessage());
|
|
||||||
} finally {
|
|
||||||
if (fd != null) fd.close();
|
|
||||||
}
|
|
||||||
} while (cursor.moveToNext());
|
|
||||||
Log.e("Contacts","Size: "+vCards.size());
|
|
||||||
} catch (Exception e) {
|
|
||||||
e.printStackTrace();
|
|
||||||
Log.e("RequestContacts", e.getMessage());
|
|
||||||
} finally {
|
|
||||||
cursor.close();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
NetworkPackage answer = new NetworkPackage(NetworkPackage.PACKAGE_TYPE_TELEPHONY);
|
|
||||||
answer.set("contacts",vCards);
|
|
||||||
device.sendPackage(answer);
|
|
||||||
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
/*
|
|
||||||
if (np.getBoolean("requestNumbers")) {
|
|
||||||
|
|
||||||
ArrayList<String> numbers = new ArrayList<String>();
|
|
||||||
|
|
||||||
Cursor cursor = context.getContentResolver().query(
|
|
||||||
CommonDataKinds.Phone.CONTENT_URI,
|
|
||||||
new String[]{
|
|
||||||
CommonDataKinds.Phone.DISPLAY_NAME,
|
|
||||||
CommonDataKinds.Phone.NUMBER
|
|
||||||
},
|
|
||||||
Contacts.HAS_PHONE_NUMBER + " > 0 ",
|
|
||||||
null,
|
|
||||||
null
|
|
||||||
);
|
|
||||||
|
|
||||||
if (cursor != null && cursor.moveToFirst()) {
|
|
||||||
try {
|
|
||||||
do {
|
|
||||||
String number = cursor.getString(cursor.getColumnIndex(CommonDataKinds.Phone.NUMBER));
|
|
||||||
String name = cursor.getString(cursor.getColumnIndex(CommonDataKinds.Phone.DISPLAY_NAME));
|
|
||||||
numbers.add(number);
|
|
||||||
} while (cursor.moveToNext());
|
|
||||||
Log.e("Numbers","Size: "+numbers.size());
|
|
||||||
} catch (Exception e) {
|
|
||||||
e.printStackTrace();
|
|
||||||
Log.e("RequestContacts", e.getMessage());
|
|
||||||
} finally {
|
|
||||||
cursor.close();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
NetworkPackage answer = new NetworkPackage(NetworkPackage.PACKAGE_TYPE_TELEPHONY);
|
|
||||||
answer.set("numbers",numbers);
|
|
||||||
device.sendPackage(answer);
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -199,6 +109,6 @@ public class TelepathyPlugin extends Plugin {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String[] getRequiredPermissions() {
|
public String[] getRequiredPermissions() {
|
||||||
return new String[]{Manifest.permission.SEND_SMS/*, Manifest.permission.READ_CONTACTS*/};
|
return new String[]{Manifest.permission.SEND_SMS};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user