Add permanent face and route management memchanism

Change-Id: I23e77358e89c49473445994b8bd0c2c425d0e1b0
Refs: #3443
diff --git a/app/src/main/jni/nfd-wrapper.cpp b/app/src/main/jni/nfd-wrapper.cpp
index 90e19ed..a04585e 100644
--- a/app/src/main/jni/nfd-wrapper.cpp
+++ b/app/src/main/jni/nfd-wrapper.cpp
@@ -293,6 +293,12 @@
   }
 }
 
+JNIEXPORT jboolean JNICALL
+Java_net_named_1data_nfd_service_NfdService_isNfdRunning(JNIEnv*, jclass)
+{
+    return nfd::g_runner.get() != nullptr;
+}
+
 JNIEXPORT jobject JNICALL
 Java_net_named_1data_nfd_service_NfdService_getNfdLogModules(JNIEnv* env, jclass)
 {
diff --git a/app/src/main/jni/nfd-wrapper.hpp b/app/src/main/jni/nfd-wrapper.hpp
index fcd598d..69a0ab5 100644
--- a/app/src/main/jni/nfd-wrapper.hpp
+++ b/app/src/main/jni/nfd-wrapper.hpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /**
- * Copyright (c) 2015 Regents of the University of California
+ * Copyright (c) 2015-2016 Regents of the University of California
  *
  * This file is part of NFD (Named Data Networking Forwarding Daemon) Android.
  * See AUTHORS.md for complete list of NFD Android authors and contributors.
@@ -45,6 +45,14 @@
 
 /*
  * Class:     net_named_data_nfd_service_NfdService
+ * Method:    isNfdRunning
+ * Signature: ()L/java/lang/Boolean;
+ */
+JNIEXPORT jboolean JNICALL
+Java_net_named_1data_nfd_service_NfdService_isNfdRunning(JNIEnv*, jclass);
+
+/*
+ * Class:     net_named_data_nfd_service_NfdService
  * Method:    getNfdLogModules
  * Signature: ()Ljava/util/List;
  */