1<?xml version="1.0" encoding="utf-8"?><!--
2  Copyright (C) 2022 The Android Open Source Project
3
4  Licensed under the Apache License, Version 2.0 (the "License");
5  you may not use this file except in compliance with the License.
6  You may obtain a copy of the License at
7
8       http://www.apache.org/licenses/LICENSE-2.0
9
10  Unless required by applicable law or agreed to in writing, software
11  distributed under the License is distributed on an "AS IS" BASIS,
12  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  See the License for the specific language governing permissions and
14  limitations under the License.
15-->
16<navigation xmlns:android="http://schemas.android.com/apk/res/android"
17    xmlns:app="http://schemas.android.com/apk/res-auto"
18    android:id="@+id/home_nav_graph"
19    app:startDestination="@id/homeFragment">
20
21    <include app:graph="@navigation/connected_app_nav_graph"/>
22
23    <fragment
24        android:id="@+id/recentAccessFragment"
25        android:name="com.android.healthconnect.controller.recentaccess.RecentAccessFragment"
26        android:label="@string/recent_access_header">
27        <action
28            android:id="@+id/action_recentAccessFragment_to_connectedAppFragment"
29            app:destination="@id/connected_app_nav_graph" />
30        <action
31            android:id="@+id/action_recentAccessFragment_to_connectedAppsFragment"
32            app:destination="@+id/connectedAppsFragment" />
33    </fragment>
34
35    <fragment
36        android:id="@+id/homeFragment"
37        android:name="com.android.healthconnect.controller.home.HomeFragment"
38        android:label="@string/app_label">
39        <action
40            android:id="@+id/action_homeFragment_to_connectedAppFragment"
41            app:destination="@id/connected_app_nav_graph" />
42        <action
43            android:id="@+id/action_homeFragment_to_healthDataCategoriesFragment"
44            app:destination="@id/data_activity" />
45        <action
46            android:id="@+id/action_homeFragment_to_recentAccessFragment"
47            app:destination="@id/recentAccessFragment" />
48        <action
49            android:id="@+id/action_homeFragment_to_connectedAppsFragment"
50            app:destination="@id/connectedAppsFragment" />
51        <action
52            android:id="@+id/action_homeFragment_to_migrationActivity"
53            app:destination="@id/migrationActivity" />
54        <action
55            android:id="@+id/action_homeFragment_to_manageDataFragment"
56            app:destination="@+id/manageDataFragment"/>
57        <action
58            android:id="@+id/action_homeFragment_to_systemUpdateActivity"
59            app:destination="@id/systemUpdateActivity"/>
60        <action
61            android:id="@+id/action_homeFragment_to_exportSetupActivity"
62            app:destination="@id/exportSetupActivity"/>
63    </fragment>
64
65    <activity
66        android:id="@+id/migrationActivity"
67        android:name="com.android.healthconnect.controller.migration.MigrationActivity"/>
68
69    <activity
70        android:id="@+id/data_activity"
71        app:action="android.health.connect.action.MANAGE_HEALTH_DATA" />
72
73    <activity
74        android:id="@+id/exportSetupActivity"
75        android:name="com.android.healthconnect.controller.exportimport.ExportSetupActivity"/>
76
77    <activity
78        android:id="@+id/importFlowActivity"
79        android:name="com.android.healthconnect.controller.exportimport.ImportFlowActivity"/>
80
81    <fragment
82        android:id="@+id/backupAndRestoreSettingsFragment"
83        android:name="com.android.healthconnect.controller.backuprestore.BackupAndRestoreSettingsFragment"
84        android:label="@string/backup_and_restore_settings_screen_title">
85        <action
86            android:id="@+id/action_backupAndRestoreSettingsFragment_to_exportSetupActivity"
87            app:destination="@id/exportSetupActivity" />
88        <action
89            android:id="@+id/action_backupAndRestoreSettingsFragment_to_scheduledExportFragment"
90            app:destination="@id/scheduledExportFragment" />
91        <action
92            android:id="@+id/action_backupAndRestoreSettingsFragment_to_importFlowActivity"
93            app:destination="@+id/importFlowActivity" />
94    </fragment>
95
96    <fragment
97        android:id="@+id/connectedAppsFragment"
98        android:name="com.android.healthconnect.controller.permissions.connectedapps.ConnectedAppsFragment"
99        android:label="@string/connected_apps_title">
100        <action
101            android:id="@+id/action_connectedApps_to_helpAndFeedback"
102            app:destination="@id/helpAndFeedbackFragment" />
103        <action
104            android:id="@+id/action_connectedApps_to_connectedApp"
105            app:destination="@id/connected_app_nav_graph" />
106        <action
107            android:id="@+id/action_connectedApps_to_searchApps"
108            app:destination="@id/searchConnectedApps" />
109        <action
110            android:id="@+id/action_connected_apps_to_updated_apps"
111            app:destination="@id/update_apps_activity" />
112
113        <action
114            android:id="@+id/action_connected_apps_to_play_store"
115            app:destination="@id/playstore_activity" />
116
117    </fragment>
118
119    <fragment
120        android:id="@+id/searchConnectedApps"
121        android:name="com.android.healthconnect.controller.permissions.connectedapps.searchapps.SearchAppsFragment">
122        <action
123            android:id="@+id/action_searchApps_to_connectedApp"
124            app:destination="@id/connected_app_nav_graph" />
125    </fragment>
126
127    <fragment
128        android:id="@+id/helpAndFeedbackFragment"
129        android:name="com.android.healthconnect.controller.permissions.shared.HelpAndFeedbackFragment"
130        android:label="@string/help_and_feedback">
131        <action
132            android:id="@+id/action_cant_see_all_apps_to_play_store"
133            app:destination="@id/playstore_activity" />
134        <action
135            android:id="@+id/action_cant_see_all_apps_to_updated_apps"
136            app:destination="@id/update_apps_activity" />
137    </fragment>
138
139    <fragment
140        android:id="@+id/manageDataFragment"
141        android:name="com.android.healthconnect.controller.managedata.ManageDataFragment"
142        android:label="@string/manage_data_section">
143        <action
144            android:id="@+id/action_manageData_to_autoDelete"
145            app:destination="@+id/autoDeleteFragment"/>
146        <action
147            android:id="@+id/action_manageData_to_dataSources"
148            app:destination="@+id/dataSourcesFragment"/>
149        <action
150            android:id="@+id/action_manageData_to_setUnits"
151            app:destination="@+id/setUnitsFragment"/>
152        <action
153            android:id="@+id/action_manageData_to_backupAndRestore"
154            app:destination="@+id/backupAndRestoreSettingsFragment" />
155    </fragment>
156
157    <fragment
158        android:id="@+id/dataSourcesFragment"
159        android:name="com.android.healthconnect.controller.datasources.DataSourcesFragment"
160        android:label="@string/data_sources_and_priority_title">
161        <action
162            android:id="@+id/action_dataSourcesFragment_to_addAnAppFragment"
163            app:destination="@id/addAnAppFragment"/>
164    </fragment>
165
166    <fragment
167        android:id="@+id/scheduledExportFragment"
168        android:name="com.android.healthconnect.controller.exportimport.ScheduledExportFragment"
169        android:label="@string/scheduled_export" />
170
171    <fragment
172        android:id="@+id/addAnAppFragment"
173        android:name="com.android.healthconnect.controller.datasources.AddAnAppFragment"
174        android:label="@string/data_sources_add_app">
175        <action
176            android:id="@+id/action_addAnAppFragment_to_dataSourcesFragment"
177            app:popUpTo="@id/dataSourcesFragment"
178            app:popUpToInclusive="true"
179            app:destination="@id/dataSourcesFragment"/>
180    </fragment>
181
182    <fragment
183        android:id="@+id/autoDeleteFragment"
184        android:name="com.android.healthconnect.controller.autodelete.AutoDeleteFragment"
185        android:label="@string/auto_delete_title"/>
186
187    <fragment
188        android:id="@+id/setUnitsFragment"
189        android:name="com.android.healthconnect.controller.dataentries.units.UnitsFragment"
190        android:label="@string/units_title"/>
191
192    <activity
193        android:id="@+id/playstore_activity"
194        android:label="@string/playstore_app_title"
195        app:action="android.intent.action.VIEW"
196        app:data="@string/playstore_collection_url"
197        app:targetPackage="@string/playstore_package_name" />
198
199    <activity
200        android:id="@+id/update_apps_activity"
201        app:action="android.intent.action.VIEW"
202        android:label="@string/playstore_app_title"
203        app:data="@string/playstore_manage_apps_url"
204        app:targetPackage="@string/playstore_package_name" />
205
206    <activity
207        android:id="@+id/systemUpdateActivity"
208        app:action="android.settings.SYSTEM_UPDATE_SETTINGS"
209        android:label="systemUpdateActivity"/>
210
211</navigation>
212