private void finishStatistics() { if (timeOnKeyguardStart < 0) { return; } if (!mViewMediatorCallback.isScreenOn() || mIsSkylightShown || !mViewMediatorCallback.isShowing()) { timeOnKeyguard = SystemClock.elapsedRealtime() - timeOnKeyguardStart; HKAgent.onEventTimeOnKeyguard(mContext, (int) timeOnKeyguard); timeOnKeyguardStart = timeOnKeyguard = -1; } }
public KeyguardViewHostManager( Context context, KeyguardViewHost host, SkylightHost skylight, LockPatternUtils lockPatternUtils, ViewMediatorCallback callback) { OtaUtils.checkRomOta(context); initVersionName(context); mContext = context; mKeyguardViewHost = host; mSkylightHost = skylight; mLockPatternUtils = lockPatternUtils; HKAgent.startStatisticThread(context.getApplicationContext()); DataStatistics.getInstance().onInit(context.getApplicationContext()); registerReceivers(); sInstance = this; setViewMediatorCallback(callback); initKeyguard(callback); // GIONEE <Amigo_Keyguard> gexiufeng <2015-06-18> modify [1/2] begin: show haokan in power saver // mode. // Common.setPowerSaverMode(getPowerSaverMode() == 2); Common.setPowerSaverMode(false); // GIONEE <Amigo_Keyguard> gexiufeng <2015-06-18> modify [1/2] end: show haokan in power saver // mode. initHorizontalListView(); mKeyguardWallpaperManager = new KeyguardWallpaperManager(); mKeyguardWallpaperManager.setKeyguardListView(mKeyguardListView); mKeyguardWallpaperManager.setWallpaperContainer(mContainer); mKeyguardWallpaperManager.setViewMediatorCallback(callback); mKeyguardWallpaperManager.init(mContext); UIController.getInstance().setmViewMediatorCallback(callback); mKeyguardViewHost.setConfigChangeCallback(mConfigChangeCallback); isSuppotFinger = isSupportFingerPrint(); if (isSuppotFinger) { mFingerIdentifyManager = new FingerIdentifyManager(context); } // GIONEE <Amigo_Keyguard> gexiufeng <2015-06-18> modify [2/2] begin: show haokan in power saver // mode. initPowerSaverObserver(); // GIONEE <Amigo_Keyguard> gexiufeng <2015-06-18> modify [2/2] end: show haokan in power saver // mode. DebugLog.d(TAG, "isSuppotFinger....isSuppotFinger=" + isSuppotFinger); Guide.init(context); onBootCompleted(); }