summaryrefslogtreecommitdiff
path: root/client/Piztor/src/com/macaroon/piztor/InitAct.java
blob: 4d2b6561f932f9239aaa357f117dd5c71861d844 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
package com.macaroon.piztor;

import android.os.Bundle;
import android.view.Menu;

public class InitAct extends PiztorAct {
	
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		id = "initAct";
		super.onCreate(savedInstanceState);
		AppMgr.init();
		AppMgr.transam.setTimeOutTime(5000);
		setContentView(R.layout.activity_init);
	}
	
	@Override
	protected void onStart() {
		super.onStart();
		if (UserInfo.token == null)
			AppMgr.trigger(AppMgr.noToken);
		else {
			//TODO jump to main
			AppMgr.trigger(AppMgr.hasToken);
		}
	}
	
	@Override
	protected void onDestroy() {
		super.onDestroy();
		//TODO 减少频率
		
	}

	@Override
	public boolean onCreateOptionsMenu(Menu menu) {
		getMenuInflater().inflate(R.menu.init, menu);
		return false;
	}

}