-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMalcomPreferenceActivity.java
More file actions
executable file
·55 lines (46 loc) · 1.87 KB
/
MalcomPreferenceActivity.java
File metadata and controls
executable file
·55 lines (46 loc) · 1.87 KB
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
package android.util.activitylifecyclecallbackscompat.app;
import android.app.Activity;
import android.os.Bundle;
import android.preference.PreferenceActivity;
import android.util.activitylifecyclecallbackscompat.MalcomApplicationHelper;
import android.util.activitylifecyclecallbackscompat.MalcomMainLifecycleDispatcher;
/**
* Extension of {@link Activity} that dispatches its life cycle calls to registered listeners.
*/
public class MalcomPreferenceActivity extends PreferenceActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
if (MalcomApplicationHelper.PRE_ICS) MalcomMainLifecycleDispatcher.get().onActivityCreated(this, savedInstanceState);
}
@Override
protected void onStart() {
super.onStart();
if (MalcomApplicationHelper.PRE_ICS) MalcomMainLifecycleDispatcher.get().onActivityStarted(this);
}
@Override
protected void onResume() {
super.onResume();
if (MalcomApplicationHelper.PRE_ICS) MalcomMainLifecycleDispatcher.get().onActivityResumed(this);
}
@Override
protected void onPause() {
super.onPause();
if (MalcomApplicationHelper.PRE_ICS) MalcomMainLifecycleDispatcher.get().onActivityPaused(this);
}
@Override
protected void onStop() {
super.onStop();
if (MalcomApplicationHelper.PRE_ICS) MalcomMainLifecycleDispatcher.get().onActivityStopped(this);
}
@Override
protected void onSaveInstanceState(Bundle outState) {
super.onSaveInstanceState(outState);
if (MalcomApplicationHelper.PRE_ICS) MalcomMainLifecycleDispatcher.get().onActivitySaveInstanceState(this, outState);
}
@Override
protected void onDestroy() {
super.onDestroy();
if (MalcomApplicationHelper.PRE_ICS) MalcomMainLifecycleDispatcher.get().onActivityDestroyed(this);
}
}