@@ -81,7 +81,7 @@ private void registerSelf(Context context) {
81
81
@ Override
82
82
public int [] getCatalogList () {
83
83
Log .i (TAG , "Get Catalog List" );
84
- return new int [] {65521 , 8891 , 3191 };
84
+ return new int [] {123 , 456 , 89010 };
85
85
}
86
86
87
87
@ Override
@@ -93,8 +93,10 @@ public LauncherResponse launchApp(Application app, String data) {
93
93
int status = 0 ;
94
94
String responseData = "" ;
95
95
96
- boolean matterAppEnabledIsInstalled =
96
+ // Installed Apps that have declared CSA product id & vendor id in their manifes
97
+ boolean matterEnabledAppdIsInstalled =
97
98
endpointsDataStore .getAllPersistedContentApps ().containsKey (app .applicationId );
99
+ // Installed App
98
100
boolean appIsInstalled =
99
101
InstallationObserver .getInstalledPackages (packageManager ).contains (app .applicationId );
100
102
boolean isAppInstalling =
@@ -106,7 +108,9 @@ public LauncherResponse launchApp(Application app, String data) {
106
108
lastReceivedInstallationStatus .get (app .applicationId ),
107
109
InstallationObserver .InstallStatus .FAILED );
108
110
109
- if (!matterAppEnabledIsInstalled && appIsInstalled ) {
111
+ // This use-case can happen if app is installed
112
+ // but it does not support Matter
113
+ if (!matterEnabledAppdIsInstalled && appIsInstalled ) {
110
114
Log .i (
111
115
TAG ,
112
116
"Matter enabled app is not installed, but app is installed. Launching app's install page" );
@@ -117,7 +121,7 @@ public LauncherResponse launchApp(Application app, String data) {
117
121
// Add code to launch App Install Page
118
122
//
119
123
120
- } else if (!matterAppEnabledIsInstalled && !appIsInstalled ) {
124
+ } else if (!matterEnabledAppdIsInstalled && !appIsInstalled ) {
121
125
Log .i (
122
126
TAG ,
123
127
"Matter enabled app is not installed and app is not installed. Launching app's install page" );
@@ -135,7 +139,7 @@ public LauncherResponse launchApp(Application app, String data) {
135
139
// Add code to launch App Install Page
136
140
//
137
141
138
- } else if (matterAppEnabledIsInstalled && appIsInstalled ) {
142
+ } else if (matterEnabledAppdIsInstalled && appIsInstalled ) {
139
143
Log .i (TAG , "Launching the app" );
140
144
status = LauncherResponse .STATUS_SUCCESS ;
141
145
0 commit comments