Search in sources :

Example 11 with SignalClusterView

use of com.android.systemui.statusbar.SignalClusterView in project platform_frameworks_base by android.

the class PhoneStatusBar method destroy.

@Override
public void destroy() {
    super.destroy();
    if (mStatusBarWindow != null) {
        mWindowManager.removeViewImmediate(mStatusBarWindow);
        mStatusBarWindow = null;
    }
    if (mNavigationBarView != null) {
        mWindowManager.removeViewImmediate(mNavigationBarView);
        mNavigationBarView = null;
    }
    if (mHandlerThread != null) {
        mHandlerThread.quitSafely();
        mHandlerThread = null;
    }
    mContext.unregisterReceiver(mBroadcastReceiver);
    mContext.unregisterReceiver(mDemoReceiver);
    mAssistManager.destroy();
    final SignalClusterView signalCluster = (SignalClusterView) mStatusBarView.findViewById(R.id.signal_cluster);
    final SignalClusterView signalClusterKeyguard = (SignalClusterView) mKeyguardStatusBar.findViewById(R.id.signal_cluster);
    final SignalClusterView signalClusterQs = (SignalClusterView) mHeader.findViewById(R.id.signal_cluster);
    mNetworkController.removeSignalCallback(signalCluster);
    mNetworkController.removeSignalCallback(signalClusterKeyguard);
    mNetworkController.removeSignalCallback(signalClusterQs);
    if (mQSPanel != null && mQSPanel.getHost() != null) {
        mQSPanel.getHost().destroy();
    }
}
Also used : SignalClusterView(com.android.systemui.statusbar.SignalClusterView)

Example 12 with SignalClusterView

use of com.android.systemui.statusbar.SignalClusterView in project platform_frameworks_base by android.

the class PhoneStatusBar method reinflateSignalCluster.

private SignalClusterView reinflateSignalCluster(View view) {
    SignalClusterView signalCluster = (SignalClusterView) view.findViewById(R.id.signal_cluster);
    if (signalCluster != null) {
        ViewParent parent = signalCluster.getParent();
        if (parent instanceof ViewGroup) {
            ViewGroup viewParent = (ViewGroup) parent;
            int index = viewParent.indexOfChild(signalCluster);
            viewParent.removeView(signalCluster);
            SignalClusterView newCluster = (SignalClusterView) LayoutInflater.from(mContext).inflate(R.layout.signal_cluster_view, viewParent, false);
            ViewGroup.MarginLayoutParams layoutParams = (ViewGroup.MarginLayoutParams) viewParent.getLayoutParams();
            layoutParams.setMarginsRelative(mContext.getResources().getDimensionPixelSize(R.dimen.signal_cluster_margin_start), 0, 0, 0);
            newCluster.setLayoutParams(layoutParams);
            newCluster.setSecurityController(mSecurityController);
            newCluster.setNetworkController(mNetworkController);
            viewParent.addView(newCluster, index);
            return newCluster;
        }
        return signalCluster;
    }
    return null;
}
Also used : SignalClusterView(com.android.systemui.statusbar.SignalClusterView) ViewParent(android.view.ViewParent) ViewGroup(android.view.ViewGroup) Point(android.graphics.Point)

Example 13 with SignalClusterView

use of com.android.systemui.statusbar.SignalClusterView in project android_frameworks_base by DirtyUnicorns.

the class PhoneStatusBar method reinflateSignalCluster.

private SignalClusterView reinflateSignalCluster(View view) {
    SignalClusterView signalCluster = (SignalClusterView) view.findViewById(R.id.signal_cluster);
    if (signalCluster != null) {
        ViewParent parent = signalCluster.getParent();
        if (parent instanceof ViewGroup) {
            ViewGroup viewParent = (ViewGroup) parent;
            int index = viewParent.indexOfChild(signalCluster);
            viewParent.removeView(signalCluster);
            SignalClusterView newCluster = (SignalClusterView) LayoutInflater.from(mContext).inflate(R.layout.signal_cluster_view, viewParent, false);
            ViewGroup.MarginLayoutParams layoutParams = (ViewGroup.MarginLayoutParams) viewParent.getLayoutParams();
            layoutParams.setMarginsRelative(mContext.getResources().getDimensionPixelSize(R.dimen.signal_cluster_margin_start), 0, 0, 0);
            newCluster.setLayoutParams(layoutParams);
            newCluster.setSecurityController(mSecurityController);
            newCluster.setNetworkController(mNetworkController);
            viewParent.addView(newCluster, index);
            return newCluster;
        }
        return signalCluster;
    }
    return null;
}
Also used : SignalClusterView(com.android.systemui.statusbar.SignalClusterView) ViewParent(android.view.ViewParent) ViewGroup(android.view.ViewGroup) Point(android.graphics.Point)

Example 14 with SignalClusterView

use of com.android.systemui.statusbar.SignalClusterView in project android_frameworks_base by AOSPA.

the class PhoneStatusBar method destroy.

@Override
public void destroy() {
    super.destroy();
    if (mStatusBarWindow != null) {
        mWindowManager.removeViewImmediate(mStatusBarWindow);
        mStatusBarWindow = null;
    }
    if (mNavigationBarView != null) {
        mWindowManager.removeViewImmediate(mNavigationBarView);
        mNavigationBarView = null;
        mNavigationBarViewAttached = false;
    }
    if (mHandlerThread != null) {
        mHandlerThread.quitSafely();
        mHandlerThread = null;
    }
    mContext.unregisterReceiver(mBroadcastReceiver);
    mContext.unregisterReceiver(mDemoReceiver);
    mAssistManager.destroy();
    final SignalClusterView signalCluster = (SignalClusterView) mStatusBarView.findViewById(R.id.signal_cluster);
    final SignalClusterView signalClusterKeyguard = (SignalClusterView) mKeyguardStatusBar.findViewById(R.id.signal_cluster);
    final SignalClusterView signalClusterQs = (SignalClusterView) mHeader.findViewById(R.id.signal_cluster);
    mNetworkController.removeSignalCallback(signalCluster);
    mNetworkController.removeSignalCallback(signalClusterKeyguard);
    mNetworkController.removeSignalCallback(signalClusterQs);
    if (mQSPanel != null && mQSPanel.getHost() != null) {
        mQSPanel.getHost().destroy();
    }
}
Also used : SignalClusterView(com.android.systemui.statusbar.SignalClusterView)

Example 15 with SignalClusterView

use of com.android.systemui.statusbar.SignalClusterView in project android_frameworks_base by ResurrectionRemix.

the class PhoneStatusBar method reinflateSignalCluster.

private SignalClusterView reinflateSignalCluster(View view) {
    SignalClusterView signalCluster = (SignalClusterView) view.findViewById(R.id.signal_cluster);
    if (signalCluster != null) {
        ViewParent parent = signalCluster.getParent();
        if (parent instanceof ViewGroup) {
            ViewGroup viewParent = (ViewGroup) parent;
            int index = viewParent.indexOfChild(signalCluster);
            viewParent.removeView(signalCluster);
            SignalClusterView newCluster = (SignalClusterView) LayoutInflater.from(mContext).inflate(R.layout.signal_cluster_view, viewParent, false);
            ViewGroup.MarginLayoutParams layoutParams = (ViewGroup.MarginLayoutParams) viewParent.getLayoutParams();
            layoutParams.setMarginsRelative(mContext.getResources().getDimensionPixelSize(R.dimen.signal_cluster_margin_start), 0, 0, 0);
            newCluster.setLayoutParams(layoutParams);
            newCluster.setSecurityController(mSecurityController);
            newCluster.setNetworkController(mNetworkController);
            viewParent.addView(newCluster, index);
            return newCluster;
        }
        return signalCluster;
    }
    return null;
}
Also used : SignalClusterView(com.android.systemui.statusbar.SignalClusterView) ViewParent(android.view.ViewParent) ViewGroup(android.view.ViewGroup) Point(android.graphics.Point)

Aggregations

SignalClusterView (com.android.systemui.statusbar.SignalClusterView)22 Point (android.graphics.Point)7 ViewGroup (android.view.ViewGroup)6 ViewParent (android.view.ViewParent)5 Context (android.content.Context)2 IntentFilter (android.content.IntentFilter)2 RemoteException (android.os.RemoteException)2 MotionEvent (android.view.MotionEvent)2 View (android.view.View)2 MarginLayoutParams (android.view.ViewGroup.MarginLayoutParams)2 ImageView (android.widget.ImageView)2 ScrollView (android.widget.ScrollView)2 TextView (android.widget.TextView)2 StatusBarIconView (com.android.systemui.statusbar.StatusBarIconView)2 BatteryController (com.android.systemui.statusbar.policy.BatteryController)2 BluetoothController (com.android.systemui.statusbar.policy.BluetoothController)2 DockBatteryController (com.android.systemui.statusbar.policy.DockBatteryController)2 LocationController (com.android.systemui.statusbar.policy.LocationController)2 NetworkController (com.android.systemui.statusbar.policy.NetworkController)2 LayoutTransition (android.animation.LayoutTransition)1