-
Notifications
You must be signed in to change notification settings - Fork 61
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix for crash in Android 4.4, also added saving the position of the s…
…tory list
- Loading branch information
1 parent
f832651
commit 888c8cf
Showing
6 changed files
with
100 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 24 additions & 0 deletions
24
out/production/HackerNews/com/android/vending/billing/IMarketBillingService.aidl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
/* | ||
* Copyright (C) 2010 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.vending.billing; | ||
|
||
import android.os.Bundle; | ||
|
||
interface IMarketBillingService { | ||
/** Given the arguments in bundle form, returns a bundle for results. */ | ||
Bundle sendBillingRequest(in Bundle bundle); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
package com.airlocksoftware.hackernews.data; | ||
|
||
import android.content.Context; | ||
import android.content.SharedPreferences; | ||
|
||
/** | ||
* TODO | ||
* | ||
* @author matthewbbishop | ||
*/ | ||
public class AppData { | ||
|
||
// State | ||
private Context mContext; | ||
private SharedPreferences mPrefs; | ||
private SharedPreferences.Editor mEditor; | ||
|
||
// Constants | ||
public static final String PREFS_NAME = AppData.class.getSimpleName() + ".data"; | ||
public static final String STORY_LIST_POSITION = AppData.class.getSimpleName() + ".story_list_position"; | ||
|
||
public AppData(Context context) { | ||
mContext = context; | ||
mPrefs = mContext.getSharedPreferences(PREFS_NAME, Context.MODE_PRIVATE); | ||
mEditor = mPrefs.edit(); | ||
} | ||
|
||
public void saveStoryListPosition(int position) { | ||
mEditor.putInt(STORY_LIST_POSITION, position); | ||
mEditor.commit(); | ||
} | ||
|
||
public int getStoryListPosition() { | ||
int position = mPrefs.getInt(STORY_LIST_POSITION, 0); | ||
return position; | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters