summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTuan Nguyen <tnguy238@ford.com>2017-07-26 14:28:40 -0700
committerTuan Nguyen <tnguy238@ford.com>2017-07-26 14:28:40 -0700
commite758471965513a8afdddb9e690e1a2e3dd727252 (patch)
tree3346e3d8da08b10a0c0afcf397f0d7fdf985d4e1
parent9295bf57bc78bd81f71a4cbdc6e6e6f6c3bbd661 (diff)
downloadsdl_android-e758471965513a8afdddb9e690e1a2e3dd727252.tar.gz
#569 Let app trust its own router service
-rw-r--r--sdl_android/src/main/java/com/smartdevicelink/transport/RouterServiceValidator.java5
1 files changed, 5 insertions, 0 deletions
diff --git a/sdl_android/src/main/java/com/smartdevicelink/transport/RouterServiceValidator.java b/sdl_android/src/main/java/com/smartdevicelink/transport/RouterServiceValidator.java
index b42732d3a..66e415f29 100644
--- a/sdl_android/src/main/java/com/smartdevicelink/transport/RouterServiceValidator.java
+++ b/sdl_android/src/main/java/com/smartdevicelink/transport/RouterServiceValidator.java
@@ -121,6 +121,11 @@ public class RouterServiceValidator {
//This means our service isn't actually running, so set to null. Hopefully we can find a real router service after this.
service = null;
Log.w(TAG, "Supplied service is not actually running.");
+ } else {
+ // If the running router service is created by this app, the validation is good by default
+ if (this.service.getPackageName().equals(context.getPackageName())) {
+ return true;
+ }
}
}
if(this.service == null){