diff --git a/automotive/src/carapp/AndroidManifest.xml b/automotive/src/carapp/AndroidManifest.xml index 6e3d326f..10af8840 100644 --- a/automotive/src/carapp/AndroidManifest.xml +++ b/automotive/src/carapp/AndroidManifest.xml @@ -64,13 +64,13 @@ - + - + diff --git a/automotive/src/carapp/java/com/ixam97/carStatsViewer/carApp/CarStatsViewerSession.kt b/automotive/src/carapp/java/com/ixam97/carStatsViewer/carApp/CarStatsViewerSession.kt index a395a406..10c05737 100644 --- a/automotive/src/carapp/java/com/ixam97/carStatsViewer/carApp/CarStatsViewerSession.kt +++ b/automotive/src/carapp/java/com/ixam97/carStatsViewer/carApp/CarStatsViewerSession.kt @@ -1,5 +1,6 @@ package com.ixam97.carStatsViewer.carApp +import android.car.Car import android.content.Intent import android.content.pm.PackageManager import androidx.annotation.OptIn @@ -13,14 +14,18 @@ import com.ixam97.carStatsViewer.BuildConfig import com.ixam97.carStatsViewer.CarStatsViewer import com.ixam97.carStatsViewer.carApp.renderer.CarDataSurfaceCallback import com.ixam97.carStatsViewer.dataCollector.DataCollector -import com.ixam97.carStatsViewer.ui.activities.PermissionsActivity import com.ixam97.carStatsViewer.utils.throttle import kotlinx.coroutines.launch @OptIn(ExperimentalCarApi::class) class CarStatsViewerSession : Session(), DefaultLifecycleObserver { - val permissions = PermissionsActivity.PERMISSIONS.toList() + val permissions = listOf( + Car.PERMISSION_ENERGY, + Car.PERMISSION_SPEED, + android.Manifest.permission.ACCESS_FINE_LOCATION, + android.Manifest.permission.ACCESS_COARSE_LOCATION + ) lateinit var carDataSurfaceCallback: CarDataSurfaceCallback diff --git a/automotive/src/carapp/java/com/ixam97/carStatsViewer/carApp/TabsScreen.kt b/automotive/src/carapp/java/com/ixam97/carStatsViewer/carApp/TabsScreen.kt index 334aaf70..66363631 100644 --- a/automotive/src/carapp/java/com/ixam97/carStatsViewer/carApp/TabsScreen.kt +++ b/automotive/src/carapp/java/com/ixam97/carStatsViewer/carApp/TabsScreen.kt @@ -176,7 +176,7 @@ class TabsScreen( if (BuildConfig.FLAVOR_version == "dev") addTab(createTab(R.string.car_app_dashboard, CID_DASHBOARD, R.drawable.ic_car_app_dashboard)) else addTab(createTab(R.string.car_app_status, CID_STATUS, R.drawable.ic_connected)) addTab(createTab(R.string.settings_title, CID_SETTINGS, R.drawable.ic_car_app_settings)) - addTab(createTab(R.string.car_app_menu, CID_MISC, R.drawable.ic_car_app_menu)) + if (BuildConfig.FLAVOR_version == "dev") addTab(createTab(R.string.car_app_menu, CID_MISC, R.drawable.ic_car_app_menu)) setTabContents(TabContents.Builder( when (selectedTabContentID) { CID_TRIP_DATA -> { diff --git a/automotive/src/main/java/com/ixam97/carStatsViewer/AutoStartReceiver.kt b/automotive/src/main/java/com/ixam97/carStatsViewer/AutoStartReceiver.kt index 5087c8ca..b4892bbf 100644 --- a/automotive/src/main/java/com/ixam97/carStatsViewer/AutoStartReceiver.kt +++ b/automotive/src/main/java/com/ixam97/carStatsViewer/AutoStartReceiver.kt @@ -143,11 +143,15 @@ class AutoStartReceiver: BroadcastReceiver() { context.getString(R.string.restart_notification_service), actionServicePendingIntent ).build()) - addAction(Notification.Action.Builder( - null, - context.getString(R.string.restart_notification_app), - actionActivityPendingIntent - ).build()) + if (BuildConfig.FLAVOR_aaos != "carapp") { + addAction( + Notification.Action.Builder( + null, + context.getString(R.string.restart_notification_app), + actionActivityPendingIntent + ).build() + ) + } /* addAction(Notification.Action.Builder( null,