Skip to content

Commit 85ae3ea

Browse files
committed
Update the code
1 parent 975e020 commit 85ae3ea

File tree

9 files changed

+33
-25
lines changed

9 files changed

+33
-25
lines changed

examples/tv-app/android/App/.idea/deploymentTargetDropDown.xml

+10
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

examples/tv-app/android/App/.idea/gradle.xml

+1-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

examples/tv-app/android/App/content-app/src/main/java/com/example/contentapp/CommandResponseHolder.java

-2
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ public class CommandResponseHolder {
1313
private Map<Long, Map<Long, String>> responseValues = new HashMap<>();
1414
private static final String TAG = "CommandResponseHolder";
1515
private static final Long DEFAULT_COMMAND = -1L;
16-
private ContentResolver contentResolver;
1716

1817
private static CommandResponseHolder instance = new CommandResponseHolder();
1918

@@ -35,7 +34,6 @@ private CommandResponseHolder() {
3534
Clusters.AccountLogin.Id,
3635
Clusters.AccountLogin.Commands.GetSetupPIN.ID,
3736
"{\"0\":\"20202021\"}");
38-
// "{\"0\":\""+ Settings.Secure.getInt(contentResolver, "matter_pin_code", 20202021) +"\"}");
3937
};
4038

4139
public static CommandResponseHolder getInstance() {

examples/tv-app/android/App/platform-app/build.gradle

+8-8
Original file line numberDiff line numberDiff line change
@@ -47,14 +47,14 @@ android {
4747
aidl.srcDirs = ['../common-api/src/main/aidl']
4848

4949
// uncomment this code to debug
50-
java.srcDirs = [
51-
'src/main/java',
52-
'../common-api/src/main/java',
53-
'../../third_party/connectedhomeip/src/setup_payload/java/src',
54-
'../../third_party/connectedhomeip/src/platform/android/java',
55-
'../../third_party/connectedhomeip/src/app/server/java/src/',
56-
'../../java/src',
57-
]
50+
// java.srcDirs = [
51+
// 'src/main/java',
52+
// '../common-api/src/main/java',
53+
// '../../third_party/connectedhomeip/src/setup_payload/java/src',
54+
// '../../third_party/connectedhomeip/src/platform/android/java',
55+
// '../../third_party/connectedhomeip/src/app/server/java/src/',
56+
// '../../java/src',
57+
// ]
5858
}
5959
}
6060
buildFeatures {

examples/tv-app/android/App/platform-app/src/main/java/com/matter/tv/server/MainActivity.java

-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
import com.matter.tv.server.fragments.ContentAppFragment;
1212
import com.matter.tv.server.fragments.QrCodeFragment;
1313
import com.matter.tv.server.fragments.TerminalFragment;
14-
import com.matter.tv.server.utils.InstallationObserver;
1514

1615
import java.util.LinkedHashMap;
1716

examples/tv-app/android/App/platform-app/src/main/java/com/matter/tv/server/handlers/ApplicationLauncherManagerImpl.java

+12-9
Original file line numberDiff line numberDiff line change
@@ -38,12 +38,6 @@ public ApplicationLauncherManagerImpl(Context context) {
3838
registerSelf(context);
3939
}
4040

41-
// Add list of apps with latest install statuses - DONE
42-
// Add list of installed apps - DONE
43-
// Add list of installed apps that support Matter
44-
// Store all of the list using Shared pref
45-
// Load the stored lists, by asking shared pref
46-
4741
private final Observer<InstallationObserver.InstallState> installStateObserver = state -> {
4842
lastReceivedInstallationStatus.put(state.getAppPackageName(), state.getStatus());
4943
switch (state.getStatus()) {
@@ -111,7 +105,10 @@ public LauncherResponse launchApp(Application app, String data) {
111105
Log.i(TAG, "Matter enabled app is not installed, but app is installed. Launching app's install page");
112106
status = LauncherResponse.STATUS_PENDING;
113107
responseData = "App is installed, try updating";
114-
// TODO: Launch App Install Page
108+
109+
//
110+
// Add code to launch App Install Page
111+
//
115112

116113
} else if (!matterAppEnabledIsInstalled && !appIsInstalled) {
117114
Log.i(TAG, "Matter enabled app is not installed and app is not installed. Launching app's install page");
@@ -124,12 +121,18 @@ public LauncherResponse launchApp(Application app, String data) {
124121
responseData = "App install failed. Try again";
125122
}
126123
}
127-
// TODO: Launch App Install Page
124+
125+
//
126+
// Add code to launch App Install Page
127+
//
128128

129129
} else if (matterAppEnabledIsInstalled && appIsInstalled) {
130130
Log.i(TAG, "Launching the app");
131131
status = LauncherResponse.STATUS_SUCCESS;
132-
// TODO: Launch App
132+
133+
//
134+
// Add code to launch an app
135+
//
133136
}
134137

135138
return new LauncherResponse(status, responseData);

examples/tv-app/android/App/platform-app/src/main/java/com/matter/tv/server/service/AppPlatformService.java

-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@
2525
import android.util.Log;
2626
import androidx.annotation.NonNull;
2727
import com.matter.tv.app.api.SupportedCluster;
28-
import com.matter.tv.server.handlers.ApplicationLauncherManagerImpl;
2928
import com.matter.tv.server.handlers.ContentAppEndpointManagerImpl;
3029
import com.matter.tv.server.model.ContentApp;
3130
import com.matter.tv.server.receivers.ContentAppDiscoveryService;

examples/tv-app/android/java/application-launcher/ApplicationLauncherManager.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
22
*
3-
* Copyright (c) 2021 Project CHIP Authors
3+
* Copyright (c) 2024 Project CHIP Authors
44
* All rights reserved.
55
*
66
* Licensed under the Apache License, Version 2.0 (the "License");

examples/tv-app/android/java/src/com/matter/tv/server/tvapp/Application.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2021 Project CHIP Authors
2+
* Copyright (c) 2024 Project CHIP Authors
33
* All rights reserved.
44
*
55
* Licensed under the Apache License, Version 2.0 (the "License");

0 commit comments

Comments
 (0)