Skip to content

Commit b0c3696

Browse files
committed
DeviceControl: back() is "up"
1 parent 0f919d7 commit b0c3696

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/oly/netpowerctrl/DeviceControl.java

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,15 @@ protected void onPause() {
116116
super.onPause();
117117
}
118118

119+
@Override
120+
public void onBackPressed() {
121+
// always go back to the main activity, or we may have to
122+
// traverse endless DeviceConfig Activities from widgets
123+
Intent it = new Intent(this, NetpowerctrlActivity.class);
124+
startActivity(it);
125+
super.onBackPressed();
126+
}
127+
119128
@SuppressLint("NewApi")
120129
@Override
121130
public boolean onCreateOptionsMenu(Menu menu) {

0 commit comments

Comments
 (0)