cmsdk: Add hidden interface for getService on AppSuggestManager.

Also retrieve service on Singleton constructor to match
  patterns of other manager service relationships.

Change-Id: I4dbca5d0a2339603ddfb58ee54959355d24c8a9a
TICKET: CYNGNOS-2319
This commit is contained in:
Adnan Begovic 2016-03-28 10:05:05 -07:00 committed by Gerrit Code Review
parent 3f42978e6f
commit 11334c9592
1 changed files with 3 additions and 1 deletions

View File

@ -80,9 +80,11 @@ public class AppSuggestManager {
private AppSuggestManager(Context context) {
mContext = context.getApplicationContext();
sImpl = getService();
}
private static synchronized IAppSuggestManager getService() {
/** @hide */
public static synchronized IAppSuggestManager getService() {
if (sImpl == null) {
IBinder b = ServiceManager.getService(CMContextConstants.CM_APP_SUGGEST_SERVICE);
if (b != null) {