2
0
mirror of https://github.com/KDE/kdeconnect-android synced 2025-09-02 07:05:09 +00:00

Compare commits

...

16 Commits

Author SHA1 Message Date
Albert Vaca
8ff45db1f3 Bump version to release 2019-03-23 21:54:27 +01:00
Erik Duisters
a146767580 Properly handle non-root tree-uri's 2019-03-23 17:57:11 +01:00
l10n daemon script
315d9657dd GIT_SILENT made messages (after extraction) 2019-03-23 03:16:08 +01:00
Nicolas Fella
5f70db7568 Don't send reply actions
They are already handles by another codepath
2019-03-22 18:19:46 +01:00
Nicolas Fella
c2cd60773b Send notification actions
Summary:
Store PendingIntents from notification actions. Send list of notifications to desktop and trigger Intent when matching packet arrives.
CCBUG: 366475

Test Plan: Create test notification, trigger package is received correctly. Whether intent.send() is actually successful is NOT yet tested.

Reviewers: #kde_connect, sredman

Reviewed By: #kde_connect, sredman

Subscribers: sredman, apol, MatMaul, kdeconnect, mtijink, #kde_connect

Tags: #kde_connect

Differential Revision: https://phabricator.kde.org/D12294
2019-03-22 17:07:00 +01:00
Albert Vaca Cintora
ca90b64094 Bump version to release 2019-03-22 08:38:36 +01:00
Albert Vaca Cintora
7b6d8a4c35 Remove mention to SMS from the description 2019-03-22 08:38:36 +01:00
Simon Redman
b725e81c37 Re-add READ_SMS permission to SMS plugin
Previously was bugged: If the SMS plugin was enabled but the Telephony was not, the SMS plugin would not have worked. Good thing nobody noticed! :)
2019-03-21 21:10:22 -06:00
Nicolas Fella
17e9892c80 Fix showing callers number on Pie 2019-03-21 23:13:27 +00:00
Albert Vaca Cintora
a8bc4f24c7 Fix crash on old API 2019-03-21 23:02:04 +01:00
Albert Vaca Cintora
3b82cd44e4 After unbinding, this will prevent other code from using any view 2019-03-21 23:01:55 +01:00
Nicolas Fella
79272a6042 Reenable calllog permission 2019-03-21 22:46:04 +01:00
Simon Redman
12fb67a7aa Change hard-coded string to use library-provided constant
Does this cause problems with older SDKs? I don't think so. (If there are problems, I assume they were already there)
2019-03-21 11:12:43 -06:00
Nicolas Fella
d03520ce70 Fix lost packets after connecting 2019-03-21 16:36:00 +00:00
Andy Holmes
0453728407 SftpPlugin: fix SAF implementation for gvfs/ssh
Returning NULL from readSymbolicLink() results in an exception that
closes the SFTP connection for some SSH implementations, notably the one
used by Gvfs (GSConnect).

primitive-ftpd had a similar issue, which was fixed by returning and
empty string instead of NULL.
2019-03-21 08:16:47 -07:00
Albert Vaca Cintora
7dc023385e Remove directives that aren't needed
And changed pickFirst to merge, that concatenates the contents
2019-03-21 09:49:49 +01:00
13 changed files with 134 additions and 33 deletions

View File

@@ -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="11240"
android:versionName="1.12.4">
android:versionCode="11260"
android:versionName="1.12.6">
<supports-screens
android:anyDensity="true"

View File

@@ -36,12 +36,9 @@ android {
}
}
packagingOptions {
pickFirst "META-INF/DEPENDENCIES"
pickFirst "META-INF/LICENSE"
pickFirst "META-INF/NOTICE"
pickFirst "META-INF/BCKEY.SF"
pickFirst "META-INF/BCKEY.DSA"
pickFirst "META-INF/INDEX.LIST"
merge "META-INF/DEPENDENCIES"
merge "META-INF/LICENSE"
merge "META-INF/NOTICE"
}
lintOptions {
abortOnError false

View File

@@ -61,7 +61,7 @@
<item>Strongest</item>
</string-array>
<string name="category_connected_devices">Verbundene Geräte</string>
<string name="category_not_paired_devices">Verfügbare Gerät</string>
<string name="category_not_paired_devices">Verfügbare Geräte</string>
<string name="category_remembered_devices">Gemerkte Geräte</string>
<string name="device_menu_plugins">Modul-Einstellungen</string>
<string name="device_menu_unpair">Verbindung trennen</string>

View File

@@ -13,6 +13,7 @@
<string name="pref_plugin_clipboard_desc">Del innhaldet på utklippstavla</string>
<string name="pref_plugin_mousepad">Fjernstyring</string>
<string name="pref_plugin_mousepad_desc">Bruk telefonen eller nettbrettet som styreplate og tastatur</string>
<string name="pref_plugin_presenter">Fjernstyring av lysbiletvising</string>
<string name="pref_plugin_presenter_desc">Bruk eininga til å byta lysbilete i presentasjonar</string>
<string name="pref_plugin_remotekeyboard">Ta imot eksterne tastetrykk</string>
<string name="pref_plugin_remotekeyboard_desc">Ta imot tastetrykk frå eksterne einingar</string>
@@ -26,8 +27,8 @@
<string name="pref_plugin_ping_desc">Send og ta imot pingsignal</string>
<string name="pref_plugin_notifications">Varslingssynkronisering</string>
<string name="pref_plugin_notifications_desc">Få tilgang til varslingar frå andre einingar</string>
<string name="pref_plugin_receive_notifications"> varslingar</string>
<string name="pref_plugin_receive_notifications_desc"> varslingar frå den andre eininga og vis dei i Android</string>
<string name="pref_plugin_receive_notifications">Ta imot varslingar</string>
<string name="pref_plugin_receive_notifications_desc">Ta imot varslingar frå den andre eininga og vis dei i Android</string>
<string name="pref_plugin_sharereceiver">Del og ta imot</string>
<string name="pref_plugin_sharereceiver_desc">Del filer og nettadresser mellom einingar</string>
<string name="plugin_not_available">Denne funksjonen er ikkje tilgjengeleg i din Android-versjon</string>
@@ -37,6 +38,7 @@
<string name="open_settings">Opna innstillingar</string>
<string name="no_permissions">Du må gje tilgang til lesing av varslingar</string>
<string name="no_permission_mprisreceiver">Du må gje tilgang til varslingar for å kunne kontrollera mediespelarar</string>
<string name="no_permissions_remotekeyboard">For å ta imot tastetrykk må du slå på fjerntastaturet i KDE Connect</string>
<string name="send_ping">Send pingsignal</string>
<string name="open_mpris_controls">Mediekontroll</string>
<string name="remotekeyboard_editing_only_title">Handter eksterne tastetrykk berre ved redigering</string>
@@ -143,7 +145,7 @@
<string name="mpris_volume">Lydstyrke</string>
<string name="mpris_settings">Medieinnstillingar</string>
<string name="mpris_time_settings_title">Spoleknappar</string>
<string name="mpris_time_settings_summary">Juster tida for spoling ved trykking</string>
<string name="mpris_time_settings_summary">Juster kor langt spoleknappane skal spola</string>
<string-array name="mpris_time_entries">
<item>10 sekund</item>
<item>20 sekund</item>
@@ -151,7 +153,7 @@
<item>1 minutt</item>
<item>2 minutt</item>
</string-array>
<string name="mpris_notification_settings_title">Vis varsling med avspelingskontrollar</string>
<string name="mpris_notification_settings_title">Vis varsling om avspelingskontrollar</string>
<string name="mpris_notification_settings_summary">Tillat å kontrollera mediespelarar utan å opna KDE Connect</string>
<string name="share_to">Del til </string>
<string name="protocol_version_older">Denne eininga brukar ein gammal protokollversjon</string>
@@ -168,8 +170,12 @@
<string name="unpair_device_action">Løys paring for %s</string>
<string name="custom_device_list">Legg til eining basert på IP</string>
<string name="delete_custom_device">Vil du sletta %s?</string>
<string name="custom_device_deleted">Tilpassa eining er sletta</string>
<string name="custom_device_list_help">Viss eininga ikkje vert funnen automatisk, kan du leggja til IP-adressa eller vertsnamnet til eininga ved å trykka på handlingsknappen</string>
<string name="custom_device_fab_hint">Legg til eining</string>
<string name="undo">Angra</string>
<string name="share_notification_preference">Lydvarsling</string>
<string name="share_notification_preference_summary">Vibrer og spel ein lyd ved mottak av fil</string>
<string name="share_notification_preference_summary">Vibrer og spel ein lyd ved mottak av filer</string>
<string name="share_destination_customize">Sjølvvald målmappe</string>
<string name="share_destination_customize_summary_disabled">Mottekne filer vert lagra i nedlastingsmappa</string>
<string name="share_destination_customize_summary_enabled">Mottekne filer vert lagra i mappa nedanfor</string>
@@ -183,7 +189,28 @@
<string name="sftp_sdcard">SD-kort</string>
<string name="sftp_readonly">(skriveverna)</string>
<string name="sftp_camera">Kamerabilete</string>
<string name="add_device_dialog_title">Legg til eining</string>
<string name="add_device_hint">Vertsnamn/IP-adresse</string>
<string name="sftp_preference_detected_sdcards">Oppdaga SD-kort</string>
<string name="sftp_preference_edit_sdcard_title">Rediger SD-kort</string>
<string name="sftp_preference_configured_storage_locations">Oppsette lagringsområde</string>
<string name="sftp_preference_add_storage_location_title">Legg til lagringsområde</string>
<string name="sftp_preference_edit_storage_location">Rediger lagringsområde</string>
<string name="sftp_preference_add_camera_shortcut">Legg til snarveg til kameramappe</string>
<string name="sftp_preference_add_camera_shortcut_summary_on">Legg til ein snarveg til kameramappa</string>
<string name="sftp_preference_add_camera_shortcut_summary_off">Ikkje legg til ein snarveg til kameramappa</string>
<string name="sftp_storage_preference_storage_location">Lagringsområde</string>
<string name="sftp_storage_preference_storage_location_already_configured">Dette lagringsområdet er alt sett opp</string>
<string name="sftp_storage_preference_click_to_select">trykk for å velja</string>
<string name="sftp_storage_preference_display_name">Visingsnamn</string>
<string name="sftp_storage_preference_display_name_already_used">Dette visingsnamnet er alt i bruk</string>
<string name="sftp_storage_preference_display_name_cannot_be_empty">Visiningsnamnet kan ikkje vera tomt</string>
<string name="sftp_action_mode_menu_delete">Slett</string>
<string name="sftp_no_sdcard_detected">Fann ikkje noko SD-kort</string>
<string name="sftp_no_storage_locations_configured">Ingen lagringsområde er sette opp</string>
<string name="sftp_saf_permission_explanation">For å få tilgang til over nettet må du setja opp lagringsområde</string>
<string name="add_host">Legg til vert/IP</string>
<string name="add_host_hint">Vertsnamn/IP-adresse</string>
<string name="no_players_connected">Fann ingen spelarar</string>
<string name="mpris_player_on_device">%1$s på %2$s</string>
<string name="send_files">Send filer</string>
@@ -210,7 +237,7 @@
<string name="plugins_need_permission">Nokre av tillegga treng utvida løyva for å fungera (trykk på dei for meir informasjon):</string>
<string name="permission_explanation">Dette tillegget treng utvida løyve for å fungera</string>
<string name="optional_permission_explanation">Du må gje utvida løyve for at alle funksjonane skal fungera</string>
<string name="plugins_need_optional_permission">På grunn av manglande løyve har nokre av tillegga funksjonar slåtte av (trykk på dei for meir informasjon):</string>
<string name="plugins_need_optional_permission">På grunn av manglande løyve vil desse funksjonane ikkje verka (trykk på dei for meir informasjon):</string>
<string name="share_optional_permission_explanation">For å kunna dela filer mellom telefonen og datamaskina må du gje appen lese- og skriveløyve til lagringsområdet på telefonen</string>
<string name="telepathy_permission_explanation">For å kunna lesa og skriva tekstmeldingar frå datamaskina må du gje appen tilgang til SMS</string>
<string name="telephony_permission_explanation">For å kunna sjå telefonsamtalar og tekstmeldingar frå datamaskina må du gje appen tilgang til telefon- og SMS-funksjonar</string>
@@ -224,6 +251,7 @@
<string name="settings_icon_description">Innstillingsikon</string>
<string name="presenter_fullscreen">Fullskjerm</string>
<string name="presenter_exit">Avslutt presentasjon</string>
<string name="presenter_lock_tip">Du kan låsa eininga og bruka lydstyrke-knappane som førre/neste-knappar</string>
<string name="add_command">Legg til kommando</string>
<string name="addcommand_explanation">Ingen kommandoar er registrerte</string>
<string name="addcommand_explanation2">Du kan leggja til nye kommandoar i systeminnstillingane til KDE Connect</string>
@@ -264,4 +292,6 @@
<string name="block_contents">Blokker varslingsinnhald</string>
<string name="block_images">Blokker bilete i varslingar</string>
<string name="notification_channel_receivenotification">Varslingar frå andre einingar</string>
<string name="take_picture">Opna kamera</string>
<string name="plugin_photo_desc">Opna kamera-appen for å gjera det lettare å ta og overføra bilete</string>
</resources>

View File

@@ -193,7 +193,10 @@
<string name="sftp_sdcard">SD karta</string>
<string name="sftp_readonly">(iba na čítanie)</string>
<string name="sftp_camera">Obrázky fotoaparátu</string>
<string name="add_device_dialog_title">Pridať zariadenie</string>
<string name="sftp_storage_preference_display_name">Zobraziť meno</string>
<string name="add_host">Pridať hostiteľa/IP</string>
<string name="add_host_hint">Názov hostiteľa alebo IP</string>
<string name="no_players_connected">Nenašli sa žiadne prehrávače</string>
<string name="mpris_player_on_device">%1$s na %2$s</string>
<string name="send_files">Odoslať súbory</string>

View File

@@ -289,7 +289,7 @@
<string name="plugins_need_optional_permission">Some plugins have features disabled because of lack of permission (tap for more info):</string>
<string name="share_optional_permission_explanation">To share files between your phone and your desktop you need to give access to the phone\'s storage</string>
<string name="telepathy_permission_explanation">To read and write SMS from your desktop you need to give permission to SMS</string>
<string name="telephony_permission_explanation">To see phone calls and SMS from the desktop you need to give permission to phone calls and SMS</string>
<string name="telephony_permission_explanation">To see phone calls from the desktop you need to give permission to access phone calls</string>
<string name="telephony_optional_permission_explanation">To see a contact name instead of a phone number you need to give access to the phone\'s contacts</string>
<string name="contacts_permission_explanation">To share your contacts book with the desktop, you need to give contacts permission</string>
<string name="select_ringtone">Select a ringtone</string>

View File

@@ -565,6 +565,11 @@ public class Device implements BaseLink.PacketReceiver {
}
} else if (isPaired()) {
// pluginsByIncomingInterface may not be built yet
if(pluginsByIncomingInterface.isEmpty()) {
reloadPluginsFromSettings();
}
//If capabilities are not supported, iterate all plugins
Collection<String> targetPlugins = pluginsByIncomingInterface.get(np.getType());
if (targetPlugins != null && !targetPlugins.isEmpty()) {

View File

@@ -16,7 +16,7 @@
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
*/
package org.kde.kdeconnect.Plugins.NotificationsPlugin;
@@ -40,6 +40,7 @@ import android.service.notification.StatusBarNotification;
import android.text.SpannableString;
import android.util.Log;
import org.json.JSONArray;
import org.kde.kdeconnect.Helpers.AppsHelper;
import org.kde.kdeconnect.NetworkPacket;
import org.kde.kdeconnect.Plugins.Plugin;
@@ -55,6 +56,8 @@ import java.security.NoSuchAlgorithmException;
import java.util.Arrays;
import java.util.HashMap;
import java.util.HashSet;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
import java.util.Set;
@@ -68,11 +71,15 @@ public class NotificationsPlugin extends Plugin implements NotificationReceiver.
private final static String PACKET_TYPE_NOTIFICATION = "kdeconnect.notification";
private final static String PACKET_TYPE_NOTIFICATION_REQUEST = "kdeconnect.notification.request";
private final static String PACKET_TYPE_NOTIFICATION_REPLY = "kdeconnect.notification.reply";
private final static String PACKET_TYPE_NOTIFICATION_ACTION = "kdeconnect.notification.action";
private final static String TAG = "NotificationsPlugin";
private AppDatabase appDatabase;
private Set<String> currentNotifications;
private Map<String, RepliableNotification> pendingIntents;
private Map<String, List<Notification.Action>> actions;
private boolean serviceReady;
@Override
@@ -117,6 +124,7 @@ public class NotificationsPlugin extends Plugin implements NotificationReceiver.
pendingIntents = new HashMap<>();
currentNotifications = new HashSet<>();
actions = new HashMap<>();
appDatabase = new AppDatabase(context, true);
@@ -153,6 +161,9 @@ public class NotificationsPlugin extends Plugin implements NotificationReceiver.
return;
}
String id = getNotificationKeyCompat(statusBarNotification);
actions.remove(id);
NetworkPacket np = new NetworkPacket(PACKET_TYPE_NOTIFICATION);
np.set("id", id);
np.set("isCancel", true);
@@ -252,6 +263,20 @@ public class NotificationsPlugin extends Plugin implements NotificationReceiver.
currentNotifications.add(key);
}
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
if (notification.actions != null && notification.actions.length > 0) {
actions.put(key, new LinkedList<>());
JSONArray jsonArray = new JSONArray();
for (Notification.Action action : notification.actions) {
if (null == action.title || (action.getRemoteInputs() != null && action.getRemoteInputs().length > 0))
continue;
jsonArray.put(action.title.toString());
actions.get(key).add(action);
}
np.set("actions", jsonArray);
}
}
np.set("id", key);
np.set("isClearable", statusBarNotification.isClearable());
np.set("appName", appName == null ? packageName : appName);
@@ -466,15 +491,37 @@ public class NotificationsPlugin extends Plugin implements NotificationReceiver.
private void sendCurrentNotifications(NotificationReceiver service) {
StatusBarNotification[] notifications = service.getActiveNotifications();
for (StatusBarNotification notification : notifications) {
sendNotification(notification);
if (notifications != null) { //Can happen only on API 23 and lower
for (StatusBarNotification notification : notifications) {
sendNotification(notification);
}
}
}
@Override
public boolean onPacketReceived(final NetworkPacket np) {
if (np.getBoolean("request")) {
if (np.getType().equals(PACKET_TYPE_NOTIFICATION_ACTION) && Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
String key = np.getString("key");
String title = np.getString("action");
PendingIntent intent = null;
for (Notification.Action a : actions.get(key)) {
if (a.title.equals(title)) {
intent = a.actionIntent;
}
}
if (intent != null) {
try {
intent.send();
} catch (PendingIntent.CanceledException e) {
Log.e(TAG, "Triggering action failed", e);
}
}
} else if (np.getBoolean("request")) {
if (serviceReady) {
NotificationReceiver.RunCommand(context, this::sendCurrentNotifications);
@@ -510,7 +557,7 @@ public class NotificationsPlugin extends Plugin implements NotificationReceiver.
@Override
public String[] getSupportedPacketTypes() {
return new String[]{PACKET_TYPE_NOTIFICATION_REQUEST, PACKET_TYPE_NOTIFICATION_REPLY};
return new String[]{PACKET_TYPE_NOTIFICATION_REQUEST, PACKET_TYPE_NOTIFICATION_REPLY, PACKET_TYPE_NOTIFICATION_ACTION};
}
@Override

View File

@@ -1,5 +1,6 @@
/*
* Copyright 2014 Albert Vaca Cintora <albertvaka@gmail.com>
* Copyright 2019 Simon Redman <simon@ergotech.com>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
@@ -32,6 +33,7 @@ import android.os.Bundle;
import android.os.Handler;
import android.os.Looper;
import android.preference.PreferenceManager;
import android.provider.Telephony;
import android.telephony.PhoneNumberUtils;
import android.telephony.SmsManager;
import android.telephony.SmsMessage;
@@ -127,7 +129,7 @@ public class SMSPlugin extends Plugin {
//Log.e("TelephonyPlugin","Telephony event: " + action);
if ("android.provider.Telephony.SMS_RECEIVED".equals(action)) {
if (Telephony.Sms.Intents.SMS_RECEIVED_ACTION.equals(action)) {
final Bundle bundle = intent.getExtras();
if (bundle == null) return;
@@ -274,7 +276,7 @@ public class SMSPlugin extends Plugin {
public boolean onCreate() {
permissionExplanation = R.string.telepathy_permission_explanation;
IntentFilter filter = new IntentFilter("android.provider.Telephony.SMS_RECEIVED");
IntentFilter filter = new IntentFilter(Telephony.Sms.Intents.SMS_RECEIVED_ACTION);
filter.setPriority(500);
context.registerReceiver(receiver, filter);
@@ -428,6 +430,9 @@ public class SMSPlugin extends Plugin {
@Override
public String[] getRequiredPermissions() {
return new String[]{Manifest.permission.SEND_SMS};
return new String[]{
Manifest.permission.SEND_SMS,
Manifest.permission.READ_SMS,
};
}
}

View File

@@ -106,7 +106,21 @@ public class AndroidSafFileSystemView implements FileSystemView {
String parentDocumentId = treeDocumentId + (parentSuffix.equals("/") ? "" : parentSuffix.substring(1));
Uri parentUri = DocumentsContract.buildDocumentUriUsingTree(treeUri, parentDocumentId);
Uri documentUri = DocumentsContract.buildDocumentUriUsingTree(treeUri, treeDocumentId + nameWithoutRoot.substring(1));
/*
When sharing a root document tree like "Internal Storage" documentUri looks like:
content://com.android.externalstorage.documents/tree/primary:/document/primary:
For a file or folder beneath that the uri looks like:
content://com.android.externalstorage.documents/tree/primary:/document/primary:Folder/file.txt
Sharing a non root document tree the documentUri looks like:
content://com.android.externalstorage.documents/tree/primary:/document/primary:Download
For a file or folder beneath that the uri looks like:
content://com.android.externalstorage.documents/tree/primary:/document/primary:Download/Folder/file.txt
*/
String documentId = treeDocumentId + (treeDocumentId.endsWith(":") ? nameWithoutRoot.substring(1) : nameWithoutRoot);
Uri documentUri = DocumentsContract.buildDocumentUriUsingTree(treeUri, documentId);
return createAndroidSafSshFile(parentUri, documentUri, filename);
}

View File

@@ -88,7 +88,7 @@ class RootFile implements SshFile {
}
public String readSymbolicLink() {
return null;
return "";
}
public void createSymbolicLink(SshFile destination) {

View File

@@ -108,15 +108,15 @@ public class TelephonyPlugin extends Plugin {
else if (state.equals(TelephonyManager.EXTRA_STATE_OFFHOOK))
intState = TelephonyManager.CALL_STATE_OFFHOOK;
String number = intent.getStringExtra(Intent.EXTRA_PHONE_NUMBER);
if (number == null)
number = intent.getStringExtra(TelephonyManager.EXTRA_INCOMING_NUMBER);
// We will get a second broadcast with the phone number https://developer.android.com/reference/android/telephony/TelephonyManager#ACTION_PHONE_STATE_CHANGED
if (!intent.hasExtra(TelephonyManager.EXTRA_INCOMING_NUMBER))
return;
String number = intent.getStringExtra(TelephonyManager.EXTRA_INCOMING_NUMBER);
final int finalIntState = intState;
final String finalNumber = number;
if (finalIntState != lastState) {
callBroadcastReceived(finalIntState, finalNumber);
callBroadcastReceived(finalIntState, number);
}
}
}
@@ -304,8 +304,7 @@ public class TelephonyPlugin extends Plugin {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
return new String[]{
Manifest.permission.READ_PHONE_STATE,
//FIXME: Disabled because of https://support.google.com/googleplay/android-developer/answer/9047303
//Manifest.permission.READ_CALL_LOG
Manifest.permission.READ_CALL_LOG
};
} else {
return new String[0];

View File

@@ -199,6 +199,7 @@ public class DeviceFragment extends Fragment {
});
unbinder.unbind();
rootView = null;
super.onDestroyView();
}