diff options
author | Treehugger Robot <treehugger-gerrit@google.com> | 2018-02-02 22:24:34 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2018-02-02 22:24:34 +0000 |
commit | 056c1911137caad554cdfebb5a0b4a03e3df8c53 (patch) | |
tree | 28107d07ea8259a86bd32b1e8d550daad35bfac1 /java/com/android/dialer/main/MainActivityPeer.java | |
parent | 7e5da60e990e153c8fd5ba4e146825bb8e9a2bd4 (diff) | |
parent | 3a398a5adf0feae1f6dafe629a6c7cc4a0a968b4 (diff) |
Merge "Split MainActivity into two peers, old and new to keep logic isolated."
Diffstat (limited to 'java/com/android/dialer/main/MainActivityPeer.java')
-rw-r--r-- | java/com/android/dialer/main/MainActivityPeer.java | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/java/com/android/dialer/main/MainActivityPeer.java b/java/com/android/dialer/main/MainActivityPeer.java new file mode 100644 index 000000000..6457b607b --- /dev/null +++ b/java/com/android/dialer/main/MainActivityPeer.java @@ -0,0 +1,44 @@ +/* + * Copyright (C) 2018 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License + */ + +package com.android.dialer.main; + +import android.content.Intent; +import android.os.Bundle; + +/** Interface for peers of MainActivity. */ +public interface MainActivityPeer { + + void onActivityCreate(Bundle saveInstanceState); + + void onActivityResume(); + + void onActivityStop(); + + void onNewIntent(Intent intent); + + void onActivityResult(int requestCode, int resultCode, Intent data); + + void onSaveInstanceState(Bundle bundle); + + boolean onBackPressed(); + + /** Supplies the MainActivityPeer */ + interface PeerSupplier { + + MainActivityPeer getPeer(); + } +} |