Skip to content

Commit

Permalink
switch to onStart/onStop
Browse files Browse the repository at this point in the history
  • Loading branch information
commonsguy committed Mar 20, 2017
1 parent 47ba2db commit 9094e36
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
Expand Up @@ -41,16 +41,16 @@ public void onCreate(Bundle savedInstanceState) {
} }


@Override @Override
public void onResume() { public void onStart() {
super.onResume(); super.onStart();


registerReceiver(onBatteryChanged, registerReceiver(onBatteryChanged,
new IntentFilter(Intent.ACTION_BATTERY_CHANGED)); new IntentFilter(Intent.ACTION_BATTERY_CHANGED));
} }


@Override @Override
public void onPause() { public void onStop() {
super.onPause(); super.onStop();


unregisterReceiver(onBatteryChanged); unregisterReceiver(onBatteryChanged);
} }
Expand Down
Expand Up @@ -35,15 +35,15 @@ protected void onCreate(Bundle savedInstanceState) {
} }


@Override @Override
public void onResume() { public void onStart() {
super.onResume(); super.onStart();
cm.addPrimaryClipChangedListener(this); cm.addPrimaryClipChangedListener(this);
} }


@Override @Override
public void onPause() { public void onStop() {
cm.removePrimaryClipChangedListener(this); cm.removePrimaryClipChangedListener(this);
super.onPause(); super.onStop();
} }


@Override @Override
Expand Down

0 comments on commit 9094e36

Please sign in to comment.