Update Target SDK and resolve CTS issue

Updated Target SDK to 29
Include Modified Boot Completed Receiver to address customer CTS issue

Change-Id: I3085d5b5d436fa23b1812adc0b14e95a041e6634
diff --git a/AndroidManifest.xml b/AndroidManifest.xml
index e847780..7005bb3 100644
--- a/AndroidManifest.xml
+++ b/AndroidManifest.xml
@@ -16,33 +16,33 @@
 -->
 <manifest xmlns:android="http://schemas.android.com/apk/res/android"
     package="com.dsi.ant.server"
-    android:versionName="5.0.0_hidl_1"
-    android:versionCode="050000"
+    android:versionName="5.0.1_hidl_1"
+    android:versionCode="050001"
     android:sharedUserId="android.uid.system">
 
     <uses-sdk
         android:minSdkVersion="7"
-        android:targetSdkVersion="23"
+        android:targetSdkVersion="29"
         />
 
     <application android:icon="@drawable/ic_launcher"
         android:label="@string/app_name"
         android:process="system"
         android:permission="com.dsi.ant.permission.ANTRADIO" >
-        
+
         <service android:exported="true" android:name=".AntService">
             <intent-filter>
                 <action android:name="com.dsi.ant.server.IAntHal" />
                 <action android:name="com.dsi.ant.intent.request.SERVICE_INFO" />
             </intent-filter>
-            
+
             <meta-data android:name="ANT_AdapterType"
                 android:value="built-in"
                 />
         </service>
-        
-        <receiver android:name="com.dsi.ant.server.startup.BootCompletedReceiver" 
-            android:enabled="true" 
+
+        <receiver android:name="com.dsi.ant.server.startup.BootCompletedReceiver"
+            android:enabled="true"
             android:exported="false"
             android:label="BootCompletedReceiver">
             <intent-filter>
@@ -65,4 +65,4 @@
     <uses-permission android:name="android.permission.INTERACT_ACROSS_USERS" />
     <uses-permission android:name="android.permission.INTERACT_ACROSS_USERS_FULL" />
     <uses-permission android:name="android.permission.MANAGE_USERS"/>
-</manifest> 
+</manifest>
diff --git a/src/com/dsi/ant/server/AntService.java b/src/com/dsi/ant/server/AntService.java
index d1d3ce0..0983272 100644
--- a/src/com/dsi/ant/server/AntService.java
+++ b/src/com/dsi/ant/server/AntService.java
@@ -152,11 +152,6 @@
         }
     };
 
-    public static boolean startService(Context context)
-    {
-        return ( null != context.startService(new Intent(IAntHal.class.getName())) );
-    }
-
     /**
      * Calls back the registered callback with the change to the new state
      * @param state the {@link AntHalDefine} state
@@ -818,10 +813,6 @@
             }
         }
 
-        // As someone has started using us, make sure we run "forever" like we
-        // are a system service.
-        startService(this);
-
         return binder;
     }
 
diff --git a/src/com/dsi/ant/server/startup/BootCompletedReceiver.java b/src/com/dsi/ant/server/startup/BootCompletedReceiver.java
index e53ebc4..f89d320 100644
--- a/src/com/dsi/ant/server/startup/BootCompletedReceiver.java
+++ b/src/com/dsi/ant/server/startup/BootCompletedReceiver.java
@@ -2,17 +2,17 @@
  * ANT Stack
  *
  * Copyright 2011 Dynastream Innovations
- * 
+ *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
- * 
+ *
  *     http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and  
+ * See the License for the specific language governing permissions and
  * limitations under the License.
  */
 package com.dsi.ant.server.startup;
@@ -27,20 +27,21 @@
 /**
  * This class will receive BOOT_COMPLETED, and start the ANT HAL Service running forever.
  */
-public class BootCompletedReceiver extends BroadcastReceiver 
+public class BootCompletedReceiver extends BroadcastReceiver
 {
     /** The debug log tag */
     public static final String TAG = "BootCompletedReceiver";
-    
+    private static final String ACTION_BOOT_COMPLETED = "android.intent.action.BOOT_COMPLETED";
     @Override
-    public void onReceive(final Context context, final Intent intent) 
+    public void onReceive(final Context context, final Intent intent)
     {
-        // just make sure we are getting the right intent (better safe than sorry)
-        if(Intent.ACTION_BOOT_COMPLETED.equals(intent.getAction())) 
-        {
-            AntService.startService(context);
-        }
-        else
+       String action = intent.getAction();
+       Intent serviceIntent = new Intent(context,AntService.class);
+       if (null != action && action.equals(ACTION_BOOT_COMPLETED))
+         {
+               context.startService(serviceIntent);
+         }
+       else
         {
             Log.w(TAG, "Received unexpected intent " + intent.toString());
         }