|
在系统/usr/palm/applications/com.palm.findapps/,即App Catalog所在目录中,app/controllers和utilities子目录中有一些.js文件,即程序的源代码,注意到有两个error.js文件,其中含有如下代码- case 'invalidtoken':
( n' A c0 f3 l% i4 E - // If we receive a bad authentication token we must inform the system
9 A% l6 A8 a5 R# H; c6 M - var self = this;
8 p- o& |6 s0 Y3 K/ n - Weave.Services.AccountServices.notifyAuthenticationFailure(function()! ?+ e: J7 y5 q+ C: ]) R9 V8 T ^
- {" r5 o7 K; Z+ D$ C9 ?
- self._selectError('badauth');. l/ P' ^5 Z/ [4 [: s
- });
# f0 N' H4 x. r1 g9 s5 C - break;
复制代码- deactivate: function()
: x5 p8 d7 q/ g+ w+ r- v+ D. i' L - {
3 o4 V. K% O) @+ @! T+ y" M V - this.controller.get('show_help').removeEventListener(Mojo.Event.tap, this._showHelp);- W. k/ T( D! ?; Z& J! U3 B
- },
复制代码- Utilities.Errors = , `5 q+ m! J4 d5 n/ L& h0 G8 T
- {0 z1 W( U' c" X
- displayErrorPage: function(scene, error)6 y! P, [! {6 X3 Q
- {
4 g% ]8 k' q% V+ E6 G) n5 C; d$ Z: @ - Mojo.Log.info("displayErrorPage", error);2 B$ q$ E. I. d
- if (error == "invalidtoken"); ^: Y& f9 g4 k( z
- {
% i6 G$ ~% w8 M8 }. J" B5 J - // If we receive a bad authentication token we must inform the system and popup a dialog (not pop to an error screen)
\2 |9 d) ]& V' W4 a - // Always felt the error screen was better.
4 E j; M. M9 p: e2 ^/ Y" C8 T - var self = this;* ~% c; N) M2 B- h
- Weave.Services.AccountServices.notifyAuthenticationFailure(function() p8 ]6 p. ?1 \6 [7 N
- {/ A: O& W7 \* W( w
- self.controller.showAlertDialog(. n5 ?2 Q9 S& @& n
- {$ G2 X/ q* t! _1 u% l1 F5 y
- onChoose: function() {},6 m+ W* z0 u" T( E% E A5 i
- title: $L('No Palm Profile'),
3 h/ G9 w: X: |1 Q - message: $L('You need an active Palm profile to use App Catalog.'),
3 I/ f, z. [, K- d( z0 F - choices:
+ \ @/ T [+ A4 ^ - [
9 ~7 ^# G& v& d5 ?8 {4 \9 J; t - { label: $L("OK"), value: true, type: 'dismiss' },: U) F: N& K. d9 `
- ]6 f0 I& K- q0 `3 n
- });4 R7 O# a; ~) J! r; ]! d% W' I' z
- });& `. w5 W, k8 s+ R- ^
- }
' R! G8 w0 u" a$ Y - else e% ^& N& }" [ q0 |1 a
- {
2 K7 k$ D t3 p; s - scene.controller.stageController.pushScene("error", error);
7 M) ]6 w" i9 P) z - }7 ^8 U W3 f7 }- ~$ K
- }9 e# v9 ~# N6 Y5 ~8 ]- ]9 s
- };
复制代码 很明显是在认证失败时对电话解除激活时使用的。如果屏蔽掉这些代码(以及我尚未找到的一些同功能代码),理论上就可以避免这种情况的发生。
7 v a; ?2 D3 ~& a$ E$ [" k3 r. Q& R3 d* c% E( E: w
我的Pre未写号,改MEID写号的xd们可以尝试这种修改。 |
评分
-
查看全部评分
|