Skip to content

Commit fcacd01

Browse files
authored
Merge pull request #210 from smartdevicelink/bugfix/private-managers
Make the internal managers private
2 parents 4d355c6 + d681296 commit fcacd01

6 files changed

Lines changed: 20 additions & 20 deletions

File tree

lib/js/src/manager/screen/_ScreenManagerBase.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,9 @@
3131
*/
3232

3333
import { _SubManagerBase } from '../_SubManagerBase.js';
34-
import { SoftButtonManager } from './SoftButtonManager.js';
35-
import { TextAndGraphicManager } from './TextAndGraphicManager.js';
36-
import { VoiceCommandManager } from './VoiceCommandManager.js';
34+
import { _SoftButtonManager } from './_SoftButtonManager.js';
35+
import { _TextAndGraphicManager } from './_TextAndGraphicManager.js';
36+
import { _VoiceCommandManager } from './_VoiceCommandManager.js';
3737

3838
class _ScreenManagerBase extends _SubManagerBase {
3939
/**
@@ -48,10 +48,10 @@ class _ScreenManagerBase extends _SubManagerBase {
4848

4949
this._fileManager = fileManager;
5050
if (this._fileManager !== null) {
51-
this._softButtonManager = new SoftButtonManager(lifecycleManager, this._fileManager);
52-
this._textAndGraphicManager = new TextAndGraphicManager(lifecycleManager, this._fileManager, this._softButtonManager);
51+
this._softButtonManager = new _SoftButtonManager(lifecycleManager, this._fileManager);
52+
this._textAndGraphicManager = new _TextAndGraphicManager(lifecycleManager, this._fileManager, this._softButtonManager);
5353
}
54-
this._voiceCommandManager = new VoiceCommandManager(lifecycleManager);
54+
this._voiceCommandManager = new _VoiceCommandManager(lifecycleManager);
5555
}
5656

5757
/**

lib/js/src/manager/screen/SoftButtonManager.js renamed to lib/js/src/manager/screen/_SoftButtonManager.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,9 @@
3232

3333
import { _SoftButtonManagerBase } from './_SoftButtonManagerBase.js';
3434

35-
class SoftButtonManager extends _SoftButtonManagerBase {
35+
class _SoftButtonManager extends _SoftButtonManagerBase {
3636
/**
37-
* Initializes an instance of SoftButtonManager.
37+
* Initializes an instance of _SoftButtonManager.
3838
* @class
3939
* @param {_LifecycleManager} lifecycleManager - An instance of _LifecycleManager.
4040
* @param {FileManager} fileManager - An instance of FileManager.
@@ -44,4 +44,4 @@ class SoftButtonManager extends _SoftButtonManagerBase {
4444
}
4545
}
4646

47-
export { SoftButtonManager };
47+
export { _SoftButtonManager };

lib/js/src/manager/screen/TextAndGraphicManager.js renamed to lib/js/src/manager/screen/_TextAndGraphicManager.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,13 +34,13 @@ import { _TextAndGraphicManagerBase } from './_TextAndGraphicManagerBase.js';
3434
import { SdlArtwork } from '../file/filetypes/SdlArtwork.js';
3535
import { FileType } from '../../rpc/enums/FileType.js';
3636

37-
class TextAndGraphicManager extends _TextAndGraphicManagerBase {
37+
class _TextAndGraphicManager extends _TextAndGraphicManagerBase {
3838
/**
39-
* Initializes an instance of TextAndGraphicManager.
39+
* Initializes an instance of _TextAndGraphicManager.
4040
* @class
4141
* @param {_LifecycleManager} lifecycleManager - An instance of _LifecycleManager.
4242
* @param {FileManager} fileManager - An instance of FileManager.
43-
* @param {SoftButtonManager} softButtonManager - An instance of SoftButtonManager.
43+
* @param {_SoftButtonManager} softButtonManager - An instance of _SoftButtonManager.
4444
*/
4545
constructor (lifecycleManager, fileManager, softButtonManager) {
4646
super(lifecycleManager, fileManager, softButtonManager);
@@ -62,4 +62,4 @@ class TextAndGraphicManager extends _TextAndGraphicManagerBase {
6262
}
6363
}
6464

65-
export { TextAndGraphicManager };
65+
export { _TextAndGraphicManager };

lib/js/src/manager/screen/_TextAndGraphicManagerBase.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ class _TextAndGraphicManagerBase extends _SubManagerBase {
4242
* @private
4343
* @param {_LifecycleManager} lifecycleManager - An instance of _LifecycleManager.
4444
* @param {FileManager} fileManager - An instance of FileManager.
45-
* @param {SoftButtonManager} softButtonManager - An instance of SoftButtonManager.
45+
* @param {_SoftButtonManager} softButtonManager - An instance of _SoftButtonManager.
4646
*/
4747
constructor (lifecycleManager, fileManager = null, softButtonManager = null) {
4848
super(lifecycleManager);

lib/js/src/manager/screen/VoiceCommandManager.js renamed to lib/js/src/manager/screen/_VoiceCommandManager.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,9 @@
3232

3333
import { _VoiceCommandManagerBase } from './_VoiceCommandManagerBase.js';
3434

35-
class VoiceCommandManager extends _VoiceCommandManagerBase {
35+
class _VoiceCommandManager extends _VoiceCommandManagerBase {
3636
/**
37-
* Initializes an instance of VoiceCommandManager.
37+
* Initializes an instance of _VoiceCommandManager.
3838
* @class
3939
* @param {_LifecycleManager} lifecycleManager - An instance of _LifecycleManager.
4040
* @param {FileManager} fileManager - An instance of FileManager.
@@ -44,4 +44,4 @@ class VoiceCommandManager extends _VoiceCommandManagerBase {
4444
}
4545
}
4646

47-
export { VoiceCommandManager };
47+
export { _VoiceCommandManager };

lib/js/src/manager/screen/utils/SoftButtonObject.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ class SoftButtonObject {
8282
if (typeof this._updateListener === 'function') {
8383
this._updateListener();
8484
} else {
85-
console.error(`SoftButtonManager is not set for soft button object: ${this._name}. Update cannot be triggered`);
85+
console.error(`_SoftButtonManager is not set for soft button object: ${this._name}. Update cannot be triggered`);
8686
}
8787

8888
return true;
@@ -153,9 +153,9 @@ class SoftButtonObject {
153153
}
154154

155155
/**
156-
* Set the SoftButtonManager's update listener
156+
* Set the _SoftButtonManager's update listener
157157
* @private
158-
* @param {function} updateListener - the SoftButtonManager.UpdateListener object
158+
* @param {function} updateListener - the _SoftButtonManager.UpdateListener object
159159
*/
160160
_setUpdateListener (updateListener) {
161161
this._updateListener = updateListener;

0 commit comments

Comments
 (0)