Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package com.android.internal.policy.impl;
- import android.app.ActivityManagerNative;
- import android.app.IActivityManager;
- import android.app.UiModeManager;
- import android.content.ActivityNotFoundException;
- import android.content.BroadcastReceiver;
- import android.content.ContentResolver;
- import android.content.Context;
- import android.content.Intent;
- import android.content.IntentFilter;
- import android.content.pm.ActivityInfo;
- import android.content.pm.PackageManager;
- import android.content.res.Configuration;
- import android.content.res.Resources;
- import android.content.res.Resources.NotFoundException;
- import android.database.ContentObserver;
- import android.graphics.Rect;
- import android.media.AudioManager;
- import android.media.IAudioService;
- import android.media.IAudioService.Stub;
- import android.net.Uri;
- import android.os.Bundle;
- import android.os.Handler;
- import android.os.IBinder;
- import android.os.LocalPowerManager;
- import android.os.Looper;
- import android.os.MessageQueue;
- import android.os.PowerManager;
- import android.os.PowerManager.WakeLock;
- import android.os.RemoteException;
- import android.os.ServiceManager;
- import android.os.SystemClock;
- import android.os.SystemProperties;
- import android.os.UEventObserver;
- import android.os.Vibrator;
- import android.provider.Settings.Secure;
- import android.provider.Settings.System;
- import android.util.DisplayMetrics;
- import android.util.EventLog;
- import android.util.Log;
- import android.util.Slog;
- import android.view.IWindowManager;
- import android.view.InputChannel;
- import android.view.InputHandler;
- import android.view.InputQueue;
- import android.view.KeyCharacterMap;
- import android.view.KeyCharacterMap.FallbackAction;
- import android.view.KeyEvent;
- import android.view.View;
- import android.view.ViewConfiguration;
- import android.view.WindowManager;
- import android.view.WindowManager.LayoutParams;
- import android.view.WindowManagerPolicy;
- import android.view.WindowManagerPolicy.OnKeyguardExitResult;
- import android.view.WindowManagerPolicy.WindowState;
- import android.view.WindowOrientationListener;
- import android.view.animation.Animation;
- import android.view.animation.AnimationUtils;
- import com.android.internal.statusbar.IStatusBarService;
- import com.android.internal.telephony.ITelephony;
- import com.android.internal.telephony.ITelephony.Stub;
- import com.android.internal.widget.PointerLocationView;
- import java.io.File;
- import java.io.FileDescriptor;
- import java.io.PrintWriter;
- import java.util.ArrayList;
- public class PhoneWindowManager
- implements WindowManagerPolicy
- {
- static final int APPLICATION_LAYER = 2;
- static final int APPLICATION_MEDIA_OVERLAY_SUBLAYER = 255;
- static final int APPLICATION_MEDIA_SUBLAYER = 254;
- static final int APPLICATION_PANEL_SUBLAYER = 1;
- static final int APPLICATION_SUB_PANEL_SUBLAYER = 2;
- private static final int BTN_MOUSE = 272;
- static final boolean DEBUG = false;
- static final boolean DEBUG_FALLBACK = false;
- static final boolean DEBUG_LAYOUT = false;
- static final int DEFAULT_ACCELEROMETER_ROTATION = 0;
- static final int DRAG_LAYER = 17;
- static final int INPUT_METHOD_DIALOG_LAYER = 14;
- static final int INPUT_METHOD_LAYER = 13;
- static final int KEYGUARD_DIALOG_LAYER = 16;
- static final int KEYGUARD_LAYER = 15;
- private static final int LID_ABSENT = 255;
- private static final int LID_CLOSED = 0;
- private static final int LID_OPEN = 1;
- static final int LONG_PRESS_HOME_NOTHING = 0;
- static final int LONG_PRESS_HOME_RECENT_ACTIVITY = 2;
- static final int LONG_PRESS_HOME_RECENT_DIALOG = 1;
- static final int LONG_PRESS_POWER_GLOBAL_ACTIONS = 1;
- static final int LONG_PRESS_POWER_NOTHING = 0;
- static final int LONG_PRESS_POWER_SHUT_OFF = 2;
- static final int PHONE_LAYER = 3;
- static final int POINTER_LAYER = 20;
- static final boolean PRINT_ANIM = false;
- static final int PRIORITY_PHONE_LAYER = 10;
- static final int SEARCH_BAR_LAYER = 4;
- static final int SECURE_SYSTEM_OVERLAY_LAYER = 19;
- static final boolean SHOW_PROCESSES_ON_ALT_MENU = false;
- static final boolean SHOW_STARTING_ANIMATIONS = true;
- static final int STATUS_BAR_LAYER = 8;
- static final int STATUS_BAR_PANEL_LAYER = 9;
- static final int STATUS_BAR_SUB_PANEL_LAYER = 5;
- private static final int SW_LID = 0;
- static final int SYSTEM_ALERT_LAYER = 11;
- static final int SYSTEM_DIALOG_LAYER = 6;
- public static final String SYSTEM_DIALOG_REASON_GLOBAL_ACTIONS = "globalactions";
- public static final String SYSTEM_DIALOG_REASON_HOME_KEY = "homekey";
- public static final String SYSTEM_DIALOG_REASON_KEY = "reason";
- public static final String SYSTEM_DIALOG_REASON_RECENT_APPS = "recentapps";
- static final int SYSTEM_ERROR_LAYER = 12;
- static final int SYSTEM_OVERLAY_LAYER = 18;
- static final String TAG = "WindowManager";
- static final int TOAST_LAYER = 7;
- static final int WALLPAPER_LAYER = 2;
- private static final int[] WINDOW_TYPES_WHERE_HOME_DOESNT_WORK;
- static final boolean localLOGV;
- static final Rect mTmpContentFrame;
- static final Rect mTmpDisplayFrame;
- static final Rect mTmpParentFrame = new Rect();
- static final Rect mTmpVisibleFrame;
- int mAccelerometerDefault;
- boolean mAllowAllRotations;
- boolean mAllowLockscreenWhenOn;
- BroadcastReceiver mBroadcastDone;
- PowerManager.WakeLock mBroadcastWakeLock;
- boolean mCarDockEnablesAccelerometer;
- Intent mCarDockIntent;
- int mCarDockRotation;
- boolean mConsumeShortcutKeyUp;
- int mContentBottom;
- int mContentLeft;
- int mContentRight;
- int mContentTop;
- Context mContext;
- int mCurBottom;
- int mCurLeft;
- int mCurRight;
- int mCurTop;
- int mCurrentAppOrientation;
- boolean mDeskDockEnablesAccelerometer;
- Intent mDeskDockIntent;
- int mDeskDockRotation;
- boolean mDismissKeyguard;
- int mDockBottom;
- int mDockLayer;
- int mDockLeft;
- int mDockMode;
- BroadcastReceiver mDockReceiver;
- int mDockRight;
- int mDockTop;
- boolean mEnableShiftMenuBugReports;
- int mEndcallBehavior;
- final KeyCharacterMap.FallbackAction mFallbackAction;
- int mFancyRotationAnimation;
- WindowManagerPolicy.WindowState mFocusedWindow;
- boolean mForceStatusBar;
- GlobalActions mGlobalActions;
- private UEventObserver mHDMIObserver;
- Handler mHandler;
- boolean mHasSoftInput;
- boolean mHdmiPlugged;
- boolean mHideLockScreen;
- Intent mHomeIntent;
- Runnable mHomeLongPress;
- boolean mHomePressed;
- int mIncallPowerBehavior;
- long[] mKeyboardTapVibePattern;
- WindowManagerPolicy.WindowState mKeyguard;
- KeyguardViewMediator mKeyguardMediator;
- int mLandscapeRotation;
- WindowManagerPolicy.WindowState mLastTopAppWindowState;
- int mLidKeyboardAccessibility;
- int mLidNavigationAccessibility;
- int mLidOpen;
- int mLidOpenRotation;
- final Object mLock;
- int mLockScreenTimeout;
- boolean mLockScreenTimerActive;
- private int mLongPressOnHomeBehavior;
- int mLongPressOnPowerBehavior;
- long[] mLongPressVibePattern;
- MyOrientationListener mOrientationListener;
- boolean mOrientationSensorEnabled;
- InputChannel mPointerLocationInputChannel;
- private final InputHandler mPointerLocationInputHandler;
- int mPointerLocationMode;
- PointerLocationView mPointerLocationView;
- int mPortraitRotation;
- volatile boolean mPowerKeyHandled;
- private final Runnable mPowerLongPress;
- LocalPowerManager mPowerManager;
- RecentApplicationsDialog mRecentAppsDialog;
- int mRestrictedScreenHeight;
- int mRestrictedScreenLeft;
- int mRestrictedScreenTop;
- int mRestrictedScreenWidth;
- boolean mSafeMode;
- long[] mSafeModeDisabledVibePattern;
- long[] mSafeModeEnabledVibePattern;
- Runnable mScreenLockTimeout;
- boolean mScreenOn;
- int mSeascapeRotation;
- int mShortcutKeyPressed;
- ShortcutManager mShortcutManager;
- WindowManagerPolicy.WindowState mStatusBar;
- boolean mStatusBarCanHide;
- int mStatusBarHeight;
- final ArrayList<WindowManagerPolicy.WindowState> mStatusBarPanels;
- IStatusBarService mStatusBarService;
- boolean mSystemReady;
- WindowManagerPolicy.WindowState mTopAppWindowState;
- WindowManagerPolicy.WindowState mTopFullscreenOpaqueWindowState;
- boolean mTopIsFullscreen;
- int mUiMode;
- int mUnrestrictedScreenHeight;
- int mUnrestrictedScreenLeft;
- int mUnrestrictedScreenTop;
- int mUnrestrictedScreenWidth;
- int mUpsideDownRotation;
- int mUserRotation;
- int mUserRotationMode;
- Vibrator mVibrator;
- long[] mVirtualKeyVibePattern;
- Runnable mVolumeDownLongPress;
- Runnable mVolumeUpLongPress;
- IWindowManager mWindowManager;
- static
- {
- mTmpDisplayFrame = new Rect();
- mTmpContentFrame = new Rect();
- mTmpVisibleFrame = new Rect();
- WINDOW_TYPES_WHERE_HOME_DOESNT_WORK = new int[] { 2003, 2010 };
- }
- public PhoneWindowManager()
- {
- Object localObject = new Object();
- this.mLock = localObject;
- this.mEnableShiftMenuBugReports = 0;
- this.mStatusBar = null;
- ArrayList localArrayList = new ArrayList();
- this.mStatusBarPanels = localArrayList;
- this.mKeyguard = null;
- this.mLidOpen = -1;
- this.mUiMode = 1;
- this.mDockMode = 0;
- this.mUserRotationMode = 0;
- this.mUserRotation = 0;
- this.mLongPressOnPowerBehavior = -1;
- this.mScreenOn = 0;
- this.mOrientationSensorEnabled = 0;
- this.mCurrentAppOrientation = -1;
- this.mAccelerometerDefault = 0;
- this.mHasSoftInput = 0;
- this.mPointerLocationMode = 0;
- this.mPointerLocationView = null;
- PhoneWindowManager.1 local1 = new PhoneWindowManager.1(this);
- this.mPointerLocationInputHandler = local1;
- this.mShortcutKeyPressed = -1;
- this.mLandscapeRotation = 0;
- this.mSeascapeRotation = 0;
- this.mPortraitRotation = 0;
- this.mUpsideDownRotation = 0;
- this.mLongPressOnHomeBehavior = -1;
- KeyCharacterMap.FallbackAction localFallbackAction = new KeyCharacterMap.FallbackAction();
- this.mFallbackAction = localFallbackAction;
- PhoneWindowManager.2 local2 = new PhoneWindowManager.2(this);
- this.mHDMIObserver = local2;
- PhoneWindowManager.3 local3 = new PhoneWindowManager.3(this);
- this.mPowerLongPress = local3;
- PhoneWindowManager.VolumeLongPressF localVolumeLongPressF = new PhoneWindowManager.VolumeLongPressF(this);
- this.mVolumeUpLongPress = localVolumeLongPressF;
- PhoneWindowManager.VolumeLongPressR localVolumeLongPressR = new PhoneWindowManager.VolumeLongPressR(this);
- this.mVolumeDownLongPress = localVolumeLongPressR;
- PhoneWindowManager.4 local4 = new PhoneWindowManager.4(this);
- this.mHomeLongPress = local4;
- PhoneWindowManager.9 local9 = new PhoneWindowManager.9(this);
- this.mBroadcastDone = local9;
- PhoneWindowManager.10 local10 = new PhoneWindowManager.10(this);
- this.mDockReceiver = local10;
- PhoneWindowManager.12 local12 = new PhoneWindowManager.12(this);
- this.mScreenLockTimeout = local12;
- }
- private int determineHiddenState(int paramInt1, int paramInt2, int paramInt3)
- {
- if (this.mLidOpen != -1);
- int i;
- switch (paramInt1)
- {
- default:
- i = paramInt3;
- case 1:
- case 2:
- }
- while (true)
- {
- return i;
- if (this.mLidOpen == 1)
- {
- i = paramInt3;
- continue;
- }
- i = paramInt2;
- continue;
- if (this.mLidOpen == 1)
- {
- i = paramInt2;
- continue;
- }
- i = paramInt3;
- }
- }
- static IAudioService getAudioService()
- {
- IAudioService localIAudioService = IAudioService.Stub.asInterface(ServiceManager.checkService("audio"));
- if (localIAudioService == null)
- int i = Log.w("WindowManager", "Unable to find IAudioService interface.");
- return localIAudioService;
- }
- private int getCurrentLandscapeRotation(int paramInt)
- {
- int j;
- if (this.mUserRotationMode == 1)
- {
- int i = this.mUserRotation;
- if (isLandscapeOrSeascape(i))
- j = this.mUserRotation;
- }
- while (true)
- {
- return j;
- j = this.mLandscapeRotation;
- continue;
- int k = this.mOrientationListener.getCurrentRotation(paramInt);
- if (isLandscapeOrSeascape(k))
- {
- j = k;
- continue;
- }
- if (isLandscapeOrSeascape(paramInt))
- {
- j = paramInt;
- continue;
- }
- j = this.mLandscapeRotation;
- }
- }
- private int getCurrentPortraitRotation(int paramInt)
- {
- int j;
- if (this.mUserRotationMode == 1)
- {
- int i = this.mUserRotation;
- if (isAnyPortrait(i))
- j = this.mUserRotation;
- }
- while (true)
- {
- return j;
- j = this.mPortraitRotation;
- continue;
- int k = this.mOrientationListener.getCurrentRotation(paramInt);
- if (isAnyPortrait(k))
- {
- j = k;
- continue;
- }
- if (isAnyPortrait(paramInt))
- {
- j = paramInt;
- continue;
- }
- j = this.mPortraitRotation;
- }
- }
- private boolean getFallbackAction(KeyCharacterMap paramKeyCharacterMap, int paramInt1, int paramInt2, KeyCharacterMap.FallbackAction paramFallbackAction)
- {
- return paramKeyCharacterMap.getFallbackAction(paramInt1, paramInt2, paramFallbackAction);
- }
- static long[] getLongIntArray(Resources paramResources, int paramInt)
- {
- int[] arrayOfInt = paramResources.getIntArray(paramInt);
- if (arrayOfInt == null);
- int j;
- for (int i = 0; ; i = j)
- {
- return i;
- j = arrayOfInt.length;
- int k = 0;
- while (true)
- {
- int m = arrayOfInt.length;
- if (k >= m)
- break;
- long l = arrayOfInt[k];
- j[k] = l;
- k += 1;
- }
- }
- }
- static ITelephony getTelephonyService()
- {
- ITelephony localITelephony = ITelephony.Stub.asInterface(ServiceManager.checkService("phone"));
- if (localITelephony == null)
- int i = Log.w("WindowManager", "Unable to find ITelephony interface.");
- return localITelephony;
- }
- private void handleLongPressOnHome()
- {
- if (this.mLongPressOnHomeBehavior < 0)
- {
- int i = this.mContext.getResources().getInteger(17694746);
- this.mLongPressOnHomeBehavior = i;
- if ((this.mLongPressOnHomeBehavior < 0) || (this.mLongPressOnHomeBehavior > 2))
- this.mLongPressOnHomeBehavior = 0;
- }
- if (this.mLongPressOnHomeBehavior != 0)
- {
- boolean bool = performHapticFeedbackLw(null, 0, 0);
- sendCloseSystemWindows("recentapps");
- this.mHomePressed = 0;
- }
- if (this.mLongPressOnHomeBehavior == 1)
- {
- showOrHideRecentAppsDialog(0, 1);
- return;
- }
- if (this.mLongPressOnHomeBehavior != 2)
- return;
- try
- {
- Intent localIntent1 = new Intent();
- Intent localIntent2 = localIntent1.setClassName("com.android.systemui", "com.android.systemui.recent.RecentApplicationsActivity");
- Intent localIntent3 = localIntent1.setFlags(276824064);
- this.mContext.startActivity(localIntent1);
- return;
- }
- catch (ActivityNotFoundException localActivityNotFoundException)
- {
- int j = Log.e("WindowManager", "Failed to launch RecentAppsIntent", localActivityNotFoundException);
- }
- }
- private void interceptPowerKeyDown(boolean paramBoolean)
- {
- this.mPowerKeyHandled = paramBoolean;
- if (paramBoolean)
- return;
- Handler localHandler = this.mHandler;
- Runnable localRunnable = this.mPowerLongPress;
- long l = ViewConfiguration.getGlobalActionKeyTimeout();
- boolean bool = localHandler.postDelayed(localRunnable, l);
- }
- private boolean interceptPowerKeyUp(boolean paramBoolean)
- {
- int i;
- if (!this.mPowerKeyHandled)
- {
- Handler localHandler = this.mHandler;
- Runnable localRunnable = this.mPowerLongPress;
- localHandler.removeCallbacks(localRunnable);
- if (!paramBoolean)
- i = 1;
- }
- while (true)
- {
- return i;
- i = 0;
- continue;
- this.mPowerKeyHandled = 1;
- i = 0;
- }
- }
- private boolean isAnyPortrait(int paramInt)
- {
- int i = this.mPortraitRotation;
- if (paramInt != i)
- {
- int j = this.mUpsideDownRotation;
- if (paramInt != j)
- break label26;
- }
- label26: for (int k = 1; ; k = 0)
- return k;
- }
- private boolean isLandscapeOrSeascape(int paramInt)
- {
- int i = this.mLandscapeRotation;
- if (paramInt != i)
- {
- int j = this.mSeascapeRotation;
- if (paramInt != j)
- break label26;
- }
- label26: for (int k = 1; ; k = 0)
- return k;
- }
- private boolean keyguardIsShowingTq()
- {
- return this.mKeyguardMediator.isShowingAndNotHidden();
- }
- private int readRotation(int paramInt)
- {
- try
- {
- int i = this.mContext.getResources().getInteger(paramInt);
- label56: int j;
- switch (i)
- {
- default:
- j = -1;
- case 0:
- case 90:
- case 180:
- case 270:
- }
- while (true)
- {
- return j;
- j = 0;
- continue;
- j = 1;
- continue;
- j = 2;
- continue;
- j = 3;
- }
- }
- catch (Resources.NotFoundException localNotFoundException)
- {
- break label56;
- }
- }
- static void sendCloseSystemWindows(Context paramContext, String paramString)
- {
- if (!ActivityManagerNative.isSystemReady())
- return;
- try
- {
- ActivityManagerNative.getDefault().closeSystemDialogs(paramString);
- return;
- }
- catch (RemoteException localRemoteException)
- {
- }
- }
- private void updateLockScreenTimeout()
- {
- synchronized (this.mScreenLockTimeout)
- {
- if ((this.mAllowLockscreenWhenOn) && (this.mScreenOn) && (this.mKeyguardMediator.isSecure()));
- for (int i = 1; ; i = 0)
- {
- if (this.mLockScreenTimerActive != i)
- {
- if (i == 0)
- break;
- Handler localHandler1 = this.mHandler;
- Runnable localRunnable2 = this.mScreenLockTimeout;
- long l = this.mLockScreenTimeout;
- boolean bool = localHandler1.postDelayed(localRunnable2, l);
- this.mLockScreenTimerActive = i;
- }
- return;
- }
- Handler localHandler2 = this.mHandler;
- Runnable localRunnable3 = this.mScreenLockTimeout;
- localHandler2.removeCallbacks(localRunnable3);
- }
- }
- private void updateSystemUiVisibility()
- {
- if (this.mFocusedWindow == null)
- return;
- WindowManager.LayoutParams localLayoutParams = this.mFocusedWindow.getAttrs();
- int i = localLayoutParams.systemUiVisibility;
- int j = localLayoutParams.subtreeSystemUiVisibility;
- int k = i | j;
- Handler localHandler = this.mHandler;
- PhoneWindowManager.13 local13 = new PhoneWindowManager.13(this, k);
- boolean bool = localHandler.post(local13);
- }
- // ERROR //
- public View addStartingWindow(IBinder paramIBinder, String paramString, int paramInt1, android.content.res.CompatibilityInfo paramCompatibilityInfo, java.lang.CharSequence paramCharSequence, int paramInt2, int paramInt3, int paramInt4)
- {
- // Byte code:
- // 0: aload_2
- // 1: ifnonnull +9 -> 10
- // 4: aconst_null
- // 5: astore 9
- // 7: aload 9
- // 9: areturn
- // 10: aload_0
- // 11: getfield 435 com/android/internal/policy/impl/PhoneWindowManager:mContext Landroid/content/Context;
- // 14: astore 10
- // 16: aload 10
- // 18: invokevirtual 586 android/content/Context:getThemeResId ()I
- // 21: istore 11
- // 23: iload 11
- // 25: istore 12
- // 27: iload_3
- // 28: istore 13
- // 30: iload 12
- // 32: istore 14
- // 34: iload 13
- // 36: iload 14
- // 38: if_icmpne +8 -> 46
- // 41: iload 6
- // 43: ifeq +30 -> 73
- // 46: aconst_null
- // 47: astore 9
- // 49: aload 10
- // 51: aload_2
- // 52: aload 9
- // 54: invokevirtual 590 android/content/Context:createPackageContext (Ljava/lang/String;I)Landroid/content/Context;
- // 57: astore 10
- // 59: aload 10
- // 61: astore 15
- // 63: iload_3
- // 64: istore 16
- // 66: aload 15
- // 68: iload 16
- // 70: invokevirtual 594 android/content/Context:setTheme (I)V
- // 73: aload 10
- // 75: invokestatic 600 com/android/internal/policy/PolicyManager:makeNewWindow (Landroid/content/Context;)Landroid/view/Window;
- // 78: astore 17
- // 80: aload 17
- // 82: invokevirtual 606 android/view/Window:getWindowStyle ()Landroid/content/res/TypedArray;
- // 85: bipush 12
- // 87: ldc 31
- // 89: invokevirtual 612 android/content/res/TypedArray:getBoolean (IZ)Z
- // 92: ifeq +9 -> 101
- // 95: aconst_null
- // 96: astore 9
- // 98: goto -91 -> 7
- // 101: aload 10
- // 103: invokevirtual 441 android/content/Context:getResources ()Landroid/content/res/Resources;
- // 106: astore 18
- // 108: iload 6
- // 110: istore 19
- // 112: aload 5
- // 114: astore 20
- // 116: aload 18
- // 118: iload 19
- // 120: aload 20
- // 122: invokevirtual 616 android/content/res/Resources:getText (ILjava/lang/CharSequence;)Ljava/lang/CharSequence;
- // 125: astore 21
- // 127: aload 17
- // 129: aload 21
- // 131: invokevirtual 620 android/view/Window:setTitle (Ljava/lang/CharSequence;)V
- // 134: aload 17
- // 136: iconst_3
- // 137: invokevirtual 623 android/view/Window:setType (I)V
- // 140: iload 8
- // 142: bipush 16
- // 144: ior
- // 145: bipush 8
- // 147: ior
- // 148: ldc_w 624
- // 151: ior
- // 152: istore 22
- // 154: iload 8
- // 156: bipush 16
- // 158: ior
- // 159: bipush 8
- // 161: ior
- // 162: ldc_w 624
- // 165: ior
- // 166: istore 23
- // 168: aload 17
- // 170: iload 22
- // 172: iload 23
- // 174: invokevirtual 627 android/view/Window:setFlags (II)V
- // 177: aload 4
- // 179: invokevirtual 632 android/content/res/CompatibilityInfo:supportsScreen ()Z
- // 182: ifne +11 -> 193
- // 185: aload 17
- // 187: ldc_w 633
- // 190: invokevirtual 636 android/view/Window:addFlags (I)V
- // 193: aload 17
- // 195: bipush 255
- // 197: bipush 255
- // 199: invokevirtual 639 android/view/Window:setLayout (II)V
- // 202: aload 17
- // 204: invokevirtual 642 android/view/Window:getAttributes ()Landroid/view/WindowManager$LayoutParams;
- // 207: astore 24
- // 209: aload 24
- // 211: aload_1
- // 212: putfield 646 android/view/WindowManager$LayoutParams:token Landroid/os/IBinder;
- // 215: aload 24
- // 217: aload_2
- // 218: putfield 649 android/view/WindowManager$LayoutParams:packageName Ljava/lang/String;
- // 221: aload 17
- // 223: invokevirtual 606 android/view/Window:getWindowStyle ()Landroid/content/res/TypedArray;
- // 226: bipush 8
- // 228: iconst_0
- // 229: invokevirtual 653 android/content/res/TypedArray:getResourceId (II)I
- // 232: istore 25
- // 234: aload 24
- // 236: iload 25
- // 238: putfield 656 android/view/WindowManager$LayoutParams:windowAnimations I
- // 241: new 658 java/lang/StringBuilder
- // 244: dup
- // 245: invokespecial 659 java/lang/StringBuilder:<init> ()V
- // 248: ldc_w 661
- // 251: invokevirtual 665 java/lang/StringBuilder:append (Ljava/lang/String;)Ljava/lang/StringBuilder;
- // 254: aload_2
- // 255: invokevirtual 665 java/lang/StringBuilder:append (Ljava/lang/String;)Ljava/lang/StringBuilder;
- // 258: invokevirtual 669 java/lang/StringBuilder:toString ()Ljava/lang/String;
- // 261: astore 26
- // 263: aload 24
- // 265: aload 26
- // 267: invokevirtual 670 android/view/WindowManager$LayoutParams:setTitle (Ljava/lang/CharSequence;)V
- // 270: aload 10
- // 272: ldc_w 672
- // 275: invokevirtual 676 android/content/Context:getSystemService (Ljava/lang/String;)Ljava/lang/Object;
- // 278: checkcast 678 android/view/WindowManager
- // 281: astore 27
- // 283: aload 17
- // 285: invokevirtual 682 android/view/Window:getDecorView ()Landroid/view/View;
- // 288: astore 28
- // 290: aload 17
- // 292: invokevirtual 685 android/view/Window:isFloating ()Z
- // 295: ifeq +9 -> 304
- // 298: aconst_null
- // 299: astore 9
- // 301: goto -294 -> 7
- // 304: aload 27
- // 306: aload 28
- // 308: aload 24
- // 310: invokeinterface 689 3 0
- // 315: aload 28
- // 317: invokevirtual 695 android/view/View:getParent ()Landroid/view/ViewParent;
- // 320: astore 11
- // 322: aload 11
- // 324: ifnull +10 -> 334
- // 327: aload 28
- // 329: astore 9
- // 331: goto -324 -> 7
- // 334: aconst_null
- // 335: astore 9
- // 337: goto -330 -> 7
- // 340: astore 29
- // 342: new 658 java/lang/StringBuilder
- // 345: dup
- // 346: invokespecial 659 java/lang/StringBuilder:<init> ()V
- // 349: aload_1
- // 350: invokevirtual 698 java/lang/StringBuilder:append (Ljava/lang/Object;)Ljava/lang/StringBuilder;
- // 353: ldc_w 700
- // 356: invokevirtual 665 java/lang/StringBuilder:append (Ljava/lang/String;)Ljava/lang/StringBuilder;
- // 359: invokevirtual 669 java/lang/StringBuilder:toString ()Ljava/lang/String;
- // 362: astore 30
- // 364: ldc 97
- // 366: aload 30
- // 368: invokestatic 390 android/util/Log:w (Ljava/lang/String;Ljava/lang/String;)I
- // 371: istore 31
- // 373: aconst_null
- // 374: astore 9
- // 376: goto -369 -> 7
- // 379: astore 32
- // 381: new 658 java/lang/StringBuilder
- // 384: dup
- // 385: invokespecial 659 java/lang/StringBuilder:<init> ()V
- // 388: aload_1
- // 389: invokevirtual 698 java/lang/StringBuilder:append (Ljava/lang/Object;)Ljava/lang/StringBuilder;
- // 392: ldc_w 702
- // 395: invokevirtual 665 java/lang/StringBuilder:append (Ljava/lang/String;)Ljava/lang/StringBuilder;
- // 398: invokevirtual 669 java/lang/StringBuilder:toString ()Ljava/lang/String;
- // 401: astore 33
- // 403: ldc 97
- // 405: aload 33
- // 407: aload 32
- // 409: invokestatic 704 android/util/Log:w (Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)I
- // 412: istore 34
- // 414: goto -41 -> 373
- // 417: astore 35
- // 419: goto -346 -> 73
- //
- // Exception table:
- // from to target type
- // 10 23 340 android/view/WindowManager$BadTokenException
- // 49 73 340 android/view/WindowManager$BadTokenException
- // 73 322 340 android/view/WindowManager$BadTokenException
- // 10 23 379 java/lang/RuntimeException
- // 49 73 379 java/lang/RuntimeException
- // 73 322 379 java/lang/RuntimeException
- // 49 73 417 android/content/pm/PackageManager$NameNotFoundException
- }
- public void adjustConfigurationLw(Configuration paramConfiguration)
- {
- readLidState();
- LocalPowerManager localLocalPowerManager = this.mPowerManager;
- if (this.mLidOpen == 1)
- {
- int i = 1;
- localLocalPowerManager.setKeyboardVisibility(i);
- if (paramConfiguration.keyboard != 1)
- break label80;
- paramConfiguration.hardKeyboardHidden = 2;
- label40: if (paramConfiguration.navigation != 1)
- break label105;
- }
- label80: label105: int i1;
- for (paramConfiguration.navigationHidden = 2; ; paramConfiguration.navigationHidden = i1)
- {
- if ((!this.mHasSoftInput) && (paramConfiguration.hardKeyboardHidden != 1))
- break label130;
- paramConfiguration.keyboardHidden = 1;
- return;
- int j = 0;
- break;
- int k = this.mLidKeyboardAccessibility;
- int m = determineHiddenState(k, 2, 1);
- paramConfiguration.hardKeyboardHidden = m;
- break label40;
- int n = this.mLidNavigationAccessibility;
- i1 = determineHiddenState(n, 2, 1);
- }
- label130: paramConfiguration.keyboardHidden = 2;
- }
- public void adjustWindowParamsLw(WindowManager.LayoutParams paramLayoutParams)
- {
- switch (paramLayoutParams.type)
- {
- default:
- return;
- case 2005:
- case 2006:
- case 2015:
- }
- int i = paramLayoutParams.flags | 0x18;
- paramLayoutParams.flags = i;
- }
- public boolean allowAppAnimationsLw()
- {
- if ((this.mKeyguard != null) && (this.mKeyguard.isVisibleLw()));
- for (int i = 0; ; i = 1)
- return i;
- }
- public boolean allowKeyRepeat()
- {
- return this.mScreenOn;
- }
- public void animatingWindowLw(WindowManagerPolicy.WindowState paramWindowState, WindowManager.LayoutParams paramLayoutParams)
- {
- if ((this.mTopFullscreenOpaqueWindowState == null) && (paramWindowState.isVisibleOrBehindKeyguardLw()))
- {
- if ((paramLayoutParams.flags & 0x800) != 0)
- this.mForceStatusBar = 1;
- if ((paramLayoutParams.type >= 1) && (paramLayoutParams.type <= 99) && (paramLayoutParams.x == 0) && (paramLayoutParams.y == 0) && (paramLayoutParams.width == -1) && (paramLayoutParams.height == -1))
- {
- this.mTopFullscreenOpaqueWindowState = paramWindowState;
- if ((paramLayoutParams.flags & 0x80000) != 0)
- this.mHideLockScreen = 1;
- if ((paramLayoutParams.flags & 0x400000) != 0)
- this.mDismissKeyguard = 1;
- if ((paramLayoutParams.flags & 0x1) != 0)
- this.mAllowLockscreenWhenOn = 1;
- }
- }
- if (this.mTopAppWindowState != null)
- return;
- if (!paramWindowState.isVisibleOrBehindKeyguardLw())
- return;
- if (paramLayoutParams.type < 1)
- return;
- if (paramLayoutParams.type > 99)
- return;
- this.mTopAppWindowState = paramWindowState;
- }
- public void beginAnimationLw(int paramInt1, int paramInt2)
- {
- this.mTopFullscreenOpaqueWindowState = null;
- this.mTopAppWindowState = null;
- this.mForceStatusBar = 0;
- this.mHideLockScreen = 0;
- this.mAllowLockscreenWhenOn = 0;
- this.mDismissKeyguard = 0;
- }
- public void beginLayoutLw(int paramInt1, int paramInt2)
- {
- this.mUnrestrictedScreenTop = 0;
- this.mUnrestrictedScreenLeft = 0;
- this.mUnrestrictedScreenWidth = paramInt1;
- this.mUnrestrictedScreenHeight = paramInt2;
- this.mRestrictedScreenTop = 0;
- this.mRestrictedScreenLeft = 0;
- this.mRestrictedScreenWidth = paramInt1;
- this.mRestrictedScreenHeight = paramInt2;
- this.mCurLeft = 0;
- this.mContentLeft = 0;
- this.mDockLeft = 0;
- this.mCurTop = 0;
- this.mContentTop = 0;
- this.mDockTop = 0;
- this.mCurRight = paramInt1;
- this.mContentRight = paramInt1;
- this.mDockRight = paramInt1;
- this.mCurBottom = paramInt2;
- this.mContentBottom = paramInt2;
- this.mDockBottom = paramInt2;
- this.mDockLayer = 268435456;
- if (this.mStatusBar == null)
- return;
- Rect localRect1 = mTmpParentFrame;
- Rect localRect2 = mTmpDisplayFrame;
- Rect localRect3 = mTmpVisibleFrame;
- localRect3.left = 0;
- localRect2.left = 0;
- localRect1.left = 0;
- localRect3.top = 0;
- localRect2.top = 0;
- localRect1.top = 0;
- localRect3.right = paramInt1;
- localRect2.right = paramInt1;
- localRect1.right = paramInt1;
- localRect3.bottom = paramInt2;
- localRect2.bottom = paramInt2;
- localRect1.bottom = paramInt2;
- this.mStatusBar.computeFrameLw(localRect1, localRect2, localRect3, localRect3);
- if (!this.mStatusBar.isVisibleLw())
- return;
- Rect localRect4 = this.mStatusBar.getFrameLw();
- if (this.mStatusBarCanHide)
- {
- int i = this.mDockTop;
- int j = localRect4.top;
- if (i == j)
- {
- int k = localRect4.bottom;
- this.mDockTop = k;
- }
- while (true)
- {
- int m = this.mDockTop;
- this.mCurTop = m;
- this.mContentTop = m;
- int n = this.mDockBottom;
- this.mCurBottom = n;
- this.mContentBottom = n;
- return;
- int i1 = this.mDockBottom;
- int i2 = localRect4.bottom;
- if (i1 != i2)
- continue;
- int i3 = localRect4.top;
- this.mDockBottom = i3;
- }
- }
- int i4 = this.mRestrictedScreenTop;
- int i5 = localRect4.top;
- if (i4 == i5)
- {
- int i6 = localRect4.bottom;
- this.mRestrictedScreenTop = i6;
- int i7 = this.mRestrictedScreenHeight;
- int i8 = localRect4.bottom;
- int i9 = localRect4.top;
- int i10 = i8 - i9;
- int i11 = i7 - i10;
- this.mRestrictedScreenHeight = i11;
- }
- while (true)
- {
- int i12 = this.mRestrictedScreenTop;
- this.mDockTop = i12;
- this.mCurTop = i12;
- this.mContentTop = i12;
- int i13 = this.mRestrictedScreenTop;
- int i14 = this.mRestrictedScreenHeight;
- int i15 = i13 + i14;
- this.mDockBottom = i15;
- this.mCurBottom = i15;
- this.mContentBottom = i15;
- return;
- int i16 = this.mRestrictedScreenHeight;
- int i17 = this.mRestrictedScreenTop;
- int i18 = i16 - i17;
- int i19 = localRect4.bottom;
- if (i18 != i19)
- continue;
- int i20 = this.mRestrictedScreenHeight;
- int i21 = localRect4.bottom;
- int i22 = localRect4.top;
- int i23 = i21 - i22;
- int i24 = i20 - i23;
- this.mRestrictedScreenHeight = i24;
- }
- }
- public boolean canBeForceHidden(WindowManagerPolicy.WindowState paramWindowState, WindowManager.LayoutParams paramLayoutParams)
- {
- if ((paramLayoutParams.type != 2000) && (paramLayoutParams.type != 2013));
- for (int i = 1; ; i = 0)
- return i;
- }
- public boolean canStatusBarHide()
- {
- return this.mStatusBarCanHide;
- }
- public int checkAddPermission(WindowManager.LayoutParams paramLayoutParams)
- {
- int i = paramLayoutParams.type;
- int j;
- if ((i < 2000) || (i > 2999))
- j = 0;
- while (true)
- {
- return j;
- String str = null;
- switch (i)
- {
- case 2004:
- case 2008:
- case 2009:
- case 2012:
- default:
- case 2005:
- case 2011:
- case 2013:
- case 2002:
- case 2003:
- case 2006:
- case 2007:
- case 2010:
- }
- for (str = "android.permission.INTERNAL_SYSTEM_WINDOW"; ; str = "android.permission.SYSTEM_ALERT_WINDOW")
- {
- if ((str == null) || (this.mContext.checkCallingOrSelfPermission(str) == 0))
- break label124;
- j = -1;
- break;
- }
- label124: j = 0;
- }
- }
- public Animation createForceHideEnterAnimation()
- {
- return AnimationUtils.loadAnimation(this.mContext, 17432605);
- }
- Intent createHomeDockIntent()
- {
- Intent localIntent1;
- ActivityInfo localActivityInfo;
- Object localObject;
- if (this.mUiMode == 3)
- {
- localIntent1 = this.mCarDockIntent;
- PackageManager localPackageManager = this.mContext.getPackageManager();
- localActivityInfo = localIntent1.resolveActivityInfo(localPackageManager, 128);
- if (localActivityInfo != null)
- break label62;
- localObject = null;
- }
- while (true)
- {
- return localObject;
- if (this.mUiMode == 2)
- {
- localIntent1 = this.mDeskDockIntent;
- break;
- }
- localObject = null;
- continue;
- label62: if ((localActivityInfo.metaData != null) && (localActivityInfo.metaData.getBoolean("android.dock_home")))
- {
- Intent localIntent2 = new Intent(localIntent1);
- String str1 = localActivityInfo.packageName;
- String str2 = localActivityInfo.name;
- Intent localIntent3 = localIntent2.setClassName(str1, str2);
- localObject = localIntent2;
- continue;
- }
- localObject = null;
- }
- }
- public boolean detectSafeMode()
- {
- try
- {
- int i = this.mWindowManager.getKeycodeState(82);
- int j = this.mWindowManager.getKeycodeState(47);
- int k = this.mWindowManager.getDPadKeycodeState(23);
- int m = this.mWindowManager.getTrackballScancodeState(272);
- int n = this.mWindowManager.getKeycodeState(25);
- int i3;
- if ((i > 0) || (j > 0) || (k > 0) || (m > 0) || (n > 0))
- {
- int i1 = 1;
- this.mSafeMode = i1;
- i1 = 0;
- if (!this.mSafeMode)
- break label210;
- i3 = 10001;
- label111: boolean bool = performHapticFeedbackLw(i1, i3, 1);
- if (!this.mSafeMode)
- break label218;
- String str = "SAFE MODE ENABLED (menu=" + i + " s=" + j + " dpad=" + k + " trackball=" + m + ")";
- int i4 = Log.i("WindowManager", str);
- }
- while (true)
- {
- return this.mSafeMode;
- int i2 = 0;
- break;
- label210: i3 = 10000;
- break label111;
- label218: int i5 = Log.i("WindowManager", "SAFE MODE not enabled");
- }
- }
- catch (RemoteException localRemoteException)
- {
- }
- throw new RuntimeException("window manager dead");
- }
- public KeyEvent dispatchUnhandledKey(WindowManagerPolicy.WindowState paramWindowState, KeyEvent paramKeyEvent, int paramInt)
- {
- KeyCharacterMap localKeyCharacterMap1;
- int i;
- int j;
- int k;
- Intent localIntent1;
- if ((paramKeyEvent.getFlags() & 0x400) == 0)
- {
- localKeyCharacterMap1 = paramKeyEvent.getKeyCharacterMap();
- i = paramKeyEvent.getKeyCode();
- j = paramKeyEvent.getMetaState();
- if ((paramKeyEvent.getAction() == 0) && (paramKeyEvent.getRepeatCount() == 0))
- {
- k = 1;
- if (k == 0)
- break label304;
- if ((0x10000 & j) == 0)
- break label217;
- ShortcutManager localShortcutManager1 = this.mShortcutManager;
- int m = 0xFFF8FFFF & j;
- ShortcutManager localShortcutManager2 = localShortcutManager1;
- KeyCharacterMap localKeyCharacterMap2 = localKeyCharacterMap1;
- int n = i;
- int i1 = m;
- localIntent1 = localShortcutManager2.getIntent(localKeyCharacterMap2, n, i1);
- if (localIntent1 == null)
- break label217;
- Intent localIntent2 = localIntent1;
- int i2 = 268435456;
- Intent localIntent3 = localIntent2.addFlags(i2);
- }
- }
- while (true)
- {
- try
- {
- Context localContext = this.mContext;
- Intent localIntent4 = localIntent1;
- localContext.startActivity(localIntent4);
- localObject = null;
- return localObject;
- k = 0;
- }
- catch (ActivityNotFoundException localActivityNotFoundException1)
- {
- StringBuilder localStringBuilder = new StringBuilder().append("Dropping shortcut key combination because the activity to which it is registered was not found: META+");
- String str1 = KeyEvent.keyCodeToString(i);
- String str2 = str1;
- String str3 = "WindowManager";
- String str4 = str2;
- ActivityNotFoundException localActivityNotFoundException2 = localActivityNotFoundException1;
- int i3 = Slog.w(str3, str4, localActivityNotFoundException2);
- continue;
- }
- label217: int i4 = i;
- int i5 = 61;
- if (i4 == i5)
- {
- int i6 = paramKeyEvent.getModifiers() & 0xFFFFFF3E;
- int i7 = i6;
- int i8 = 2;
- if (!KeyEvent.metaStateHasModifiers(i7, i8))
- {
- int i9 = i6;
- int i10 = 65536;
- if (!KeyEvent.metaStateHasModifiers(i9, i10));
- }
- else
- {
- PhoneWindowManager localPhoneWindowManager1 = this;
- int i11 = i6;
- int i12 = 0;
- localPhoneWindowManager1.showOrHideRecentAppsDialog(i11, i12);
- localObject = null;
- continue;
- }
- }
- label304: KeyCharacterMap.FallbackAction localFallbackAction1 = this.mFallbackAction;
- PhoneWindowManager localPhoneWindowManager2 = this;
- KeyCharacterMap localKeyCharacterMap3 = localKeyCharacterMap1;
- int i13 = i;
- int i14 = j;
- KeyCharacterMap.FallbackAction localFallbackAction2 = localFallbackAction1;
- if (localPhoneWindowManager2.getFallbackAction(localKeyCharacterMap3, i13, i14, localFallbackAction2))
- {
- int i15 = paramKeyEvent.getFlags() | 0x400;
- long l1 = paramKeyEvent.getDownTime();
- long l2 = paramKeyEvent.getEventTime();
- int i16 = paramKeyEvent.getAction();
- int i17 = this.mFallbackAction.keyCode;
- int i18 = paramKeyEvent.getRepeatCount();
- int i19 = this.mFallbackAction.metaState;
- int i20 = paramKeyEvent.getDeviceId();
- int i21 = paramKeyEvent.getScanCode();
- int i22 = paramKeyEvent.getSource();
- KeyEvent localKeyEvent1 = KeyEvent.obtain(l1, l2, i16, i17, i18, i19, i20, i21, i15, i22, null);
- PhoneWindowManager localPhoneWindowManager3 = this;
- KeyEvent localKeyEvent2 = localKeyEvent1;
- int i23 = paramInt;
- int i24 = 1;
- if ((localPhoneWindowManager3.interceptKeyBeforeQueueing(localKeyEvent2, i23, i24) & 0x1) != 0)
- {
- PhoneWindowManager localPhoneWindowManager4 = this;
- WindowManagerPolicy.WindowState localWindowState = paramWindowState;
- KeyEvent localKeyEvent3 = localKeyEvent1;
- int i25 = paramInt;
- if (!localPhoneWindowManager4.interceptKeyBeforeDispatching(localWindowState, localKeyEvent3, i25))
- {
- localObject = localKeyEvent1;
- continue;
- }
- }
- localKeyEvent1.recycle();
- }
- Object localObject = null;
- }
- }
- public boolean doesForceHide(WindowManagerPolicy.WindowState paramWindowState, WindowManager.LayoutParams paramLayoutParams)
- {
- if (paramLayoutParams.type == 2004);
- for (int i = 1; ; i = 0)
- return i;
- }
- public void dump(String paramString, FileDescriptor paramFileDescriptor, PrintWriter paramPrintWriter, String[] paramArrayOfString)
- {
- paramPrintWriter.print(paramString);
- paramPrintWriter.print("mSafeMode=");
- boolean bool1 = this.mSafeMode;
- paramPrintWriter.print(bool1);
- paramPrintWriter.print(" mSystemRead=");
- boolean bool2 = this.mSystemReady;
- paramPrintWriter.println(bool2);
- paramPrintWriter.print(paramString);
- paramPrintWriter.print("mLidOpen=");
- int i = this.mLidOpen;
- paramPrintWriter.print(i);
- paramPrintWriter.print(" mLidOpenRotation=");
- int j = this.mLidOpenRotation;
- paramPrintWriter.print(j);
- paramPrintWriter.print(" mHdmiPlugged=");
- boolean bool3 = this.mHdmiPlugged;
- paramPrintWriter.println(bool3);
- paramPrintWriter.print(paramString);
- paramPrintWriter.print("mUiMode=");
- int k = this.mUiMode;
- paramPrintWriter.print(k);
- paramPrintWriter.print(" mDockMode=");
- int m = this.mDockMode;
- paramPrintWriter.print(m);
- paramPrintWriter.print(" mCarDockRotation=");
- int n = this.mCarDockRotation;
- paramPrintWriter.print(n);
- paramPrintWriter.print(" mDeskDockRotation=");
- int i1 = this.mDeskDockRotation;
- paramPrintWriter.println(i1);
- paramPrintWriter.print(paramString);
- paramPrintWriter.print("mUserRotationMode=");
- int i2 = this.mUserRotationMode;
- paramPrintWriter.print(i2);
- paramPrintWriter.print(" mUserRotation=");
- int i3 = this.mUserRotation;
- paramPrintWriter.print(i3);
- paramPrintWriter.print(" mAllowAllRotations=");
- boolean bool4 = this.mAllowAllRotations;
- paramPrintWriter.println(bool4);
- paramPrintWriter.print(paramString);
- paramPrintWriter.print("mAccelerometerDefault=");
- int i4 = this.mAccelerometerDefault;
- paramPrintWriter.print(i4);
- paramPrintWriter.print(" mCurrentAppOrientation=");
- int i5 = this.mCurrentAppOrientation;
- paramPrintWriter.println(i5);
- paramPrintWriter.print(paramString);
- paramPrintWriter.print("mCarDockEnablesAccelerometer=");
- boolean bool5 = this.mCarDockEnablesAccelerometer;
- paramPrintWriter.print(bool5);
- paramPrintWriter.print(" mDeskDockEnablesAccelerometer=");
- boolean bool6 = this.mDeskDockEnablesAccelerometer;
- paramPrintWriter.println(bool6);
- paramPrintWriter.print(paramString);
- paramPrintWriter.print("mLidKeyboardAccessibility=");
- int i6 = this.mLidKeyboardAccessibility;
- paramPrintWriter.print(i6);
- paramPrintWriter.print(" mLidNavigationAccessibility=");
- int i7 = this.mLidNavigationAccessibility;
- paramPrintWriter.print(i7);
- paramPrintWriter.print(" mLongPressOnPowerBehavior=");
- int i8 = this.mLongPressOnPowerBehavior;
- paramPrintWriter.println(i8);
- paramPrintWriter.print(paramString);
- paramPrintWriter.print("mScreenOn=");
- boolean bool7 = this.mScreenOn;
- paramPrintWriter.print(bool7);
- paramPrintWriter.print(" mOrientationSensorEnabled=");
- boolean bool8 = this.mOrientationSensorEnabled;
- paramPrintWriter.print(bool8);
- paramPrintWriter.print(" mHasSoftInput=");
- boolean bool9 = this.mHasSoftInput;
- paramPrintWriter.println(bool9);
- paramPrintWriter.print(paramString);
- paramPrintWriter.print("mUnrestrictedScreen=(");
- int i9 = this.mUnrestrictedScreenLeft;
- paramPrintWriter.print(i9);
- paramPrintWriter.print(",");
- int i10 = this.mUnrestrictedScreenTop;
- paramPrintWriter.print(i10);
- paramPrintWriter.print(") ");
- int i11 = this.mUnrestrictedScreenWidth;
- paramPrintWriter.print(i11);
- paramPrintWriter.print("x");
- int i12 = this.mUnrestrictedScreenHeight;
- paramPrintWriter.println(i12);
- paramPrintWriter.print(paramString);
- paramPrintWriter.print("mRestrictedScreen=(");
- int i13 = this.mRestrictedScreenLeft;
- paramPrintWriter.print(i13);
- paramPrintWriter.print(",");
- int i14 = this.mRestrictedScreenTop;
- paramPrintWriter.print(i14);
- paramPrintWriter.print(") ");
- int i15 = this.mRestrictedScreenWidth;
- paramPrintWriter.print(i15);
- paramPrintWriter.print("x");
- int i16 = this.mRestrictedScreenHeight;
- paramPrintWriter.println(i16);
- paramPrintWriter.print(paramString);
- paramPrintWriter.print("mCur=(");
- int i17 = this.mCurLeft;
- paramPrintWriter.print(i17);
- paramPrintWriter.print(",");
- int i18 = this.mCurTop;
- paramPrintWriter.print(i18);
- paramPrintWriter.print(")-(");
- int i19 = this.mCurRight;
- paramPrintWriter.print(i19);
- paramPrintWriter.print(",");
- int i20 = this.mCurBottom;
- paramPrintWriter.print(i20);
- paramPrintWriter.println(")");
- paramPrintWriter.print(paramString);
- paramPrintWriter.print("mContent=(");
- int i21 = this.mContentLeft;
- paramPrintWriter.print(i21);
- paramPrintWriter.print(",");
- int i22 = this.mContentTop;
- paramPrintWriter.print(i22);
- paramPrintWriter.print(")-(");
- int i23 = this.mContentRight;
- paramPrintWriter.print(i23);
- paramPrintWriter.print(",");
- int i24 = this.mContentBottom;
- paramPrintWriter.print(i24);
- paramPrintWriter.println(")");
- paramPrintWriter.print(paramString);
- paramPrintWriter.print("mDock=(");
- int i25 = this.mDockLeft;
- paramPrintWriter.print(i25);
- paramPrintWriter.print(",");
- int i26 = this.mDockTop;
- paramPrintWriter.print(i26);
- paramPrintWriter.print(")-(");
- int i27 = this.mDockRight;
- paramPrintWriter.print(i27);
- paramPrintWriter.print(",");
- int i28 = this.mDockBottom;
- paramPrintWriter.print(i28);
- paramPrintWriter.println(")");
- paramPrintWriter.print(paramString);
- paramPrintWriter.print("mDockLayer=");
- int i29 = this.mDockLayer;
- paramPrintWriter.println(i29);
- paramPrintWriter.print(paramString);
- paramPrintWriter.print("mTopFullscreenOpaqueWindowState=");
- WindowManagerPolicy.WindowState localWindowState = this.mTopFullscreenOpaqueWindowState;
- paramPrintWriter.println(localWindowState);
- paramPrintWriter.print(paramString);
- paramPrintWriter.print("mTopIsFullscreen=");
- boolean bool10 = this.mTopIsFullscreen;
- paramPrintWriter.print(bool10);
- paramPrintWriter.print(" mForceStatusBar=");
- boolean bool11 = this.mForceStatusBar;
- paramPrintWriter.print(bool11);
- paramPrintWriter.print(" mHideLockScreen=");
- boolean bool12 = this.mHideLockScreen;
- paramPrintWriter.println(bool12);
- paramPrintWriter.print(paramString);
- paramPrintWriter.print("mDismissKeyguard=");
- boolean bool13 = this.mDismissKeyguard;
- paramPrintWriter.print(bool13);
- paramPrintWriter.print(" mHomePressed=");
- boolean bool14 = this.mHomePressed;
- paramPrintWriter.println(bool14);
- paramPrintWriter.print(paramString);
- paramPrintWriter.print("mAllowLockscreenWhenOn=");
- boolean bool15 = this.mAllowLockscreenWhenOn;
- paramPrintWriter.print(bool15);
- paramPrintWriter.print(" mLockScreenTimeout=");
- int i30 = this.mLockScreenTimeout;
- paramPrintWriter.print(i30);
- paramPrintWriter.print(" mLockScreenTimerActive=");
- boolean bool16 = this.mLockScreenTimerActive;
- paramPrintWriter.println(bool16);
- paramPrintWriter.print(paramString);
- paramPrintWriter.print("mEndcallBehavior=");
- int i31 = this.mEndcallBehavior;
- paramPrintWriter.print(i31);
- paramPrintWriter.print(" mIncallPowerBehavior=");
- int i32 = this.mIncallPowerBehavior;
- paramPrintWriter.print(i32);
- paramPrintWriter.print(" mLongPressOnHomeBehavior=");
- int i33 = this.mLongPressOnHomeBehavior;
- paramPrintWriter.println(i33);
- paramPrintWriter.print(paramString);
- paramPrintWriter.print("mLandscapeRotation=");
- int i34 = this.mLandscapeRotation;
- paramPrintWriter.print(i34);
- paramPrintWriter.print(" mSeascapeRotation=");
- int i35 = this.mSeascapeRotation;
- paramPrintWriter.println(i35);
- paramPrintWriter.print(paramString);
- paramPrintWriter.print("mPortraitRotation=");
- int i36 = this.mPortraitRotation;
- paramPrintWriter.print(i36);
- paramPrintWriter.print(" mUpsideDownRotation=");
- int i37 = this.mUpsideDownRotation;
- paramPrintWriter.println(i37);
- }
- public void enableKeyguard(boolean paramBoolean)
- {
- this.mKeyguardMediator.setKeyguardEnabled(paramBoolean);
- }
- public void enableScreenAfterBoot()
- {
- readLidState();
- updateRotation(1);
- }
- public void exitKeyguardSecurely(WindowManagerPolicy.OnKeyguardExitResult paramOnKeyguardExitResult)
- {
- this.mKeyguardMediator.verifyUnlock(paramOnKeyguardExitResult);
- }
- public int finishAnimationLw()
- {
- int i = 0;
- int j = 0;
- WindowManager.LayoutParams localLayoutParams;
- if (this.mTopFullscreenOpaqueWindowState != null)
- {
- localLayoutParams = this.mTopFullscreenOpaqueWindowState.getAttrs();
- if (this.mStatusBar != null)
- {
- if (!this.mForceStatusBar)
- break label240;
- if (this.mStatusBar.showLw(1))
- i = 0x0 | 0x1;
- }
- label54: this.mTopIsFullscreen = j;
- if (this.mTopAppWindowState != null)
- {
- WindowManagerPolicy.WindowState localWindowState1 = this.mTopAppWindowState;
- WindowManagerPolicy.WindowState localWindowState2 = this.mLastTopAppWindowState;
- if (localWindowState1 != localWindowState2)
- {
- WindowManagerPolicy.WindowState localWindowState3 = this.mTopAppWindowState;
- this.mLastTopAppWindowState = localWindowState3;
- if ((this.mTopAppWindowState.getAttrs().flags & 0x8000000) == 0)
- break label320;
- int k = 1;
- label120: Handler localHandler1 = this.mHandler;
- PhoneWindowManager.7 local7 = new PhoneWindowManager.7(this, k);
- boolean bool1 = localHandler1.post(local7);
- }
- }
- if (this.mKeyguard != null)
- {
- if ((!this.mDismissKeyguard) || (this.mKeyguardMediator.isSecure()))
- break label327;
- if (this.mKeyguard.hideLw(1))
- i |= 7;
- if (this.mKeyguardMediator.isShowing())
- {
- Handler localHandler2 = this.mHandler;
- PhoneWindowManager.8 local8 = new PhoneWindowManager.8(this);
- boolean bool2 = localHandler2.post(local8);
- }
- }
- }
- while (true)
- {
- updateSystemUiVisibility();
- updateLockScreenTimeout();
- return i;
- localLayoutParams = null;
- break;
- label240: if (this.mTopFullscreenOpaqueWindowState == null)
- break label54;
- if ((localLayoutParams.flags & 0x400) != 0);
- for (j = 1; ; j = 0)
- {
- if (j == 0)
- break label299;
- if ((!this.mStatusBarCanHide) || (!this.mStatusBar.hideLw(1)))
- break;
- i = 0x0 | 0x1;
- break;
- }
- label299: if (!this.mStatusBar.showLw(1))
- break label54;
- i = 0x0 | 0x1;
- break label54;
- label320: int m = 0;
- break label120;
- label327: if (this.mHideLockScreen)
- {
- if (this.mKeyguard.hideLw(1))
- i |= 7;
- this.mKeyguardMediator.setHidden(1);
- continue;
- }
- if (this.mKeyguard.showLw(1))
- i |= 7;
- this.mKeyguardMediator.setHidden(0);
- }
- }
- public int finishLayoutLw()
- {
- return 0;
- }
- public void focusChanged(WindowManagerPolicy.WindowState paramWindowState1, WindowManagerPolicy.WindowState paramWindowState2)
- {
- this.mFocusedWindow = paramWindowState2;
- updateSystemUiVisibility();
- }
- public int getConfigDisplayHeight(int paramInt1, int paramInt2)
- {
- int i = this.mStatusBarHeight;
- return paramInt2 - i;
- }
- public int getConfigDisplayWidth(int paramInt1, int paramInt2)
- {
- return paramInt2;
- }
- public void getContentInsetHintLw(WindowManager.LayoutParams paramLayoutParams, Rect paramRect)
- {
- int i = paramLayoutParams.flags;
- if ((0x10500 & i) == 65792)
- {
- int j = this.mCurLeft;
- int k = this.mCurTop;
- int m = this.mRestrictedScreenLeft;
- int n = this.mRestrictedScreenWidth;
- int i1 = m + n;
- int i2 = this.mCurRight;
- int i3 = i1 - i2;
- int i4 = this.mRestrictedScreenTop;
- int i5 = this.mRestrictedScreenHeight;
- int i6 = i4 + i5;
- int i7 = this.mCurBottom;
- int i8 = i6 - i7;
- paramRect.set(j, k, i3, i8);
- return;
- }
- paramRect.setEmpty();
- }
- public int getLockedRotationLw()
- {
- synchronized (this.mLock)
- {
- return -1;
- }
- }
- public int getMaxWallpaperLayer()
- {
- return 8;
- }
- public int getNonDecorDisplayHeight(int paramInt1, int paramInt2)
- {
- if (this.mStatusBarCanHide);
- int j;
- for (int i = paramInt2; ; i = paramInt2 - j)
- {
- return i;
- j = this.mStatusBarHeight;
- }
- }
- public int getNonDecorDisplayWidth(int paramInt1, int paramInt2)
- {
- return paramInt2;
- }
- boolean goHome()
- {
- try
- {
- if (SystemProperties.getInt("persist.sys.uts-test-mode", 0) == 1)
- {
- int i = Log.d("WindowManager", "UTS-TEST-MODE");
- IActivityManager localIActivityManager1 = ActivityManagerNative.getDefault();
- Intent localIntent1 = this.mHomeIntent;
- Intent localIntent2 = this.mHomeIntent;
- ContentResolver localContentResolver1 = this.mContext.getContentResolver();
- String str1 = localIntent2.resolveTypeIfNeeded(localContentResolver1);
- if (localIActivityManager1.startActivity(null, localIntent1, str1, null, 0, null, null, 0, 1, 0) != 1);
- }
- else
- {
- for (j = 0; ; j = 0)
- {
- return j;
- ActivityManagerNative.getDefault().stopAppSwitches();
- sendCloseSystemWindows();
- Intent localIntent3 = createHomeDockIntent();
- if (localIntent3 == null)
- break;
- IActivityManager localIActivityManager2 = ActivityManagerNative.getDefault();
- ContentResolver localContentResolver2 = this.mContext.getContentResolver();
- String str2 = localIntent3.resolveTypeIfNeeded(localContentResolver2);
- int k = localIActivityManager2.startActivity(null, localIntent3, str2, null, 0, null, null, 0, 1, 0);
- if (k != 1)
- break;
- }
- }
- }
- catch (RemoteException localRemoteException)
- {
- while (true)
- int j = 1;
- }
- }
- void handleVolumeKey(int paramInt1, int paramInt2)
- {
- IAudioService localIAudioService = getAudioService();
- if (localIAudioService == null)
- return;
- try
- {
- this.mBroadcastWakeLock.acquire();
- if (paramInt2 == 24);
- for (int i = 1; ; i = -1)
- {
- localIAudioService.adjustStreamVolume(paramInt1, i, 0);
- return;
- }
- }
- catch (RemoteException localRemoteException)
- {
- String str = "IAudioService.adjustStreamVolume() threw RemoteException " + localRemoteException;
- int j = Log.w("WindowManager", str);
- return;
- }
- finally
- {
- this.mBroadcastWakeLock.release();
- }
- throw localObject;
- }
- public boolean inKeyguardRestrictedKeyInputMode()
- {
- return this.mKeyguardMediator.isInputRestricted();
- }
- public void init(Context paramContext, IWindowManager paramIWindowManager, LocalPowerManager paramLocalPowerManager)
- {
- this.mContext = paramContext;
- this.mWindowManager = paramIWindowManager;
- this.mPowerManager = paramLocalPowerManager;
- KeyguardViewMediator localKeyguardViewMediator = new KeyguardViewMediator(paramContext, this, paramLocalPowerManager);
- this.mKeyguardMediator = localKeyguardViewMediator;
- Handler localHandler1 = new Handler();
- this.mHandler = localHandler1;
- Context localContext = this.mContext;
- MyOrientationListener localMyOrientationListener = new MyOrientationListener(localContext);
- this.mOrientationListener = localMyOrientationListener;
- Handler localHandler2 = this.mHandler;
- new SettingsObserver(localHandler2).observe();
- Handler localHandler3 = this.mHandler;
- ShortcutManager localShortcutManager = new ShortcutManager(paramContext, localHandler3);
- this.mShortcutManager = localShortcutManager;
- this.mShortcutManager.observe();
- Intent localIntent1 = new Intent("android.intent.action.MAIN", null);
- this.mHomeIntent = localIntent1;
- Intent localIntent2 = this.mHomeIntent.addCategory("android.intent.category.HOME");
- Intent localIntent3 = this.mHomeIntent.addFlags(270532608);
- Intent localIntent4 = new Intent("android.intent.action.MAIN", null);
- this.mCarDockIntent = localIntent4;
- Intent localIntent5 = this.mCarDockIntent.addCategory("android.intent.category.CAR_DOCK");
- Intent localIntent6 = this.mCarDockIntent.addFlags(270532608);
- Intent localIntent7 = new Intent("android.intent.action.MAIN", null);
- this.mDeskDockIntent = localIntent7;
- Intent localIntent8 = this.mDeskDockIntent.addCategory("android.intent.category.DESK_DOCK");
- Intent localIntent9 = this.mDeskDockIntent.addFlags(270532608);
- PowerManager.WakeLock localWakeLock = ((PowerManager)paramContext.getSystemService("power")).newWakeLock(1, "PhoneWindowManager.mBroadcastWakeLock");
- this.mBroadcastWakeLock = localWakeLock;
- String str1 = SystemProperties.get("ro.debuggable");
- boolean bool1 = "1".equals(str1);
- this.mEnableShiftMenuBugReports = bool1;
- int i = readRotation(17694728);
- this.mLidOpenRotation = i;
- int j = readRotation(17694730);
- this.mCarDockRotation = j;
- int k = readRotation(17694729);
- this.mDeskDockRotation = k;
- boolean bool2 = this.mContext.getResources().getBoolean(17891340);
- this.mAllowAllRotations = bool2;
- boolean bool3 = this.mContext.getResources().getBoolean(17891343);
- this.mCarDockEnablesAccelerometer = bool3;
- boolean bool4 = this.mContext.getResources().getBoolean(17891342);
- this.mDeskDockEnablesAccelerometer = bool4;
- int m = this.mContext.getResources().getInteger(17694733);
- this.mLidKeyboardAccessibility = m;
- int n = this.mContext.getResources().getInteger(17694734);
- this.mLidNavigationAccessibility = n;
- IntentFilter localIntentFilter = new IntentFilter();
- String str2 = UiModeManager.ACTION_ENTER_CAR_MODE;
- localIntentFilter.addAction(str2);
- String str3 = UiModeManager.ACTION_EXIT_CAR_MODE;
- localIntentFilter.addAction(str3);
- String str4 = UiModeManager.ACTION_ENTER_DESK_MODE;
- localIntentFilter.addAction(str4);
- String str5 = UiModeManager.ACTION_EXIT_DESK_MODE;
- localIntentFilter.addAction(str5);
- localIntentFilter.addAction("android.intent.action.DOCK_EVENT");
- BroadcastReceiver localBroadcastReceiver = this.mDockReceiver;
- Intent localIntent10 = paramContext.registerReceiver(localBroadcastReceiver, localIntentFilter);
- if (localIntent10 != null)
- {
- int i1 = localIntent10.getIntExtra("android.intent.extra.DOCK_STATE", 0);
- this.mDockMode = i1;
- }
- Vibrator localVibrator = new Vibrator();
- this.mVibrator = localVibrator;
- long[] arrayOfLong1 = getLongIntArray(this.mContext.getResources(), 17235988);
- this.mLongPressVibePattern = arrayOfLong1;
- long[] arrayOfLong2 = getLongIntArray(this.mContext.getResources(), 17235989);
- this.mVirtualKeyVibePattern = arrayOfLong2;
- long[] arrayOfLong3 = getLongIntArray(this.mContext.getResources(), 17235990);
- this.mKeyboardTapVibePattern = arrayOfLong3;
- long[] arrayOfLong4 = getLongIntArray(this.mContext.getResources(), 17235991);
- this.mSafeModeDisabledVibePattern = arrayOfLong4;
- long[] arrayOfLong5 = getLongIntArray(this.mContext.getResources(), 17235992);
- this.mSafeModeEnabledVibePattern = arrayOfLong5;
- if (new File("/sys/devices/virtual/switch/hdmi/state").exists())
- this.mHDMIObserver.startObserving("DEVPATH=/devices/virtual/switch/hdmi");
- int i2;
- if (!readHdmiState())
- {
- i2 = 1;
- this.mHdmiPlugged = i2;
- if (this.mHdmiPlugged)
- break label741;
- }
- label741: int i4;
- for (int i3 = 1; ; i4 = 0)
- {
- setHdmiPlugged(i3);
- return;
- i2 = 0;
- break;
- }
- }
- public boolean interceptKeyBeforeDispatching(WindowManagerPolicy.WindowState paramWindowState, KeyEvent paramKeyEvent, int paramInt)
- {
- boolean bool1 = keyguardOn();
- int i = paramKeyEvent.getKeyCode();
- int j = paramKeyEvent.getRepeatCount();
- int k = paramKeyEvent.getMetaState();
- int m;
- int i3;
- if (paramKeyEvent.getAction() == 0)
- {
- m = 1;
- boolean bool2 = paramKeyEvent.isCanceled();
- int n = i;
- int i1 = 3;
- if (n != i1)
- break label397;
- if (m == 0)
- {
- Handler localHandler1 = this.mHandler;
- Runnable localRunnable1 = this.mHomeLongPress;
- localHandler1.removeCallbacks(localRunnable1);
- }
- if ((!this.mHomePressed) || (m != 0))
- break label208;
- int i2 = 0;
- this.mHomePressed = i2;
- if (bool2)
- break label195;
- i3 = 0;
- }
- while (true)
- {
- try
- {
- ITelephony localITelephony = getTelephonyService();
- if (localITelephony == null)
- continue;
- int i4 = localITelephony.isRinging();
- i3 = i4;
- if (i3 == 0)
- continue;
- int i5 = Log.i("WindowManager", "Ignoring HOME; there's a ringing incoming call.");
- i6 = 1;
- return i6;
- m = 0;
- }
- catch (RemoteException localRemoteException1)
- {
- String str1 = "WindowManager";
- String str2 = "RemoteException from getPhoneInterface()";
- RemoteException localRemoteException2 = localRemoteException1;
- int i7 = Log.w(str1, str2, localRemoteException2);
- continue;
- launchHomeFromHotKey();
- continue;
- }
- label195: int i8 = Log.i("WindowManager", "Ignoring HOME; event canceled.");
- continue;
- label208: if (paramWindowState != null);
- int i9;
- for (WindowManager.LayoutParams localLayoutParams = paramWindowState.getAttrs(); ; localLayoutParams = null)
- {
- if (localLayoutParams == null)
- break label338;
- i9 = localLayoutParams.type;
- int i10 = i9;
- int i11 = 2004;
- if (i10 != i11)
- {
- int i12 = i9;
- int i13 = 2009;
- if (i12 != i13)
- break label276;
- }
- i6 = 0;
- break;
- }
- label276: int i14 = WINDOW_TYPES_WHERE_HOME_DOESNT_WORK.length;
- int i15 = 0;
- while (true)
- {
- int i16 = i15;
- int i17 = i14;
- if (i16 >= i17)
- break label338;
- int i18 = WINDOW_TYPES_WHERE_HOME_DOESNT_WORK[i15];
- int i19 = i9;
- int i20 = i18;
- if (i19 == i20)
- {
- i6 = 1;
- break;
- }
- i15 += 1;
- }
- label338: if ((m != 0) && (j == 0))
- {
- if (!bool1)
- {
- Handler localHandler2 = this.mHandler;
- Runnable localRunnable2 = this.mHomeLongPress;
- long l = ViewConfiguration.getGlobalActionKeyTimeout();
- boolean bool3 = localHandler2.postDelayed(localRunnable2, l);
- }
- int i21 = 1;
- this.mHomePressed = i21;
- }
- int i6 = 1;
- continue;
- label397: int i22 = i;
- int i23 = 82;
- if (i22 == i23)
- {
- if ((m != 0) && (j == 0) && (this.mEnableShiftMenuBugReports))
- {
- int i24 = k & 0x1;
- int i25 = 1;
- if (i24 == i25)
- {
- Intent localIntent1 = new android/content/Intent;
- Intent localIntent2 = localIntent1;
- String str3 = "android.intent.action.BUG_REPORT";
- localIntent2.<init>(str3);
- Context localContext1 = this.mContext;
- Intent localIntent3 = localIntent1;
- String str4 = null;
- localContext1.sendOrderedBroadcast(localIntent3, str4);
- i6 = 1;
- continue;
- }
- }
- }
- else
- {
- int i26 = i;
- int i27 = 84;
- if (i26 == i27)
- {
- if (m != 0)
- if (j == 0)
- {
- int i28 = i;
- this.mShortcutKeyPressed = i28;
- int i29 = 0;
- this.mConsumeShortcutKeyUp = i29;
- }
- do
- {
- int i31;
- int i32;
- do
- {
- i6 = 0;
- break;
- int i30 = this.mShortcutKeyPressed;
- i31 = i;
- i32 = i30;
- }
- while (i31 != i32);
- int i33 = 65535;
- this.mShortcutKeyPressed = i33;
- }
- while (!this.mConsumeShortcutKeyUp);
- int i34 = 0;
- this.mConsumeShortcutKeyUp = i34;
- i6 = 1;
- continue;
- }
- int i35 = i;
- int i36 = 187;
- if (i35 == i36)
- {
- if ((m != 0) && (j == 0))
- {
- PhoneWindowManager localPhoneWindowManager = this;
- int i37 = 0;
- int i38 = 1;
- localPhoneWindowManager.showOrHideRecentAppsDialog(i37, i38);
- }
- i6 = 1;
- continue;
- }
- }
- int i39 = this.mShortcutKeyPressed;
- int i40 = 65535;
- if (i39 != i40)
- {
- KeyCharacterMap localKeyCharacterMap1 = paramKeyEvent.getKeyCharacterMap();
- if (localKeyCharacterMap1.isPrintingKey(i))
- {
- int i41 = 1;
- this.mConsumeShortcutKeyUp = i41;
- Intent localIntent4;
- if ((m != 0) && (j == 0) && (!bool1))
- {
- ShortcutManager localShortcutManager = this.mShortcutManager;
- KeyCharacterMap localKeyCharacterMap2 = localKeyCharacterMap1;
- int i42 = i;
- int i43 = k;
- localIntent4 = localShortcutManager.getIntent(localKeyCharacterMap2, i42, i43);
- if (localIntent4 == null)
- break label873;
- Intent localIntent5 = localIntent4;
- int i44 = 268435456;
- Intent localIntent6 = localIntent5.addFlags(i44);
- }
- while (true)
- {
- try
- {
- Context localContext2 = this.mContext;
- Intent localIntent7 = localIntent4;
- localContext2.startActivity(localIntent7);
- i6 = 1;
- }
- catch (ActivityNotFoundException localActivityNotFoundException1)
- {
- StringBuilder localStringBuilder1 = new StringBuilder().append("Dropping shortcut key combination because the activity to which it is registered was not found: ");
- String str5 = KeyEvent.keyCodeToString(this.mShortcutKeyPressed);
- StringBuilder localStringBuilder2 = localStringBuilder1.append(str5).append("+");
- String str6 = KeyEvent.keyCodeToString(i);
- String str7 = str6;
- String str8 = "WindowManager";
- String str9 = str7;
- ActivityNotFoundException localActivityNotFoundException2 = localActivityNotFoundException1;
- int i45 = Slog.w(str8, str9, localActivityNotFoundException2);
- continue;
- }
- label873: StringBuilder localStringBuilder3 = new StringBuilder().append("Dropping unregistered shortcut key combination: ");
- String str10 = KeyEvent.keyCodeToString(this.mShortcutKeyPressed);
- StringBuilder localStringBuilder4 = localStringBuilder3.append(str10).append("+");
- String str11 = KeyEvent.keyCodeToString(i);
- String str12 = str11;
- int i46 = Slog.i("WindowManager", str12);
- }
- }
- }
- i6 = 0;
- }
- }
- public int interceptKeyBeforeQueueing(KeyEvent paramKeyEvent, int paramInt, boolean paramBoolean)
- {
- int i;
- boolean bool1;
- int j;
- int k;
- label33: boolean bool2;
- label46: int m;
- if (paramKeyEvent.getAction() == 0)
- {
- i = 1;
- bool1 = paramKeyEvent.isCanceled();
- j = paramKeyEvent.getKeyCode();
- if ((0x1000000 & paramInt) == 0)
- break label237;
- k = 1;
- if (!paramBoolean)
- break label243;
- bool2 = this.mKeyguardMediator.isShowingAndNotHidden();
- if ((i != 0) && ((paramInt & 0x100) != 0))
- boolean bool3 = performHapticFeedbackLw(null, 1, 0);
- if ((!paramBoolean) && (k == 0))
- break label255;
- m = 1;
- label81: switch (j)
- {
- default:
- case 24:
- case 25:
- case 164:
- case 6:
- case 26:
- case 85:
- case 126:
- case 127:
- case 79:
- case 86:
- case 87:
- case 88:
- case 89:
- case 90:
- case 91:
- case 130:
- case 5:
- }
- }
- while (true)
- {
- return m;
- i = 0;
- break;
- label237: k = 0;
- break label33;
- label243: bool2 = this.mKeyguardMediator.isShowing();
- break label46;
- label255: m = 0;
- if ((paramInt & 0x3) != 0);
- for (int n = 1; (i != 0) && (n != 0); n = 0)
- {
- if (!bool2)
- break label302;
- boolean bool4 = this.mKeyguardMediator.onWakeKeyWhenKeyguardShowingTq(j);
- break;
- }
- label302: m |= 2;
- break label81;
- if (i == 0)
- continue;
- ITelephony localITelephony = getTelephonyService();
- if (localITelephony != null)
- try
- {
- if (localITelephony.isRinging())
- {
- int i1 = Log.i("WindowManager", "interceptKeyBeforeQueueing: VOLUME key-down while ringing: Silence ringer!");
- localITelephony.silenceRinger();
- m &= -2;
- continue;
- }
- if ((localITelephony.isOffhook()) && ((m & 0x1) == 0))
- handleVolumeKey(0, j);
- }
- catch (RemoteException localRemoteException1)
- {
- int i2 = Log.w("WindowManager", "ITelephony threw RemoteException", localRemoteException1);
- }
- if ((!isMusicActive()) || ((m & 0x1) != 0))
- continue;
- handleVolumeKey(3, j);
- continue;
- m &= -2;
- int i3;
- int i6;
- if (i != 0)
- {
- localITelephony = getTelephonyService();
- i3 = 0;
- if (localITelephony != null);
- try
- {
- int i4 = localITelephony.endCall();
- i3 = i4;
- if ((!paramBoolean) || (i3 != 0))
- {
- int i5 = 1;
- interceptPowerKeyDown(i5);
- }
- }
- catch (RemoteException localRemoteException2)
- {
- while (true)
- {
- int i8 = Log.w("WindowManager", "ITelephony threw RemoteException", localRemoteException2);
- continue;
- i6 = 0;
- }
- }
- }
- if ((!interceptPowerKeyUp(bool1)) || (((this.mEndcallBehavior & 0x1) != 0) && (goHome())) || ((this.mEndcallBehavior & 0x2) == 0))
- continue;
- m = m & 0xFFFFFFFD | 0x4;
- continue;
- m &= -2;
- int i9;
- if (i != 0)
- {
- localITelephony = getTelephonyService();
- i3 = 0;
- if (localITelephony != null);
- try
- {
- if (localITelephony.isRinging())
- localITelephony.silenceRinger();
- while (true)
- {
- if ((paramBoolean) && (i3 == 0))
- break label676;
- i6 = 1;
- interceptPowerKeyDown(i6);
- break;
- if (((this.mIncallPowerBehavior & 0x2) == 0) || (!localITelephony.isOffhook()))
- continue;
- i9 = localITelephony.endCall();
- i3 = i9;
- }
- }
- catch (RemoteException localRemoteException3)
- {
- while (true)
- {
- int i10 = Log.w("WindowManager", "ITelephony threw RemoteException", localRemoteException3);
- continue;
- label676: int i7 = 0;
- }
- }
- }
- if (!interceptPowerKeyUp(bool1))
- continue;
- m = m & 0xFFFFFFFD | 0x4;
- continue;
- if (i != 0)
- {
- localITelephony = getTelephonyService();
- if (localITelephony == null);
- }
- try
- {
- i9 = localITelephony.isIdle();
- if ((i9 == 0) || ((m & 0x1) != 0))
- continue;
- this.mBroadcastWakeLock.acquire();
- Handler localHandler = this.mHandler;
- KeyEvent localKeyEvent = new KeyEvent(paramKeyEvent);
- PassHeadsetKey localPassHeadsetKey = new PassHeadsetKey(localKeyEvent);
- boolean bool5 = localHandler.post(localPassHeadsetKey);
- }
- catch (RemoteException localRemoteException4)
- {
- while (true)
- int i11 = Log.w("WindowManager", "ITelephony threw RemoteException", localRemoteException4);
- }
- if (i == 0)
- continue;
- localITelephony = getTelephonyService();
- if (localITelephony == null)
- continue;
- try
- {
- if (!localITelephony.isRinging())
- continue;
- int i12 = Log.i("WindowManager", "interceptKeyBeforeQueueing: CALL key-down while ringing: Answer the call!");
- localITelephony.answerRingingCall();
- m &= -2;
- }
- catch (RemoteException localRemoteException5)
- {
- int i13 = Log.w("WindowManager", "ITelephony threw RemoteException", localRemoteException5);
- }
- }
- }
- public int interceptMotionBeforeQueueingWhenScreenOff(int paramInt)
- {
- int i = 0;
- int j;
- if ((paramInt & 0x3) != 0)
- {
- j = 1;
- if (j != 0)
- {
- if (!this.mKeyguardMediator.isShowing())
- break label40;
- boolean bool = this.mKeyguardMediator.onWakeMotionWhenKeyguardShowingTq();
- }
- }
- while (true)
- {
- return i;
- j = 0;
- break;
- label40: i = 0x0 | 0x2;
- }
- }
- boolean isDeviceProvisioned()
- {
- if (Settings.Secure.getInt(this.mContext.getContentResolver(), "device_provisioned", 0) != 0);
- for (int i = 1; ; i = 0)
- return i;
- }
- public boolean isKeyguardLocked()
- {
- return keyguardOn();
- }
- public boolean isKeyguardSecure()
- {
- return this.mKeyguardMediator.isSecure();
- }
- boolean isMusicActive()
- {
- AudioManager localAudioManager = (AudioManager)this.mContext.getSystemService("audio");
- if (localAudioManager == null)
- int i = Log.w("WindowManager", "isMusicActive: couldn't get AudioManager reference");
- boolean bool;
- for (int j = 0; ; bool = localAudioManager.isMusicActive())
- return j;
- }
- public boolean isScreenOn()
- {
- return this.mScreenOn;
- }
- boolean keyguardOn()
- {
- if ((keyguardIsShowingTq()) || (inKeyguardRestrictedKeyInputMode()));
- for (int i = 1; ; i = 0)
- return i;
- }
- void launchHomeFromHotKey()
- {
- if (this.mKeyguardMediator.isShowingAndNotHidden())
- return;
- if ((!this.mHideLockScreen) && (this.mKeyguardMediator.isInputRestricted()))
- {
- KeyguardViewMediator localKeyguardViewMediator = this.mKeyguardMediator;
- PhoneWindowManager.6 local6 = new PhoneWindowManager.6(this);
- localKeyguardViewMediator.verifyUnlock(local6);
- return;
- }
- try
- {
- ActivityManagerNative.getDefault().stopAppSwitches();
- label56: sendCloseSystemWindows("homekey");
- startDockOrHome();
- return;
- }
- catch (RemoteException localRemoteException)
- {
- break label56;
- }
- }
- public void layoutWindowLw(WindowManagerPolicy.WindowState paramWindowState1, WindowManager.LayoutParams paramLayoutParams, WindowManagerPolicy.WindowState paramWindowState2)
- {
- WindowManagerPolicy.WindowState localWindowState1 = this.mStatusBar;
- WindowManagerPolicy.WindowState localWindowState2 = paramWindowState1;
- WindowManagerPolicy.WindowState localWindowState3 = localWindowState1;
- if (localWindowState2 == localWindowState3)
- return;
- int i = paramLayoutParams.flags;
- int j = paramLayoutParams.softInputMode;
- Rect localRect1 = mTmpParentFrame;
- Rect localRect2 = mTmpDisplayFrame;
- Rect localRect3 = mTmpContentFrame;
- Rect localRect4 = mTmpVisibleFrame;
- if (paramLayoutParams.type == 2011)
- {
- int k = this.mDockLeft;
- localRect4.left = k;
- localRect3.left = k;
- localRect2.left = k;
- localRect1.left = k;
- int m = this.mDockTop;
- localRect4.top = m;
- localRect3.top = m;
- localRect2.top = m;
- localRect1.top = m;
- int n = this.mDockRight;
- localRect4.right = n;
- localRect3.right = n;
- localRect2.right = n;
- localRect1.right = n;
- int i1 = this.mDockBottom;
- localRect4.bottom = i1;
- localRect3.bottom = i1;
- localRect2.bottom = i1;
- localRect1.bottom = i1;
- int i2 = 80;
- paramLayoutParams.gravity = i2;
- int i3 = paramWindowState1.getSurfaceLayer();
- this.mDockLayer = i3;
- }
- while (true)
- {
- if ((i & 0x200) != 0)
- {
- localRect4.top = 55536;
- localRect4.left = 55536;
- localRect3.top = 55536;
- localRect3.left = 55536;
- localRect2.top = 55536;
- localRect2.left = 55536;
- localRect4.bottom = 10000;
- localRect4.right = 10000;
- localRect3.bottom = 10000;
- localRect3.right = 10000;
- localRect2.bottom = 10000;
- localRect2.right = 10000;
- }
- WindowManagerPolicy.WindowState localWindowState4 = paramWindowState1;
- Rect localRect5 = localRect1;
- Rect localRect6 = localRect2;
- Rect localRect7 = localRect3;
- Rect localRect8 = localRect4;
- localWindowState4.computeFrameLw(localRect5, localRect6, localRect7, localRect8);
- if (paramLayoutParams.type != 2011)
- return;
- if (paramWindowState1.getGivenInsetsPendingLw())
- return;
- int i4 = paramWindowState1.getContentFrameLw().top;
- int i5 = paramWindowState1.getGivenContentInsetsLw().top;
- int i6 = i4 + i5;
- int i7 = this.mContentBottom;
- int i8 = i6;
- if (i7 > i8)
- {
- int i9 = i6;
- this.mContentBottom = i9;
- }
- int i10 = paramWindowState1.getVisibleFrameLw().top;
- int i11 = paramWindowState1.getGivenVisibleInsetsLw().top;
- int i12 = i10 + i11;
- int i13 = this.mCurBottom;
- int i14 = i12;
- if (i13 <= i14)
- return;
- int i15 = i12;
- this.mCurBottom = i15;
- return;
- int i16 = j & 0xF0;
- if ((0x10500 & i) == 65792)
- {
- if (paramWindowState2 != null)
- {
- PhoneWindowManager localPhoneWindowManager1 = this;
- WindowManagerPolicy.WindowState localWindowState5 = paramWindowState1;
- WindowManagerPolicy.WindowState localWindowState6 = paramWindowState2;
- localPhoneWindowManager1.setAttachedWindowFrames(localWindowState5, i, j, localWindowState6, 1, localRect1, localRect2, localRect3, localRect4);
- continue;
- }
- int i17 = this.mRestrictedScreenLeft;
- localRect2.left = i17;
- localRect1.left = i17;
- int i18 = this.mRestrictedScreenTop;
- localRect2.top = i18;
- localRect1.top = i18;
- int i19 = this.mRestrictedScreenLeft;
- int i20 = this.mRestrictedScreenWidth;
- int i21 = i19 + i20;
- localRect2.right = i21;
- localRect1.right = i21;
- int i22 = this.mRestrictedScreenTop;
- int i23 = this.mRestrictedScreenHeight;
- int i24 = i22 + i23;
- localRect2.bottom = i24;
- localRect1.bottom = i24;
- int i25 = i16;
- int i26 = 16;
- int i30;
- if (i25 != i26)
- {
- int i27 = this.mDockLeft;
- localRect3.left = i27;
- int i28 = this.mDockTop;
- localRect3.top = i28;
- int i29 = this.mDockRight;
- localRect3.right = i29;
- i30 = this.mDockBottom;
- }
- int i40;
- for (localRect3.bottom = i30; ; localRect3.bottom = i40)
- {
- int i31 = i16;
- int i32 = 48;
- if (i31 == i32)
- break label854;
- int i33 = this.mCurLeft;
- localRect4.left = i33;
- int i34 = this.mCurTop;
- localRect4.top = i34;
- int i35 = this.mCurRight;
- localRect4.right = i35;
- int i36 = this.mCurBottom;
- localRect4.bottom = i36;
- break;
- int i37 = this.mContentLeft;
- localRect3.left = i37;
- int i38 = this.mContentTop;
- localRect3.top = i38;
- int i39 = this.mContentRight;
- localRect3.right = i39;
- i40 = this.mContentBottom;
- }
- label854: localRect4.set(localRect3);
- continue;
- }
- if ((i & 0x100) != 0)
- {
- int i48;
- if (paramLayoutParams.type == 2014)
- {
- int i41 = this.mUnrestrictedScreenLeft;
- localRect3.left = i41;
- localRect2.left = i41;
- localRect1.left = i41;
- int i42 = this.mUnrestrictedScreenTop;
- localRect3.top = i42;
- localRect2.top = i42;
- localRect1.top = i42;
- int i43 = this.mUnrestrictedScreenLeft;
- int i44 = this.mUnrestrictedScreenWidth;
- int i45 = i43 + i44;
- localRect3.right = i45;
- localRect2.right = i45;
- localRect1.right = i45;
- int i46 = this.mUnrestrictedScreenTop;
- int i47 = this.mUnrestrictedScreenHeight;
- i48 = i46 + i47;
- localRect3.bottom = i48;
- localRect2.bottom = i48;
- }
- int i62;
- for (localRect1.bottom = i48; ; localRect1.bottom = i62)
- {
- int i49 = i16;
- int i50 = 48;
- if (i49 == i50)
- break label1224;
- int i51 = this.mCurLeft;
- localRect4.left = i51;
- int i52 = this.mCurTop;
- localRect4.top = i52;
- int i53 = this.mCurRight;
- localRect4.right = i53;
- int i54 = this.mCurBottom;
- localRect4.bottom = i54;
- break;
- int i55 = this.mRestrictedScreenLeft;
- localRect3.left = i55;
- localRect2.left = i55;
- localRect1.left = i55;
- int i56 = this.mRestrictedScreenTop;
- localRect3.top = i56;
- localRect2.top = i56;
- localRect1.top = i56;
- int i57 = this.mRestrictedScreenLeft;
- int i58 = this.mRestrictedScreenWidth;
- int i59 = i57 + i58;
- localRect3.right = i59;
- localRect2.right = i59;
- localRect1.right = i59;
- int i60 = this.mRestrictedScreenTop;
- int i61 = this.mRestrictedScreenHeight;
- i62 = i60 + i61;
- localRect3.bottom = i62;
- localRect2.bottom = i62;
- }
- label1224: localRect4.set(localRect3);
- continue;
- }
- if (paramWindowState2 != null)
- {
- PhoneWindowManager localPhoneWindowManager2 = this;
- WindowManagerPolicy.WindowState localWindowState7 = paramWindowState1;
- int i63 = i;
- WindowManagerPolicy.WindowState localWindowState8 = paramWindowState2;
- Rect localRect9 = localRect1;
- Rect localRect10 = localRect2;
- Rect localRect11 = localRect3;
- Rect localRect12 = localRect4;
- localPhoneWindowManager2.setAttachedWindowFrames(localWindowState7, i63, i16, localWindowState8, 0, localRect9, localRect10, localRect11, localRect12);
- continue;
- }
- if (paramLayoutParams.type == 2014)
- {
- int i64 = this.mRestrictedScreenLeft;
- localRect3.left = i64;
- localRect2.left = i64;
- localRect1.left = i64;
- int i65 = this.mRestrictedScreenTop;
- localRect3.top = i65;
- localRect2.top = i65;
- localRect1.top = i65;
- int i66 = this.mRestrictedScreenLeft;
- int i67 = this.mRestrictedScreenWidth;
- int i68 = i66 + i67;
- localRect3.right = i68;
- localRect2.right = i68;
- localRect1.right = i68;
- int i69 = this.mRestrictedScreenTop;
- int i70 = this.mRestrictedScreenHeight;
- int i71 = i69 + i70;
- localRect3.bottom = i71;
- localRect2.bottom = i71;
- localRect1.bottom = i71;
- continue;
- }
- int i72 = this.mContentLeft;
- localRect1.left = i72;
- int i73 = this.mContentTop;
- localRect1.top = i73;
- int i74 = this.mContentRight;
- localRect1.right = i74;
- int i75 = this.mContentBottom;
- localRect1.bottom = i75;
- int i76 = i16;
- int i77 = 16;
- int i81;
- if (i76 != i77)
- {
- int i78 = this.mDockLeft;
- localRect3.left = i78;
- localRect2.left = i78;
- int i79 = this.mDockTop;
- localRect3.top = i79;
- localRect2.top = i79;
- int i80 = this.mDockRight;
- localRect3.right = i80;
- localRect2.right = i80;
- i81 = this.mDockBottom;
- localRect3.bottom = i81;
- }
- int i91;
- for (localRect2.bottom = i81; ; localRect2.bottom = i91)
- {
- int i82 = i16;
- int i83 = 48;
- if (i82 == i83)
- break label1740;
- int i84 = this.mCurLeft;
- localRect4.left = i84;
- int i85 = this.mCurTop;
- localRect4.top = i85;
- int i86 = this.mCurRight;
- localRect4.right = i86;
- int i87 = this.mCurBottom;
- localRect4.bottom = i87;
- break;
- int i88 = this.mContentLeft;
- localRect3.left = i88;
- localRect2.left = i88;
- int i89 = this.mContentTop;
- localRect3.top = i89;
- localRect2.top = i89;
- int i90 = this.mContentRight;
- localRect3.right = i90;
- localRect2.right = i90;
- i91 = this.mContentBottom;
- localRect3.bottom = i91;
- }
- label1740: localRect4.set(localRect3);
- }
- }
- boolean needSensorRunningLp()
- {
- int i;
- if ((this.mCurrentAppOrientation == 4) || (this.mCurrentAppOrientation == 10) || (this.mCurrentAppOrientation == 7) || (this.mCurrentAppOrientation == 6))
- i = 1;
- while (true)
- {
- return i;
- if (((this.mCarDockEnablesAccelerometer) && (this.mDockMode == 2)) || ((this.mDeskDockEnablesAccelerometer) && (this.mDockMode == 1)))
- {
- i = 1;
- continue;
- }
- if (this.mAccelerometerDefault == 0)
- {
- i = 0;
- continue;
- }
- i = 1;
- }
- }
- public void notifyLidSwitchChanged(long paramLong, boolean paramBoolean)
- {
- if (paramBoolean);
- for (int i = 1; ; i = 0)
- {
- this.mLidOpen = i;
- boolean bool1 = this.mKeyguardMediator.doLidChangeTq(paramBoolean);
- updateRotation(1);
- if (!bool1)
- break;
- this.mKeyguardMediator.pokeWakelock();
- return;
- }
- if (keyguardIsShowingTq())
- {
- if (!paramBoolean)
- return;
- boolean bool2 = this.mKeyguardMediator.onWakeKeyWhenKeyguardShowingTq(26);
- return;
- }
- if (paramBoolean)
- {
- LocalPowerManager localLocalPowerManager1 = this.mPowerManager;
- long l1 = SystemClock.uptimeMillis();
- localLocalPowerManager1.userActivity(l1, 0, 1);
- return;
- }
- LocalPowerManager localLocalPowerManager2 = this.mPowerManager;
- long l2 = SystemClock.uptimeMillis();
- localLocalPowerManager2.userActivity(l2, 0, 0);
- }
- public boolean performHapticFeedbackLw(WindowManagerPolicy.WindowState paramWindowState, int paramInt, boolean paramBoolean)
- {
- int i;
- if (Settings.System.getInt(this.mContext.getContentResolver(), "haptic_feedback_enabled", 0) == 0)
- {
- i = 1;
- if ((paramBoolean) || ((i == 0) && (!this.mKeyguardMediator.isShowingAndNotHidden())))
- break label51;
- }
- for (int j = 0; ; j = 0)
- {
- return j;
- i = 0;
- break;
- label51: switch (paramInt)
- {
- default:
- case 0:
- case 1:
- case 3:
- case 10000:
- case 10001:
- }
- }
- long[] arrayOfLong = this.mLongPressVibePattern;
- label116: if (arrayOfLong.length == 1)
- {
- Vibrator localVibrator = this.mVibrator;
- long l = arrayOfLong[0];
- localVibrator.vibrate(l);
- }
- while (true)
- {
- j = 1;
- break;
- arrayOfLong = this.mVirtualKeyVibePattern;
- break label116;
- arrayOfLong = this.mKeyboardTapVibePattern;
- break label116;
- arrayOfLong = this.mSafeModeDisabledVibePattern;
- break label116;
- arrayOfLong = this.mSafeModeEnabledVibePattern;
- break label116;
- this.mVibrator.vibrate(arrayOfLong, -1);
- }
- }
- public int prepareAddWindowLw(WindowManagerPolicy.WindowState paramWindowState, WindowManager.LayoutParams paramLayoutParams)
- {
- switch (paramLayoutParams.type)
- {
- default:
- case 2000:
- case 2014:
- case 2017:
- case 2004:
- }
- while (true)
- {
- int i = 0;
- while (true)
- {
- return i;
- this.mContext.enforceCallingOrSelfPermission("android.permission.STATUS_BAR_SERVICE", "PhoneWindowManager");
- if (this.mStatusBar != null)
- {
- i = -1;
- continue;
- }
- this.mStatusBar = paramWindowState;
- break;
- this.mContext.enforceCallingOrSelfPermission("android.permission.STATUS_BAR_SERVICE", "PhoneWindowManager");
- boolean bool1 = this.mStatusBarPanels.add(paramWindowState);
- break;
- this.mContext.enforceCallingOrSelfPermission("android.permission.STATUS_BAR_SERVICE", "PhoneWindowManager");
- boolean bool2 = this.mStatusBarPanels.add(paramWindowState);
- break;
- if (this.mKeyguard == null)
- break label151;
- i = -1;
- }
- label151: this.mKeyguard = paramWindowState;
- }
- }
- // ERROR //
- boolean readHdmiState()
- {
- // Byte code:
- // 0: aconst_null
- // 1: astore_1
- // 2: new 1633 java/io/FileReader
- // 5: dup
- // 6: ldc_w 1635
- // 9: invokespecial 1636 java/io/FileReader:<init> (Ljava/lang/String;)V
- // 12: astore_2
- // 13: bipush 15
- // 15: istore_3
- // 16: iload_3
- // 17: newarray char
- // 19: astore 4
- // 21: aload_2
- // 22: aload 4
- // 24: invokevirtual 1640 java/io/FileReader:read ([C)I
- // 27: istore 5
- // 29: iload 5
- // 31: iconst_1
- // 32: if_icmple +54 -> 86
- // 35: iload 5
- // 37: iconst_1
- // 38: isub
- // 39: istore 6
- // 41: new 1346 java/lang/String
- // 44: dup
- // 45: aload 4
- // 47: iconst_0
- // 48: iload 6
- // 50: invokespecial 1643 java/lang/String:<init> ([CII)V
- // 53: invokestatic 1648 java/lang/Integer:parseInt (Ljava/lang/String;)I
- // 56: istore 7
- // 58: iload 7
- // 60: ifeq +20 -> 80
- // 63: iconst_1
- // 64: istore 8
- // 66: aload_2
- // 67: ifnull +7 -> 74
- // 70: aload_2
- // 71: invokevirtual 1651 java/io/FileReader:close ()V
- // 74: aload_2
- // 75: astore 9
- // 77: iload 8
- // 79: ireturn
- // 80: iconst_0
- // 81: istore 8
- // 83: goto -17 -> 66
- // 86: aload_2
- // 87: ifnull +7 -> 94
- // 90: aload_2
- // 91: invokevirtual 1651 java/io/FileReader:close ()V
- // 94: aload_2
- // 95: astore 10
- // 97: iconst_0
- // 98: istore 8
- // 100: goto -23 -> 77
- // 103: astore 11
- // 105: new 658 java/lang/StringBuilder
- // 108: dup
- // 109: invokespecial 659 java/lang/StringBuilder:<init> ()V
- // 112: ldc_w 1653
- // 115: invokevirtual 665 java/lang/StringBuilder:append (Ljava/lang/String;)Ljava/lang/StringBuilder;
- // 118: aload 11
- // 120: invokevirtual 698 java/lang/StringBuilder:append (Ljava/lang/Object;)Ljava/lang/StringBuilder;
- // 123: invokevirtual 669 java/lang/StringBuilder:toString ()Ljava/lang/String;
- // 126: astore 12
- // 128: ldc 97
- // 130: aload 12
- // 132: invokestatic 1654 android/util/Slog:d (Ljava/lang/String;Ljava/lang/String;)I
- // 135: istore 13
- // 137: aload_1
- // 138: ifnull +7 -> 145
- // 141: aload_1
- // 142: invokevirtual 1651 java/io/FileReader:close ()V
- // 145: iconst_0
- // 146: istore 8
- // 148: goto -71 -> 77
- // 151: astore 11
- // 153: new 658 java/lang/StringBuilder
- // 156: dup
- // 157: invokespecial 659 java/lang/StringBuilder:<init> ()V
- // 160: ldc_w 1653
- // 163: invokevirtual 665 java/lang/StringBuilder:append (Ljava/lang/String;)Ljava/lang/StringBuilder;
- // 166: aload 11
- // 168: invokevirtual 698 java/lang/StringBuilder:append (Ljava/lang/Object;)Ljava/lang/StringBuilder;
- // 171: invokevirtual 669 java/lang/StringBuilder:toString ()Ljava/lang/String;
- // 174: astore 14
- // 176: ldc 97
- // 178: aload 14
- // 180: invokestatic 1654 android/util/Slog:d (Ljava/lang/String;Ljava/lang/String;)I
- // 183: istore 15
- // 185: aload_1
- // 186: ifnull +7 -> 193
- // 189: aload_1
- // 190: invokevirtual 1651 java/io/FileReader:close ()V
- // 193: iconst_0
- // 194: istore 8
- // 196: goto -119 -> 77
- // 199: astore 16
- // 201: aload_1
- // 202: ifnull +7 -> 209
- // 205: aload_1
- // 206: invokevirtual 1651 java/io/FileReader:close ()V
- // 209: aload 16
- // 211: athrow
- // 212: astore 17
- // 214: goto -140 -> 74
- // 217: astore 18
- // 219: goto -125 -> 94
- // 222: astore 19
- // 224: goto -79 -> 145
- // 227: astore 20
- // 229: goto -36 -> 193
- // 232: astore 21
- // 234: goto -25 -> 209
- // 237: astore 16
- // 239: aload_2
- // 240: astore_1
- // 241: goto -40 -> 201
- // 244: astore 11
- // 246: aload_2
- // 247: astore_1
- // 248: goto -95 -> 153
- // 251: astore 11
- // 253: aload_2
- // 254: astore_1
- // 255: goto -150 -> 105
- //
- // Exception table:
- // from to target type
- // 2 13 103 java/io/IOException
- // 2 13 151 java/lang/NumberFormatException
- // 2 13 199 finally
- // 105 137 199 finally
- // 153 185 199 finally
- // 70 74 212 java/io/IOException
- // 90 94 217 java/io/IOException
- // 141 145 222 java/io/IOException
- // 189 193 227 java/io/IOException
- // 205 209 232 java/io/IOException
- // 16 58 237 finally
- // 16 58 244 java/lang/NumberFormatException
- // 16 58 251 java/io/IOException
- }
- void readLidState()
- {
- try
- {
- int i = this.mWindowManager.getSwitchState(0);
- if (i > 0)
- {
- this.mLidOpen = 1;
- return;
- }
- if (i == 0)
- {
- this.mLidOpen = 0;
- return;
- }
- }
- catch (RemoteException localRemoteException)
- {
- return;
- }
- this.mLidOpen = -1;
- }
- public void removeStartingWindow(IBinder paramIBinder, View paramView)
- {
- if (paramView == null)
- return;
- ((WindowManager)this.mContext.getSystemService("window")).removeView(paramView);
- }
- public void removeWindowLw(WindowManagerPolicy.WindowState paramWindowState)
- {
- if (this.mStatusBar == paramWindowState)
- {
- this.mStatusBar = null;
- return;
- }
- if (this.mKeyguard == paramWindowState)
- {
- this.mKeyguard = null;
- return;
- }
- boolean bool = this.mStatusBarPanels.remove(paramWindowState);
- }
- public int rotationForOrientationLw(int paramInt1, int paramInt2, boolean paramBoolean)
- {
- Object localObject1 = this.mLock;
- monitorenter;
- switch (paramInt1)
- {
- case 2:
- case 3:
- case 4:
- case 5:
- default:
- case 1:
- case 0:
- case 9:
- case 8:
- case 6:
- case 7:
- }
- try
- {
- if (this.mHdmiPlugged)
- monitorexit;
- while (true)
- {
- return i;
- int j = this.mPortraitRotation;
- monitorexit;
- i = j;
- continue;
- int k = this.mLandscapeRotation;
- monitorexit;
- i = k;
- continue;
- int m = this.mUpsideDownRotation;
- monitorexit;
- i = m;
- continue;
- int n = this.mSeascapeRotation;
- monitorexit;
- i = n;
- continue;
- int i1 = getCurrentLandscapeRotation(paramInt2);
- monitorexit;
- i = i1;
- continue;
- int i2 = getCurrentPortraitRotation(paramInt2);
- monitorexit;
- i = i2;
- continue;
- if (this.mLidOpen == 1)
- {
- int i3 = this.mLidOpenRotation;
- monitorexit;
- i = i3;
- continue;
- }
- if ((this.mDockMode == 2) && (this.mCarDockRotation >= 0))
- {
- int i4 = this.mCarDockRotation;
- monitorexit;
- i = i4;
- continue;
- }
- if ((this.mDockMode == 1) && (this.mDeskDockRotation >= 0))
- {
- int i5 = this.mDeskDockRotation;
- monitorexit;
- i = i5;
- continue;
- }
- if (this.mUserRotationMode == 1)
- {
- int i6 = this.mUserRotation;
- monitorexit;
- i = i6;
- continue;
- }
- if (!useSensorForOrientationLp(paramInt1))
- break;
- int i7 = this.mOrientationListener.getCurrentRotation(paramInt2);
- if ((i7 == 2) && (!this.mAllowAllRotations) && (paramInt1 != 10))
- {
- monitorexit;
- i = paramInt2;
- continue;
- }
- monitorexit;
- i = i7;
- }
- monitorexit;
- i = 0;
- }
- finally
- {
- int i;
- monitorexit;
- }
- }
- public void screenOnStoppedLw()
- {
- if (this.mKeyguardMediator.isShowingAndNotHidden())
- return;
- if (!this.mPowerManager.isScreenOn())
- return;
- long l = SystemClock.uptimeMillis();
- this.mPowerManager.userActivity(l, 0, 0);
- }
- public void screenTurnedOff(int paramInt)
- {
- int i = EventLog.writeEvent(70000, 0);
- this.mKeyguardMediator.onScreenTurnedOff(paramInt);
- synchronized (this.mLock)
- {
- this.mScreenOn = 0;
- updateOrientationListenerLp();
- updateLockScreenTimeout();
- return;
- }
- }
- public void screenTurnedOn()
- {
- int i = EventLog.writeEvent(70000, 1);
- this.mKeyguardMediator.onScreenTurnedOn();
- synchronized (this.mLock)
- {
- this.mScreenOn = 1;
- updateOrientationListenerLp();
- updateLockScreenTimeout();
- return;
- }
- }
- public int selectAnimationLw(WindowManagerPolicy.WindowState paramWindowState, int paramInt)
- {
- if ((paramInt == 5) && (paramWindowState.hasAppShownWindows()));
- for (int i = 17432593; ; i = 0)
- return i;
- }
- void sendCloseSystemWindows()
- {
- sendCloseSystemWindows(this.mContext, null);
- }
- void sendCloseSystemWindows(String paramString)
- {
- sendCloseSystemWindows(this.mContext, paramString);
- }
- void setAttachedWindowFrames(WindowManagerPolicy.WindowState paramWindowState1, int paramInt1, int paramInt2, WindowManagerPolicy.WindowState paramWindowState2, boolean paramBoolean, Rect paramRect1, Rect paramRect2, Rect paramRect3, Rect paramRect4)
- {
- int i = paramWindowState1.getSurfaceLayer();
- int j = this.mDockLayer;
- if (i > j)
- {
- int k = paramWindowState2.getSurfaceLayer();
- int m = this.mDockLayer;
- if (k < m)
- {
- int n = this.mDockLeft;
- paramRect4.left = n;
- paramRect3.left = n;
- paramRect2.left = n;
- int i1 = this.mDockTop;
- paramRect4.top = i1;
- paramRect3.top = i1;
- paramRect2.top = i1;
- int i2 = this.mDockRight;
- paramRect4.right = i2;
- paramRect3.right = i2;
- paramRect2.right = i2;
- int i3 = this.mDockBottom;
- paramRect4.bottom = i3;
- paramRect3.bottom = i3;
- paramRect2.bottom = i3;
- if ((paramInt1 & 0x100) != 0)
- break label418;
- }
- }
- label411: label418: for (Rect localRect1 = paramWindowState2.getFrameLw(); ; localRect1 = paramRect2)
- {
- paramRect1.set(localRect1);
- return;
- if (paramInt2 != 16)
- {
- Rect localRect2 = paramWindowState2.getDisplayFrameLw();
- paramRect3.set(localRect2);
- label198: if (!paramBoolean)
- break label411;
- }
- for (Rect localRect3 = paramWindowState2.getDisplayFrameLw(); ; localRect3 = paramRect3)
- {
- paramRect2.set(localRect3);
- Rect localRect4 = paramWindowState2.getVisibleFrameLw();
- paramRect4.set(localRect4);
- break;
- Rect localRect5 = paramWindowState2.getContentFrameLw();
- paramRect3.set(localRect5);
- int i4 = paramWindowState2.getSurfaceLayer();
- int i5 = this.mDockLayer;
- if (i4 >= i5)
- break label198;
- int i6 = paramRect3.left;
- int i7 = this.mContentLeft;
- if (i6 < i7)
- {
- int i8 = this.mContentLeft;
- paramRect3.left = i8;
- }
- int i9 = paramRect3.top;
- int i10 = this.mContentTop;
- if (i9 < i10)
- {
- int i11 = this.mContentTop;
- paramRect3.top = i11;
- }
- int i12 = paramRect3.right;
- int i13 = this.mContentRight;
- if (i12 > i13)
- {
- int i14 = this.mContentRight;
- paramRect3.right = i14;
- }
- int i15 = paramRect3.bottom;
- int i16 = this.mContentBottom;
- if (i15 <= i16)
- break label198;
- int i17 = this.mContentBottom;
- paramRect3.bottom = i17;
- break label198;
- }
- }
- }
- public void setCurrentOrientationLw(int paramInt)
- {
- synchronized (this.mLock)
- {
- int i = this.mCurrentAppOrientation;
- if (paramInt != i)
- {
- this.mCurrentAppOrientation = paramInt;
- updateOrientationListenerLp();
- }
- return;
- }
- }
- void setHdmiPlugged(boolean paramBoolean)
- {
- if (this.mHdmiPlugged == paramBoolean)
- return;
- this.mHdmiPlugged = paramBoolean;
- updateRotation(1);
- Intent localIntent1 = new Intent("android.intent.action.HDMI_PLUGGED");
- Intent localIntent2 = localIntent1.addFlags(268435456);
- Intent localIntent3 = localIntent1.putExtra("state", paramBoolean);
- this.mContext.sendStickyBroadcast(localIntent1);
- }
- public void setInitialDisplaySize(int paramInt1, int paramInt2)
- {
- int i;
- int m;
- label70: Resources localResources;
- if (paramInt1 > paramInt2)
- {
- i = paramInt2;
- this.mLandscapeRotation = 0;
- this.mSeascapeRotation = 2;
- if (this.mContext.getResources().getBoolean(17891341))
- {
- this.mPortraitRotation = 1;
- this.mUpsideDownRotation = 3;
- int j = i * 160;
- int k = DisplayMetrics.DENSITY_DEVICE;
- if (j / k >= 600)
- break label180;
- m = 1;
- this.mStatusBarCanHide = m;
- localResources = this.mContext.getResources();
- if (!this.mStatusBarCanHide)
- break label187;
- }
- }
- label180: label187: for (int n = 17104905; ; n = 17104906)
- {
- int i1 = localResources.getDimensionPixelSize(n);
- this.mStatusBarHeight = i1;
- return;
- this.mPortraitRotation = 3;
- this.mUpsideDownRotation = 1;
- break;
- i = paramInt1;
- this.mPortraitRotation = 0;
- this.mUpsideDownRotation = 2;
- if (this.mContext.getResources().getBoolean(17891341))
- {
- this.mLandscapeRotation = 3;
- this.mSeascapeRotation = 1;
- break;
- }
- this.mLandscapeRotation = 1;
- this.mSeascapeRotation = 3;
- break;
- m = 0;
- break label70;
- }
- }
- public void setUserRotationMode(int paramInt1, int paramInt2)
- {
- ContentResolver localContentResolver = this.mContext.getContentResolver();
- if (paramInt1 == 1)
- {
- boolean bool1 = Settings.System.putInt(localContentResolver, "user_rotation", paramInt2);
- boolean bool2 = Settings.System.putInt(localContentResolver, "accelerometer_rotation", 0);
- return;
- }
- boolean bool3 = Settings.System.putInt(localContentResolver, "accelerometer_rotation", 1);
- }
- void showGlobalActionsDialog()
- {
- if (this.mGlobalActions == null)
- {
- Context localContext = this.mContext;
- GlobalActions localGlobalActions1 = new GlobalActions(localContext);
- this.mGlobalActions = localGlobalActions1;
- }
- boolean bool1 = this.mKeyguardMediator.isShowingAndNotHidden();
- GlobalActions localGlobalActions2 = this.mGlobalActions;
- boolean bool2 = isDeviceProvisioned();
- localGlobalActions2.showDialog(bool1, bool2);
- if (!bool1)
- return;
- this.mKeyguardMediator.pokeWakelock();
- }
- void showOrHideRecentAppsDialog(int paramInt, boolean paramBoolean)
- {
- Handler localHandler = this.mHandler;
- PhoneWindowManager.5 local5 = new PhoneWindowManager.5(this, paramBoolean, paramInt);
- boolean bool = localHandler.post(local5);
- }
- void startDockOrHome()
- {
- Intent localIntent1 = createHomeDockIntent();
- if (localIntent1 != null)
- try
- {
- this.mContext.startActivity(localIntent1);
- return;
- }
- catch (ActivityNotFoundException localActivityNotFoundException)
- {
- }
- Context localContext = this.mContext;
- Intent localIntent2 = this.mHomeIntent;
- localContext.startActivity(localIntent2);
- }
- public int subWindowTypeToLayerLw(int paramInt)
- {
- int j;
- switch (paramInt)
- {
- default:
- String str = "Unknown sub-window type: " + paramInt;
- int i = Log.e("WindowManager", str);
- j = 0;
- case 1000:
- case 1003:
- case 1001:
- case 1004:
- case 1002:
- }
- while (true)
- {
- return j;
- j = 1;
- continue;
- j = -1;
- continue;
- j = -1;
- continue;
- j = 2;
- }
- }
- public void systemReady()
- {
- this.mKeyguardMediator.onSystemReady();
- SystemProperties.set("dev.bootcomplete", "1");
- synchronized (this.mLock)
- {
- updateOrientationListenerLp();
- this.mSystemReady = 1;
- Handler localHandler = this.mHandler;
- PhoneWindowManager.11 local11 = new PhoneWindowManager.11(this);
- boolean bool = localHandler.post(local11);
- return;
- }
- }
- void updateOrientationListenerLp()
- {
- if (!this.mOrientationListener.canDetectOrientation())
- return;
- int i = 1;
- if ((this.mScreenOn) && (needSensorRunningLp()))
- {
- i = 0;
- if (!this.mOrientationSensorEnabled)
- {
- this.mOrientationListener.enable();
- this.mOrientationSensorEnabled = 1;
- }
- }
- if (i == 0)
- return;
- if (!this.mOrientationSensorEnabled)
- return;
- this.mOrientationListener.disable();
- this.mOrientationSensorEnabled = 0;
- }
- void updateRotation(int paramInt)
- {
- LocalPowerManager localLocalPowerManager = this.mPowerManager;
- int i;
- if (this.mLidOpen == 1)
- i = 1;
- while (true)
- {
- localLocalPowerManager.setKeyboardVisibility(i);
- int k = 0;
- if (this.mHdmiPlugged)
- k = 0;
- try
- {
- while (true)
- {
- IWindowManager localIWindowManager = this.mWindowManager;
- int m = this.mFancyRotationAnimation | paramInt;
- localIWindowManager.setRotation(k, 1, m);
- return;
- int j = 0;
- break;
- if (this.mLidOpen == 1)
- {
- k = this.mLidOpenRotation;
- continue;
- }
- if ((this.mDockMode == 2) && (this.mCarDockRotation >= 0))
- {
- k = this.mCarDockRotation;
- continue;
- }
- if ((this.mDockMode != 1) || (this.mDeskDockRotation < 0))
- continue;
- k = this.mDeskDockRotation;
- }
- }
- catch (RemoteException localRemoteException)
- {
- }
- }
- }
- public void updateSettings()
- {
- ContentResolver localContentResolver = this.mContext.getContentResolver();
- int i = 0;
- PointerLocationView localPointerLocationView1 = null;
- Object localObject1 = null;
- while (true)
- {
- int i7;
- synchronized (this.mLock)
- {
- int j = Settings.System.getInt(localContentResolver, "end_button_behavior", 2);
- this.mEndcallBehavior = j;
- int k = Settings.Secure.getInt(localContentResolver, "incall_power_button_behavior", 1);
- this.mIncallPowerBehavior = k;
- if (Settings.System.getInt(localContentResolver, "fancy_rotation_anim", 0) != 0)
- {
- int m = 128;
- this.mFancyRotationAnimation = m;
- int i1 = Settings.System.getInt(localContentResolver, "accelerometer_rotation", 0);
- if (i1 != 0)
- break label505;
- m = 1;
- this.mUserRotationMode = m;
- int i2 = Settings.System.getInt(localContentResolver, "user_rotation", 0);
- this.mUserRotation = i2;
- if (this.mAccelerometerDefault == i1)
- continue;
- this.mAccelerometerDefault = i1;
- updateOrientationListenerLp();
- MyOrientationListener localMyOrientationListener = this.mOrientationListener;
- if (Settings.System.getInt(localContentResolver, "window_orientation_listener_log", 0) == 0)
- break label511;
- int i3 = 1;
- localMyOrientationListener.setLogEnabled(i3);
- if (!this.mSystemReady)
- continue;
- int i5 = Settings.System.getInt(localContentResolver, "pointer_location", 0);
- if (this.mPointerLocationMode == i5)
- continue;
- this.mPointerLocationMode = i5;
- if (i5 == 0)
- break label518;
- if (this.mPointerLocationView != null)
- continue;
- Context localContext = this.mContext;
- PointerLocationView localPointerLocationView2 = new PointerLocationView(localContext);
- this.mPointerLocationView = localPointerLocationView2;
- this.mPointerLocationView.setPrintCoords(0);
- localPointerLocationView1 = this.mPointerLocationView;
- int i6 = Settings.System.getInt(localContentResolver, "screen_off_timeout", 0);
- this.mLockScreenTimeout = i6;
- String str = Settings.Secure.getString(localContentResolver, "default_input_method");
- if ((str == null) || (str.length() <= 0))
- break label540;
- i7 = 1;
- if (this.mHasSoftInput == i7)
- continue;
- this.mHasSoftInput = i7;
- i = 1;
- if (i == 0)
- continue;
- updateRotation(0);
- if (localPointerLocationView1 != null)
- {
- WindowManager.LayoutParams localLayoutParams = new WindowManager.LayoutParams(-1, -1);
- localLayoutParams.type = 2015;
- localLayoutParams.flags = 280;
- localLayoutParams.format = -1;
- localLayoutParams.setTitle("PointerLocation");
- ((WindowManager)this.mContext.getSystemService("window")).addView(localPointerLocationView1, localLayoutParams);
- if (this.mPointerLocationInputChannel != null);
- }
- }
- }
- try
- {
- InputChannel localInputChannel1 = this.mWindowManager.monitorInput("PointerLocationView");
- this.mPointerLocationInputChannel = localInputChannel1;
- InputChannel localInputChannel2 = this.mPointerLocationInputChannel;
- InputHandler localInputHandler = this.mPointerLocationInputHandler;
- MessageQueue localMessageQueue = this.mHandler.getLooper().getQueue();
- InputQueue.registerInputChannel(localInputChannel2, localInputHandler, localMessageQueue);
- if (localObject1 == null)
- return;
- if (this.mPointerLocationInputChannel != null)
- {
- InputQueue.unregisterInputChannel(this.mPointerLocationInputChannel);
- this.mPointerLocationInputChannel.dispose();
- this.mPointerLocationInputChannel = null;
- }
- ((WindowManager)this.mContext.getSystemService("window")).removeView((View)localObject1);
- return;
- int n = 0;
- continue;
- label505: n = 0;
- continue;
- label511: int i4 = 0;
- continue;
- label518: localObject1 = this.mPointerLocationView;
- this.mPointerLocationView = null;
- continue;
- localObject3 = finally;
- monitorexit;
- throw localObject3;
- label540: i7 = 0;
- }
- catch (RemoteException localRemoteException)
- {
- while (true)
- int i8 = Slog.e("WindowManager", "Could not set up input monitoring channel for PointerLocation.", localRemoteException);
- }
- }
- }
- boolean useSensorForOrientationLp(int paramInt)
- {
- int i;
- if ((paramInt == 4) || (paramInt == 10) || (paramInt == 6) || (paramInt == 7))
- i = 1;
- while (true)
- {
- return i;
- if ((this.mAccelerometerDefault != 0) && ((paramInt == 2) || (paramInt == -1)))
- {
- i = 1;
- continue;
- }
- if (((this.mCarDockEnablesAccelerometer) && (this.mDockMode == 2)) || ((this.mDeskDockEnablesAccelerometer) && (this.mDockMode == 1) && ((paramInt == 2) || (paramInt == -1) || (paramInt == 5))))
- {
- i = 1;
- continue;
- }
- i = 0;
- }
- }
- public void userActivity()
- {
- synchronized (this.mScreenLockTimeout)
- {
- if (this.mLockScreenTimerActive)
- {
- Handler localHandler1 = this.mHandler;
- Runnable localRunnable2 = this.mScreenLockTimeout;
- localHandler1.removeCallbacks(localRunnable2);
- Handler localHandler2 = this.mHandler;
- Runnable localRunnable3 = this.mScreenLockTimeout;
- long l = this.mLockScreenTimeout;
- boolean bool = localHandler2.postDelayed(localRunnable3, l);
- }
- return;
- }
- }
- public int windowTypeToLayerLw(int paramInt)
- {
- int i;
- if ((paramInt >= 1) && (paramInt <= 99))
- i = 2;
- while (true)
- {
- return i;
- switch (paramInt)
- {
- default:
- String str = "Unknown window type: " + paramInt;
- int j = Log.e("WindowManager", str);
- i = 2;
- break;
- case 2000:
- i = 8;
- break;
- case 2014:
- i = 9;
- break;
- case 2017:
- i = 5;
- break;
- case 2008:
- i = 6;
- break;
- case 2001:
- i = 4;
- break;
- case 2002:
- i = 3;
- break;
- case 2004:
- i = 15;
- break;
- case 2009:
- i = 16;
- break;
- case 2003:
- i = 11;
- break;
- case 2010:
- i = 12;
- break;
- case 2011:
- i = 13;
- break;
- case 2012:
- i = 14;
- break;
- case 2006:
- i = 18;
- break;
- case 2015:
- i = 19;
- break;
- case 2007:
- i = 10;
- break;
- case 2005:
- i = 7;
- break;
- case 2013:
- i = 2;
- break;
- case 2016:
- i = 17;
- break;
- case 2018:
- i = 20;
- }
- }
- }
- class PassHeadsetKey
- implements Runnable
- {
- KeyEvent mKeyEvent;
- PassHeadsetKey(KeyEvent arg2)
- {
- Object localObject;
- this.mKeyEvent = localObject;
- }
- public void run()
- {
- if (!ActivityManagerNative.isSystemReady())
- return;
- Intent localIntent1 = new Intent("android.intent.action.MEDIA_BUTTON", null);
- KeyEvent localKeyEvent = this.mKeyEvent;
- Intent localIntent2 = localIntent1.putExtra("android.intent.extra.KEY_EVENT", localKeyEvent);
- Context localContext = PhoneWindowManager.this.mContext;
- BroadcastReceiver localBroadcastReceiver = PhoneWindowManager.this.mBroadcastDone;
- Handler localHandler = PhoneWindowManager.this.mHandler;
- String str = null;
- Bundle localBundle = null;
- localContext.sendOrderedBroadcast(localIntent1, null, localBroadcastReceiver, localHandler, -1, str, localBundle);
- }
- }
- class MyOrientationListener extends WindowOrientationListener
- {
- MyOrientationListener(Context arg2)
- {
- super();
- }
- public void onOrientationChanged(int paramInt)
- {
- try
- {
- IWindowManager localIWindowManager = PhoneWindowManager.this.mWindowManager;
- int i = PhoneWindowManager.this.mFancyRotationAnimation;
- localIWindowManager.setRotation(paramInt, 0, i);
- return;
- }
- catch (RemoteException localRemoteException)
- {
- }
- }
- }
- class SettingsObserver extends ContentObserver
- {
- SettingsObserver(Handler arg2)
- {
- super();
- }
- void observe()
- {
- ContentResolver localContentResolver = PhoneWindowManager.this.mContext.getContentResolver();
- Uri localUri1 = Settings.System.getUriFor("end_button_behavior");
- localContentResolver.registerContentObserver(localUri1, 0, this);
- Uri localUri2 = Settings.Secure.getUriFor("incall_power_button_behavior");
- localContentResolver.registerContentObserver(localUri2, 0, this);
- Uri localUri3 = Settings.System.getUriFor("accelerometer_rotation");
- localContentResolver.registerContentObserver(localUri3, 0, this);
- Uri localUri4 = Settings.System.getUriFor("user_rotation");
- localContentResolver.registerContentObserver(localUri4, 0, this);
- Uri localUri5 = Settings.System.getUriFor("screen_off_timeout");
- localContentResolver.registerContentObserver(localUri5, 0, this);
- Uri localUri6 = Settings.System.getUriFor("window_orientation_listener_log");
- localContentResolver.registerContentObserver(localUri6, 0, this);
- Uri localUri7 = Settings.System.getUriFor("pointer_location");
- localContentResolver.registerContentObserver(localUri7, 0, this);
- Uri localUri8 = Settings.Secure.getUriFor("default_input_method");
- localContentResolver.registerContentObserver(localUri8, 0, this);
- Uri localUri9 = Settings.System.getUriFor("fancy_rotation_anim");
- localContentResolver.registerContentObserver(localUri9, 0, this);
- PhoneWindowManager.this.updateSettings();
- }
- public void onChange(boolean paramBoolean)
- {
- PhoneWindowManager.this.updateSettings();
- try
- {
- IWindowManager localIWindowManager = PhoneWindowManager.this.mWindowManager;
- int i = PhoneWindowManager.this.mFancyRotationAnimation;
- localIWindowManager.setRotation(64536, 0, i);
- return;
- }
- catch (RemoteException localRemoteException)
- {
- }
- }
- }
- }
- /* Location: /home/bigrushdog/Desktop/music_mod/classes.dex.dex2jar.jar
- * Qualified Name: com.android.internal.policy.impl.PhoneWindowManager
- * JD-Core Version: 0.6.0
- */
Advertisement
Add Comment
Please, Sign In to add comment