Closed runningcode closed 5 years ago
Any updates on this?
@runningcode The current code shouldn't be creating a leak of the Activity
. curActivity
will be set to null
when the Activity
is stopped, paused, or destroyed. Code of where this is done linked below.
https://github.com/OneSignal/OneSignal-Android-SDK/blob/3.6.5/OneSignalSDK/onesignal/src/main/java/com/onesignal/ActivityLifecycleHandler.java#L79
https://github.com/OneSignal/OneSignal-Android-SDK/blob/3.6.5/OneSignalSDK/onesignal/src/main/java/com/onesignal/ActivityLifecycleHandler.java#L90
https://github.com/OneSignal/OneSignal-Android-SDK/blob/3.6.5/OneSignalSDK/onesignal/src/main/java/com/onesignal/ActivityLifecycleHandler.java#L101
The static analysis that the lint tool doesn't account for the logic above. However even in this case it should still be converted to a weak reference as the implementation is fragile to leaking with future code changes.
Let us know if you are detecting a leak at runtime and I can give this issue a higher priority.
Yes we are detecting a leak at runtime. Here is the stack trace from leak canary:
In com.telenor.capp.farmsupplies:2.0.1:2.
com.telenor.capp.farmsupplies.ui.main.categories_product_list.CategoriesProductListFragment has leaked:
GC ROOT static com.onesignal.ActivityLifecycleHandler.curActivity
references com.telenor.capp.farmsupplies.ui.main.MainActivity.mFragments
references android.support.v4.app.FragmentController.mHost
references android.support.v4.app.FragmentActivity$HostCallbacks.mFragmentManager
references android.support.v4.app.FragmentManagerImpl.mActive
references android.util.SparseArray.mValues
references array java.lang.Object[].[3]
references com.telenor.capp.farmsupplies.ui.main.categories_product_list.featured_product.FeaturedProductFragment.mContainer
references android.support.v4.view.ViewPager.mParent
references android.widget.FrameLayout.mParent
references android.widget.RelativeLayout.mSortedHorizontalChildren
references array android.view.View[].[3]
references android.widget.LinearLayout.mChildren
references array android.view.View[].[0]
references android.support.v7.widget.AppCompatButton.mListenerInfo
references android.view.View$ListenerInfo.mOnClickListener
references com.telenor.capp.farmsupplies.ui.main.categories_product_list.CategoriesProductListFragment$3.this$0 (anonymous implementation of android.view.View$OnClickListener)
leaks com.telenor.capp.farmsupplies.ui.main.categories_product_list.CategoriesProductListFragment instance
Retaining: 1.6 kB.
Reference Key: be31ad24-2896-4909-b8b0-d97efa127dc5
Device: samsung Verizon SM-G930V heroqltevzw
Android Version: 8.0.0 API: 26 LeakCanary: 1.5.4 74837f0
Durations: watch=5103ms, gc=320ms, heap dump=3022ms, analysis=36763ms
Details:
Class com.onesignal.ActivityLifecycleHandler | static $classOverhead = byte[117]@319597369 (0x130cab39) | static focusHandlerThread = com.onesignal.ActivityLifecycleHandler$FocusHandlerThread@319297872 (0x13081950) | static nextResumeIsFirstActivity = false | static curActivity = com.telenor.capp.farmsupplies.ui.main.MainActivity@320571840 (0x131b89c0) | static mActivityAvailableListener = null
Instance of com.telenor.capp.farmsupplies.ui.main.MainActivity | static TAG = java.lang.String@320456224 (0x1319c620) | static isDataLoaded = true | static $classOverhead = byte[4573]@320246017 (0x13169101) | static PERMISSIONS_REQUEST_ACCESS_CALL = 200 | static APP_SETTINGS_FOR_CALL = 10002 | binding = com.telenor.capp.farmsupplies.databinding.ActivityMainBindingImpl@320572160 (0x131b8b00) | call_perms = java.lang.String[1]@320572232 (0x131b8b48) | mPresenter = com.telenor.capp.farmsupplies.ui.main.MainActivityPresenter@320572248 (0x131b8b58) | number = null | encodedData = null | helper = null | isOnPauseCalled = false | mInstallerOpened = false | shouldShowRequestPermissionRationale = 2 | mDelegate = android.support.v7.app.AppCompatDelegateImplN@320572264 (0x131b8b68) | mResources = null | mThemeId = 2131755016 | mCreated = true | mFragments = android.support.v4.app.FragmentController@320572408 (0x131b8bf8) | mHandler = android.support.v4.app.FragmentActivity$1@320572424 (0x131b8c08) | mLoaderManager = null | mNextCandidateRequestIndex = 0 | mPendingFragmentActivityResults = android.support.v4.util.SparseArrayCompat@320572456 (0x131b8c28) | mReallyStopped = false | mRequestedPermissionsFromFragment = false | mResumed = true | mRetaining = false | mStopped = false | mViewModelStore = null | mStartedActivityFromFragment = false | mStartedIntentSenderFromFragment = false | mExtraDataMap = android.support.v4.util.SimpleArrayMap@320572480 (0x131b8c40) | mLifecycleRegistry = android.arch.lifecycle.LifecycleRegistry@320572504 (0x131b8c58) | mActionBar = null | mActionModeTypeStarting = 0 | mActivityInfo = android.content.pm.ActivityInfo@320572536 (0x131b8c78) | mActivityTransitionState = android.app.ActivityTransitionState@320572696 (0x131b8d18) | mAppLockCheckRunnable = android.app.Activity$1@320572752 (0x131b8d50) | mAppLockIsInMultiWindowMode = false | mApplication = com.telenor.capp.farmsupplies.FarmSuppliesApp@319452480 (0x130a7540) | mAutoFillResetNeeded = false | mAutofillManager = null | mAutofillPopupWindow = null | mCalled = true | mChangeCanvasToTranslucent = false | mChangingConfigurations = false | mComponent = android.content.ComponentName@320572768 (0x131b8d60) | mConfigChangeFlags = 0 | mCurrentConfig = android.content.res.Configuration@320572784 (0x131b8d70) | mDecor = com.android.internal.policy.DecorView@320572920 (0x131b8df8) | mDefaultKeyMode = 0 | mDefaultKeySsb = null | mDestroyed = false | mDoReportFullyDrawn = false | mEmbeddedID = null | mEnableDefaultActionBarUp = false | mEnterTransitionListener = android.app.SharedElementCallback$1@1883509968 (0x704414d0) | mExitTransitionListener = android.app.SharedElementCallback$1@1883509968 (0x704414d0) | mFinished = false | mFlipfont = 0 | mFragments = android.app.FragmentController@320573896 (0x131b91c8) | mHandler = android.os.Handler@320573912 (0x131b91d8) | mHasCurrentPermissionsRequest = false | mIdent = 206151978 | mInstanceTracker = android.os.StrictMode$InstanceTracker@320573944 (0x131b91f8) | mInstrumentation = android.app.Instrumentation@320397864 (0x1318e228) | mIntent = android.content.Intent@320573960 (0x131b9208) | mLastAutofillId = 1073741823 | mLastNonConfigurationInstances = null | mMainThread = android.app.ActivityThread@319292320 (0x130803a0) | mManagedCursors = java.util.ArrayList@320574040 (0x131b9258) | mManagedDialogs = null | mMenuInflater = null | mParent = null | mPolicyManager = null | mReferrer = java.lang.String@320574064 (0x131b9270) | mResultCode = 0 | mResultData = null | mResumed = true | mSearchEvent = null | mSearchManager = null | mStartedActivity = false | mStopped = false | mTaskDescription = android.app.ActivityManager$TaskDescription@320574112 (0x131b92a0) | mTemporaryPause = false | mTitle = java.lang.String@320382216 (0x1318a508) | mTitleColor = 0 | mTitleReady = true | mToken = android.os.BinderProxy@320574152 (0x131b92c8) | mTranslucentCallback = null | mUiThread = java.lang.Thread@1944935456 (0x73ed5c20) | mVisibleBehind = false | mVisibleFromClient = true | mVisibleFromServer = true | mVoiceInteractor = null | mWindow = com.android.internal.policy.PhoneWindow@320574184 (0x131b92e8) | mWindowAdded = true | mWindowManager = android.view.WindowManagerImpl@320574560 (0x131b9460) | mInflater = com.android.internal.policy.PhoneLayoutInflater@320574584 (0x131b9478) | mOverrideConfiguration = null | mResources = android.content.res.Resources@320574632 (0x131b94a8) | mTheme = android.content.res.Resources$Theme@320574680 (0x131b94d8) | mThemeResource = 2131755016 | mBase = android.app.ContextImpl@320574696 (0x131b94e8) | shadow$klass = com.telenor.capp.farmsupplies.ui.main.MainActivity | shadow$monitor = -1930395679
Instance of android.support.v4.app.FragmentController | static $classOverhead = byte[424]@320055889 (0x1313aa51) | mHost = android.support.v4.app.FragmentActivity$HostCallbacks@320658176 (0x131cdb00) | shadow$klass = android.support.v4.app.FragmentController | shadow$monitor = 0
Instance of android.support.v4.app.FragmentActivity$HostCallbacks | static $classOverhead = byte[272]@319841953 (0x131066a1) | this$0 = com.telenor.capp.farmsupplies.ui.main.MainActivity@320571840 (0x131b89c0) | mActivity = com.telenor.capp.farmsupplies.ui.main.MainActivity@320571840 (0x131b89c0) | mContext = com.telenor.capp.farmsupplies.ui.main.MainActivity@320571840 (0x131b89c0) | mFragmentManager = android.support.v4.app.FragmentManagerImpl@320658064 (0x131cda90) | mHandler = android.support.v4.app.FragmentActivity$1@320572424 (0x131b8c08) | mWindowAnimations = 0 | shadow$klass = android.support.v4.app.FragmentActivity$HostCallbacks | shadow$monitor = 0
Instance of android.support.v4.app.FragmentManagerImpl | static DECELERATE_QUINT = android.view.animation.DecelerateInterpolator@321259296 (0x13260720) | static USER_VISIBLE_HINT_TAG = java.lang.String@1885249048 (0x705e9e18) | static TAG = java.lang.String@1885029320 (0x705b43c8) | static DECELERATE_CUBIC = android.view.animation.DecelerateInterpolator@321259280 (0x13260710) | static ANIM_STYLE_CLOSE_ENTER = 3 | static VIEW_STATE_TAG = java.lang.String@1885249144 (0x705e9e78) | static ANIM_STYLE_CLOSE_EXIT = 4 | static TARGET_REQUEST_CODE_STATE_TAG = java.lang.String@1885248864 (0x705e9d60) | static ANIM_STYLE_FADE_EXIT = 6 | static DEBUG = false | static ANIM_STYLE_OPEN_ENTER = 1 | static ANIM_STYLE_FADE_ENTER = 5 | static ACCELERATE_CUBIC = android.view.animation.AccelerateInterpolator@321259232 (0x132606e0) | static TARGET_STATE_TAG = java.lang.String@1885248904 (0x705e9d88) | static $classOverhead = byte[973]@319631049 (0x130d2ec9) | static sAnimationListenerField = java.lang.reflect.Field@321259312 (0x13260730) | static ANIM_DUR = 220 | static ANIM_STYLE_OPEN_EXIT = 2 | static ACCELERATE_QUINT = android.view.animation.AccelerateInterpolator@321259256 (0x132606f8) | mActive = android.util.SparseArray@320658656 (0x131cdce0) | mAdded = java.util.ArrayList@320658680 (0x131cdcf8) | mAvailBackStackIndices = java.util.ArrayList@320658704 (0x131cdd10) | mBackStack = java.util.ArrayList@320658728 (0x131cdd28) | mBackStackChangeListeners = null | mBackStackIndices = java.util.ArrayList@320658752 (0x131cdd40) | mContainer = android.support.v4.app.FragmentActivity$HostCallbacks@320658176 (0x131cdb00) | mCreatedMenus = null | mCurState = 5 | mDestroyed = false | mExecCommit = android.support.v4.app.FragmentManagerImpl$1@320658776 (0x131cdd58) | mExecutingActions = false | mHavePendingDeferredStart = false | mHost = android.support.v4.app.FragmentActivity$HostCallbacks@320658176 (0x131cdb00) | mLifecycleCallbacks = java.util.concurrent.CopyOnWriteArrayList@320658792 (0x131cdd68) | mNeedMenuInvalidate = false | mNextFragmentIndex = 6 | mNoTransactionsBecause = null | mParent = null | mPendingActions = java.util.ArrayList@320658808 (0x131cdd78) | mPostponedTransactions = null | mPrimaryNav = null | mSavedNonConfig = null | mStateArray = null | mStateBundle = android.os.Bundle@320658832 (0x131cdd90) | mStateSaved = false | mStopped = false | mTmpAddedFragments = java.util.ArrayList@320658856 (0x131cdda8) | mTmpIsPop = java.util.ArrayList@320658880 (0x131cddc0) | mTmpRecords = java.util.ArrayList@320658904 (0x131cddd8) | shadow$klass = android.support.v4.app.FragmentManagerImpl | shadow$monitor = 1073741919
Instance of android.util.SparseArray | static $classOverhead = byte[252]@1884428817 (0x70521a11) | static DELETED = java.lang.Object@1883316968 (0x704122e8) | mGarbage = false | mKeys = int[11]@321005808 (0x132228f0) | mSize = 5 | mValues = java.lang.Object[11]@321005864 (0x13222928) | shadow$klass = android.util.SparseArray | shadow$monitor = 0
Array of java.lang.Object[] | [0] = com.telenor.capp.farmsupplies.ui.main.categories.CategoriesFragment@320659432 (0x131cdfe8) | [1] = com.bumptech.glide.manager.SupportRequestManagerFragment@320657768 (0x131cd968) | [2] = null | [3] = com.telenor.capp.farmsupplies.ui.main.categories_product_list.featured_product.FeaturedProductFragment@320659592 (0x131ce088) | [4] = com.telenor.capp.farmsupplies.ui.main.categories_product_list.featured_product.FeaturedProductFragment@320659744 (0x131ce120) | [5] = java.lang.Object@1883316968 (0x704122e8) | [6] = null | [7] = null | [8] = null | [9] = null | [10] = null
Instance of com.telenor.capp.farmsupplies.ui.main.categories_product_list.featured_product.FeaturedProductFragment | static $classOverhead = byte[1376]@320081145 (0x13140cf9) | static rating = 0 | static ARG_PRODUCT = java.lang.String@319534000 (0x130bb3b0) | binding = com.telenor.capp.farmsupplies.databinding.CustomImageSliderLayoutBindingImpl@320961912 (0x13217d78) | product = com.telenor.capp.farmsupplies.model.FeatureProduct@321001632 (0x132218a0) | doLog = true | mBaseActivity = com.telenor.capp.farmsupplies.ui.main.MainActivity@320571840 (0x131b89c0) | mAdded = true | mAnimationInfo = null | mArguments = android.os.Bundle@321001760 (0x13221920) | mBackStackNesting = 0 | mCalled = true | mChildFragmentManager = android.support.v4.app.FragmentManagerImpl@321001784 (0x13221938) | mChildNonConfig = null | mContainer = android.support.v4.view.ViewPager@320660272 (0x131ce330) | mContainerId = 2131296595 | mDeferStart = false | mDetached = false | mFragmentId = 2131296595 | mFragmentManager = android.support.v4.app.FragmentManagerImpl@320658064 (0x131cda90) | mFromLayout = false | mHasMenu = false | mHidden = false | mHiddenChanged = false | mHost = android.support.v4.app.FragmentActivity$HostCallbacks@320658176 (0x131cdb00) | mInLayout = false | mIndex = 3 | mInnerView = android.widget.RelativeLayout@320959712 (0x132174e0) | mIsCreated = true | mIsNewlyAdded = false | mLayoutInflater = com.android.internal.policy.PhoneLayoutInflater@321001896 (0x132219a8) | mLifecycleRegistry = android.arch.lifecycle.LifecycleRegistry@321001944 (0x132219d8) | mLoaderManager = null | mMenuVisible = true | mParentFragment = null | mPerformedCreateView = true | mPostponedAlpha = 0.0 | mRemoving = false | mRestored = false | mRetainInstance = false | mRetaining = false | mSavedFragmentState = null | mSavedUserVisibleHint = null | mSavedViewState = null | mState = 5 | mTag = null | mTarget = null | mTargetIndex = -1 | mTargetRequestCode = 0 | mUserVisibleHint = true | mView = android.widget.RelativeLayout@320959712 (0x132174e0) | mViewModelStore = null | mWho = java.lang.String@321001976 (0x132219f8) | shadow$klass = com.telenor.capp.farmsupplies.ui.main.categories_product_list.featured_product.FeaturedProductFragment | shadow$monitor = 0
Instance of android.support.v4.view.ViewPager | static DRAW_ORDER_REVERSE = 2 | static SCROLL_STATE_SETTLING = 2 | static TAG = java.lang.String@319522584 (0x130b8718) | static MAX_SETTLE_DURATION = 600 | static DEFAULT_GUTTER_SIZE = 16 | static INVALID_POINTER = -1 | static sPositionComparator = android.support.v4.view.ViewPager$ViewPositionComparator@321218248 (0x132566c8) | static DEFAULT_OFFSCREEN_PAGES = 1 | static DRAW_ORDER_FORWARD = 1 | static DEBUG = false | static SCROLL_STATE_DRAGGING = 1 | static USE_CACHE = false | static MIN_DISTANCE_FOR_FLING = 25 | static COMPARATOR = android.support.v4.view.ViewPager$1@321218224 (0x132566b0) | static MIN_FLING_VELOCITY = 400 | static $classOverhead = byte[8482]@319776529 (0x130f6711) | static LAYOUT_ATTRS = int[1]@321218232 (0x132566b8) | static sInterpolator = android.support.v4.view.ViewPager$2@320997616 (0x132208f0) | static DRAW_ORDER_DEFAULT = 0 | static CLOSE_ENOUGH = 2 | static SCROLL_STATE_IDLE = 0 | mActivePointerId = -1 | mAdapter = com.telenor.capp.farmsupplies.ui.main.categories_product_list.CategoriesFeatureProductViewPagerAdapter@320741992 (0x131e2268) | mAdapterChangeListeners = null | mBottomPageBounds = 816 | mCalledSuper = true | mChildHeightMeasureSpec = 1073742640 | mChildWidthMeasureSpec = 1073743264 | mCloseEnough = 8 | mCurItem = 0 | mDecorChildCount = 0 | mDefaultGutterSize = 64 | mDrawingOrder = 0 | mDrawingOrderedChildren = null | mEndScrollRunnable = android.support.v4.view.ViewPager$3@320742040 (0x131e2298) | mExpectedAdapterCount = 4 | mFakeDragBeginTime = 0 | mFakeDragging = false | mFirstLayout = false | mFirstOffset = 0.0 | mFlingDistance = 100 | mGutterSize = 64 | mInLayout = false | mInitialMotionX = 577.6172 | mInitialMotionY = 443.75 | mInternalPageChangeListener = null | mIsBeingDragged = false | mIsScrollStarted = true | mIsUnableToDrag = false | mItems = java.util.ArrayList@320742056 (0x131e22a8) | mLastMotionX = 577.6172 | mLastMotionY = 443.75 | mLastOffset = 3.4028235E38 | mLeftEdge = android.widget.EdgeEffect@320742080 (0x131e22c0) | mMarginDrawable = null | mMaximumVelocity = 32000 | mMinimumVelocity = 1600 | mNeedCalculatePageOffsets = false | mObserver = android.support.v4.view.ViewPager$PagerObserver@320742216 (0x131e2348) | mOffscreenPageLimit = 1 | mOnPageChangeListener = null | mOnPageChangeListeners = java.util.ArrayList@320742232 (0x131e2358) | mPageMargin = 0 | mPageTransformer = null | mPageTransformerLayerType = 0 | mPopulatePending = false | mRestoredAdapterState = null | mRestoredClassLoader = null | mRestoredCurItem = -1 | mRightEdge = android.widget.EdgeEffect@320742256 (0x131e2370) | mScrollState = 0 | mScroller = android.widget.Scroller@320742392 (0x131e23f8) | mScrollingCacheEnabled = false | mTempItem = android.support.v4.view.ViewPager$ItemInfo@320742504 (0x131e2468) | mTempRect = android.graphics.Rect@320742536 (0x131e2488) | mTopPageBounds = 0 | mTouchSlop = 64 | mVelocityTracker = null | mAnimationListener = null | mCachePaint = null | mChildCountWithTransientState = 0 | mChildTransformation = null | mChildren = android.view.View[12]@320742560 (0x131e24a0) | mChildrenCount = 2 | mChildrenInterestedInDrag = null | mCurrentDragChild = null | mCurrentDragStartEvent = null | mDefaultFocus = null | mDisappearingChildren = null | mFirstHoverTarget = null | mFirstTouchTarget = null | mFocused = null | mFocusedInCluster = null | mGroupFlags = 2375763 | mHoveredSelf = false | mInvalidateRegion = null | mInvalidationTransformation = null | mIsInterestedInDrag = false | mLastTouchDownIndex = 0 | mLastTouchDownTime = 117656975 | mLastTouchDownX = 577.6172 | mLastTouchDownY = 443.75 | mLayoutAnimationController = null | mLayoutCalledWhileSuppressed = false | mLayoutMode = -1 | mLayoutTransitionListener = android.view.ViewGroup$2@320742624 (0x131e24e0) | mLocalPoint = null | mNestedScrollAxes = 0 | mOnHierarchyChangeListener = null | mPersistentDrawingCache = 2 | mPreSortedChildren = null | mSemHorizontalScrollbarRectRelativePosX = 0 | mSemVerticalScrollbarRectRelativePosY = 0 | mSemX = 577.6172 | mSemY = 443.75 | mSuppressLayout = false | mTempPoint = float[2]@320742640 (0x131e24f0) | mTooltipHoverTarget = null | mTooltipHoveredSelf = false | mTransientIndices = null | mTransientViews = null | mTransition = null | mTransitioningViews = null | mVisibilityChangingChildren = null | isPenSideButton = false | mAccessibilityCursorPosition = -1 | mAccessibilityDelegate = android.support.v4.view.AccessibilityDelegateCompat$AccessibilityDelegateApi16Impl$1@320742664 (0x131e2508) | mAccessibilityTraversalAfterId = -1 | mAccessibilityTraversalBeforeId = -1 | mAccessibilityViewId = -1 | mAnimator = null | mAttachInfo = null | mAttributes = null | mAutofillHints = null | mAutofillId = null | mAutofillViewId = -1 | mBackground = null | mBackgroundRenderNode = null | mBackgroundResource = 0 | mBackgroundSizeChanged = true | mBackgroundTint = null | mBottom = 816 | mCachingFailed = false | mClipBounds = null | mContentDescription = null | mContext = com.telenor.capp.farmsupplies.ui.main.MainActivity@320571840 (0x131b89c0) | mCurrentAnimation = null | mDefaultFocusHighlight = null | mDefaultFocusHighlightCache = null | mDefaultFocusHighlightEnabled = true | mDefaultFocusHighlightSizeChanged = true | mDirectPenInput = null | mDisablePenGestureforfactorytest = true | mDrawableState = int[3]@1883853640 (0x70495348) | mDrawingCache = null | mDrawingCacheBackgroundColor = 0 | mFloatingTreeObserver = null | mForegroundInfo = null | mFrameMetricsObservers = null | mGhostView = null | mHasPerformedLongPress = false | mHoverPopup = null | mHoverPopupToolTypeByApp = 0 | mHoverPopupType = 0 | mID = 2131296595 | mIgnoreNextUpEvent = false | mImageFilterBridge = null | mInContextButtonPress = false | mInputEventConsistencyVerifier = null | mIsCiqEnabled = false | mIsDetachedFromWindow = false | mIsDirectPenInputEnabled = false | mIsSetFingerHovedInAppWidget = true | mKeyedTags = null | mLabelForId = -1 | mLastIsOpaque = false | mLayerPaint = null | mLayerType = 0 | mLayoutInsets = null | mLayoutParams = android.widget.FrameLayout$LayoutParams@320742680 (0x131e2518) | mLeft = 0 | mLeftPaddingDefined = false | mListenerInfo = android.view.View$ListenerInfo@320742736 (0x131e2550) | mLongClickX = NaN | mLongClickY = NaN | mMatchIdPredicate = null | mMatchLabelForPredicate = null | mMeasureCache = android.util.LongSparseLongArray@320742808 (0x131e2598) | mMeasuredHeight = 816 | mMeasuredWidth = 1440 | mMinHeight = 0 | mMinWidth = 0 | mNeededToChangedScrollBarPosition = false | mNestedScrollingParent = null | mNextClusterForwardId = -1 | mNextFocusDownId = -1 | mNextFocusForwardId = -1 | mNextFocusLeftId = -1 | mNextFocusRightId = -1 | mNextFocusUpId = -1 | mOldHeightMeasureSpec = 1073742640 | mOldWidthMeasureSpec = 1073743264 | mOutlineProvider = android.view.ViewOutlineProvider$1@1883549984 (0x7044b120) | mOverScrollMode = 1 | mOverlay = null | mPaddingBottom = 0 | mPaddingLeft = 0 | mPaddingRight = 0 | mPaddingTop = 0 | mParent = android.widget.FrameLayout@320742832 (0x131e25b0) | mPendingCheckForLongPress = null | mPendingCheckForTap = null | mPerformClick = null | mPointerIcon = null | mPrivateFlags = 19007536 | mPrivateFlags2 = 1611867688 | mPrivateFlags3 = 0 | mRecreateDisplayList = false | mRenderNode = android.view.RenderNode@320743552 (0x131e2880) | mRenderNodeImageFilter = null | mRenderNodeImageFilterClipRects = java.util.ArrayList@320743576 (0x131e2898) | mResources = android.content.res.Resources@320574632 (0x131b94a8) | mRight = 1440 | mRightPaddingDefined = false | mRoundScrollbarRenderer = null | mRunQueue = android.view.HandlerActionQueue@320743600 (0x131e28b0) | mScrollBarPositionPadding = 0 | mScrollCache = null | mScrollIndicatorDrawable = null | mScrollX = 0 | mScrollY = 0 | mSemHorizontalScrollbarRect = android.graphics.Rect@320743616 (0x131e28c0) | mSemScrollingByScrollbar = false | mSemScrollingVertical = true | mSemVerticalScrollbarRect = android.graphics.Rect@320743640 (0x131e28d8) | mSendViewScrolledAccessibilityEvent = null | mSendViewStateChangedAccessibilityEvent = null | mSendingHoverAccessibilityEvents = false | mSmartClipDataExtractionListener = null | mSmartClipDataTag = null | mStartActivityRequestWho = null | mStateListAnimator = null | mSystemUiVisibility = 0 | mTag = null | mTempNestedScrollConsumed = null | mTooltipInfo = null | mTop = 0 | mTouchDelegate = null | mTouchSlop = 32 | mTouchwizFlags = 0 | mTransformationInfo = null | mTransientStateCount = 0 | mTransitionName = null | mTwExtraPaddingBottomForPreference = 0 | mTwHorizontalScrollbarPosition = 0 | mUnscaledDrawingCache = null | mUnsetPressedState = null | mUserPaddingBottom = 0 | mUserPaddingEnd = -2147483648 | mUserPaddingLeft = 0 | mUserPaddingLeftInitial = 0 | mUserPaddingRight = 0 | mUserPaddingRightInitial = 0 | mUserPaddingStart = -2147483648 | mVerticalScrollFactor = 0.0 | mVerticalScrollbarPosition = 0 | mViewFlags = 402653185 | mVisibilityChangeForAutofillHandler = null | mWindowAttachCount = 1 | shadow$klass = android.support.v4.view.ViewPager | shadow$monitor = 0
Instance of android.widget.FrameLayout | static $classOverhead = byte[8124]@1884341825 (0x7050c641) | static DEFAULT_CHILD_GRAVITY = 8388659 | mForegroundPaddingBottom = 0 | mForegroundPaddingLeft = 0 | mForegroundPaddingRight = 0 | mForegroundPaddingTop = 0 | mMatchParentChildren = java.util.ArrayList@320743664 (0x131e28f0) | mMeasureAllChildren = false | mAnimationListener = null | mCachePaint = null | mChildCountWithTransientState = 0 | mChildTransformation = null | mChildren = android.view.View[12]@320743688 (0x131e2908) | mChildrenCount = 3 | mChildrenInterestedInDrag = null | mCurrentDragChild = null | mCurrentDragStartEvent = null | mDefaultFocus = null | mDisappearingChildren = null | mFirstHoverTarget = null | mFirstTouchTarget = null | mFocused = null | mFocusedInCluster = null | mGroupFlags = 2244691 | mHoveredSelf = false | mInvalidateRegion = null | mInvalidationTransformation = null | mIsInterestedInDrag = false | mLastTouchDownIndex = 0 | mLastTouchDownTime = 117656975 | mLastTouchDownX = 577.6172 | mLastTouchDownY = 443.75 | mLayoutAnimationController = null | mLayoutCalledWhileSuppressed = false | mLayoutMode = -1 | mLayoutTransitionListener = android.view.ViewGroup$2@320743752 (0x131e2948) | mLocalPoint = null | mNestedScrollAxes = 0 | mOnHierarchyChangeListener = null | mPersistentDrawingCache = 2 | mPreSortedChildren = null | mSemHorizontalScrollbarRectRelativePosX = 0 | mSemVerticalScrollbarRectRelativePosY = 0 | mSemX = 577.6172 | mSemY = 443.75 | mSuppressLayout = false | mTempPoint = float[2]@320743768 (0x131e2958) | mTooltipHoverTarget = null | mTooltipHoveredSelf = false | mTransientIndices = null | mTransientViews = null | mTransition = null | mTransitioningViews = null | mVisibilityChangingChildren = null | isPenSideButton = false | mAccessibilityCursorPosition = -1 | mAccessibilityDelegate = null | mAccessibilityTraversalAfterId = -1 | mAccessibilityTraversalBeforeId = -1 | mAccessibilityViewId = -1 | mAnimator = null | mAttachInfo = null | mAttributes = null | mAutofillHints = null | mAutofillId = null | mAutofillViewId = -1 | mBackground = null | mBackgroundRenderNode = null | mBackgroundResource = 0 | mBackgroundSizeChanged = true | mBackgroundTint = null | mBottom = 1040 | mCachingFailed = false | mClipBounds = null | mContentDescription = null | mContext = com.telenor.capp.farmsupplies.ui.main.MainActivity@320571840 (0x131b89c0) | mCurrentAnimation = null | mDefaultFocusHighlight = null | mDefaultFocusHighlightCache = null | mDefaultFocusHighlightEnabled = true | mDefaultFocusHighlightSizeChanged = true | mDirectPenInput = null | mDisablePenGestureforfactorytest = true | mDrawableState = int[3]@1883853640 (0x70495348) | mDrawingCache = null | mDrawingCacheBackgroundColor = 0 | mFloatingTreeObserver = null | mForegroundInfo = null | mFrameMetricsObservers = null | mGhostView = null | mHasPerformedLongPress = false | mHoverPopup = null | mHoverPopupToolTypeByApp = 0 | mHoverPopupType = 0 | mID = 2131296344 | mIgnoreNextUpEvent = false | mImageFilterBridge = null | mInContextButtonPress = false | mInputEventConsistencyVerifier = null | mIsCiqEnabled = false | mIsDetachedFromWindow = false | mIsDirectPenInputEnabled = false | mIsSetFingerHovedInAppWidget = true | mKeyedTags = null | mLabelForId = -1 | mLastIsOpaque = false | mLayerPaint = null | mLayerType = 0 | mLayoutInsets = null | mLayoutParams = android.widget.RelativeLayout$LayoutParams@320743792 (0x131e2970) | mLeft = 0 | mLeftPaddingDefined = false | mListenerInfo = null | mLongClickX = NaN | mLongClickY = NaN | mMatchIdPredicate = null | mMatchLabelForPredicate = null | mMeasureCache = android.util.LongSparseLongArray@320743872 (0x131e29c0) | mMeasuredHeight = 816 | mMeasuredWidth = 1440 | mMinHeight = 0 | mMinWidth = 0 | mNeededToChangedScrollBarPosition = false | mNestedScrollingParent = null | mNextClusterForwardId = -1 | mNextFocusDownId = -1 | mNextFocusForwardId = -1 | mNextFocusLeftId = -1 | mNextFocusRightId = -1 | mNextFocusUpId = -1 | mOldHeightMeasureSpec = -2147481408 | mOldWidthMeasureSpec = 1073743264 | mOutlineProvider = android.view.ViewOutlineProvider$1@1883549984 (0x7044b120) | mOverScrollMode = 1 | mOverlay = null | mPaddingBottom = 0 | mPaddingLeft = 0 | mPaddingRight = 0 | mPaddingTop = 0 | mParent = android.widget.RelativeLayout@320743896 (0x131e29d8) | mPendingCheckForLongPress = null | mPendingCheckForTap = null | mPerformClick = null | mPointerIcon = null | mPrivateFlags = 19007664 | mPrivateFlags2 = 1610819104 | mPrivateFlags3 = 0 | mRecreateDisplayList = false | mRenderNode = android.view.RenderNode@320744640 (0x131e2cc0) | mRenderNodeImageFilter = null | mRenderNodeImageFilterClipRects = java.util.ArrayList@320744664 (0x131e2cd8) | mResources = android.content.res.Resources@320574632 (0x131b94a8) | mRight = 1440 | mRightPaddingDefined = false | mRoundScrollbarRenderer = null | mRunQueue = null | mScrollBarPositionPadding = 0 | mScrollCache = null | mScrollIndicatorDrawable = null | mScrollX = 0 | mScrollY = 0 | mSemHorizontalScrollbarRect = android.graphics.Rect@320744688 (0x131e2cf0) | mSemScrollingByScrollbar = false | mSemScrollingVertical = true | mSemVerticalScrollbarRect = android.graphics.Rect@320744712 (0x131e2d08) | mSendViewScrolledAccessibilityEvent = null | mSendViewStateChangedAccessibilityEvent = null | mSendingHoverAccessibilityEvents = false | mSmartClipDataExtractionListener = null | mSmartClipDataTag = null | mStartActivityRequestWho = null | mStateListAnimator = null | mSystemUiVisibility = 0 | mTag = null | mTempNestedScrollConsumed = null | mTooltipInfo = null | mTop = 224 | mTouchDelegate = null | mTouchSlop = 32 | mTouchwizFlags = 0 | mTransformationInfo = null | mTransientStateCount = 0 | mTransitionName = null | mTwExtraPaddingBottomForPreference = 0 | mTwHorizontalScrollbarPosition = 0 | mUnscaledDrawingCache = null | mUnsetPressedState = null | mUserPaddingBottom = 0 | mUserPaddingEnd = -2147483648 | mUserPaddingLeft = 0 | mUserPaddingLeftInitial = 0 | mUserPaddingRight = 0 | mUserPaddingRightInitial = 0 | mUserPaddingStart = -2147483648 | mVerticalScrollFactor = 0.0 | mVerticalScrollbarPosition = 0 | mViewFlags = 402653328 | mVisibilityChangeForAutofillHandler = null | mWindowAttachCount = 1 | shadow$klass = android.widget.FrameLayout | shadow$monitor = 0
Instance of android.widget.RelativeLayout | static ALIGN_PARENT_LEFT = 9 | static CENTER_HORIZONTAL = 14 | static ALIGN_BOTTOM = 8 | static TRUE = -1 | static ALIGN_PARENT_RIGHT = 11 | static RULES_HORIZONTAL = int[8]@1883828832 (0x7048f260) | static VALUE_NOT_SET = -2147483648 | static ALIGN_END = 19 | static ALIGN_TOP = 6 | static ALIGN_LEFT = 5 | static ALIGN_RIGHT = 7 | static ALIGN_PARENT_START = 20 | static CENTER_IN_PARENT = 13 | static ALIGN_PARENT_END = 21 | static LEFT_OF = 0 | static BELOW = 3 | static ALIGN_PARENT_TOP = 10 | static RULES_VERTICAL = int[5]@1883828880 (0x7048f290) | static ABOVE = 2 | static ALIGN_START = 18 | static VERB_COUNT = 22 | static START_OF = 16 | static ALIGN_PARENT_BOTTOM = 12 | static CENTER_VERTICAL = 15 | static DEFAULT_WIDTH = 65536 | static $classOverhead = byte[8216]@1884252201 (0x704f6829) | static ALIGN_BASELINE = 4 | static END_OF = 17 | static RIGHT_OF = 1 | mAllowBrokenMeasureSpecs = false | mBaselineView = android.support.design.widget.AppBarLayout@320744736 (0x131e2d20) | mContentBounds = android.graphics.Rect@320745528 (0x131e3038) | mDirtyHierarchy = false | mGraph = android.widget.RelativeLayout$DependencyGraph@320745552 (0x131e3050) | mGravity = 8388659 | mIgnoreGravity = -1 | mMeasureVerticalWithPaddingMargin = true | mSelfBounds = android.graphics.Rect@320745576 (0x131e3068) | mSortedHorizontalChildren = android.view.View[6]@320745600 (0x131e3080) | mSortedVerticalChildren = android.view.View[6]@320745640 (0x131e30a8) | mTopToBottomLeftToRightSet = null | mAnimationListener = null | mCachePaint = null | mChildCountWithTransientState = 0 | mChildTransformation = null | mChildren = android.view.View[12]@320745680 (0x131e30d0) | mChildrenCount = 6 | mChildrenInterestedInDrag = null | mCurrentDragChild = null | mCurrentDragStartEvent = null | mDefaultFocus = null | mDisappearingChildren = null | mFirstHoverTarget = null | mFirstTouchTarget = null | mFocused = null | mFocusedInCluster = null | mGroupFlags = 2244691 | mHoveredSelf = false | mInvalidateRegion = null | mInvalidationTransformation = null | mIsInterestedInDrag = false | mLastTouchDownIndex = 5 | mLastTouchDownTime = 117765907 | mLastTouchDownX = 130.42969 | mLastTouchDownY = 138.375 | mLayoutAnimationController = null | mLayoutCalledWhileSuppressed = false | mLayoutMode = -1 | mLayoutTransitionListener = android.view.ViewGroup$2@320745744 (0x131e3110) | mLocalPoint = null | mNestedScrollAxes = 0 | mOnHierarchyChangeListener = null | mPersistentDrawingCache = 2 | mPreSortedChildren = java.util.ArrayList@320745760 (0x131e3120) | mSemHorizontalScrollbarRectRelativePosX = 0 | mSemVerticalScrollbarRectRelativePosY = 0 | mSemX = 130.42969 | mSemY = 138.375 | mSuppressLayout = false | mTempPoint = float[2]@320745784 (0x131e3138) | mTooltipHoverTarget = null | mTooltipHoveredSelf = false | mTransientIndices = null | mTransientViews = null | mTransition = null | mTransitioningViews = null | mVisibilityChangingChildren = null | isPenSideButton = false | mAccessibilityCursorPosition = -1 | mAccessibilityDelegate = null | mAccessibilityTraversalAfterId = -1 | mAccessibilityTraversalBeforeId = -1 | mAccessibilityViewId = -1 | mAnimator = null | mAttachInfo = null | mAttributes = null | mAutofillHints = null | mAutofillId = null | mAutofillViewId = -1 | mBackground = android.graphics.drawable.ColorDrawable@320745808 (0x131e3150) | mBackgroundRenderNode = android.view.RenderNode@320745864 (0x131e3188) | mBackgroundResource = 0 | mBackgroundSizeChanged = false | mBackgroundTint = null | mBottom = 2464 | mCachingFailed = false | mClipBounds = null | mContentDescription = null | mContext = com.telenor.capp.farmsupplies.ui.main.MainActivity@320571840 (0x131b89c0) | mCurrentAnimation = null | mDefaultFocusHighlight = null | mDefaultFocusHighlightCache = null | mDefaultFocusHighlightEnabled = true | mDefaultFocusHighlightSizeChanged = true | mDirectPenInput = null | mDisablePenGestureforfactorytest = true | mDrawableState = int[3]@1883853640 (0x70495348) | mDrawingCache = null | mDrawingCacheBackgroundColor = 0 | mFloatingTreeObserver = null | mForegroundInfo = null | mFrameMetricsObservers = null | mGhostView = null | mHasPerformedLongPress = false | mHoverPopup = null | mHoverPopupToolTypeByApp = 0 | mHoverPopupType = 0 | mID = -1 | mIgnoreNextUpEvent = false | mImageFilterBridge = null | mInContextButtonPress = false | mInputEventConsistencyVerifier = null | mIsCiqEnabled = false | mIsDetachedFromWindow = false | mIsDirectPenInputEnabled = false | mIsSetFingerHovedInAppWidget = true | mKeyedTags = android.util.SparseArray@320745888 (0x131e31a0) | mLabelForId = -1 | mLastIsOpaque = true | mLayerPaint = null | mLayerType = 0 | mLayoutInsets = null | mLayoutParams = android.widget.FrameLayout$LayoutParams@320745912 (0x131e31b8) | mLeft = 0 | mLeftPaddingDefined = false | mListenerInfo = null | mLongClickX = NaN | mLongClickY = NaN | mMatchIdPredicate = null | mMatchLabelForPredicate = null | mMeasureCache = android.util.LongSparseLongArray@320745968 (0x131e31f0) | mMeasuredHeight = 2464 | mMeasuredWidth = 1440 | mMinHeight = 0 | mMinWidth = 0 | mNeededToChangedScrollBarPosition = false | mNestedScrollingParent = null | mNextClusterForwardId = -1 | mNextFocusDownId = -1 | mNextFocusForwardId = -1 | mNextFocusLeftId = -1 | mNextFocusRightId = -1 | mNextFocusUpId = -1 | mOldHeightMeasureSpec = 1073744288 | mOldWidthMeasureSpec = 1073743264 | mOutlineProvider = android.view.ViewOutlineProvider$1@1883549984 (0x7044b120) | mOverScrollMode = 1 | mOverlay = null | mPaddingBottom = 0 | mPaddingLeft = 0 | mPaddingRight = 0 | mPaddingTop = 0 | mParent = null | mPendingCheckForLongPress = null | mPendingCheckForTap = null | mPerformClick = null | mPointerIcon = null | mPrivateFlags = -2120153040 | mPrivateFlags2 = 1610819112 | mPrivateFlags3 = 2 | mRecreateDisplayList = false | mRenderNode = android.view.RenderNode@320745992 (0x131e3208) | mRenderNodeImageFilter = null | mRenderNodeImageFilterClipRects = java.util.ArrayList@320746016 (0x131e3220) | mResources = android.content.res.Resources@320574632 (0x131b94a8) | mRight = 1440 | mRightPaddingDefined = false | mRoundScrollbarRenderer = null | mRunQueue = null | mScrollBarPositionPadding = 0 | mScrollCache = null | mScrollIndicatorDrawable = null | mScrollX = 0 | mScrollY = 0 | mSemHorizontalScrollbarRect = android.graphics.Rect@320746040 (0x131e3238) | mSemScrollingByScrollbar = false | mSemScrollingVertical = true | mSemVerticalScrollbarRect = android.graphics.Rect@320746064 (0x131e3250) | mSendViewScrolledAccessibilityEvent = null | mSendViewStateChangedAccessibilityEvent = null | mSendingHoverAccessibilityEvents = false | mSmartClipDataExtractionListener = null | mSmartClipDataTag = null | mStartActivityRequestWho = null | mStateListAnimator = null | mSystemUiVisibility = 0 | mTag = null | mTempNestedScrollConsumed = null | mTooltipInfo = null | mTop = 0 | mTouchDelegate = null | mTouchSlop = 32 | mTouchwizFlags = 0 | mTransformationInfo = null | mTransientStateCount = 0 | mTransitionName = null | mTwExtraPaddingBottomForPreference = 0 | mTwHorizontalScrollbarPosition = 0 | mUnscaledDrawingCache = null | mUnsetPressedState = null | mUserPaddingBottom = 0 | mUserPaddingEnd = -2147483648 | mUserPaddingLeft = 0 | mUserPaddingLeftInitial = 0 | mUserPaddingRight = 0 | mUserPaddingRightInitial = 0 | mUserPaddingStart = -2147483648 | mVerticalScrollFactor = 0.0 | mVerticalScrollbarPosition = 0 | mViewFlags = 939802753 | mVisibilityChangeForAutofillHandler = null | mWindowAttachCount = 1 | shadow$klass = android.widget.RelativeLayout | shadow$monitor = 0
Array of android.view.View[] | [0] = android.view.View@320952752 (0x132159b0) | [1] = android.view.View@320952224 (0x132157a0) | [2] = android.widget.FrameLayout@320756032 (0x131e5940) | [3] = android.widget.LinearLayout@320751232 (0x131e4680) | [4] = android.widget.FrameLayout@320742832 (0x131e25b0) | [5] = android.support.design.widget.AppBarLayout@320744736 (0x131e2d20)
Instance of android.widget.LinearLayout | static INDEX_TOP = 1 | static SHOW_DIVIDER_BEGINNING = 1 | static INDEX_FILL = 3 | static SHOW_DIVIDER_NONE = 0 | static $classOverhead = byte[8420]@1884516193 (0x70536f61) | static HORIZONTAL = 0 | static VERTICAL_GRAVITY_COUNT = 4 | static INDEX_BOTTOM = 2 | static SHOW_DIVIDER_END = 4 | static VERTICAL = 1 | static SHOW_DIVIDER_MIDDLE = 2 | static INDEX_CENTER_VERTICAL = 0 | mAllowInconsistentMeasurement = false | mBaselineAligned = true | mBaselineAlignedChildIndex = -1 | mBaselineChildTop = 0 | mDivider = null | mDividerHeight = 0 | mDividerPadding = 0 | mDividerWidth = 0 | mGravity = 8388659 | mLayoutDirection = 1 | mMaxAscent = int[4]@320924480 (0x1320eb40) | mMaxDescent = int[4]@320924512 (0x1320eb60) | mOrientation = 0 | mShowDividers = 0 | mTotalLength = 1440 | mUseLargestChild = false | mWeightSum = 2.0 | mAnimationListener = null | mCachePaint = null | mChildCountWithTransientState = 0 | mChildTransformation = null | mChildren = android.view.View[12]@320924544 (0x1320eb80) | mChildrenCount = 2 | mChildrenInterestedInDrag = null | mCurrentDragChild = null | mCurrentDragStartEvent = null | mDefaultFocus = null | mDisappearingChildren = null | mFirstHoverTarget = null | mFirstTouchTarget = null | mFocused = null | mFocusedInCluster = null | mGroupFlags = 2244723 | mHoveredSelf = false | mInvalidateRegion = null | mInvalidationTransformation = null | mIsInterestedInDrag = false | mLastTouchDownIndex = -1 | mLastTouchDownTime = 0 | mLastTouchDownX = 0.0 | mLastTouchDownY = 0.0 | mLayoutAnimationController = null | mLayoutCalledWhileSuppressed = false | mLayoutMode = -1 | mLayoutTransitionListener = android.view.ViewGroup$2@320924608 (0x1320ebc0) | mLocalPoint = null | mNestedScrollAxes = 0 | mOnHierarchyChangeListener = null | mPersistentDrawingCache = 2 | mPreSortedChildren = null | mSemHorizontalScrollbarRectRelativePosX = 0 | mSemVerticalScrollbarRectRelativePosY = 0 | mSemX = 0.0 | mSemY = 0.0 | mSuppressLayout = false | mTempPoint = null | mTooltipHoverTarget = null | mTooltipHoveredSelf = false | mTransientIndices = null | mTransientViews = null | mTransition = null | mTransitioningViews = null | mVisibilityChangingChildren = null | isPenSideButton = false | mAccessibilityCursorPosition = -1 | mAccessibilityDelegate = null | mAccessibilityTraversalAfterId = -1 | mAccessibilityTraversalBeforeId = -1 | mAccessibilityViewId = -1 | mAnimator = null | mAttachInfo = null | mAttributes = null | mAutofillHints = null | mAutofillId = null | mAutofillViewId = -1 | mBackground = android.graphics.drawable.ColorDrawable@320924624 (0x1320ebd0) | mBackgroundRenderNode = android.view.RenderNode@320924680 (0x1320ec08) | mBackgroundResource = 0 | mBackgroundSizeChanged = false | mBackgroundTint = null | mBottom = 1280 | mCachingFailed = false | mClipBounds = null | mContentDescription = null | mContext = com.telenor.capp.farmsupplies.ui.main.MainActivity@320571840 (0x131b89c0) | mCurrentAnimation = null | mDefaultFocusHighlight = null | mDefaultFocusHighlightCache = null | mDefaultFocusHighlightEnabled = true | mDefaultFocusHighlightSizeChanged = true | mDirectPenInput = null | mDisablePenGestureforfactorytest = true | mDrawableState = int[3]@1883853640 (0x70495348) | mDrawingCache = null | mDrawingCacheBackgroundColor = 0 | mFloatingTreeObserver = null | mForegroundInfo = null | mFrameMetricsObservers = null | mGhostView = null | mHasPerformedLongPress = false | mHoverPopup = null | mHoverPopupToolTypeByApp = 0 | mHoverPopupType = 0 | mID = 2131296359 | mIgnoreNextUpEvent = false | mImageFilterBridge = null | mInContextButtonPress = false | mInputEventConsistencyVerifier = null | mIsCiqEnabled = false | mIsDetachedFromWindow = false | mIsDirectPenInputEnabled = false | mIsSetFingerHovedInAppWidget = true | mKeyedTags = null | mLabelForId = -1 | mLastIsOpaque = true | mLayerPaint = null | mLayerType = 0 | mLayoutInsets = null | mLayoutParams = android.widget.RelativeLayout$LayoutParams@320924704 (0x1320ec20) | mLeft = 0 | mLeftPaddingDefined = true | mListenerInfo = null | mLongClickX = NaN | mLongClickY = NaN | mMatchIdPredicate = null | mMatchLabelForPredicate = null | mMeasureCache = android.util.LongSparseLongArray@320924784 (0x1320ec70) | mMeasuredHeight = 240 | mMeasuredWidth = 1440 | mMinHeight = 0 | mMinWidth = 0 | mNeededToChangedScrollBarPosition = false | mNestedScrollingParent = null | mNextClusterForwardId = -1 | mNextFocusDownId = -1 | mNextFocusForwardId = -1 | mNextFocusLeftId = -1 | mNextFocusRightId = -1 | mNextFocusUpId = -1 | mOldHeightMeasureSpec = -2147482224 | mOldWidthMeasureSpec = 1073743264 | mOutlineProvider = android.view.ViewOutlineProvider$1@1883549984 (0x7044b120) | mOverScrollMode = 1 | mOverlay = null | mPaddingBottom = 24 | mPaddingLeft = 24 | mPaddingRight = 24 | mPaddingTop = 24 | mParent = android.widget.RelativeLayout@320743896 (0x131e29d8) | mPendingCheckForLongPress = null | mPendingCheckForTap = null | mPerformClick = null | mPointerIcon = null | mPrivateFlags = -2120087504 | mPrivateFlags2 = 1610819124 | mPrivateFlags3 = 0 | mRecreateDisplayList = false | mRenderNode = android.view.RenderNode@320924808 (0x1320ec88) | mRenderNodeImageFilter = null | mRenderNodeImageFilterClipRects = java.util.ArrayList@320924832 (0x1320eca0) | mResources = android.content.res.Resources@320574632 (0x131b94a8) | mRight = 1440 | mRightPaddingDefined = true | mRoundScrollbarRenderer = null | mRunQueue = null | mScrollBarPositionPadding = 0 | mScrollCache = null | mScrollIndicatorDrawable = null | mScrollX = 0 | mScrollY = 0 | mSemHorizontalScrollbarRect = android.graphics.Rect@320924856 (0x1320ecb8) | mSemScrollingByScrollbar = false | mSemScrollingVertical = true | mSemVerticalScrollbarRect = android.graphics.Rect@320924880 (0x1320ecd0) | mSendViewScrolledAccessibilityEvent = null | mSendViewStateChangedAccessibilityEvent = null | mSendingHoverAccessibilityEvents = false | mSmartClipDataExtractionListener = null | mSmartClipDataTag = null | mStartActivityRequestWho = null | mStateListAnimator = null | mSystemUiVisibility = 0 | mTag = null | mTempNestedScrollConsumed = null | mTooltipInfo = null | mTop = 1040 | mTouchDelegate = null | mTouchSlop = 32 | mTouchwizFlags = 0 | mTransformationInfo = null | mTransientStateCount = 0 | mTransitionName = null | mTwExtraPaddingBottomForPreference = 0 | mTwHorizontalScrollbarPosition = 0 | mUnscaledDrawingCache = null | mUnsetPressedState = null | mUserPaddingBottom = 24 | mUserPaddingEnd = -2147483648 | mUserPaddingLeft = 24 | mUserPaddingLeftInitial = 24 | mUserPaddingRight = 24 | mUserPaddingRightInitial = 24 | mUserPaddingStart = -2147483648 | mVerticalScrollFactor = 0.0 | mVerticalScrollbarPosition = 0 | mViewFlags = 402653328 | mVisibilityChangeForAutofillHandler = null | mWindowAttachCount = 1 | shadow$klass = android.widget.LinearLayout | shadow$monitor = 0
Array of android.view.View[] | [0] = android.support.v7.widget.AppCompatButton@320748432 (0x131e3b90) | [1] = android.support.v7.widget.AppCompatButton@320749472 (0x131e3fa0) | [2] = null | [3] = null | [4] = null | [5] = null | [6] = null | [7] = null | [8] = null | [9] = null | [10] = null | [11] = null
Instance of android.support.v7.widget.AppCompatButton | static $classOverhead = byte[9504]@319936649 (0x1311d889) | mBackgroundTintHelper = android.support.v7.widget.AppCompatBackgroundHelper@320941672 (0x13212e68) | mTextHelper = android.support.v7.widget.AppCompatTextHelperV17@320941704 (0x13212e88) | mIsThemeDeviceDefault = false | HOVER_INTERVAL = 300 | SEC_CLIPBOARD_DISABLED = 0 | SEC_CLIPBOARD_ENABLED = 1 | SEC_CLIPBOARD_UNKNOWN = -1 | TOUCH_DELTA = 48.0 | mActionModeFlags = 241664 | mAllowTransformationLengthChange = true | mAttachedWindow = false | mAutoLinkMask = 0 | mAutoSizeMaxTextSizeInPx = -1.0 | mAutoSizeMinTextSizeInPx = -1.0 | mAutoSizeStepGranularityInPx = -1.0 | mAutoSizeTextSizesInPx = int[0]@1883499888 (0x7043ed70) | mAutoSizeTextType = 0 | mBoring = null | mBreakStrategy = 0 | mBufferType = android.widget.TextView$BufferType@1883935928 (0x704a94b8) | mCanPaste = false | mCanTextMultiSelection = false | mCategoryPadding = 0 | mChangeWatcher = null | mChangedSelectionBySIP = false | mCharWrapper = null | mClipboardChangeListener = android.widget.TextView$TextViewClipboardChangeListener@320941760 (0x13212ec0) | mClipboardDataFormat = 1 | mCoverManager = null | mCurHintTextColor = 1627389952 | mCurTextColor = -4671047 | mCurrentSpellCheckerLocaleCache = null | mCursorDrawableRes = 17304028 | mCursorWidth = 5 | mDPIMaxLength = -1 | mDPITextBuffer = null | mDeferScroll = -1 | mDesiredHeightAtMeasure = -1 | mDeviceProvisionedState = 0 | mDisplayText = null | mDrawStrikeAnimationValue = 0.0 | mDrawTextStrikeAnimator = null | mDrawables = android.widget.TextView$Drawables@320941776 (0x13212ed0) | mEditableFactory = android.text.Editable$Factory@1883718864 (0x704744d0) | mEditor = null | mEllipsisKeywordCount = -1 | mEllipsisKeywordStart = -1 | mEllipsize = null | mEnableLinkPreview = false | mEnableMultiSelection = true | mFilters = android.text.InputFilter[0]@1945030880 (0x73eed0e0) | mFreezesText = false | mGravity = 8388627 | mHasPresetAutoSizeValues = false | mHighlightColor = 1711381579 | mHighlightPaint = android.graphics.Paint@320941904 (0x13212f50) | mHighlightPath = null | mHighlightPathBogus = true | mHint = null | mHintBoring = null | mHintLayout = null | mHintTextColor = android.content.res.ColorStateList@320630288 (0x131c6e10) | mHorizontallyScrolling = false | mHoverEnterTime = -1 | mHoverExitTime = -1 | mHoveredSpan = null | mHyphenationFrequency = 0 | mIncludePad = true | mIsSecClipboardEnabled = 1 | mIsShowingLinkPreview = false | mIsThemeDeviceDefault = false | mIsTouchDown = false | mJustificationMode = 0 | mLastLayoutDirection = -1 | mLastScroll = 0 | mLayout = android.text.StaticLayout@320942000 (0x13212fb0) | mLineIsDrawed = false | mLinkTextColor = android.content.res.ColorStateList@320618416 (0x131c3fb0) | mLinksClickable = true | mListenerChanged = false | mListeners = null | mLocalesChanged = false | mMagnifierView = null | mMarquee = null | mMarqueeFadeMode = 0 | mMarqueeRepeatLimit = 3 | mMaxMode = 1 | mMaxWidth = 2147483647 | mMaxWidthMode = 2 | mMaximum = 2147483647 | mMinMode = 2 | mMinWidth = 352 | mMinWidthMode = 2 | mMinimum = 192 | mMovement = null | mMultiHighlightColor = -1728022343 | mMultiHighlightPaint = android.graphics.Paint@320942096 (0x13213010) | mMultiSelectPopupWindow = android.widget.MultiSelectPopupWindow@320618552 (0x131c4038) | mNeedsAutoSizeText = false | mOldMaxMode = 1 | mOldMaximum = 2147483647 | mParentIsListSeparatorStyle = false | mPasteEventListener = android.widget.TextView$TextViewClipboardEventListener@320942192 (0x13213070) | mPenSelectionController = com.samsung.android.penselect.PenSelectionController@320618600 (0x131c4068) | mPreDrawListenerDetached = false | mPreDrawRegistered = false | mPreventDefaultMovement = false | mRestartMarquee = false | mRestrictionPolicy = android.sec.enterprise.RestrictionPolicy@320618608 (0x131c4070) | mRightInset = 0 | mSavedHintLayout = null | mSavedLayout = null | mSavedMarqueeModeLayout = null | mScroller = null | mSectionDividerHeight = 0 | mSectionDividerLineColor = null | mSemClipboardManager = com.samsung.android.content.clipboard.SemClipboardManager@320589248 (0x131bcdc0) | mShadowColor = 0 | mShadowDx = 0.0 | mShadowDy = 0.0 | mShadowRadius = 0.0 | mSingleLine = false | mSkipUpdateDisplayText = false | mSoftInputEnabled = true | mSpacingAdd = 0.0 | mSpacingMult = 1.0 | mSpannableFactory = android.text.Spannable$Factory@1883939096 (0x704aa118) | mStrikeThroughPaint = null | mStylusEventListener = null | mTempRect = null | mTempTextPaint = null | mText = java.lang.String@319478672 (0x130adb90) | mTextClassifier = null | mTextColor = android.content.res.ColorStateList@320767792 (0x131e8730) | mTextDir = android.text.TextDirectionHeuristics$TextDirectionHeuristicInternal@1883539552 (0x70448860) | mTextEditSuggestionContainerLayout = 17367342 | mTextEditSuggestionHighlightStyle = 16974790 | mTextEditSuggestionItemLayout = 17367344 | mTextFromResource = false | mTextPaint = android.text.TextPaint@320942208 (0x13213080) | mTextSelectHandleLeftRes = 17304033 | mTextSelectHandleRes = 17304035 | mTextSelectHandleRightRes = 17304037 | mTextStrikeThroughEnabled = false | mToolType = 0 | mTransformation = android.text.method.AllCapsTransformationMethod@320942336 (0x13213100) | mTransformed = java.lang.StringBuilder@320942352 (0x13213110) | mUseDisplayText = false | mUseInternationalizedInput = true | mUserSetTextScaleX = false | mWordIteratorForMultiSelection = null | mhasMultiSelection = false | isPenSideButton = false | mAccessibilityCursorPosition = -1 | mAccessibilityDelegate = null | mAccessibilityTraversalAfterId = -1 | mAccessibilityTraversalBeforeId = -1 | mAccessibilityViewId = -1 | mAnimator = null | mAttachInfo = null | mAttributes = null | mAutofillHints = null | mAutofillId = null | mAutofillViewId = -1 | mBackground = android.graphics.drawable.GradientDrawable@320942368 (0x13213120) | mBackgroundRenderNode = android.view.RenderNode@320942456 (0x13213178) | mBackgroundResource = 0 | mBackgroundSizeChanged = false | mBackgroundTint = null | mBottom = 192 | mCachingFailed = false | mClipBounds = null | mContentDescription = null | mContext = com.telenor.capp.farmsupplies.ui.main.MainActivity@320571840 (0x131b89c0) | mCurrentAnimation = null | mDefaultFocusHighlight = null | mDefaultFocusHighlightCache = null | mDefaultFocusHighlightEnabled = true | mDefaultFocusHighlightSizeChanged = true | mDirectPenInput = null | mDisablePenGestureforfactorytest = true | mDrawableState = int[4]@320942480 (0x13213190) | mDrawingCache = null | mDrawingCacheBackgroundColor = 0 | mFloatingTreeObserver = null | mForegroundInfo = null | mFrameMetricsObservers = null | mGhostView = null | mHasPerformedLongPress = false | mHoverPopup = null | mHoverPopupToolTypeByApp = 0 | mHoverPopupType = 0 | mID = 2131296348 | mIgnoreNextUpEvent = false | mImageFilterBridge = null | mInContextButtonPress = false | mInputEventConsistencyVerifier = null | mIsCiqEnabled = false | mIsDetachedFromWindow = false | mIsDirectPenInputEnabled = false | mIsSetFingerHovedInAppWidget = true | mKeyedTags = null | mLabelForId = -1 | mLastIsOpaque = false | mLayerPaint = null | mLayerType = 0 | mLayoutInsets = null | mLayoutParams = android.widget.LinearLayout$LayoutParams@320942512 (0x132131b0) | mLeft = 744 | mLeftPaddingDefined = true | mListenerInfo = android.view.View$ListenerInfo@320942568 (0x132131e8) | mLongClickX = NaN | mLongClickY = NaN | mMatchIdPredicate = null | mMatchLabelForPredicate = null | mMeasureCache = android.util.LongSparseLongArray@320942640 (0x13213230) | mMeasuredHeight = 144 | mMeasuredWidth = 648 | mMinHeight = 192 | mMinWidth = 352 | mNeededToChangedScrollBarPosition = false | mNestedScrollingParent = null | mNextClusterForwardId = -1 | mNextFocusDownId = -1 | mNextFocusForwardId = -1 | mNextFocusLeftId = -1 | mNextFocusRightId = -1 | mNextFocusUpId = -1 | mOldHeightMeasureSpec = 1073741968 | mOldWidthMeasureSpec = 1073742472 | mOutlineProvider = android.view.ViewOutlineProvider$1@1883549984 (0x7044b120) | mOverScrollMode = 1 | mOverlay = null | mPaddingBottom = 0 | mPaddingLeft = 48 | mPaddingRight = 48 | mPaddingTop = 0 | mParent = android.widget.LinearLayout@320751232 (0x131e4680) | mPendingCheckForLongPress = null | mPendingCheckForTap = null | mPerformClick = null | mPointerIcon = null | mPrivateFlags = -2128476112 | mPrivateFlags2 = 538125880 | mPrivateFlags3 = 524288 | mRecreateDisplayList = false | mRenderNode = android.view.RenderNode@320942664 (0x13213248) | mRenderNodeImageFilter = null | mRenderNodeImageFilterClipRects = java.util.ArrayList@320942688 (0x13213260) | mResources = android.content.res.Resources@320574632 (0x131b94a8) | mRight = 1392 | mRightPaddingDefined = true | mRoundScrollbarRenderer = null | mRunQueue = null | mScrollBarPositionPadding = 0 | mScrollCache = null | mScrollIndicatorDrawable = null | mScrollX = 0 | mScrollY = 0 | mSemHorizontalScrollbarRect = android.graphics.Rect@320942712 (0x13213278) | mSemScrollingByScrollbar = false | mSemScrollingVertical = true | mSemVerticalScrollbarRect = android.graphics.Rect@320942736 (0x13213290) | mSendViewScrolledAccessibilityEvent = null | mSendViewStateChangedAccessibilityEvent = null | mSendingHoverAccessibilityEvents = false | mSmartClipDataExtractionListener = null | mSmartClipDataTag = null | mStartActivityRequestWho = null | mStateListAnimator = android.animation.StateListAnimator@320942760 (0x132132a8) | mSystemUiVisibility = 0 | mTag = null | mTempNestedScrollConsumed = null | mTooltipInfo = null | mTop = 48 | mTouchDelegate = null | mTouchSlop = 32 | mTouchwizFlags = 0 | mTransformationInfo = null | mTransientStateCount = 0 | mTransitionName = null | mTwExtraPaddingBottomForPreference = 0 | mTwHorizontalScrollbarPosition = 0 | mUnscaledDrawingCache = null | mUnsetPressedState = null | mUserPaddingBottom = 0 | mUserPaddingEnd = -2147483648 | mUserPaddingLeft = 48 | mUserPaddingLeftInitial = 48 | mUserPaddingRight = 48 | mUserPaddingRightInitial = 48 | mUserPaddingStart = -2147483648 | mVerticalScrollFactor = 0.0 | mVerticalScrollbarPosition = 0 | mViewFlags = 402669569 | mVisibilityChangeForAutofillHandler = null | mWindowAttachCount = 1 | shadow$klass = android.support.v7.widget.AppCompatButton | shadow$monitor = 0
Instance of android.view.View$ListenerInfo | static $classOverhead = byte[104]@1884722225 (0x70569431) | mOnApplyWindowInsetsListener = null | mOnAttachStateChangeListeners = null | mOnCapturedPointerListener = null | mOnClickListener = com.telenor.capp.farmsupplies.ui.main.categories_product_list.CategoriesProductListFragment$3@320949600 (0x13214d60) | mOnContextClickListener = null | mOnCreateContextMenuListener = null | mOnDragListener = null | mOnFocusChangeListener = null | mOnGenericMotionListener = null | mOnHoverListener = null | mOnKeyListener = null | mOnLayoutChangeListeners = null | mOnLongClickListener = null | mOnScrollChangeListener = null | mOnSystemUiVisibilityChangeListener = null | mOnTouchListener = null | shadow$klass = android.view.View$ListenerInfo | shadow$monitor = 0
Instance of com.telenor.capp.farmsupplies.ui.main.categories_product_list.CategoriesProductListFragment$3 | static $classOverhead = byte[112]@319774561 (0x130f5f61) | this$0 = com.telenor.capp.farmsupplies.ui.main.categories_product_list.CategoriesProductListFragment@320775040 (0x131ea380) | shadow$klass = com.telenor.capp.farmsupplies.ui.main.categories_product_list.CategoriesProductListFragment$3 | shadow$monitor = 0
Instance of com.telenor.capp.farmsupplies.ui.main.categories_product_list.CategoriesProductListFragment | static TAG = java.lang.String@320561528 (0x131b6178) | static $classOverhead = byte[1505]@320145049 (0x13150699) | static ARG_CATEGORY = java.lang.String@319518000 (0x130b7530) | static shouldOpenAnyOtherItem = true | adapter = com.telenor.capp.farmsupplies.ui.main.categories_product_list.CategoriesProductListAdapter@320775232 (0x131ea440) | adapterForFilter = com.telenor.capp.farmsupplies.ui.main.categories_product_list.CategoriesProductListAdapter@320772232 (0x131e9888) | binding = com.telenor.capp.farmsupplies.databinding.FragmentSelectCategoriesProductListBindingImpl@320746200 (0x131e32d8) | category = com.telenor.capp.farmsupplies.model.Category@320775264 (0x131ea460) | dots = android.widget.ImageView[4]@320775296 (0x131ea480) | dotscount = 4 | hasLoadedAllItems = false | i = 2 | isFiltersEnabled = true | isLoadingInProgress = false | mPresenter = com.telenor.capp.farmsupplies.ui.main.categories_product_list.CategoriesProductListPresenter@320775328 (0x131ea4a0) | onPageChangeListener = com.telenor.capp.farmsupplies.ui.main.categories_product_list.CategoriesProductListFragment$5@320775360 (0x131ea4c0) | paginate = com.paginate.recycler.RecyclerPaginate@320775376 (0x131ea4d0) | viewPagerAdapter = com.telenor.capp.farmsupplies.ui.main.categories_product_list.CategoriesFeatureProductViewPagerAdapter@320741992 (0x131e2268) | doLog = true | mBaseActivity = com.telenor.capp.farmsupplies.ui.main.MainActivity@320571840 (0x131b89c0) | mAdded = false | mAnimationInfo = android.support.v4.app.Fragment$AnimationInfo@320775416 (0x131ea4f8) | mArguments = android.os.Bundle@320775496 (0x131ea548) | mBackStackNesting = 0 | mCalled = true | mChildFragmentManager = null | mChildNonConfig = null | mContainer = null | mContainerId = 0 | mDeferStart = false | mDetached = false | mFragmentId = 0 | mFragmentManager = null | mFromLayout = false | mHasMenu = false | mHidden = false | mHiddenChanged = false | mHost = null | mInLayout = false | mIndex = -1 | mInnerView = null | mIsCreated = false | mIsNewlyAdded = false | mLayoutInflater = null | mLifecycleRegistry = android.arch.lifecycle.LifecycleRegistry@320775520 (0x131ea560) | mLoaderManager = null | mMenuVisible = true | mParentFragment = null | mPerformedCreateView = false | mPostponedAlpha = 0.0 | mRemoving = false | mRestored = false | mRetainInstance = false | mRetaining = false | mSavedFragmentState = null | mSavedUserVisibleHint = null | mSavedViewState = android.util.SparseArray@320775552 (0x131ea580) | mState = 0 | mTag = null | mTarget = null | mTargetIndex = -1 | mTargetRequestCode = 0 | mUserVisibleHint = true | mView = null | mViewModelStore = null | mWho = null | shadow$klass = com.telenor.capp.farmsupplies.ui.main.categories_product_list.CategoriesProductListFragment | shadow$monitor = 0
Excluded Refs: | Field: android.view.Choreographer$FrameDisplayEventReceiver.mMessageQueue (always) | Field: android.widget.VideoView.mContext | Thread:FinalizerWatchdogDaemon (always) | Thread:main (always) | Thread:LeakCanary-Heap-Dump (always) | Class:java.lang.ref.WeakReference (always) | Class:java.lang.ref.SoftReference (always) | Class:java.lang.ref.PhantomReference (always) | Class:java.lang.ref.Finalizer (always) | Class:java.lang.ref.FinalizerReference (always)
@MuhammadMuzammilQadri Thanks for reporting with the full state. I looks like com.onesignal.ActivityLifecycleHandler.curActivity
does have a static reference to com.telenor.capp.farmsupplies.ui.main.MainActivity.mFragments
but I don't see any other Activities so this shouldn't be a production issue.
Was your app in the background or foreground at this time?
What do you mean by "you don't see any other activities"? This isn't the full heap. This is just the shortest path to GC root. By default LeakCanary triggers a warning like this if an Activity is destroyed but there is still a reference to it in the heap. In this case this Activity should have been garbage collected but OneSignal is keeping a reference to it and preventing it from being garbage collected. One way to fix it would simply be to replace the strong reference to the activity with a WeakReference.
@runningcode I see, didn't know if it printed all Activities. OneSignal shouldn't be leaving any references behind as it does hook into the onActivityDestroyed
and clears it's reference.
From looking at state log above again it seems like the Activity is in a in focus state;
Instance of com.telenor.capp.farmsupplies.ui.main.MainActivity
...
| isOnPauseCalled = false
...
| mCreated = true
...
| mReallyStopped = false
| mRequestedPermissionsFromFragment = false
| mResumed = true
| mRetaining = false
| mStopped = false
I believe LeakCanary might be just looking for static references in this case then. Let me know if you think this isn't the case.
I agree that WeakReference
is the correct path forward here. All Context
references on Android should be referenced this way with the only exception being the ApplicationContext
and only if it doesn't create issues with "Instant Run".
This issue has been lower priority with us we haven't been able to reproduce a leak in our testing. We have also reviewed the code were not able to find a case were it would leak. For safely our plan is still to switch to WeakReference
here.
Closing issue. Note: request still under consideration
ActivityLifecycleHandler#curActivity keeps static references to android activities. This should probably be a WeakReference in order to avoid memory leaks.
This also breaks instant run for any consumers of OneSignal.
Could be related to #258
Here is this same error in lint: