Related
Well, it seems Sammy has yet again added another great feature but forgot the option to turn it off! So as usual, we grab our shovels and fix that which is piled before us.
First, we thank Mirko ddd for his patch that allows us the option:http://forum.xda-developers.com/showthread.php?t=2095845
So as you can see, it's a nice, clean patch and will follow the format of previous toggles I've written about. This tutorial is based upon XXLSJ.
Step 1. Implement Mirko's patch as a configurable option
In ZoomManager.smali within framework.jar, we will need to patch at 3 points:
a) Add the following variable to the top of the smali after '.field private registerTiltListener:Z':
Code:
.field private final mContext:Landroid/content/Context;
b) Then we will add 3 lines to the end (ABOVE return-void) of the following method: '.method public constructor <init>(Landroid/webkit/WebViewClassic;Landroid/webkit/CallbackProxyV'
Code:
invoke-virtual {p1}, Landroid/webkit/WebViewClassic;->getContext()Landroid/content/Context;
move-result-object v0
iput-object v0, p0, Landroid/webkit/ZoomManager;->mContext:Landroid/content/Context;
c) Now we will implement the actual patch based on our newly created setting. Find '.method setEdgeZoom(Z)V' and replace the code between '.prologue' and '.line 1602' with the following:
Code:
#const/4 v5, 0x1
const/4 v4, 0x0
iget-object v2, p0, Landroid/webkit/ZoomManager;->mContext:Landroid/content/Context;
invoke-virtual {v2}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v2
const-string v3, "edgezoom_toggle"
invoke-static {v2, v3, v4}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v5
if-nez v5, :disable_ez
const/4 v5, 0x1
goto :toggle_resume
:disable_ez
const/4 v5, 0x0
:toggle_resume
That's it for framework.jar, recompile, upload and ensure it's stable before proceeding.
Step 2. Modifying Display settings, the most involved portion of this tutorial
Decompile SecSettings.apk and find DisplaySettings.smali. We will have 5 patch points:
a) Add a new variable to top of smali after '.field private mTouchKeyLight:Landroid/preference/ListPreference;':
Code:
.field private mEdgeZoomPreference:Landroid/preference/CheckBoxPreference;
b) Search for '.method public onCreate(Landroid/os/BundleV' and add the following code after
'iput-object v12, p0, Lcom/android/settings/DisplaySettings;->mMultiWindowPref:Landroid/preference/CheckBoxPreference;':
Code:
const-string v12, "edgezoom_toggle"
invoke-virtual {p0, v12}, Lcom/android/settings/DisplaySettings;->findPreference(Ljava/lang/CharSequence;)Landroid/preference/Preference;
move-result-object v12
check-cast v12, Landroid/preference/CheckBoxPreference;
iput-object v12, p0, Lcom/android/settings/DisplaySettings;->mEdgeZoomPreference:Landroid/preference/CheckBoxPreference;
c) In '.method public onPreferenceTreeClick(Landroid/preference/PreferenceScreen;Landroid/preference/PreferenceZ' find '.line 985' and just ABOVE it replace 'if-eqz v0, :cond_0' with:
Code:
if-eqz v0, :cond_new
d) About 20 lines below the last patch, you will see 'goto :goto_a' just before the end of the method. Paste the following code after 'goto :goto_a' but before '.end method':
Code:
:cond_new
iget-object v0, p0, Lcom/android/settings/DisplaySettings;->mEdgeZoomPreference:Landroid/preference/CheckBoxPreference;
invoke-virtual {p2, v0}, Ljava/lang/Object;->equals(Ljava/lang/Object;)Z
move-result v0
if-eqz v0, :cond_0
iget-object v0, p0, Lcom/android/settings/DisplaySettings;->mEdgeZoomPreference:Landroid/preference/CheckBoxPreference;
invoke-virtual {v0}, Landroid/preference/CheckBoxPreference;->isChecked()Z
move-result v0
invoke-virtual {p0}, Lcom/android/settings/DisplaySettings;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v3
const-string v4, "edgezoom_toggle"
if-nez v0, :cond_newA
const/4 v0, 0x0
goto :cond_newB
:cond_newA
const/4 v0, 0x1
:cond_newB
invoke-static {v3, v4, v0}, Landroid/provider/Settings$System;->putInt(Landroid/content/ContentResolver;Ljava/lang/String;I)Z
goto/16 :goto_1
e) Within '.method public onResume()V' find 'return-void' and add this code ABOVE that line:
Code:
iget-object v0, p0, Lcom/android/settings/DisplaySettings;->mEdgeZoomPreference:Landroid/preference/CheckBoxPreference;
invoke-virtual {p0}, Lcom/android/settings/DisplaySettings;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v3
const-string v4, "edgezoom_toggle"
const/4 v1, 0x0
invoke-static {v3, v4, v1}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v3
if-eqz v3, :goto_2b
const/4 v1, 0x1
goto :goto_2c
:goto_2b
const/4 v1, 0x0
:goto_2c
invoke-virtual {v0, v1}, Landroid/preference/CheckBoxPreference;->setChecked(Z)V
That's it for DisplaySettings.smali, but we have just a few xml edits left before recompiling.
Step 3. Adding the actual setting, the easy part
In res/xml/display_settings.xml, add this line wherever you want the setting to appear:
Code:
<CheckBoxPreference android:title="@string/edgezoom_title" android:key="edgezoom_toggle" android:summary="@string/edgezoom_summary" />
In strings.xml, add:
Code:
<string name="edgezoom_title">Disable Edge Zoom</string>
<string name="edgezoom_summary">Disable edge zoom feature used in email and browsers</string>
In public.xml, add the IDs (NOTE: these numbers may differ depending on previous mods):
Code:
<public type="string" name="edgezoom_title" id="0x7f090ef4" />
<public type="string" name="edgezoom_summary" id="0x7f090ef5" />
Compile SecSettings.apk, upload and reboot. If all goes well, you should have a setting to control this new feature!
nice one jeboo thanks
Re-enable Edge Zoom on Official Release
So in typical Samsung style they decided to disable Edge Zoom in the official releases.
Here is how we re-enable it and allow the toggle int he OP to still function correctly.
Decompile framework.jar
Go here:
\framework\smali\android\view\ScaleGestureDetector.smali
Find:
Code:
[B].method public onTouchEvent(Landroid/view/MotionEvent;)Z[/B]
Replace that entire method with this:
Code:
.method public onTouchEvent(Landroid/view/MotionEvent;)Z
.locals 26
.parameter "event"
.prologue
.line 207
move-object/from16 v0, p0
iget-object v0, v0, Landroid/view/ScaleGestureDetector;->mInputEventConsistencyVerifier:Landroid/view/InputEventConsistencyVerifier;
move-object/from16 v24, v0
if-eqz v24, :cond_0
.line 208
move-object/from16 v0, p0
iget-object v0, v0, Landroid/view/ScaleGestureDetector;->mInputEventConsistencyVerifier:Landroid/view/InputEventConsistencyVerifier;
move-object/from16 v24, v0
const/16 v25, 0x0
move-object/from16 v0, v24
move-object/from16 v1, p1
move/from16 v2, v25
invoke-virtual {v0, v1, v2}, Landroid/view/InputEventConsistencyVerifier;->onTouchEvent(Landroid/view/MotionEvent;I)V
.line 213
:cond_0
move-object/from16 v0, p0
iget-boolean v0, v0, Landroid/view/ScaleGestureDetector;->mValidPackage:Z
move/from16 v24, v0
if-eqz v24, :cond_1
invoke-direct/range {p0 .. p1}, Landroid/view/ScaleGestureDetector;->onEdgeTouchEvent(Landroid/view/MotionEvent;)Z
move-result v24
if-eqz v24, :cond_1
const/16 v24, 0x1
.line 310
:goto_0
return v24
.line 213
:cond_1
invoke-virtual/range {p1 .. p1}, Landroid/view/MotionEvent;->getActionMasked()I
move-result v3
.line 215
.local v3, action:I
const/16 v24, 0x1
move/from16 v0, v24
if-eq v3, v0, :cond_2
const/16 v24, 0x3
move/from16 v0, v24
if-ne v3, v0, :cond_5
:cond_2
const/16 v19, 0x1
.line 217
.local v19, streamComplete:Z
:goto_1
if-eqz v3, :cond_3
if-eqz v19, :cond_6
.line 221
:cond_3
move-object/from16 v0, p0
iget-boolean v0, v0, Landroid/view/ScaleGestureDetector;->mInProgress:Z
move/from16 v24, v0
if-eqz v24, :cond_4
.line 222
move-object/from16 v0, p0
iget-object v0, v0, Landroid/view/ScaleGestureDetector;->mListener:Landroid/view/ScaleGestureDetector$OnScaleGestureListener;
move-object/from16 v24, v0
move-object/from16 v0, v24
move-object/from16 v1, p0
invoke-interface {v0, v1}, Landroid/view/ScaleGestureDetector$OnScaleGestureListener;->onScaleEnd(Landroid/view/ScaleGestureDetector;)V
.line 223
const/16 v24, 0x0
move/from16 v0, v24
move-object/from16 v1, p0
iput-boolean v0, v1, Landroid/view/ScaleGestureDetector;->mInProgress:Z
.line 224
const/16 v24, 0x0
move/from16 v0, v24
move-object/from16 v1, p0
iput v0, v1, Landroid/view/ScaleGestureDetector;->mInitialSpan:F
.line 227
:cond_4
if-eqz v19, :cond_6
.line 228
const/16 v24, 0x1
goto :goto_0
.line 215
.end local v19 #streamComplete:Z
:cond_5
const/16 v19, 0x0
goto :goto_1
.line 232
.restart local v19 #streamComplete:Z
:cond_6
const/16 v24, 0x6
move/from16 v0, v24
if-eq v3, v0, :cond_7
const/16 v24, 0x5
move/from16 v0, v24
if-ne v3, v0, :cond_8
:cond_7
const/4 v4, 0x1
.line 235
.local v4, configChanged:Z
:goto_2
const/16 v24, 0x6
move/from16 v0, v24
if-ne v3, v0, :cond_9
const/4 v14, 0x1
.line 236
.local v14, pointerUp:Z
:goto_3
if-eqz v14, :cond_a
invoke-virtual/range {p1 .. p1}, Landroid/view/MotionEvent;->getActionIndex()I
move-result v15
.line 239
.local v15, skipIndex:I
:goto_4
const/16 v20, 0x0
.local v20, sumX:F
const/16 v21, 0x0
.line 240
.local v21, sumY:F
invoke-virtual/range {p1 .. p1}, Landroid/view/MotionEvent;->getPointerCount()I
move-result v5
.line 241
.local v5, count:I
const/4 v13, 0x0
.local v13, i:I
:goto_5
if-ge v13, v5, :cond_c
.line 242
if-ne v15, v13, :cond_b
.line 241
:goto_6
add-int/lit8 v13, v13, 0x1
goto :goto_5
.line 232
.end local v4 #configChanged:Z
.end local v5 #count:I
.end local v13 #i:I
.end local v14 #pointerUp:Z
.end local v15 #skipIndex:I
.end local v20 #sumX:F
.end local v21 #sumY:F
:cond_8
const/4 v4, 0x0
goto :goto_2
.line 235
.restart local v4 #configChanged:Z
:cond_9
const/4 v14, 0x0
goto :goto_3
.line 236
.restart local v14 #pointerUp:Z
:cond_a
const/4 v15, -0x1
goto :goto_4
.line 243
.restart local v5 #count:I
.restart local v13 #i:I
.restart local v15 #skipIndex:I
.restart local v20 #sumX:F
.restart local v21 #sumY:F
:cond_b
move-object/from16 v0, p1
invoke-virtual {v0, v13}, Landroid/view/MotionEvent;->getX(I)F
move-result v24
add-float v20, v20, v24
.line 244
move-object/from16 v0, p1
invoke-virtual {v0, v13}, Landroid/view/MotionEvent;->getY(I)F
move-result v24
add-float v21, v21, v24
goto :goto_6
.line 246
:cond_c
if-eqz v14, :cond_d
add-int/lit8 v10, v5, -0x1
.line 247
.local v10, div:I
:goto_7
int-to-float v0, v10
move/from16 v24, v0
div-float v11, v20, v24
.line 248
.local v11, focusX:F
int-to-float v0, v10
move/from16 v24, v0
div-float v12, v21, v24
.line 251
.local v12, focusY:F
const/4 v6, 0x0
.local v6, devSumX:F
const/4 v7, 0x0
.line 252
.local v7, devSumY:F
const/4 v13, 0x0
:goto_8
if-ge v13, v5, :cond_f
.line 253
if-ne v15, v13, :cond_e
.line 252
:goto_9
add-int/lit8 v13, v13, 0x1
goto :goto_8
.end local v6 #devSumX:F
.end local v7 #devSumY:F
.end local v10 #div:I
.end local v11 #focusX:F
.end local v12 #focusY:F
:cond_d
move v10, v5
.line 246
goto :goto_7
.line 254
.restart local v6 #devSumX:F
.restart local v7 #devSumY:F
.restart local v10 #div:I
.restart local v11 #focusX:F
.restart local v12 #focusY:F
:cond_e
move-object/from16 v0, p1
invoke-virtual {v0, v13}, Landroid/view/MotionEvent;->getX(I)F
move-result v24
sub-float v24, v24, v11
invoke-static/range {v24 .. v24}, Ljava/lang/Math;->abs(F)F
move-result v24
add-float v6, v6, v24
.line 255
move-object/from16 v0, p1
invoke-virtual {v0, v13}, Landroid/view/MotionEvent;->getY(I)F
move-result v24
sub-float v24, v24, v12
invoke-static/range {v24 .. v24}, Ljava/lang/Math;->abs(F)F
move-result v24
add-float v7, v7, v24
goto :goto_9
.line 257
:cond_f
int-to-float v0, v10
move/from16 v24, v0
div-float v8, v6, v24
.line 258
.local v8, devX:F
int-to-float v0, v10
move/from16 v24, v0
div-float v9, v7, v24
.line 263
.local v9, devY:F
const/high16 v24, 0x4000
mul-float v17, v8, v24
.line 264
.local v17, spanX:F
const/high16 v24, 0x4000
mul-float v18, v9, v24
.line 265
.local v18, spanY:F
mul-float v24, v17, v17
mul-float v25, v18, v18
add-float v24, v24, v25
invoke-static/range {v24 .. v24}, Landroid/util/FloatMath;->sqrt(F)F
move-result v16
.line 270
.local v16, span:F
move-object/from16 v0, p0
iget-boolean v0, v0, Landroid/view/ScaleGestureDetector;->mInProgress:Z
move/from16 v23, v0
.line 271
.local v23, wasInProgress:Z
move-object/from16 v0, p0
iput v11, v0, Landroid/view/ScaleGestureDetector;->mFocusX:F
.line 272
move-object/from16 v0, p0
iput v12, v0, Landroid/view/ScaleGestureDetector;->mFocusY:F
.line 273
move-object/from16 v0, p0
iget-boolean v0, v0, Landroid/view/ScaleGestureDetector;->mInProgress:Z
move/from16 v24, v0
if-eqz v24, :cond_11
const/16 v24, 0x0
cmpl-float v24, v16, v24
if-eqz v24, :cond_10
if-eqz v4, :cond_11
.line 274
:cond_10
move-object/from16 v0, p0
iget-object v0, v0, Landroid/view/ScaleGestureDetector;->mListener:Landroid/view/ScaleGestureDetector$OnScaleGestureListener;
move-object/from16 v24, v0
move-object/from16 v0, v24
move-object/from16 v1, p0
invoke-interface {v0, v1}, Landroid/view/ScaleGestureDetector$OnScaleGestureListener;->onScaleEnd(Landroid/view/ScaleGestureDetector;)V
.line 275
const/16 v24, 0x0
move/from16 v0, v24
move-object/from16 v1, p0
iput-boolean v0, v1, Landroid/view/ScaleGestureDetector;->mInProgress:Z
.line 276
move/from16 v0, v16
move-object/from16 v1, p0
iput v0, v1, Landroid/view/ScaleGestureDetector;->mInitialSpan:F
.line 278
:cond_11
if-eqz v4, :cond_12
.line 279
move/from16 v0, v17
move-object/from16 v1, p0
iput v0, v1, Landroid/view/ScaleGestureDetector;->mCurrSpanX:F
move/from16 v0, v17
move-object/from16 v1, p0
iput v0, v1, Landroid/view/ScaleGestureDetector;->mPrevSpanX:F
.line 280
move/from16 v0, v18
move-object/from16 v1, p0
iput v0, v1, Landroid/view/ScaleGestureDetector;->mCurrSpanY:F
move/from16 v0, v18
move-object/from16 v1, p0
iput v0, v1, Landroid/view/ScaleGestureDetector;->mPrevSpanY:F
.line 281
move/from16 v0, v16
move-object/from16 v1, p0
iput v0, v1, Landroid/view/ScaleGestureDetector;->mCurrSpan:F
move/from16 v0, v16
move-object/from16 v1, p0
iput v0, v1, Landroid/view/ScaleGestureDetector;->mPrevSpan:F
move/from16 v0, v16
move-object/from16 v1, p0
iput v0, v1, Landroid/view/ScaleGestureDetector;->mInitialSpan:F
.line 283
:cond_12
move-object/from16 v0, p0
iget-boolean v0, v0, Landroid/view/ScaleGestureDetector;->mInProgress:Z
move/from16 v24, v0
if-nez v24, :cond_14
const/16 v24, 0x0
cmpl-float v24, v16, v24
if-eqz v24, :cond_14
if-nez v23, :cond_13
move-object/from16 v0, p0
iget v0, v0, Landroid/view/ScaleGestureDetector;->mInitialSpan:F
move/from16 v24, v0
sub-float v24, v16, v24
invoke-static/range {v24 .. v24}, Ljava/lang/Math;->abs(F)F
move-result v24
move-object/from16 v0, p0
iget v0, v0, Landroid/view/ScaleGestureDetector;->mSpanSlop:I
move/from16 v25, v0
move/from16 v0, v25
int-to-float v0, v0
move/from16 v25, v0
cmpl-float v24, v24, v25
if-lez v24, :cond_14
.line 285
:cond_13
move/from16 v0, v17
move-object/from16 v1, p0
iput v0, v1, Landroid/view/ScaleGestureDetector;->mCurrSpanX:F
move/from16 v0, v17
move-object/from16 v1, p0
iput v0, v1, Landroid/view/ScaleGestureDetector;->mPrevSpanX:F
.line 286
move/from16 v0, v18
move-object/from16 v1, p0
iput v0, v1, Landroid/view/ScaleGestureDetector;->mCurrSpanY:F
move/from16 v0, v18
move-object/from16 v1, p0
iput v0, v1, Landroid/view/ScaleGestureDetector;->mPrevSpanY:F
.line 287
move/from16 v0, v16
move-object/from16 v1, p0
iput v0, v1, Landroid/view/ScaleGestureDetector;->mCurrSpan:F
move/from16 v0, v16
move-object/from16 v1, p0
iput v0, v1, Landroid/view/ScaleGestureDetector;->mPrevSpan:F
.line 288
move-object/from16 v0, p0
iget-object v0, v0, Landroid/view/ScaleGestureDetector;->mListener:Landroid/view/ScaleGestureDetector$OnScaleGestureListener;
move-object/from16 v24, v0
move-object/from16 v0, v24
move-object/from16 v1, p0
invoke-interface {v0, v1}, Landroid/view/ScaleGestureDetector$OnScaleGestureListener;->onScaleBegin(Landroid/view/ScaleGestureDetector;)Z
move-result v24
move/from16 v0, v24
move-object/from16 v1, p0
iput-boolean v0, v1, Landroid/view/ScaleGestureDetector;->mInProgress:Z
.line 289
const-string v24, "ScaleGestureDetector"
const-string v25, "SGD"
invoke-static/range {v24 .. v25}, Landroid/util/Log;->i(Ljava/lang/String;Ljava/lang/String;)I
.line 293
:cond_14
const/16 v24, 0x2
move/from16 v0, v24
if-ne v3, v0, :cond_16
.line 294
move/from16 v0, v17
move-object/from16 v1, p0
iput v0, v1, Landroid/view/ScaleGestureDetector;->mCurrSpanX:F
.line 295
move/from16 v0, v18
move-object/from16 v1, p0
iput v0, v1, Landroid/view/ScaleGestureDetector;->mCurrSpanY:F
.line 296
move/from16 v0, v16
move-object/from16 v1, p0
iput v0, v1, Landroid/view/ScaleGestureDetector;->mCurrSpan:F
.line 298
const/16 v22, 0x1
.line 299
.local v22, updatePrev:Z
move-object/from16 v0, p0
iget-boolean v0, v0, Landroid/view/ScaleGestureDetector;->mInProgress:Z
move/from16 v24, v0
if-eqz v24, :cond_15
.line 300
move-object/from16 v0, p0
iget-object v0, v0, Landroid/view/ScaleGestureDetector;->mListener:Landroid/view/ScaleGestureDetector$OnScaleGestureListener;
move-object/from16 v24, v0
move-object/from16 v0, v24
move-object/from16 v1, p0
invoke-interface {v0, v1}, Landroid/view/ScaleGestureDetector$OnScaleGestureListener;->onScale(Landroid/view/ScaleGestureDetector;)Z
move-result v22
.line 303
:cond_15
if-eqz v22, :cond_16
.line 304
move-object/from16 v0, p0
iget v0, v0, Landroid/view/ScaleGestureDetector;->mCurrSpanX:F
move/from16 v24, v0
move/from16 v0, v24
move-object/from16 v1, p0
iput v0, v1, Landroid/view/ScaleGestureDetector;->mPrevSpanX:F
.line 305
move-object/from16 v0, p0
iget v0, v0, Landroid/view/ScaleGestureDetector;->mCurrSpanY:F
move/from16 v24, v0
move/from16 v0, v24
move-object/from16 v1, p0
iput v0, v1, Landroid/view/ScaleGestureDetector;->mPrevSpanY:F
.line 306
move-object/from16 v0, p0
iget v0, v0, Landroid/view/ScaleGestureDetector;->mCurrSpan:F
move/from16 v24, v0
move/from16 v0, v24
move-object/from16 v1, p0
iput v0, v1, Landroid/view/ScaleGestureDetector;->mPrevSpan:F
.line 310
.end local v22 #updatePrev:Z
:cond_16
const/16 v24, 0x1
goto/16 :goto_0
.end method
Recompile to test then add the toggle from the OP.
Hope this helps.
shoman94 said:
So in typical Samsung style they decided to disable Edge Zoom in the official release (XWLS8)
Here is how we re-enable it and allow the toggle int he OP to still function correctly.
Decompile framework.jar
Go here:
\framework\smali\android\view\ScaleGestureDetector.smali
Find:
Code:
[B].method public onTouchEvent(Landroid/view/MotionEvent;)Z[/B]
Replace that entire method with this:
Code:
.method public onTouchEvent(Landroid/view/MotionEvent;)Z
.locals 26
.parameter "event"
.prologue
.line 207
move-object/from16 v0, p0
iget-object v0, v0, Landroid/view/ScaleGestureDetector;->mInputEventConsistencyVerifier:Landroid/view/InputEventConsistencyVerifier;
move-object/from16 v24, v0
if-eqz v24, :cond_0
.line 208
move-object/from16 v0, p0
iget-object v0, v0, Landroid/view/ScaleGestureDetector;->mInputEventConsistencyVerifier:Landroid/view/InputEventConsistencyVerifier;
move-object/from16 v24, v0
const/16 v25, 0x0
move-object/from16 v0, v24
move-object/from16 v1, p1
move/from16 v2, v25
invoke-virtual {v0, v1, v2}, Landroid/view/InputEventConsistencyVerifier;->onTouchEvent(Landroid/view/MotionEvent;I)V
.line 213
:cond_0
move-object/from16 v0, p0
iget-boolean v0, v0, Landroid/view/ScaleGestureDetector;->mValidPackage:Z
move/from16 v24, v0
if-eqz v24, :cond_1
invoke-direct/range {p0 .. p1}, Landroid/view/ScaleGestureDetector;->onEdgeTouchEvent(Landroid/view/MotionEvent;)Z
move-result v24
if-eqz v24, :cond_1
const/16 v24, 0x1
.line 310
:goto_0
return v24
.line 213
:cond_1
invoke-virtual/range {p1 .. p1}, Landroid/view/MotionEvent;->getActionMasked()I
move-result v3
.line 215
.local v3, action:I
const/16 v24, 0x1
move/from16 v0, v24
if-eq v3, v0, :cond_2
const/16 v24, 0x3
move/from16 v0, v24
if-ne v3, v0, :cond_5
:cond_2
const/16 v19, 0x1
.line 217
.local v19, streamComplete:Z
:goto_1
if-eqz v3, :cond_3
if-eqz v19, :cond_6
.line 221
:cond_3
move-object/from16 v0, p0
iget-boolean v0, v0, Landroid/view/ScaleGestureDetector;->mInProgress:Z
move/from16 v24, v0
if-eqz v24, :cond_4
.line 222
move-object/from16 v0, p0
iget-object v0, v0, Landroid/view/ScaleGestureDetector;->mListener:Landroid/view/ScaleGestureDetector$OnScaleGestureListener;
move-object/from16 v24, v0
move-object/from16 v0, v24
move-object/from16 v1, p0
invoke-interface {v0, v1}, Landroid/view/ScaleGestureDetector$OnScaleGestureListener;->onScaleEnd(Landroid/view/ScaleGestureDetector;)V
.line 223
const/16 v24, 0x0
move/from16 v0, v24
move-object/from16 v1, p0
iput-boolean v0, v1, Landroid/view/ScaleGestureDetector;->mInProgress:Z
.line 224
const/16 v24, 0x0
move/from16 v0, v24
move-object/from16 v1, p0
iput v0, v1, Landroid/view/ScaleGestureDetector;->mInitialSpan:F
.line 227
:cond_4
if-eqz v19, :cond_6
.line 228
const/16 v24, 0x1
goto :goto_0
.line 215
.end local v19 #streamComplete:Z
:cond_5
const/16 v19, 0x0
goto :goto_1
.line 232
.restart local v19 #streamComplete:Z
:cond_6
const/16 v24, 0x6
move/from16 v0, v24
if-eq v3, v0, :cond_7
const/16 v24, 0x5
move/from16 v0, v24
if-ne v3, v0, :cond_8
:cond_7
const/4 v4, 0x1
.line 235
.local v4, configChanged:Z
:goto_2
const/16 v24, 0x6
move/from16 v0, v24
if-ne v3, v0, :cond_9
const/4 v14, 0x1
.line 236
.local v14, pointerUp:Z
:goto_3
if-eqz v14, :cond_a
invoke-virtual/range {p1 .. p1}, Landroid/view/MotionEvent;->getActionIndex()I
move-result v15
.line 239
.local v15, skipIndex:I
:goto_4
const/16 v20, 0x0
.local v20, sumX:F
const/16 v21, 0x0
.line 240
.local v21, sumY:F
invoke-virtual/range {p1 .. p1}, Landroid/view/MotionEvent;->getPointerCount()I
move-result v5
.line 241
.local v5, count:I
const/4 v13, 0x0
.local v13, i:I
:goto_5
if-ge v13, v5, :cond_c
.line 242
if-ne v15, v13, :cond_b
.line 241
:goto_6
add-int/lit8 v13, v13, 0x1
goto :goto_5
.line 232
.end local v4 #configChanged:Z
.end local v5 #count:I
.end local v13 #i:I
.end local v14 #pointerUp:Z
.end local v15 #skipIndex:I
.end local v20 #sumX:F
.end local v21 #sumY:F
:cond_8
const/4 v4, 0x0
goto :goto_2
.line 235
.restart local v4 #configChanged:Z
:cond_9
const/4 v14, 0x0
goto :goto_3
.line 236
.restart local v14 #pointerUp:Z
:cond_a
const/4 v15, -0x1
goto :goto_4
.line 243
.restart local v5 #count:I
.restart local v13 #i:I
.restart local v15 #skipIndex:I
.restart local v20 #sumX:F
.restart local v21 #sumY:F
:cond_b
move-object/from16 v0, p1
invoke-virtual {v0, v13}, Landroid/view/MotionEvent;->getX(I)F
move-result v24
add-float v20, v20, v24
.line 244
move-object/from16 v0, p1
invoke-virtual {v0, v13}, Landroid/view/MotionEvent;->getY(I)F
move-result v24
add-float v21, v21, v24
goto :goto_6
.line 246
:cond_c
if-eqz v14, :cond_d
add-int/lit8 v10, v5, -0x1
.line 247
.local v10, div:I
:goto_7
int-to-float v0, v10
move/from16 v24, v0
div-float v11, v20, v24
.line 248
.local v11, focusX:F
int-to-float v0, v10
move/from16 v24, v0
div-float v12, v21, v24
.line 251
.local v12, focusY:F
const/4 v6, 0x0
.local v6, devSumX:F
const/4 v7, 0x0
.line 252
.local v7, devSumY:F
const/4 v13, 0x0
:goto_8
if-ge v13, v5, :cond_f
.line 253
if-ne v15, v13, :cond_e
.line 252
:goto_9
add-int/lit8 v13, v13, 0x1
goto :goto_8
.end local v6 #devSumX:F
.end local v7 #devSumY:F
.end local v10 #div:I
.end local v11 #focusX:F
.end local v12 #focusY:F
:cond_d
move v10, v5
.line 246
goto :goto_7
.line 254
.restart local v6 #devSumX:F
.restart local v7 #devSumY:F
.restart local v10 #div:I
.restart local v11 #focusX:F
.restart local v12 #focusY:F
:cond_e
move-object/from16 v0, p1
invoke-virtual {v0, v13}, Landroid/view/MotionEvent;->getX(I)F
move-result v24
sub-float v24, v24, v11
invoke-static/range {v24 .. v24}, Ljava/lang/Math;->abs(F)F
move-result v24
add-float v6, v6, v24
.line 255
move-object/from16 v0, p1
invoke-virtual {v0, v13}, Landroid/view/MotionEvent;->getY(I)F
move-result v24
sub-float v24, v24, v12
invoke-static/range {v24 .. v24}, Ljava/lang/Math;->abs(F)F
move-result v24
add-float v7, v7, v24
goto :goto_9
.line 257
:cond_f
int-to-float v0, v10
move/from16 v24, v0
div-float v8, v6, v24
.line 258
.local v8, devX:F
int-to-float v0, v10
move/from16 v24, v0
div-float v9, v7, v24
.line 263
.local v9, devY:F
const/high16 v24, 0x4000
mul-float v17, v8, v24
.line 264
.local v17, spanX:F
const/high16 v24, 0x4000
mul-float v18, v9, v24
.line 265
.local v18, spanY:F
mul-float v24, v17, v17
mul-float v25, v18, v18
add-float v24, v24, v25
invoke-static/range {v24 .. v24}, Landroid/util/FloatMath;->sqrt(F)F
move-result v16
.line 270
.local v16, span:F
move-object/from16 v0, p0
iget-boolean v0, v0, Landroid/view/ScaleGestureDetector;->mInProgress:Z
move/from16 v23, v0
.line 271
.local v23, wasInProgress:Z
move-object/from16 v0, p0
iput v11, v0, Landroid/view/ScaleGestureDetector;->mFocusX:F
.line 272
move-object/from16 v0, p0
iput v12, v0, Landroid/view/ScaleGestureDetector;->mFocusY:F
.line 273
move-object/from16 v0, p0
iget-boolean v0, v0, Landroid/view/ScaleGestureDetector;->mInProgress:Z
move/from16 v24, v0
if-eqz v24, :cond_11
const/16 v24, 0x0
cmpl-float v24, v16, v24
if-eqz v24, :cond_10
if-eqz v4, :cond_11
.line 274
:cond_10
move-object/from16 v0, p0
iget-object v0, v0, Landroid/view/ScaleGestureDetector;->mListener:Landroid/view/ScaleGestureDetector$OnScaleGestureListener;
move-object/from16 v24, v0
move-object/from16 v0, v24
move-object/from16 v1, p0
invoke-interface {v0, v1}, Landroid/view/ScaleGestureDetector$OnScaleGestureListener;->onScaleEnd(Landroid/view/ScaleGestureDetector;)V
.line 275
const/16 v24, 0x0
move/from16 v0, v24
move-object/from16 v1, p0
iput-boolean v0, v1, Landroid/view/ScaleGestureDetector;->mInProgress:Z
.line 276
move/from16 v0, v16
move-object/from16 v1, p0
iput v0, v1, Landroid/view/ScaleGestureDetector;->mInitialSpan:F
.line 278
:cond_11
if-eqz v4, :cond_12
.line 279
move/from16 v0, v17
move-object/from16 v1, p0
iput v0, v1, Landroid/view/ScaleGestureDetector;->mCurrSpanX:F
move/from16 v0, v17
move-object/from16 v1, p0
iput v0, v1, Landroid/view/ScaleGestureDetector;->mPrevSpanX:F
.line 280
move/from16 v0, v18
move-object/from16 v1, p0
iput v0, v1, Landroid/view/ScaleGestureDetector;->mCurrSpanY:F
move/from16 v0, v18
move-object/from16 v1, p0
iput v0, v1, Landroid/view/ScaleGestureDetector;->mPrevSpanY:F
.line 281
move/from16 v0, v16
move-object/from16 v1, p0
iput v0, v1, Landroid/view/ScaleGestureDetector;->mCurrSpan:F
move/from16 v0, v16
move-object/from16 v1, p0
iput v0, v1, Landroid/view/ScaleGestureDetector;->mPrevSpan:F
move/from16 v0, v16
move-object/from16 v1, p0
iput v0, v1, Landroid/view/ScaleGestureDetector;->mInitialSpan:F
.line 283
:cond_12
move-object/from16 v0, p0
iget-boolean v0, v0, Landroid/view/ScaleGestureDetector;->mInProgress:Z
move/from16 v24, v0
if-nez v24, :cond_14
const/16 v24, 0x0
cmpl-float v24, v16, v24
if-eqz v24, :cond_14
if-nez v23, :cond_13
move-object/from16 v0, p0
iget v0, v0, Landroid/view/ScaleGestureDetector;->mInitialSpan:F
move/from16 v24, v0
sub-float v24, v16, v24
invoke-static/range {v24 .. v24}, Ljava/lang/Math;->abs(F)F
move-result v24
move-object/from16 v0, p0
iget v0, v0, Landroid/view/ScaleGestureDetector;->mSpanSlop:I
move/from16 v25, v0
move/from16 v0, v25
int-to-float v0, v0
move/from16 v25, v0
cmpl-float v24, v24, v25
if-lez v24, :cond_14
.line 285
:cond_13
move/from16 v0, v17
move-object/from16 v1, p0
iput v0, v1, Landroid/view/ScaleGestureDetector;->mCurrSpanX:F
move/from16 v0, v17
move-object/from16 v1, p0
iput v0, v1, Landroid/view/ScaleGestureDetector;->mPrevSpanX:F
.line 286
move/from16 v0, v18
move-object/from16 v1, p0
iput v0, v1, Landroid/view/ScaleGestureDetector;->mCurrSpanY:F
move/from16 v0, v18
move-object/from16 v1, p0
iput v0, v1, Landroid/view/ScaleGestureDetector;->mPrevSpanY:F
.line 287
move/from16 v0, v16
move-object/from16 v1, p0
iput v0, v1, Landroid/view/ScaleGestureDetector;->mCurrSpan:F
move/from16 v0, v16
move-object/from16 v1, p0
iput v0, v1, Landroid/view/ScaleGestureDetector;->mPrevSpan:F
.line 288
move-object/from16 v0, p0
iget-object v0, v0, Landroid/view/ScaleGestureDetector;->mListener:Landroid/view/ScaleGestureDetector$OnScaleGestureListener;
move-object/from16 v24, v0
move-object/from16 v0, v24
move-object/from16 v1, p0
invoke-interface {v0, v1}, Landroid/view/ScaleGestureDetector$OnScaleGestureListener;->onScaleBegin(Landroid/view/ScaleGestureDetector;)Z
move-result v24
move/from16 v0, v24
move-object/from16 v1, p0
iput-boolean v0, v1, Landroid/view/ScaleGestureDetector;->mInProgress:Z
.line 289
const-string v24, "ScaleGestureDetector"
const-string v25, "SGD"
invoke-static/range {v24 .. v25}, Landroid/util/Log;->i(Ljava/lang/String;Ljava/lang/String;)I
.line 293
:cond_14
const/16 v24, 0x2
move/from16 v0, v24
if-ne v3, v0, :cond_16
.line 294
move/from16 v0, v17
move-object/from16 v1, p0
iput v0, v1, Landroid/view/ScaleGestureDetector;->mCurrSpanX:F
.line 295
move/from16 v0, v18
move-object/from16 v1, p0
iput v0, v1, Landroid/view/ScaleGestureDetector;->mCurrSpanY:F
.line 296
move/from16 v0, v16
move-object/from16 v1, p0
iput v0, v1, Landroid/view/ScaleGestureDetector;->mCurrSpan:F
.line 298
const/16 v22, 0x1
.line 299
.local v22, updatePrev:Z
move-object/from16 v0, p0
iget-boolean v0, v0, Landroid/view/ScaleGestureDetector;->mInProgress:Z
move/from16 v24, v0
if-eqz v24, :cond_15
.line 300
move-object/from16 v0, p0
iget-object v0, v0, Landroid/view/ScaleGestureDetector;->mListener:Landroid/view/ScaleGestureDetector$OnScaleGestureListener;
move-object/from16 v24, v0
move-object/from16 v0, v24
move-object/from16 v1, p0
invoke-interface {v0, v1}, Landroid/view/ScaleGestureDetector$OnScaleGestureListener;->onScale(Landroid/view/ScaleGestureDetector;)Z
move-result v22
.line 303
:cond_15
if-eqz v22, :cond_16
.line 304
move-object/from16 v0, p0
iget v0, v0, Landroid/view/ScaleGestureDetector;->mCurrSpanX:F
move/from16 v24, v0
move/from16 v0, v24
move-object/from16 v1, p0
iput v0, v1, Landroid/view/ScaleGestureDetector;->mPrevSpanX:F
.line 305
move-object/from16 v0, p0
iget v0, v0, Landroid/view/ScaleGestureDetector;->mCurrSpanY:F
move/from16 v24, v0
move/from16 v0, v24
move-object/from16 v1, p0
iput v0, v1, Landroid/view/ScaleGestureDetector;->mPrevSpanY:F
.line 306
move-object/from16 v0, p0
iget v0, v0, Landroid/view/ScaleGestureDetector;->mCurrSpan:F
move/from16 v24, v0
move/from16 v0, v24
move-object/from16 v1, p0
iput v0, v1, Landroid/view/ScaleGestureDetector;->mPrevSpan:F
.line 310
.end local v22 #updatePrev:Z
:cond_16
const/16 v24, 0x1
goto/16 :goto_0
.end method
Recompile to test then add the toggle from the OP.
Hope this helps.
Click to expand...
Click to collapse
nice job man.would you please tell me how can i add the toggle from the OP?
emam damon said:
nice job man.would you please tell me how can i add the toggle from the OP?
Click to expand...
Click to collapse
Umm... follow the op instructions
Sent from my SGH-I777 using Tapatalk 2
HI... great job!!
can you tell me the best tool to use to extract the string.xml display.setting.xml e.t.c e.t.c ?
thanks
Thanks . I published that in my next build
---------- Post added at 01:32 PM ---------- Previous post was at 01:31 PM ----------
Can you maybe make a screenshot, or not ?
i get errors when i compile these they conflict with other id's
<public type="string" name="edgezoom_title" id="0x7f090ef4" />
<public type="string" name="edgezoom_summary" id="0x7f090ef5" />
are there other id's i can use?
welard said:
i get errors when i compile these they conflict with other id's
<public type="string" name="edgezoom_title" id="0x7f090ef4" />
<public type="string" name="edgezoom_summary" id="0x7f090ef5" />
are there other id's i can use?
Click to expand...
Click to collapse
Technically with this mod you shouldn't have to enter anything in public.xml. Its not an ID that you have to specify in smali so it "should" create it while compiling.
Otherwise you need to find your next available ID.
shoman94 said:
Technically with this mod you shouldn't have to enter anything in public.xml. Its not an ID that you have to specify in smali so it "should" create it while compiling.
Otherwise you need to find your next available ID.
Click to expand...
Click to collapse
ok thank you:good:
i got it working but it doesnt disable when unticked it still zooms
welard said:
ok thank you:good:
i got it working but it doesnt disable when unticked it still zooms
Click to expand...
Click to collapse
The browser has to be force closed so it had to re load into memory.
Sent from my SGH-I777 using Tapatalk 2
Nice work. I would just like zoom feature to just work for me as a zip file
Sent from my GT-I9100 using Tapatalk 2
Sorry but im trying very hard to follow the guide to build a mod for LSS Neatrom Lite but i have had a few problems if you could help plz. First problem i had was i couldnt recompile Secsetting.apk but i saw a futher post by shoman that told another member that this
Code:
<public type="string" name="edgezoom_title" id="0x7f090ef4" />
<public type="string" name="edgezoom_summary" id="0x7f090ef5" />
Wasnt needed and so i left out and compiled fine with toggle in settings.
So followed guide for Framework.jar after adding edgezoom and pushed to my device and now my browser just crashes "Unfortunately, Internet has stopped, i have tried clearing data hoping that may help but hasnt. Can anyone offer any advice please
bombaybadboy said:
Sorry but im trying very hard to follow the guide to build a mod for LSS Neatrom Lite but i have had a few problems if you could help plz. First problem i had was i couldnt recompile Secsetting.apk but i saw a futher post by shoman that told another member that this
Code:
<public type="string" name="edgezoom_title" id="0x7f090ef4" />
<public type="string" name="edgezoom_summary" id="0x7f090ef5" />
Wasnt needed and so i left out and compiled fine with toggle in settings.
So followed guide for Framework.jar after adding edgezoom and pushed to my device and now my browser just crashes "Unfortunately, Internet has stopped, i have tried clearing data hoping that may help but hasnt. Can anyone offer any advice please
Click to expand...
Click to collapse
Using the code feature, or if its too big use pastebin, please post the ZoomManager.smali text so I may look at the code. Thanks.
Edit: Also did you re-enable edgezoom from this post? http://forum.xda-developers.com/showpost.php?p=37602131&postcount=3
first edit here
Code:
.field private mZoomScale:F
.field private mZoomStart:J
.field private motionListener:Landroid/hardware/motion/MRListener;
.field private registerTiltListener:Z
.field private final mContext:Landroid/content/Context;
# direct methods
.method static constructor ()V
.registers 1
.prologue
.line 58
const-class v0, Landroid/webkit/ZoomManager;
2nd edit
Code:
invoke-direct {v0, p0}, Landroid/webkit/ZoomManager$FocusMovementQueue;->(Landroid/webkit/ZoomManager;)V
iput-object v0, p0, Landroid/webkit/ZoomManager;->mFocusMovementQueue:Landroid/webkit/ZoomManager$FocusMovementQueue;
.line 298
return-void
invoke-virtual {p1}, Landroid/webkit/WebViewClassic;->getContext()Landroid/content/Context;
move-result-object v0
iput-object v0, p0, Landroid/webkit/ZoomManager;->mContext:Landroid/content/Context;
.end method
3rd edit
Code:
.method setEdgeZoom(Z)V
.registers 12
.parameter "enabled"
.prologue
#const/4 v5, 0x1
const/4 v4, 0x0
iget-object v2, p0, Landroid/webkit/ZoomManager;->mContext:Landroid/content/Context;
invoke-virtual {v2}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v2
const-string v3, "edgezoom_toggle"
invoke-static {v2, v3, v4}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v5
if-nez v5, :disable_ez
const/4 v5, 0x1
goto :toggle_resume
:disable_ez
const/4 v5, 0x0
:toggle_resume
.line 1602
invoke-virtual {p0}, Landroid/webkit/ZoomManager;->getScaleGestureDetector()Landroid/view/ScaleGestureDetector;
Sorry didnt see your edit, yes I enabled edge zoom from your 3rd post of this thread
Here is my complete ZoomManager.smali
If I have already put the toggle crt effect, as it should do to make them work the two?
If I put only one (does not matter which is) this works correctly, but want to put the two only works one. What do I do?
Edit : I could fix this. It was only two conditions change. Thanks anyway.
Sorry for my bad english...
bombaybadboy said:
first edit here
Code:
.field private mZoomScale:F
.field private mZoomStart:J
.field private motionListener:Landroid/hardware/motion/MRListener;
.field private registerTiltListener:Z
.field private final mContext:Landroid/content/Context;
# direct methods
.method static constructor ()V
.registers 1
.prologue
.line 58
const-class v0, Landroid/webkit/ZoomManager;
2nd edit
Code:
invoke-direct {v0, p0}, Landroid/webkit/ZoomManager$FocusMovementQueue;->(Landroid/webkit/ZoomManager;)V
iput-object v0, p0, Landroid/webkit/ZoomManager;->mFocusMovementQueue:Landroid/webkit/ZoomManager$FocusMovementQueue;
.line 298
return-void
invoke-virtual {p1}, Landroid/webkit/WebViewClassic;->getContext()Landroid/content/Context;
move-result-object v0
iput-object v0, p0, Landroid/webkit/ZoomManager;->mContext:Landroid/content/Context;
.end method
3rd edit
Code:
.method setEdgeZoom(Z)V
.registers 12
.parameter "enabled"
.prologue
#const/4 v5, 0x1
const/4 v4, 0x0
iget-object v2, p0, Landroid/webkit/ZoomManager;->mContext:Landroid/content/Context;
invoke-virtual {v2}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v2
const-string v3, "edgezoom_toggle"
invoke-static {v2, v3, v4}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v5
if-nez v5, :disable_ez
const/4 v5, 0x1
goto :toggle_resume
:disable_ez
const/4 v5, 0x0
:toggle_resume
.line 1602
invoke-virtual {p0}, Landroid/webkit/ZoomManager;->getScaleGestureDetector()Landroid/view/ScaleGestureDetector;
Sorry didnt see your edit, yes I enabled edge zoom from your 3rd post of this thread
Here is my complete ZoomManager.smali
Click to expand...
Click to collapse
ZoomManager.smali looks in order. With it enabled from my post alone it should be working by default. Adding in the code from the OP just enables it to be toggled and by default is also enabled. You are aware that it doesn't work on all apps....only certain ones. The stock browser and gmail are 2 that I know of.
EDIT: IF you have a logcat of the error that would be very helpful.
I Dont have PC available to me till tomorrow but i have tried making a log with catlog + terminal and opening stock browser twice with toggle on and twice with toggle off, crashed every time. tomorrow i will use adb to make a log but these logs i have now if helpful. I have added spaces to logcat to find errors a little better
I've been trying to do but I get compile error because apparently it is not compatible with this mod
http://forum.xda-developers.com/showthread.php?t=2194003
Enviado desde mi GT-I9100 usando Tapatalk 2
bombaybadboy said:
I Dont have PC available to me till tomorrow but i have tried making a log with catlog + terminal and opening stock browser twice with toggle on and twice with toggle off, crashed every time. tomorrow i will use adb to make a log but these logs i have now if helpful. I have added spaces to logcat to find errors a little better
Click to expand...
Click to collapse
I'm having the same nullpointer exception errors in zoommanager.smali. I went as far as making all the SecSettings edits first to make sure that ran fine (edgezoom is working but toggle isn't applied yet in framework.jar of course). As soon as I make edits to framework.jar, that is when I get the internet FC and nullpointer exceptions in logcat.
Hi i want share this method to all step by step
in 4 step
You need knows about smali and backsmali And Notpad++....
1.Decompile Services.jar
Go to smali\com\android\server\pm
Open PackageManagerService.smali with Notpad++
2.Find this Method:
Code:
.method static compareSignatures([Landroid/content/pm/Signature;[Landroid/content/pm/Signature;)I
.locals 7
.parameter "s1"
.parameter "s2"
.prologue
.line 3445
if-nez p0, :cond_1
.line 3446
if-nez p1, :cond_0
const/4 v6, 0x1
.line 3465
:goto_0
return v6
.line 3446
:cond_0
const/4 v6, -0x1
goto :goto_0
.line 3450
:cond_1
if-nez p1, :cond_2
.line 3451
const/4 v6, -0x2
goto :goto_0
.line 3453
:cond_2
new-instance v3, Ljava/util/HashSet;
invoke-direct {v3}, Ljava/util/HashSet;-><init>()V
.line 3454
.local v3, set1:Ljava/util/HashSet;,"Ljava/util/HashSet<Landroid/content/pm/Signature;>;"
move-object v0, p0
.local v0, arr$:[Landroid/content/pm/Signature;
array-length v2, v0
.local v2, len$:I
const/4 v1, 0x0
.local v1, i$:I
:goto_1
if-ge v1, v2, :cond_3
aget-object v5, v0, v1
.line 3455
.local v5, sig:Landroid/content/pm/Signature;
invoke-virtual {v3, v5}, Ljava/util/HashSet;->add(Ljava/lang/Object;)Z
.line 3454
add-int/lit8 v1, v1, 0x1
goto :goto_1
.line 3457
.end local v5 #sig:Landroid/content/pm/Signature;
:cond_3
new-instance v4, Ljava/util/HashSet;
invoke-direct {v4}, Ljava/util/HashSet;-><init>()V
.line 3458
.local v4, set2:Ljava/util/HashSet;,"Ljava/util/HashSet<Landroid/content/pm/Signature;>;"
move-object v0, p1
array-length v2, v0
const/4 v1, 0x0
:goto_2
if-ge v1, v2, :cond_4
aget-object v5, v0, v1
.line 3459
.restart local v5 #sig:Landroid/content/pm/Signature;
invoke-virtual {v4, v5}, Ljava/util/HashSet;->add(Ljava/lang/Object;)Z
.line 3458
add-int/lit8 v1, v1, 0x1
goto :goto_2
.line 3462
.end local v5 #sig:Landroid/content/pm/Signature;
:cond_4
invoke-virtual {v3, v4}, Ljava/util/HashSet;->equals(Ljava/lang/Object;)Z
move-result v6
if-eqz v6, :cond_5
.line 3463
const/4 v6, 0x0
goto :goto_0
.line 3465
:cond_5
const/4 v6, -0x3
goto :goto_0
.end method
3.Chang it to this:
Code:
.method static compareSignatures([Landroid/content/pm/Signature;[Landroid/content/pm/Signature;)I
.locals 7
const-string p0, "Biftor:"
const-string p1, "Skip signatures check"
invoke-static {p0, p1}, Landroid/util/Log;->v(Ljava/lang/String;Ljava/lang/String;)I
const/4 v6, 0x0
return v6
.end method
you can chang "Biftor" to your name
Save That
4.Recompile Services.jar Again
after this you can Sign all of System App and enjoy it!
This topick For Persian user
Thanks to Wanam for first learn this to me!
Goodluck
Armin
Biftor™
Great. Thanks for sharing.
Big thanks :good:
Double Tap Statusbar to Sleep
In the spirit of open source, i would like to share my HarshJelly ROM's new feature backported from CM11.
What it does : Double tap statusbar anywhere to sleep device.
Requirements :
SystemUI.apk
Apktool
Notepad++
So let's begin
Decompile SystemUI.apk
Open com\android\systemui\statusbar\phone\PhoneStatusBarView.smali
Add following code after #static fields
Code:
.field static c:Landroid/content/Context;
Add this after #instance fields
Code:
.field private mDoubleTapGesture:Landroid/view/GestureDetector;
Now search for .method public constructor <init>(Landroid/content/Context;Landroid/util/AttributeSetV and delete
Code:
[COLOR="Red"]const/4 v2, 0x0[/COLOR]
which comes in beginning of this method.
Now after invoke-direct {p0, p1, p2}, Landroid/widget/FrameLayout;-><init>(Landroid/content/Context;Landroid/util/AttributeSetV add following code
Code:
sput-object p1, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->c:Landroid/content/Context;
new-instance v0, Landroid/view/GestureDetector;
sget-object v1, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->c:Landroid/content/Context;
new-instance v2, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView$1;
invoke-direct {v2, p0}, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView$1;-><init>(Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;)V
invoke-direct {v0, v1, v2}, Landroid/view/GestureDetector;-><init>(Landroid/content/Context;Landroid/view/GestureDetector$OnGestureListener;)V
iput-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->mDoubleTapGesture:Landroid/view/GestureDetector;
const/4 v2, 0x0
Now search for .method public onTouchEvent(Landroid/view/MotionEventZ at the starting of this method add
Code:
iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->mDoubleTapGesture:Landroid/view/GestureDetector;
invoke-virtual {v0, p1}, Landroid/view/GestureDetector;->onTouchEvent(Landroid/view/MotionEvent;)Z
Download attached file, extract it & put PhoneStatusBarView$1.smali to com\android\systemui\statusbar\phone
Compile back, it is done...
Click to expand...
Click to collapse
And yeah a big thanks goes to CyanogenMod Team...
I tested this on Touchwiz JB 4.1.2 but it should work on any device with 4.1.2 or any device > 4.1 with some modification (if necessary)...
If you found any error then report here along with FULL LOG. I'll ignore posts without logs.
Updated method. Now there won't be FC (i forget to add one line)
BOOTMGR said:
Updated method. Now there won't be FC (i forget to add one line)
Click to expand...
Click to collapse
Working GR8
Thanx
Can you do one zip file , in which we just to flash this zip to have this mod?
Gesendet von meinem GT-I9070 mit Tapatalk
You are really a great developer... @BOOTMGR
Sent from my GT-I9070 using Tapatalk
Thanks, this works on my device JB 4.1.2. Keep on sharing your mods Sir :good:
BOOTMGR said:
Updated method. Now there won't be FC (i forget to add one line)
Click to expand...
Click to collapse
i try this on 4.2.2 rom. it original have the PhoneStatusBarView$1.smali can u help me...
Code:
.class Lcom/android/systemui/statusbar/phone/PhoneStatusBarView$1;
.super Landroid/content/BroadcastReceiver;
.source "PhoneStatusBarView.java"
# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
value = Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;
.end annotation
.annotation system Ldalvik/annotation/InnerClass;
accessFlags = 0x0
name = null
.end annotation
# instance fields
.field final synthetic this$0:Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;
# direct methods
.method constructor <init>(Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;)V
.locals 0
.parameter
.prologue
.line 120
iput-object p1, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView$1;->this$0:Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;
invoke-direct {p0}, Landroid/content/BroadcastReceiver;-><init>()V
return-void
.end method
# virtual methods
[COLOR="Red"].method public onDoubleTap(Landroid/view/MotionEvent;)Z
.locals 3
.parameter "e"
.prologue
.line 24
sget-object v1, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->c:Landroid/content/Context;
const-string v2, "power"
invoke-virtual {v1, v2}, Landroid/content/Context;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;
move-result-object v0
check-cast v0, Landroid/os/PowerManager;
.line 119
.local v0, pm:Landroid/os/PowerManager;
.line 120
if-eqz v0, :cond_0
.line 121
invoke-virtual {p1}, Landroid/view/MotionEvent;->getEventTime()J
move-result-wide v1
invoke-virtual {v0, v1, v2}, Landroid/os/PowerManager;->goToSleep(J)V
.line 122
:cond_0
const/4 v1, 0x1
return v1
.end method[/COLOR]
.method public onReceive(Landroid/content/Context;Landroid/content/Intent;)V
.locals 8
.parameter "context"
.parameter "intent"
.prologue
const/4 v7, 0x1
const/4 v3, 0x0
.line 123
invoke-virtual {p2}, Landroid/content/Intent;->getAction()Ljava/lang/String;
move-result-object v0
.line 124
.local v0, action:Ljava/lang/String;
const-string v2, "com.samsung.cover.OPEN"
invoke-virtual {v0, v2}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v2
if-eqz v2, :cond_0
.line 125
const-string v2, "coverOpen"
invoke-virtual {p2, v2, v3}, Landroid/content/Intent;->getBooleanExtra(Ljava/lang/String;Z)Z
move-result v2
if-ne v7, v2, :cond_1
.line 126
iget-object v2, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView$1;->this$0:Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;
#setter for: Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->mClearCoverMargin:I
invoke-static {v2, v3}, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->access$002(Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;I)I
.line 127
const-string v2, "PhoneStatusBarView"
new-instance v3, Ljava/lang/StringBuilder;
invoke-direct {v3}, Ljava/lang/StringBuilder;-><init>()V
const-string v4, "clear cover opened : "
invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v3
iget-object v4, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView$1;->this$0:Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;
#getter for: Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->mClearCoverMargin:I
invoke-static {v4}, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->access$000(Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;)I
move-result v4
invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
move-result-object v3
invoke-virtual {v3}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v3
invoke-static {v2, v3}, Landroid/util/Slog;->d(Ljava/lang/String;Ljava/lang/String;)I
.line 128
iget-object v2, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView$1;->this$0:Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;
iget-object v2, v2, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->mTicker:Landroid/view/ViewGroup;
iget-object v3, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView$1;->this$0:Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;
#getter for: Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->mTickerPaddingLeft:I
invoke-static {v3}, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->access$100(Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;)I
move-result v3
iget-object v4, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView$1;->this$0:Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;
#getter for: Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->mClearCoverMargin:I
invoke-static {v4}, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->access$000(Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;)I
move-result v4
add-int/2addr v3, v4
iget-object v4, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView$1;->this$0:Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;
#getter for: Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->mTickerPaddingTop:I
invoke-static {v4}, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->access$200(Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;)I
move-result v4
iget-object v5, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView$1;->this$0:Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;
#getter for: Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->mTickerPaddingRight:I
invoke-static {v5}, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->access$300(Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;)I
move-result v5
iget-object v6, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView$1;->this$0:Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;
#getter for: Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->mClearCoverMargin:I
invoke-static {v6}, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->access$000(Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;)I
move-result v6
add-int/2addr v5, v6
iget-object v6, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView$1;->this$0:Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;
#getter for: Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->mTickerPaddingBottom:I
invoke-static {v6}, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->access$400(Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;)I
move-result v6
invoke-virtual {v2, v3, v4, v5, v6}, Landroid/view/ViewGroup;->setPadding(IIII)V
.line 134
iget-object v2, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView$1;->this$0:Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;
iget-object v2, v2, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->mBar:Lcom/android/systemui/statusbar/phone/PhoneStatusBar;
invoke-virtual {v2, v7}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->showClockByClearCover(Z)V
.line 135
iget-object v2, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView$1;->this$0:Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;
iget-object v2, v2, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->mBlackBGView:Landroid/view/View;
const/16 v3, 0x8
invoke-virtual {v2, v3}, Landroid/view/View;->setVisibility(I)V
.line 137
iget-object v2, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView$1;->this$0:Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;
invoke-virtual {v2}, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->marqueeStatusBar()V
.line 162
:cond_0
:goto_0
return-void
.line 139
:cond_1
iget-object v2, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView$1;->this$0:Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;
iget-object v3, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView$1;->this$0:Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;
#getter for: Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->mIndent1:I
invoke-static {v3}, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->access$500(Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;)I
move-result v3
mul-int/lit8 v3, v3, 0x11
#setter for: Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->mClearCoverMargin:I
invoke-static {v2, v3}, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->access$002(Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;I)I
.line 140
new-instance v1, Landroid/os/Handler;
invoke-direct {v1}, Landroid/os/Handler;-><init>()V
.line 141
.local v1, mHandler:Landroid/os/Handler;
new-instance v2, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView$1$1;
invoke-direct {v2, p0}, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView$1$1;-><init>(Lcom/android/systemui/statusbar/phone/PhoneStatusBarView$1;)V
const-wide/16 v3, 0xaa
invoke-virtual {v1, v2, v3, v4}, Landroid/os/Handler;->postDelayed(Ljava/lang/Runnable;J)Z
goto :goto_0
.end method
Now after invoke-direct {p0, p1, p2}, Landroid/widget/FrameLayout;-><init>(Landroid/content/Context;Landroid/util/AttributeSetV add following code i cant fine it, can you show where shukd chuld it edit it
It looked a bit complicated at first, but IT WORKS.
You just saved my power button!
shazzl said:
i try this on 4.2.2 rom. it original have the PhoneStatusBarView$1.smali can u help me...
Code:
.class Lcom/android/systemui/statusbar/phone/PhoneStatusBarView$1;
.super Landroid/content/BroadcastReceiver;
.source "PhoneStatusBarView.java"
# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
value = Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;
.end annotation
.annotation system Ldalvik/annotation/InnerClass;
accessFlags = 0x0
name = null
.end annotation
# instance fields
.field final synthetic this$0:Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;
# direct methods
.method constructor <init>(Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;)V
.locals 0
.parameter
.prologue
.line 120
iput-object p1, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView$1;->this$0:Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;
invoke-direct {p0}, Landroid/content/BroadcastReceiver;-><init>()V
return-void
.end method
# virtual methods
[COLOR="Red"].method public onDoubleTap(Landroid/view/MotionEvent;)Z
.locals 3
.parameter "e"
.prologue
.line 24
sget-object v1, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->c:Landroid/content/Context;
const-string v2, "power"
invoke-virtual {v1, v2}, Landroid/content/Context;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;
move-result-object v0
check-cast v0, Landroid/os/PowerManager;
.line 119
.local v0, pm:Landroid/os/PowerManager;
.line 120
if-eqz v0, :cond_0
.line 121
invoke-virtual {p1}, Landroid/view/MotionEvent;->getEventTime()J
move-result-wide v1
invoke-virtual {v0, v1, v2}, Landroid/os/PowerManager;->goToSleep(J)V
.line 122
:cond_0
const/4 v1, 0x1
return v1
.end method[/COLOR]
.method public onReceive(Landroid/content/Context;Landroid/content/Intent;)V
.locals 8
.parameter "context"
.parameter "intent"
.prologue
const/4 v7, 0x1
const/4 v3, 0x0
.line 123
invoke-virtual {p2}, Landroid/content/Intent;->getAction()Ljava/lang/String;
move-result-object v0
.line 124
.local v0, action:Ljava/lang/String;
const-string v2, "com.samsung.cover.OPEN"
invoke-virtual {v0, v2}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v2
if-eqz v2, :cond_0
.line 125
const-string v2, "coverOpen"
invoke-virtual {p2, v2, v3}, Landroid/content/Intent;->getBooleanExtra(Ljava/lang/String;Z)Z
move-result v2
if-ne v7, v2, :cond_1
.line 126
iget-object v2, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView$1;->this$0:Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;
#setter for: Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->mClearCoverMargin:I
invoke-static {v2, v3}, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->access$002(Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;I)I
.line 127
const-string v2, "PhoneStatusBarView"
new-instance v3, Ljava/lang/StringBuilder;
invoke-direct {v3}, Ljava/lang/StringBuilder;-><init>()V
const-string v4, "clear cover opened : "
invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v3
iget-object v4, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView$1;->this$0:Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;
#getter for: Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->mClearCoverMargin:I
invoke-static {v4}, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->access$000(Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;)I
move-result v4
invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
move-result-object v3
invoke-virtual {v3}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v3
invoke-static {v2, v3}, Landroid/util/Slog;->d(Ljava/lang/String;Ljava/lang/String;)I
.line 128
iget-object v2, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView$1;->this$0:Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;
iget-object v2, v2, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->mTicker:Landroid/view/ViewGroup;
iget-object v3, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView$1;->this$0:Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;
#getter for: Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->mTickerPaddingLeft:I
invoke-static {v3}, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->access$100(Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;)I
move-result v3
iget-object v4, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView$1;->this$0:Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;
#getter for: Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->mClearCoverMargin:I
invoke-static {v4}, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->access$000(Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;)I
move-result v4
add-int/2addr v3, v4
iget-object v4, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView$1;->this$0:Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;
#getter for: Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->mTickerPaddingTop:I
invoke-static {v4}, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->access$200(Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;)I
move-result v4
iget-object v5, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView$1;->this$0:Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;
#getter for: Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->mTickerPaddingRight:I
invoke-static {v5}, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->access$300(Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;)I
move-result v5
iget-object v6, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView$1;->this$0:Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;
#getter for: Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->mClearCoverMargin:I
invoke-static {v6}, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->access$000(Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;)I
move-result v6
add-int/2addr v5, v6
iget-object v6, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView$1;->this$0:Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;
#getter for: Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->mTickerPaddingBottom:I
invoke-static {v6}, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->access$400(Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;)I
move-result v6
invoke-virtual {v2, v3, v4, v5, v6}, Landroid/view/ViewGroup;->setPadding(IIII)V
.line 134
iget-object v2, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView$1;->this$0:Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;
iget-object v2, v2, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->mBar:Lcom/android/systemui/statusbar/phone/PhoneStatusBar;
invoke-virtual {v2, v7}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->showClockByClearCover(Z)V
.line 135
iget-object v2, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView$1;->this$0:Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;
iget-object v2, v2, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->mBlackBGView:Landroid/view/View;
const/16 v3, 0x8
invoke-virtual {v2, v3}, Landroid/view/View;->setVisibility(I)V
.line 137
iget-object v2, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView$1;->this$0:Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;
invoke-virtual {v2}, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->marqueeStatusBar()V
.line 162
:cond_0
:goto_0
return-void
.line 139
:cond_1
iget-object v2, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView$1;->this$0:Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;
iget-object v3, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView$1;->this$0:Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;
#getter for: Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->mIndent1:I
invoke-static {v3}, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->access$500(Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;)I
move-result v3
mul-int/lit8 v3, v3, 0x11
#setter for: Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->mClearCoverMargin:I
invoke-static {v2, v3}, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->access$002(Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;I)I
.line 140
new-instance v1, Landroid/os/Handler;
invoke-direct {v1}, Landroid/os/Handler;-><init>()V
.line 141
.local v1, mHandler:Landroid/os/Handler;
new-instance v2, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView$1$1;
invoke-direct {v2, p0}, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView$1$1;-><init>(Lcom/android/systemui/statusbar/phone/PhoneStatusBarView$1;)V
const-wide/16 v3, 0xaa
invoke-virtual {v1, v2, v3, v4}, Landroid/os/Handler;->postDelayed(Ljava/lang/Runnable;J)Z
goto :goto_0
.end method
Now after invoke-direct {p0, p1, p2}, Landroid/widget/FrameLayout;-><init>(Landroid/content/Context;Landroid/util/AttributeSetV add following code i cant fine it, can you show where shukd chuld it edit it
Click to expand...
Click to collapse
If you already have PhoneStatusBarView$1 then don't merge changes. Just rename my file to PhoneStatusBarView$2 & replace all other occurences of PhoneStatusBarView$1 with PhoneStatusBarView$2 apperaring on this tutorial.
Hello BOOTMGR,
I try on 4.2.1 ROM, but my PhoneStatusBarView.smali doesn't have "invoke-direct {p0, p1, p2}, Landroid/widget/FrameLayout;-...". Can you show me how to integrate? My Rom has only PhoneStatusBarView.smali file
Code:
.class public Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;
.super Lcom/android/systemui/statusbar/phone/PanelBar;
.source "PhoneStatusBarView.java"
# static fields
.field private static final DEBUG:Z = false
.field private static final TAG:Ljava/lang/String; = "PhoneStatusBarView"
# instance fields
.field mBar:Lcom/android/systemui/statusbar/phone/PhoneStatusBar;
.field mFadingPanel:Lcom/android/systemui/statusbar/phone/PanelView;
.field mFullWidthNotifications:Z
.field mLastFullyOpenedPanel:Lcom/android/systemui/statusbar/phone/PanelView;
.field mNotificationPanel:Lcom/android/systemui/statusbar/phone/PanelView;
.field mScrimColor:I
.field mSettingsPanel:Lcom/android/systemui/statusbar/phone/PanelView;
.field mSettingsPanelDragzoneFrac:F
.field mSettingsPanelDragzoneMin:F
.field private mShouldFade:Z
# direct methods
.method public constructor <init>(Landroid/content/Context;Landroid/util/AttributeSet;)V
.locals 7
.parameter "context"
.parameter "attrs"
.prologue
const/4 v3, 0x0
const/4 v6, 0x0
const/4 v2, 0x1
.line 47
invoke-direct {p0, p1, p2}, Lcom/android/systemui/statusbar/phone/PanelBar;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;)V
.line 41
iput-object v3, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->mFadingPanel:Lcom/android/systemui/statusbar/phone/PanelView;
.line 42
iput-object v3, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->mLastFullyOpenedPanel:Lcom/android/systemui/statusbar/phone/PanelView;
.line 49
invoke-virtual {p0}, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->getContext()Landroid/content/Context;
move-result-object v3
invoke-virtual {v3}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;
move-result-object v1
.line 50
.local v1, res:Landroid/content/res/Resources;
const v3, 0x7f0a0003
invoke-virtual {v1, v3}, Landroid/content/res/Resources;->getColor(I)I
move-result v3
iput v3, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->mScrimColor:I
.line 51
const v3, 0x7f0e003c
invoke-virtual {v1, v3}, Landroid/content/res/Resources;->getDimension(I)F
move-result v3
iput v3, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->mSettingsPanelDragzoneMin:F
.line 53
const v3, 0x7f0e003b
const/4 v4, 0x1
const/4 v5, 0x1
:try_start_0
invoke-virtual {v1, v3, v4, v5}, Landroid/content/res/Resources;->getFraction(III)F
move-result v3
iput v3, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->mSettingsPanelDragzoneFrac:F
:try_end_0
.catch Landroid/content/res/Resources$NotFoundException; {:try_start_0 .. :try_end_0} :catch_0
.line 57
:goto_0
iget v3, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->mSettingsPanelDragzoneFrac:F
cmpg-float v3, v3, v6
if-gtz v3, :cond_0
:goto_1
iput-boolean v2, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->mFullWidthNotifications:Z
.line 58
return-void
.line 54
:catch_0
move-exception v0
.line 55
.local v0, ex:Landroid/content/res/Resources$NotFoundException;
iput v6, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->mSettingsPanelDragzoneFrac:F
goto :goto_0
.line 57
.end local v0 #ex:Landroid/content/res/Resources$NotFoundException;
:cond_0
const/4 v2, 0x0
goto :goto_1
.end method
# virtual methods
.method public addPanel(Lcom/android/systemui/statusbar/phone/PanelView;)V
.locals 2
.parameter "pv"
.prologue
.line 77
invoke-super {p0, p1}, Lcom/android/systemui/statusbar/phone/PanelBar;->addPanel(Lcom/android/systemui/statusbar/phone/PanelView;)V
.line 78
invoke-virtual {p1}, Lcom/android/systemui/statusbar/phone/PanelView;->getId()I
move-result v0
const v1, 0x7f090042
if-ne v0, v1, :cond_1
.line 79
iput-object p1, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->mNotificationPanel:Lcom/android/systemui/statusbar/phone/PanelView;
.line 83
:cond_0
:goto_0
iget-boolean v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->mFullWidthNotifications:Z
if-nez v0, :cond_2
const/4 v0, 0x1
:goto_1
invoke-virtual {p1, v0}, Lcom/android/systemui/statusbar/phone/PanelView;->setRubberbandingEnabled(Z)V
.line 84
return-void
.line 80
:cond_1
invoke-virtual {p1}, Lcom/android/systemui/statusbar/phone/PanelView;->getId()I
move-result v0
const v1, 0x7f090071
if-ne v0, v1, :cond_0
.line 81
iput-object p1, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->mSettingsPanel:Lcom/android/systemui/statusbar/phone/PanelView;
goto :goto_0
.line 83
:cond_2
const/4 v0, 0x0
goto :goto_1
.end method
.method public hasFullWidthNotifications()Z
.locals 1
.prologue
.line 65
iget-boolean v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->mFullWidthNotifications:Z
return v0
.end method
.method public onAllPanelsCollapsed()V
.locals 2
.prologue
const/4 v1, 0x0
.line 156
invoke-super {p0}, Lcom/android/systemui/statusbar/phone/PanelBar;->onAllPanelsCollapsed()V
.line 158
iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->mBar:Lcom/android/systemui/statusbar/phone/PhoneStatusBar;
invoke-virtual {v0}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->makeExpandedInvisibleSoon()V
.line 159
iput-object v1, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->mFadingPanel:Lcom/android/systemui/statusbar/phone/PanelView;
.line 160
iput-object v1, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->mLastFullyOpenedPanel:Lcom/android/systemui/statusbar/phone/PanelView;
.line 161
return-void
.end method
.method public onAttachedToWindow()V
.locals 3
.prologue
.line 70
iget-object v2, p0, Lcom/android/systemui/statusbar/phone/PanelBar;->mPanels:Ljava/util/ArrayList;
invoke-virtual {v2}, Ljava/util/ArrayList;->iterator()Ljava/util/Iterator;
move-result-object v0
.local v0, i$:Ljava/util/Iterator;
:goto_0
invoke-interface {v0}, Ljava/util/Iterator;->hasNext()Z
move-result v2
if-eqz v2, :cond_1
invoke-interface {v0}, Ljava/util/Iterator;->next()Ljava/lang/Object;
move-result-object v1
check-cast v1, Lcom/android/systemui/statusbar/phone/PanelView;
.line 71
.local v1, pv:Lcom/android/systemui/statusbar/phone/PanelView;
iget-boolean v2, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->mFullWidthNotifications:Z
if-nez v2, :cond_0
const/4 v2, 0x1
:goto_1
invoke-virtual {v1, v2}, Lcom/android/systemui/statusbar/phone/PanelView;->setRubberbandingEnabled(Z)V
goto :goto_0
:cond_0
const/4 v2, 0x0
goto :goto_1
.line 73
.end local v1 #pv:Lcom/android/systemui/statusbar/phone/PanelView;
:cond_1
return-void
.end method
.method public onInterceptTouchEvent(Landroid/view/MotionEvent;)Z
.locals 1
.parameter "event"
.prologue
.line 181
iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->mBar:Lcom/android/systemui/statusbar/phone/PhoneStatusBar;
invoke-virtual {v0, p1}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->interceptTouchEvent(Landroid/view/MotionEvent;)Z
move-result v0
if-nez v0, :cond_0
invoke-super {p0, p1}, Lcom/android/systemui/statusbar/phone/PanelBar;->onInterceptTouchEvent(Landroid/view/MotionEvent;)Z
move-result v0
if-eqz v0, :cond_1
:cond_0
const/4 v0, 0x1
:goto_0
return v0
:cond_1
const/4 v0, 0x0
goto :goto_0
.end method
.method public onPanelFullyOpened(Lcom/android/systemui/statusbar/phone/PanelView;)V
.locals 1
.parameter "openPanel"
.prologue
.line 165
invoke-super {p0, p1}, Lcom/android/systemui/statusbar/phone/PanelBar;->onPanelFullyOpened(Lcom/android/systemui/statusbar/phone/PanelView;)V
.line 166
iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->mLastFullyOpenedPanel:Lcom/android/systemui/statusbar/phone/PanelView;
if-eq p1, v0, :cond_0
.line 167
const/16 v0, 0x20
invoke-virtual {p1, v0}, Lcom/android/systemui/statusbar/phone/PanelView;->sendAccessibilityEvent(I)V
.line 169
:cond_0
iput-object p1, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->mFadingPanel:Lcom/android/systemui/statusbar/phone/PanelView;
.line 170
iput-object p1, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->mLastFullyOpenedPanel:Lcom/android/systemui/statusbar/phone/PanelView;
.line 171
const/4 v0, 0x1
iput-boolean v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->mShouldFade:Z
.line 172
return-void
.end method
.method public onPanelPeeked()V
.locals 2
.prologue
.line 138
invoke-super {p0}, Lcom/android/systemui/statusbar/phone/PanelBar;->onPanelPeeked()V
.line 139
iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->mBar:Lcom/android/systemui/statusbar/phone/PhoneStatusBar;
const/4 v1, 0x1
invoke-virtual {v0, v1}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->makeExpandedVisible(Z)V
.line 140
return-void
.end method
.method public onRequestSendAccessibilityEvent(Landroid/view/View;Landroid/view/accessibility/AccessibilityEvent;)Z
.locals 2
.parameter "child"
.parameter "event"
.prologue
.line 93
invoke-super {p0, p1, p2}, Lcom/android/systemui/statusbar/phone/PanelBar;->onRequestSendAccessibilityEvent(Landroid/view/View;Landroid/view/accessibility/AccessibilityEvent;)Z
move-result v1
if-eqz v1, :cond_0
.line 97
invoke-static {}, Landroid/view/accessibility/AccessibilityEvent;->obtain()Landroid/view/accessibility/AccessibilityEvent;
move-result-object v0
.line 98
.local v0, record:Landroid/view/accessibility/AccessibilityEvent;
invoke-virtual {p0, v0}, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->onInitializeAccessibilityEvent(Landroid/view/accessibility/AccessibilityEvent;)V
.line 99
invoke-virtual {p0, v0}, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->dispatchPopulateAccessibilityEvent(Landroid/view/accessibility/AccessibilityEvent;)Z
.line 100
invoke-virtual {p2, v0}, Landroid/view/accessibility/AccessibilityEvent;->appendRecord(Landroid/view/accessibility/AccessibilityRecord;)V
.line 101
const/4 v1, 0x1
.line 103
.end local v0 #record:Landroid/view/accessibility/AccessibilityEvent;
:goto_0
return v1
:cond_0
const/4 v1, 0x0
goto :goto_0
.end method
.method public onTouchEvent(Landroid/view/MotionEvent;)Z
.locals 1
.parameter "event"
.prologue
.line 176
iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->mBar:Lcom/android/systemui/statusbar/phone/PhoneStatusBar;
invoke-virtual {v0, p1}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->interceptTouchEvent(Landroid/view/MotionEvent;)Z
move-result v0
if-nez v0, :cond_0
invoke-super {p0, p1}, Lcom/android/systemui/statusbar/phone/PanelBar;->onTouchEvent(Landroid/view/MotionEvent;)Z
move-result v0
if-eqz v0, :cond_1
:cond_0
const/4 v0, 0x1
:goto_0
return v0
:cond_1
const/4 v0, 0x0
goto :goto_0
.end method
.method public panelExpansionChanged(Lcom/android/systemui/statusbar/phone/PanelView;F)V
.locals 17
.parameter "panel"
.parameter "frac"
.prologue
.line 186
invoke-super/range {p0 .. p2}, Lcom/android/systemui/statusbar/phone/PanelBar;->panelExpansionChanged(Lcom/android/systemui/statusbar/phone/PanelView;F)V
.line 192
move-object/from16 v0, p0
iget-object v5, v0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->mFadingPanel:Lcom/android/systemui/statusbar/phone/PanelView;
move-object/from16 v0, p1
if-ne v0, v5, :cond_0
move-object/from16 v0, p0
iget v5, v0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->mScrimColor:I
if-eqz v5, :cond_0
invoke-static {}, Landroid/app/ActivityManager;->isHighEndGfx()Z
move-result v5
if-eqz v5, :cond_0
.line 193
move-object/from16 v0, p0
iget-boolean v5, v0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->mShouldFade:Z
if-eqz v5, :cond_0
.line 194
move-object/from16 v0, p0
iget v0, v0, Lcom/android/systemui/statusbar/phone/PanelBar;->mPanelExpandedFractionSum:F
move/from16 p2, v0
.line 196
const v5, 0x3f99999a
mul-float v5, v5, p2
const v6, 0x3e4ccccd
sub-float p2, v5, v6
.line 197
const/4 v5, 0x0
cmpg-float v5, p2, v5
if-gtz v5, :cond_3
.line 215
:cond_0
:goto_0
move-object/from16 v0, p0
iget-object v5, v0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->mBar:Lcom/android/systemui/statusbar/phone/PhoneStatusBar;
invoke-virtual {v5}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->getStatusBarHeight()I
move-result v1
.line 216
.local v1, H:I
invoke-virtual/range {p1 .. p1}, Lcom/android/systemui/statusbar/phone/PanelView;->getExpandedHeight()F
move-result v5
invoke-virtual/range {p1 .. p1}, Lcom/android/systemui/statusbar/phone/PanelView;->getPaddingBottom()I
move-result v6
int-to-float v6, v6
add-float v4, v5, v6
.line 217
.local v4, ph:F
const/high16 v2, 0x3f80
.line 218
.local v2, alpha:F
mul-int/lit8 v5, v1, 0x2
int-to-float v5, v5
cmpg-float v5, v4, v5
if-gez v5, :cond_1
.line 219
int-to-float v5, v1
cmpg-float v5, v4, v5
if-gez v5, :cond_4
const/4 v2, 0x0
.line 221
:goto_1
mul-float/2addr v2, v2
.line 223
:cond_1
invoke-virtual/range {p1 .. p1}, Lcom/android/systemui/statusbar/phone/PanelView;->getAlpha()F
move-result v5
cmpl-float v5, v5, v2
if-eqz v5, :cond_2
.line 224
move-object/from16 v0, p1
invoke-virtual {v0, v2}, Lcom/android/systemui/statusbar/phone/PanelView;->setAlpha(F)V
.line 227
:cond_2
move-object/from16 v0, p0
iget-object v5, v0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->mBar:Lcom/android/systemui/statusbar/phone/PhoneStatusBar;
const/4 v6, 0x0
invoke-virtual {v5, v6}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->updateCarrierLabelVisibility(Z)V
.line 228
return-void
.line 203
.end local v1 #H:I
.end local v2 #alpha:F
.end local v4 #ph:F
:cond_3
const-wide/high16 v5, 0x3ff0
const-wide/high16 v7, 0x3fe0
const-wide/high16 v9, 0x3ff0
const-wide v11, 0x400921fa00000000L
const/high16 v13, 0x3f80
sub-float v13, v13, p2
float-to-double v13, v13
const-wide/high16 v15, 0x4000
invoke-static/range {v13 .. v16}, Ljava/lang/Math;->pow(DD)D
move-result-wide v13
mul-double/2addr v11, v13
invoke-static {v11, v12}, Ljava/lang/Math;->cos(D)D
move-result-wide v11
sub-double/2addr v9, v11
mul-double/2addr v7, v9
sub-double/2addr v5, v7
double-to-float v3, v5
.line 205
.local v3, k:F
move-object/from16 v0, p0
iget v5, v0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->mScrimColor:I
ushr-int/lit8 v5, v5, 0x18
int-to-float v5, v5
mul-float/2addr v5, v3
float-to-int v5, v5
shl-int/lit8 v5, v5, 0x18
move-object/from16 v0, p0
iget v6, v0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->mScrimColor:I
const v7, 0xffffff
and-int/2addr v6, v7
or-int/2addr v5, v6
goto :goto_0
.line 220
.end local v3 #k:F
.restart local v1 #H:I
.restart local v2 #alpha:F
.restart local v4 #ph:F
:cond_4
int-to-float v5, v1
sub-float v5, v4, v5
int-to-float v6, v1
div-float v2, v5, v6
goto :goto_1
.end method
.method public panelsEnabled()Z
.locals 2
.prologue
.line 88
iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->mBar:Lcom/android/systemui/statusbar/phone/PhoneStatusBar;
iget v0, v0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mDisabled:I
const/high16 v1, 0x1
and-int/2addr v0, v1
if-nez v0, :cond_0
const/4 v0, 0x1
:goto_0
return v0
:cond_0
const/4 v0, 0x0
goto :goto_0
.end method
.method public selectPanelForTouch(Landroid/view/MotionEvent;)Lcom/android/systemui/statusbar/phone/PanelView;
.locals 6
.parameter "touch"
.prologue
const/4 v4, 0x0
.line 108
invoke-virtual {p1}, Landroid/view/MotionEvent;->getX()F
move-result v2
.line 110
.local v2, x:F
iget-boolean v3, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->mFullWidthNotifications:Z
if-eqz v3, :cond_2
.line 112
iget-object v3, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->mSettingsPanel:Lcom/android/systemui/statusbar/phone/PanelView;
if-nez v3, :cond_0
move v3, v4
:goto_0
iget-object v5, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->mNotificationPanel:Lcom/android/systemui/statusbar/phone/PanelView;
invoke-virtual {v5}, Lcom/android/systemui/statusbar/phone/PanelView;->getExpandedHeight()F
move-result v5
add-float/2addr v3, v5
cmpl-float v3, v3, v4
if-lez v3, :cond_1
const/4 v3, 0x0
.line 133
:goto_1
return-object v3
.line 112
:cond_0
iget-object v3, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->mSettingsPanel:Lcom/android/systemui/statusbar/phone/PanelView;
invoke-virtual {v3}, Lcom/android/systemui/statusbar/phone/PanelView;->getExpandedHeight()F
move-result v3
goto :goto_0
:cond_1
iget-object v3, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->mNotificationPanel:Lcom/android/systemui/statusbar/phone/PanelView;
goto :goto_1
.line 122
:cond_2
invoke-virtual {p0}, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->getMeasuredWidth()I
move-result v3
int-to-float v1, v3
.line 123
.local v1, w:F
iget v3, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->mSettingsPanelDragzoneFrac:F
mul-float v0, v1, v3
.line 131
.local v0, region:F
iget v3, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->mSettingsPanelDragzoneMin:F
cmpg-float v3, v0, v3
if-gez v3, :cond_3
iget v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->mSettingsPanelDragzoneMin:F
.line 133
:cond_3
sub-float v3, v1, v2
cmpg-float v3, v3, v0
if-gez v3, :cond_4
iget-object v3, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->mSettingsPanel:Lcom/android/systemui/statusbar/phone/PanelView;
goto :goto_1
:cond_4
iget-object v3, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->mNotificationPanel:Lcom/android/systemui/statusbar/phone/PanelView;
goto :goto_1
.end method
.method public setBar(Lcom/android/systemui/statusbar/phone/PhoneStatusBar;)V
.locals 0
.parameter "bar"
.prologue
.line 61
iput-object p1, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->mBar:Lcom/android/systemui/statusbar/phone/PhoneStatusBar;
.line 62
return-void
.end method
.method public startOpeningPanel(Lcom/android/systemui/statusbar/phone/PanelView;)V
.locals 1
.parameter "panel"
.prologue
.line 144
invoke-super {p0, p1}, Lcom/android/systemui/statusbar/phone/PanelBar;->startOpeningPanel(Lcom/android/systemui/statusbar/phone/PanelView;)V
.line 147
iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->mFadingPanel:Lcom/android/systemui/statusbar/phone/PanelView;
if-eqz v0, :cond_0
iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->mFadingPanel:Lcom/android/systemui/statusbar/phone/PanelView;
invoke-virtual {v0}, Lcom/android/systemui/statusbar/phone/PanelView;->isFullyExpanded()Z
move-result v0
if-eqz v0, :cond_1
:cond_0
const/4 v0, 0x1
:goto_0
iput-boolean v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->mShouldFade:Z
.line 151
iput-object p1, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->mFadingPanel:Lcom/android/systemui/statusbar/phone/PanelView;
.line 152
return-void
.line 147
:cond_1
const/4 v0, 0x0
goto :goto_0
.end method
BOOTMGR said:
Double Tap Statusbar to Sleep
In the spirit of open source, i would like to share my HarshJelly ROM's new feature backported from CM11.
What it does : Double tap statusbar anywhere to sleep device.
Requirements :
SystemUI.apk
Apktool
Notepad++
And yeah a big thanks goes to CyanogenMod Team...
I tested this on Touchwiz JB 4.1.2 but it should work on any device with 4.1.2 or any device > 4.1 with some modification (if necessary)...
If you found any error then report here along with FULL LOG. I'll ignore posts without logs.
Click to expand...
Click to collapse
will this work on stock roms?
yeshwanthvshenoy said:
will this work on stock roms?
Click to expand...
Click to collapse
If you read whole post you will find this at the end:
"I tested this on Touchwiz JB 4.1.2 but it should work on any device with 4.1.2 or any device > 4.1 with some modification (if necessary)..."
shut_down said:
If you read whole post you will find this at the end:
"I tested this on Touchwiz JB 4.1.2 but it should work on any device with 4.1.2 or any device > 4.1 with some modification (if necessary)..."
Click to expand...
Click to collapse
had this doubt thatz why asked coz some stock roms dont support this feature
BOOTMGR said:
Double Tap Statusbar to Sleep
In the spirit of open source, i would like to share my HarshJelly ROM's new feature backported from CM11.
What it does : Double tap statusbar anywhere to sleep device.
Requirements :
SystemUI.apk
Apktool
Notepad++
And yeah a big thanks goes to CyanogenMod Team...
I tested this on Touchwiz JB 4.1.2 but it should work on any device with 4.1.2 or any device > 4.1 with some modification (if necessary)...
If you found any error then report here along with FULL LOG. I'll ignore posts without logs.
Click to expand...
Click to collapse
Sir can you help me im using a dual sim phone and it has no phonestatusbarview.smali and I already have phonestatusbarview1.smali
Hope you can help me in this mod thank you sir
shazzl said:
i try this on 4.2.2 rom. it original have the PhoneStatusBarView$1.smali can u help me...
Code:
.class Lcom/android/systemui/statusbar/phone/PhoneStatusBarView$1;
.super Landroid/content/BroadcastReceiver;
.source "PhoneStatusBarView.java"
# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
value = Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;
.end annotation
.annotation system Ldalvik/annotation/InnerClass;
accessFlags = 0x0
name = null
.end annotation
# instance fields
.field final synthetic this$0:Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;
# direct methods
.method constructor <init>(Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;)V
.locals 0
.parameter
.prologue
.line 120
iput-object p1, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView$1;->this$0:Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;
invoke-direct {p0}, Landroid/content/BroadcastReceiver;-><init>()V
return-void
.end method
# virtual methods
[COLOR="Red"].method public onDoubleTap(Landroid/view/MotionEvent;)Z
.locals 3
.parameter "e"
.prologue
.line 24
sget-object v1, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->c:Landroid/content/Context;
const-string v2, "power"
invoke-virtual {v1, v2}, Landroid/content/Context;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;
move-result-object v0
check-cast v0, Landroid/os/PowerManager;
.line 119
.local v0, pm:Landroid/os/PowerManager;
.line 120
if-eqz v0, :cond_0
.line 121
invoke-virtual {p1}, Landroid/view/MotionEvent;->getEventTime()J
move-result-wide v1
invoke-virtual {v0, v1, v2}, Landroid/os/PowerManager;->goToSleep(J)V
.line 122
:cond_0
const/4 v1, 0x1
return v1
.end method[/COLOR]
.method public onReceive(Landroid/content/Context;Landroid/content/Intent;)V
.locals 8
.parameter "context"
.parameter "intent"
.prologue
const/4 v7, 0x1
const/4 v3, 0x0
.line 123
invoke-virtual {p2}, Landroid/content/Intent;->getAction()Ljava/lang/String;
move-result-object v0
.line 124
.local v0, action:Ljava/lang/String;
const-string v2, "com.samsung.cover.OPEN"
invoke-virtual {v0, v2}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v2
if-eqz v2, :cond_0
.line 125
const-string v2, "coverOpen"
invoke-virtual {p2, v2, v3}, Landroid/content/Intent;->getBooleanExtra(Ljava/lang/String;Z)Z
move-result v2
if-ne v7, v2, :cond_1
.line 126
iget-object v2, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView$1;->this$0:Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;
#setter for: Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->mClearCoverMargin:I
invoke-static {v2, v3}, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->access$002(Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;I)I
.line 127
const-string v2, "PhoneStatusBarView"
new-instance v3, Ljava/lang/StringBuilder;
invoke-direct {v3}, Ljava/lang/StringBuilder;-><init>()V
const-string v4, "clear cover opened : "
invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v3
iget-object v4, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView$1;->this$0:Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;
#getter for: Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->mClearCoverMargin:I
invoke-static {v4}, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->access$000(Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;)I
move-result v4
invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
move-result-object v3
invoke-virtual {v3}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v3
invoke-static {v2, v3}, Landroid/util/Slog;->d(Ljava/lang/String;Ljava/lang/String;)I
.line 128
iget-object v2, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView$1;->this$0:Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;
iget-object v2, v2, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->mTicker:Landroid/view/ViewGroup;
iget-object v3, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView$1;->this$0:Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;
#getter for: Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->mTickerPaddingLeft:I
invoke-static {v3}, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->access$100(Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;)I
move-result v3
iget-object v4, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView$1;->this$0:Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;
#getter for: Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->mClearCoverMargin:I
invoke-static {v4}, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->access$000(Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;)I
move-result v4
add-int/2addr v3, v4
iget-object v4, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView$1;->this$0:Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;
#getter for: Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->mTickerPaddingTop:I
invoke-static {v4}, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->access$200(Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;)I
move-result v4
iget-object v5, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView$1;->this$0:Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;
#getter for: Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->mTickerPaddingRight:I
invoke-static {v5}, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->access$300(Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;)I
move-result v5
iget-object v6, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView$1;->this$0:Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;
#getter for: Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->mClearCoverMargin:I
invoke-static {v6}, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->access$000(Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;)I
move-result v6
add-int/2addr v5, v6
iget-object v6, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView$1;->this$0:Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;
#getter for: Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->mTickerPaddingBottom:I
invoke-static {v6}, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->access$400(Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;)I
move-result v6
invoke-virtual {v2, v3, v4, v5, v6}, Landroid/view/ViewGroup;->setPadding(IIII)V
.line 134
iget-object v2, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView$1;->this$0:Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;
iget-object v2, v2, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->mBar:Lcom/android/systemui/statusbar/phone/PhoneStatusBar;
invoke-virtual {v2, v7}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->showClockByClearCover(Z)V
.line 135
iget-object v2, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView$1;->this$0:Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;
iget-object v2, v2, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->mBlackBGView:Landroid/view/View;
const/16 v3, 0x8
invoke-virtual {v2, v3}, Landroid/view/View;->setVisibility(I)V
.line 137
iget-object v2, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView$1;->this$0:Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;
invoke-virtual {v2}, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->marqueeStatusBar()V
.line 162
:cond_0
:goto_0
return-void
.line 139
:cond_1
iget-object v2, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView$1;->this$0:Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;
iget-object v3, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView$1;->this$0:Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;
#getter for: Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->mIndent1:I
invoke-static {v3}, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->access$500(Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;)I
move-result v3
mul-int/lit8 v3, v3, 0x11
#setter for: Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->mClearCoverMargin:I
invoke-static {v2, v3}, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->access$002(Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;I)I
.line 140
new-instance v1, Landroid/os/Handler;
invoke-direct {v1}, Landroid/os/Handler;-><init>()V
.line 141
.local v1, mHandler:Landroid/os/Handler;
new-instance v2, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView$1$1;
invoke-direct {v2, p0}, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView$1$1;-><init>(Lcom/android/systemui/statusbar/phone/PhoneStatusBarView$1;)V
const-wide/16 v3, 0xaa
invoke-virtual {v1, v2, v3, v4}, Landroid/os/Handler;->postDelayed(Ljava/lang/Runnable;J)Z
goto :goto_0
.end method
Now after invoke-direct {p0, p1, p2}, Landroid/widget/FrameLayout;-><init>(Landroid/content/Context;Landroid/util/AttributeSetV add following code i cant fine it, can you show where shukd chuld it edit it
Click to expand...
Click to collapse
Hi sir i have the same problm w/ u Im also using 4.2 and i have already phone status view 1 up to 34 .smali what did you do can you help me? hmmm
Does this still work, or is there any updated guide?
shwise said:
Does this still work, or is there any updated guide?
Click to expand...
Click to collapse
It works (at least on my i9070 running Samsung's 4.1.2 firmware).
I added this to my ROM (about a week ago) and it works just like it should.
There is an alternate guide for this too, but I never tried it..
In case you're interested, here's a link to it.
is there any easiest way to install double tap status bar to sleep for JB 4.1.2
masud0869 said:
is there any easiest way to install double tap status bar to sleep for JB 4.1.2
Click to expand...
Click to collapse
Yes. There is.
You can install this Xposed Module: http://forum.xda-developers.com/xposed/modules/mod-doubletaptosleep-v1-0-t2667177
The only requirement is that you need to have Xposed Installer installed on your phone.
Sami Kabir said:
Yes. There is.
You can install this Xposed Module: http://forum.xda-developers.com/xposed/modules/mod-doubletaptosleep-v1-0-t2667177
The only requirement is that you need to have Xposed Installer installed on your phone.
Click to expand...
Click to collapse
Is there required root first?
GUIDE Disable Signature CM12.1 - CM13
Work and Tested - CM 12.1 & CM 13 Based
What's / Why signature verification?The system always checks for different signatures for system apps and if they dont match the app doesnt get installed.
So if you try to make changes to Android Manifest and sign it it will not work untill you sign the whole rom with the same signature.
It's pretty annoying! If you are a modding this will help you too, you will be easily able to replace system apps from other roms without any problems
Unless they dont require something (lib's , png's from framework).
I think every rom maker should do it in their rom,so its a bit more easy to modify
Let's Do It
Decompile Services.jar
GO To smali/com/android/server/pm/PackageManagerService.smali
Find method :
PHP:
.method static compareSignatures([Landroid/content/pm/Signature;[Landroid/content/pm/Signature;)I
.locals 11
.param p0, "s1" # [Landroid/content/pm/Signature;
.param p1, "s2" # [Landroid/content/pm/Signature;
.prologue
const/4 v6, 0x1
const/4 v8, -0x3
const/4 v7, 0x0
.line 2985
if-nez p0, :cond_1
.line 2986
if-nez p1, :cond_0
.line 3018
:goto_0
return v6
.line 2986
:cond_0
const/4 v6, -0x1
goto :goto_0
.line 2991
:cond_1
if-nez p1, :cond_2
.line 2992
const/4 v6, -0x2
goto :goto_0
.line 2995
:cond_2
array-length v9, p0
array-length v10, p1
if-eq v9, v10, :cond_3
move v6, v8
.line 2996
goto :goto_0
.line 3000
:cond_3
array-length v9, p0
if-ne v9, v6, :cond_5
.line 3001
aget-object v6, p0, v7
aget-object v9, p1, v7
invoke-virtual {v6, v9}, Landroid/content/pm/Signature;->equals(Ljava/lang/Object;)Z
move-result v6
if-eqz v6, :cond_4
move v6, v7
goto :goto_0
:cond_4
move v6, v8
goto :goto_0
.line 3006
:cond_5
new-instance v3, Landroid/util/ArraySet;
invoke-direct {v3}, Landroid/util/ArraySet;-><init>()V
.line 3007
.local v3, "set1":Landroid/util/ArraySet;, "Landroid/util/ArraySet<Landroid/content/pm/Signature;>;"
move-object v0, p0
.local v0, "arr$":[Landroid/content/pm/Signature;
array-length v2, v0
.local v2, "len$":I
const/4 v1, 0x0
.local v1, "i$":I
:goto_1
if-ge v1, v2, :cond_6
aget-object v5, v0, v1
.line 3008
.local v5, "sig":Landroid/content/pm/Signature;
invoke-virtual {v3, v5}, Landroid/util/ArraySet;->add(Ljava/lang/Object;)Z
.line 3007
add-int/lit8 v1, v1, 0x1
goto :goto_1
.line 3010
.end local v5 # "sig":Landroid/content/pm/Signature;
:cond_6
new-instance v4, Landroid/util/ArraySet;
invoke-direct {v4}, Landroid/util/ArraySet;-><init>()V
.line 3011
.local v4, "set2":Landroid/util/ArraySet;, "Landroid/util/ArraySet<Landroid/content/pm/Signature;>;"
move-object v0, p1
array-length v2, v0
const/4 v1, 0x0
:goto_2
if-ge v1, v2, :cond_7
aget-object v5, v0, v1
.line 3012
.restart local v5 # "sig":Landroid/content/pm/Signature;
invoke-virtual {v4, v5}, Landroid/util/ArraySet;->add(Ljava/lang/Object;)Z
.line 3011
add-int/lit8 v1, v1, 0x1
goto :goto_2
.line 3015
.end local v5 # "sig":Landroid/content/pm/Signature;
:cond_7
invoke-virtual {v3, v4}, Landroid/util/ArraySet;->equals(Ljava/lang/Object;)Z
move-result v6
if-eqz v6, :cond_8
move v6, v7
.line 3016
goto :goto_0
:cond_8
move v6, v8
.line 3018
goto :goto_0
.end method
Replace With
PHP:
.method static compareSignatures([Landroid/content/pm/Signature;[Landroid/content/pm/Signature;)I
.locals 11
.param p0, "s1" # [Landroid/content/pm/Signature;
.param p1, "s2" # [Landroid/content/pm/Signature;
.prologue
const/4 v7, 0x0
.line 3018
return v7
.end method
Search To Find Line Below:
PHP:
invoke-static {v4, v0}, Lcom/android/server/pm/PackageManagerService;->compareSignatures([Landroid/content/pm/Signature;[Landroid/content/pm/Signature;)I
move-result v4
if-nez v4, :cond_c
.line 5696
new-instance v4, Lcom/android/server/pm/PackageManagerException;
const/16 v5, -0x13
const-string v11, "Cannot install platform packages to user storage!"
invoke-direct {v4, v5, v11}, Lcom/android/server/pm/PackageManagerException;-><init>(ILjava/lang/String;)V
throw v4
Change (if-nez v4) To (if-eqz v4)
Will be like this :
PHP:
invoke-static {v4, v0}, Lcom/android/server/pm/PackageManagerService;->compareSignatures([Landroid/content/pm/Signature;[Landroid/content/pm/Signature;)I
move-result v4
if-eqz v4, :cond_c
.line 5696
new-instance v4, Lcom/android/server/pm/PackageManagerException;
const/16 v5, -0x13
const-string v11, "Cannot install platform packages to user storage!"
invoke-direct {v4, v5, v11}, Lcom/android/server/pm/PackageManagerException;-><init>(ILjava/lang/String;)V
throw v4
Credit For Guide : Abdullah Ba'agil ( Thanks To Him )
Decompil Services.jar
Go into smali\com\android\server\pm\PackageManagerService. smali
Search for :
Code:
.method static compareSignatures([Landroid/content/pm/Signature;[Landroid/content/pm/Signature;)I
.locals 8
.param p0, "s1" # [Landroid/content/pm/Signature;
.param p1, "s2" # [Landroid/content/pm/Signature;
.prologue
const/4 v3, 0x1
const/4 v5, -0x3
const/4 v4, 0x0
.line 4751
if-nez p0, :cond_1
.line 4752
if-nez p1, :cond_0
:goto_0
return v3
.line 4754
:cond_0
const/4 v3, -0x1
goto :goto_0
.line 4757
:cond_1
if-nez p1, :cond_2
.line 4758
const/4 v3, -0x2
return v3
.line 4761
:cond_2
array-length v6, p0
array-length v7, p1
if-eq v6, v7, :cond_3
.line 4762
return v5
.line 4766
:cond_3
array-length v6, p0
if-ne v6, v3, :cond_5
.line 4767
aget-object v3, p0, v4
aget-object v6, p1, v4
invoke-virtual {v3, v6}, Landroid/content/pm/Signature;->equals(Ljava/lang/Object;)Z
move-result v3
if-eqz v3, :cond_4
move v3, v4
:goto_1
return v3
:cond_4
move v3, v5
.line 4769
goto :goto_1
.line 4772
:cond_5
new-instance v0, Landroid/util/ArraySet;
invoke-direct {v0}, Landroid/util/ArraySet;-><init>()V
.line 4773
.local v0, "set1":Landroid/util/ArraySet;, "Landroid/util/ArraySet<Landroid/content/pm/Signature;>;"
array-length v6, p0
move v3, v4
:goto_2
if-ge v3, v6, :cond_6
aget-object v2, p0, v3
.line 4774
.local v2, "sig":Landroid/content/pm/Signature;
invoke-virtual {v0, v2}, Landroid/util/ArraySet;->add(Ljava/lang/Object;)Z
.line 4773
add-int/lit8 v3, v3, 0x1
goto :goto_2
.line 4776
.end local v2 # "sig":Landroid/content/pm/Signature;
:cond_6
new-instance v1, Landroid/util/ArraySet;
invoke-direct {v1}, Landroid/util/ArraySet;-><init>()V
.line 4777
.local v1, "set2":Landroid/util/ArraySet;, "Landroid/util/ArraySet<Landroid/content/pm/Signature;>;"
array-length v6, p1
move v3, v4
:goto_3
if-ge v3, v6, :cond_7
aget-object v2, p1, v3
.line 4778
.restart local v2 # "sig":Landroid/content/pm/Signature;
invoke-virtual {v1, v2}, Landroid/util/ArraySet;->add(Ljava/lang/Object;)Z
.line 4777
add-int/lit8 v3, v3, 0x1
goto :goto_3
.line 4781
.end local v2 # "sig":Landroid/content/pm/Signature;
:cond_7
invoke-virtual {v0, v1}, Landroid/util/ArraySet;->equals(Ljava/lang/Object;)Z
move-result v3
if-eqz v3, :cond_8
.line 4782
return v4
.line 4784
:cond_8
return v5
.end method
Replace:
Code:
.method static compareSignatures([Landroid/content/pm/Signature;[Landroid/content/pm/Signature;)I
.locals 8
.param p0, "s1" # [Landroid/content/pm/Signature;
.param p1, "s2" # [Landroid/content/pm/Signature;
.prologue
const/4 v4, 0x0
.line 4784
return v4
.end method
Recompile Services.jar
A2017G_B05_MOD